From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (Postfix) with ESMTP id 4ABC57F55 for ; Fri, 2 Jan 2015 03:40:34 -0600 (CST) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by relay1.corp.sgi.com (Postfix) with ESMTP id 394358F8035 for ; Fri, 2 Jan 2015 01:40:30 -0800 (PST) Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by cuda.sgi.com with ESMTP id DySBlYezxjfp7rLW (version=TLSv1 cipher=RC4-MD5 bits=128 verify=NO) for ; Fri, 02 Jan 2015 01:40:26 -0800 (PST) Received: from epcpsbgr3.samsung.com (u143.gpu120.samsung.co.kr [203.254.230.143]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NHJ00JF6MVCB800@mailout1.samsung.com> for xfs@oss.sgi.com; Fri, 02 Jan 2015 18:40:24 +0900 (KST) From: Namjae Jeon Subject: [PATCH v7 0/11] fs: Introduce FALLOC_FL_INSERT_RANGE for fallocate Date: Fri, 02 Jan 2015 18:40:23 +0900 Message-id: <003e01d02670$21a8d610$64fa8230$@samsung.com> MIME-version: 1.0 Content-language: ko List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Dave Chinner , Theodore Ts'o Cc: Brian Foster , linux-kernel@vger.kernel.org, xfs@oss.sgi.com, Ashish Sangwan , linux-fsdevel@vger.kernel.org, linux-ext4 In continuation of the work of making the process of non linear editing of media files faster, we introduce here the new flag FALLOC_FL_INSERT_RANGE for fallocate. This flag will work opposite to the FALLOC_FL_COLLAPSE_RANGE flag. As such, specifying FALLOC_FL_INSERT_RANGE flag will create new space inside file by inserting a hole within the range specified by offset and len. User can write new data in this space. e.g. ads. Like collapse range, currently we have the limitation that offset and len should be block size aligned for both XFS and Ext4. The semantics of the flag are : 1) It creates space within file by inserting a hole of len bytes starting at offset byte without overwriting any existing data. All the data blocks from offset to EOF are shifted towards right to make hole space. 2) It should be used exclusively. No other fallocate flag in combination. 3) Offset and length supplied to fallocate should be fs block size aligned in case of xfs and ext4. 4) Insert range does not work for the case when offset is overlapping/beyond i_size. If the user wants to insert space at the end of file they are advised to use either ftruncate(2) or fallocate(2) with mode 0. 5) It increses the size of file by len bytes. Namjae Jeon (11): fs: Add support FALLOC_FL_INSERT_RANGE for fallocate xfs: Add support FALLOC_FL_INSERT_RANGE for fallocate ext4: Add support FALLOC_FL_INSERT_RANGE for fallocate xfsprogs: xfs_io: add finsert command for insert range via fallocate xfstests: generic/039: Standard insert range tests xfstests: generic/040: Delayed allocation insert range xfstests: generic/041: Multi insert range tests xfstests: generic/042: Delayed allocation multi insert xfstests: generic/043: Test multiple fallocate insert/collapse range calls xfstests: fsstress: Add fallocate insert range operation xfstests: fsx: Add fallocate insert range operation -- 1.7.11-rc0 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs