From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (Postfix) with ESMTP id D11667F50 for ; Mon, 24 Nov 2014 00:16:31 -0600 (CST) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by relay3.corp.sgi.com (Postfix) with ESMTP id 5FA55AC002 for ; Sun, 23 Nov 2014 22:16:28 -0800 (PST) Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by cuda.sgi.com with ESMTP id dNAUvflg1tdbwNck (version=TLSv1 cipher=RC4-MD5 bits=128 verify=NO) for ; Sun, 23 Nov 2014 22:16:26 -0800 (PST) Received: from epcpsbgr4.samsung.com (u144.gpu120.samsung.co.kr [203.254.230.144]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NFJ00FOI5FCG590@mailout4.samsung.com> for xfs@oss.sgi.com; Mon, 24 Nov 2014 15:16:24 +0900 (KST) From: Namjae Jeon Subject: [PATCH v6 0/10] fs: Introduce FALLOC_FL_INSERT_RANGE for fallocate Date: Mon, 24 Nov 2014 15:16:23 +0900 Message-id: <002901d007ae$2c279580$8476c080$@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: linux-fsdevel@vger.kernel.org, linux-ext4 , linux-kernel@vger.kernel.org, Ashish Sangwan , xfs@oss.sgi.com 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 (10): 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/038: Standard insert range tests xfstests: generic/039: Delayed allocation insert range xfstests: generic/040: Multi insert range tests xfstests: generic/041: Delayed allocation multi insert 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