From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (Postfix) with ESMTP id 07F547F4E for ; Wed, 21 Jan 2015 09:13:09 -0600 (CST) Received: from cuda.sgi.com (cuda3.sgi.com [192.48.176.15]) by relay2.corp.sgi.com (Postfix) with ESMTP id EBC11304066 for ; Wed, 21 Jan 2015 07:13:05 -0800 (PST) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by cuda.sgi.com with ESMTP id 2vsUUtJvGRpdkuTp (version=TLSv1 cipher=RC4-SHA bits=128 verify=NO) for ; Wed, 21 Jan 2015 07:13:04 -0800 (PST) Received: by mail-pa0-f45.google.com with SMTP id lf10so53445061pab.4 for ; Wed, 21 Jan 2015 07:13:04 -0800 (PST) From: Namjae Jeon Subject: [PATCH v9 0/11] fs: Introduce FALLOC_FL_INSERT_RANGE for fallocate Date: Thu, 22 Jan 2015 00:11:55 +0900 Message-Id: <1421853126-4505-1-git-send-email-linkinjeon@gmail.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 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: david@fromorbit.com, tytso@mit.edu Cc: Namjae Jeon , Namjae Jeon , bfoster@redhat.com, linux-kernel@vger.kernel.org, xfs@oss.sgi.com, a.sangwan@samsung.com, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org From: Namjae Jeon 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.9.5 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs