Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751176AbbEGI32 (ORCPT ); Thu, 7 May 2015 04:29:28 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:49796 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750843AbbEGI3U (ORCPT ); Thu, 7 May 2015 04:29:20 -0400 X-AuditID: cbfee68e-f79c56d000006efb-b3-554b2256092c From: Namjae Jeon To: "'Michael Kerrisk (man-pages)'" Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-man@vger.kernel.org, "'Linux API'" , "'Dave Chinner'" , "'Theodore Ts'o'" References: <006d01d08884$dcfc7ea0$96f57be0$@samsung.com> <554B2011.5010703@gmail.com> In-reply-to: <554B2011.5010703@gmail.com> Subject: RE: [PATCH v2] manpage: update FALLOC_FL_INSERT_RANGE flag in fallocate Date: Thu, 07 May 2015 17:29:10 +0900 Message-id: <00be01d0889f$e427de20$ac779a60$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: AQEtJrgdGrDdDSsmJ/4L08ky39yttwDqLBmVnq+gFkA= Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsWyRsSkUDdMyTvU4P0hRYstx+4xWmz+3sFm sWfvSRaLy7vmsFmsWT+D3eLUhAfsFq09P9kd2D1OLZLw2DnrLrtH05mjzB6fN8kFsERx2aSk 5mSWpRbp2yVwZcw8d4O1YKlgxfQl61kbGI/wdjFyckgImEhsvr2XDcIWk7hwbz2YLSSwlFFi 0m0NmJrr01YydTFyAcUXMUrceXqDBcJ5zyixa89xoAwHB5uAtsSfLaIgpoiAjcThpTogJcwC 5xglXjxoZwaJCwlESLRvUQeZySmgKXF+/TywsLBAgMSyG4UgYRYBVYmdT+ayg9i8ApYSx18v ZIawBSV+TL7HAmIzC2hJrN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T IzgZPJPawbiyweIQowAHoxIPr8BOr1Ah1sSy4srcQ4wSHMxKIrxbJL1DhXhTEiurUovy44tK c1KLDzGaAn06kVlKNDkfmKjySuINjU3MjCyNzA0tjIzNlcR55+jKhQoJpCeWpGanphakFsH0 MXFwSjUwelxZ0pq66tkOjVqNq7pLH6pv06zZs2bnde9tj/4Vvt9fceSq0Mslde0CbTJXPux4 0bI+eMG1oxUs91hScps5QorSn52+9ehK68Tll1xZnRgds9crfDf7uvHt3kPVTApMAkI+vxcV VD8M8N65VS6oVDdZlcvk86c1PWvDw4XLRBbaeO9ZvfPDYyWW4oxEQy3mouJEAN1M6QkcAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2381 Lines: 82 > Hello Namjae Jeon, Hi Michael, > > Thanks for the revised patch. I have a question below: > > On 05/07/2015 07:15 AM, Namjae Jeon wrote: > > Update FALLOC_FL_INSERT_RANGE flag in fallocate. > > > > Signed-off-by: Namjae Jeon > > Signed-off-by: Ashish Sangwan > > --- > > man2/fallocate.2 | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++---- > > 1 file changed, 84 insertions(+), 5 deletions(-) > > > > diff --git a/man2/fallocate.2 b/man2/fallocate.2 > > index 0cc1a00..0d31027 100644 > > --- a/man2/fallocate.2 > > +++ b/man2/fallocate.2 > > @@ -228,6 +228,59 @@ ext4, for extent-based files (since Linux 3.15) > > .IP * > > SMB3 (since Linux 3.17) > > .\" commit 30175628bf7f521e9ee31ac98fa6d6fe7441a556 > > +.SS Increasing file space > > +flag (available since Linux 4.1) > > +.\" commit dd46c787788d5bf5b974729d43e4c405814a4c7d > > +Specifying the > > +.BR FALLOC_FL_INSERT_RANGE > > +flag in > > +.I mode > > +will increase the file space by inserting a hole within the file size without > > +overwriting any existing data. > > +The hole will start at > > +.I offset > > +and continue for > > +.I len > > +bytes. > > +For inserting hole inside file, the contents of the file starting at > > +.I offset > > +will be shifted towards right by > > +.I len > > +bytes. > > +Inserting a hole inside the file will increase the file size by > > +.I len > > +bytes. > > + > > +This mode has the same limitation as > > +.BR FALLOC_FL_COLLAPSE_RANGE > > +regarding the > > +granularity of the operation. > > +If the granularity requirements are not met, > > +.BR fallocate () > > +will fail with the error > > +.BR EINVAL. > > +If the > > +.I offset > > +overlaps with end of file OR if it is greater than end of file, an error is > > > Could that last line not be simplified to > > if the offset is greater than or equal to the end of file > > ? Yes, Looks good :) Thanks!! > > Thanks, > > Michael > > > -- > Michael Kerrisk > Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ > Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/