From owner-svn-src-all@FreeBSD.ORG Sun May 24 18:12:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87B3BA35; Sun, 24 May 2015 18:12:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75B4B114F; Sun, 24 May 2015 18:12:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4OIC5Gw046587; Sun, 24 May 2015 18:12:05 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4OIC5so046585; Sun, 24 May 2015 18:12:05 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201505241812.t4OIC5so046585@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Sun, 24 May 2015 18:12:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r283496 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2015 18:12:05 -0000 Author: dchagin Date: Sun May 24 18:12:04 2015 New Revision: 283496 URL: https://svnweb.freebsd.org/changeset/base/283496 Log: 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: head/sys/compat/linux/linux_ioctl.c head/sys/compat/linux/linux_ioctl.h Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Sun May 24 18:11:22 2015 (r283495) +++ head/sys/compat/linux/linux_ioctl.c Sun May 24 18:12:04 2015 (r283496) @@ -3596,9 +3596,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: head/sys/compat/linux/linux_ioctl.h ============================================================================== --- head/sys/compat/linux/linux_ioctl.h Sun May 24 18:11:22 2015 (r283495) +++ head/sys/compat/linux/linux_ioctl.h Sun May 24 18:12:04 2015 (r283496) @@ -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;