From patchwork Wed Nov 23 04:48:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 9486485 X-Mozilla-Keys: nonjunk Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on sandeen.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0 X-Spam-HP: BAYES_00=-1.9,HEADER_FROM_DIFFERENT_DOMAINS=0.001, RP_MATCHES_RCVD=-0.1,UNPARSEABLE_RELAY=0.001 X-Original-To: sandeen@sandeen.net Delivered-To: sandeen@sandeen.net Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by sandeen.net (Postfix) with ESMTP id 21EE7116F2 for ; Tue, 22 Nov 2016 22:47:43 -0600 (CST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932679AbcKWEsW (ORCPT ); Tue, 22 Nov 2016 23:48:22 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:46425 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932346AbcKWEsV (ORCPT ); Tue, 22 Nov 2016 23:48:21 -0500 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id uAN4mIXH030010 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 23 Nov 2016 04:48:19 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id uAN4mIMS004811 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 23 Nov 2016 04:48:18 GMT Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id uAN4mILT025586; Wed, 23 Nov 2016 04:48:18 GMT Received: from localhost (/24.21.211.40) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 22 Nov 2016 20:48:17 -0800 Date: Tue, 22 Nov 2016 20:48:16 -0800 From: "Darrick J. Wong" To: mtk.manpages@gmail.com Cc: linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-xfs@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-man@vger.kernel.org, osandov@osandov.com Subject: [PATCH v2] fideduperange.2: fix the discussion of maximum sizes Message-ID: <20161123044816.GG16807@birch.djwong.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org Fix the discussion of the limitations on the dest_count and src_length parameters to the fideduperange ioctl to reflect what's actually in the kernel. Signed-off-by: Darrick J. Wong --- man2/ioctl_fideduperange.2 | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/man2/ioctl_fideduperange.2 b/man2/ioctl_fideduperange.2 index 2112d10..057229d 100644 --- a/man2/ioctl_fideduperange.2 +++ b/man2/ioctl_fideduperange.2 @@ -95,7 +95,7 @@ struct file_dedupe_range_info { .in Each deduplication operation targets -.IR length +.IR src_length bytes in file descriptor .IR dest_fd at offset @@ -108,8 +108,15 @@ During the call, must be open for reading and .IR dest_fd must be open for writing. -For any call to this ioctl, there may not be more than 65,536 -requests attached; each request may not exceed 16MiB. +The combined size of the struct +.IR file_dedupe_range +and the struct +.IR file_dedupe_range_info +array must not exceed the system page size. +The maximum size of +.IR src_length +is filesystem dependent and is typically 16MiB. +This limit will be enforced silently by the filesystem. By convention, the storage used by .IR src_fd is mapped into @@ -144,6 +151,13 @@ is set to indicate the error. .SH ERRORS Error codes can be one of, but are not limited to, the following: .TP +.B ENOMEM +The kernel was unable to allocate sufficient memory to perform the +operation or +.IR dest_count +is so large that the input argument description spans more than a single +page of memory. +.TP .B EBADF .IR src_fd is not open for reading;