Date: Sat, 9 Jan 2016 18:03:10 +0000 (UTC) From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r293596 - stable/10/sys/compat/linux Message-ID: <201601091803.u09I3AdT071417@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dchagin Date: Sat Jan 9 18:03:09 2016 New Revision: 293596 URL: https://svnweb.freebsd.org/changeset/base/293596 Log: MFC r283496: The latest cp tool is trying to use the btrfs clone operation that is implemented via ioctl interface. First of all return ENOTSUP for this operation as a cp fallback to usual method in that case. Secondly, do not print out the message about unimplemented operation. Modified: stable/10/sys/compat/linux/linux_ioctl.c stable/10/sys/compat/linux/linux_ioctl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/linux/linux_ioctl.c ============================================================================== --- stable/10/sys/compat/linux/linux_ioctl.c Sat Jan 9 18:02:08 2016 (r293595) +++ stable/10/sys/compat/linux/linux_ioctl.c Sat Jan 9 18:03:09 2016 (r293596) @@ -3595,9 +3595,16 @@ linux_ioctl(struct thread *td, struct li sx_sunlock(&linux_ioctl_sx); fdrop(fp, td); - linux_msg(td, "ioctl fd=%d, cmd=0x%x ('%c',%d) is not implemented", - args->fd, (int)(args->cmd & 0xffff), - (int)(args->cmd & 0xff00) >> 8, (int)(args->cmd & 0xff)); + switch (args->cmd & 0xffff) { + case LINUX_BTRFS_IOC_CLONE: + return (ENOTSUP); + + default: + linux_msg(td, "ioctl fd=%d, cmd=0x%x ('%c',%d) is not implemented", + args->fd, (int)(args->cmd & 0xffff), + (int)(args->cmd & 0xff00) >> 8, (int)(args->cmd & 0xff)); + break; + } return (EINVAL); } Modified: stable/10/sys/compat/linux/linux_ioctl.h ============================================================================== --- stable/10/sys/compat/linux/linux_ioctl.h Sat Jan 9 18:02:08 2016 (r293595) +++ stable/10/sys/compat/linux/linux_ioctl.h Sat Jan 9 18:03:09 2016 (r293596) @@ -745,6 +745,12 @@ #define FBSD_LUSB_MIN 0xffdd /* + * Linux btrfs clone operation + */ +#define LINUX_BTRFS_IOC_CLONE 0x9409 /* 0x40049409 */ + + +/* * Pluggable ioctl handlers */ struct linux_ioctl_args;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601091803.u09I3AdT071417>