[PATCH v4 6/6] Documentation/filesystems/vfat.txt: update the limitation for fat fallocate

2014-03-02 Thread Namjae Jeon
From: Namjae Jeon Update the limitation for fat fallocate. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat --- Documentation/filesystems/vfat.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git a/Documentation/filesystems/vfat.txt b/Documentation/filesystems/vfat.txt

[PATCH v4 4/6] fat: fallback to buffered write in case of fallocated region on direct IO

2014-03-02 Thread Namjae Jeon
From: Namjae Jeon For normal cases of direct IO write, trying to seek to location greater than file size, makes it fall back to buffered write to fill that region. Similarly, in case for write in Fallocated region, make it fall to buffered write. Signed-off-by: Namjae Jeon Signed-off-by: Amit

[PATCH v4 2/6] fat: add fat_fallocate operation

2014-03-02 Thread Namjae Jeon
From: Namjae Jeon Implement preallocation via the fallocate syscall on VFAT partitions. This patch is based on an earlier patch of the same name which had some issues detailed below and did not get accepted. Refer https://lkml.org/lkml/2007/12/22/130. a) The preallocated space was not

[PATCH v4 1/6] fat: add i_disksize to represent uninitialized size

2014-03-02 Thread Namjae Jeon
From: Namjae Jeon Add i_disksize to represent uninitialized allocated size. And mmu_private represent initialized allocated size. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat --- fs/fat/cache.c | 6 +++--- fs/fat/fat.h | 3 ++- fs/fat/file.c | 4 +++- fs/fat/inode.c | 9

[PATCH v7] ext4: Add support FALLOC_FL_COLLAPSE_RANGE for fallocate

2014-03-02 Thread Namjae Jeon
From: Namjae Jeon This patch implements fallocate's FALLOC_FL_COLLAPSE_RANGE for Ext4. The semantics of this flag are following: 1) It collapses the range lying between offset and length by removing any data blocks which are present in this range and than updates all the logical of

Re: [PATCH v4 3/6] fat: zero out seek range on _fat_get_block

2014-03-19 Thread Namjae Jeon
2014-03-18 23:59 GMT+09:00, OGAWA Hirofumi : > Namjae Jeon writes: > >> +static void check_fallocated_region(struct inode *inode, sector_t >> iblock, >> +unsigned long *max_blocks, struct buffer_head *bh_result) >> +{ >> +struct super_block

Re: [PATCH RESEND 2/10] xfs: Add support FALLOC_FL_COLLAPSE_RANGE for fallocate

2014-02-11 Thread Namjae Jeon
Hi Dave. 2014-02-11 8:32 GMT+09:00, Dave Chinner : > On Sun, Feb 02, 2014 at 02:44:11PM +0900, Namjae Jeon wrote: >> From: Namjae Jeon >> >> Add support FALLOC_FL_COLLAPSE_RANGE for fallocate. >> >> Signed-off-by: Namjae Jeon >> Signed-off-by: Ashish S

Re: [PATCH RESEND 3/10] ext4: Add support FALLOC_FL_COLLAPSE_RANGE for fallocate

2014-02-11 Thread Namjae Jeon
2014-02-11 20:59 GMT+09:00, Lukáš Czerner : > On Sun, 2 Feb 2014, Namjae Jeon wrote: > >> Date: Sun, 2 Feb 2014 14:44:34 +0900 >> From: Namjae Jeon >> To: v...@zeniv.linux.org.uk, da...@fromorbit.com, b...@sgi.com, >> ty...@mit.edu, >> adilger.ker..

[PATCH v5 0/10] fs: Introduce new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocate

2014-02-18 Thread Namjae Jeon
From: Namjae Jeon This patch series is in response of the following post: http://lwn.net/Articles/556136/ "ext4: introduce two new ioctls" Dave chinner suggested that truncate_block_range (which was one of the ioctls name) should be an fallocate operation and not any fs specific ioctl

[PATCH v5 1/10] fs: Add new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocate

2014-02-18 Thread Namjae Jeon
From: Namjae Jeon This patch is in response of the following post: http://lwn.net/Articles/556136/ "ext4: introduce two new ioctls" Dave chinner suggested that truncate_block_range (which was one of the ioctls name) should be a fallocate operation and not any fs specific ioctl, he

[PATCH v5 4/10] xfsprog: xfsio: Add support FALLOC_FL_COLLAPSE_RANGE for fallocate

2014-02-18 Thread Namjae Jeon
From: Namjae Jeon Add support FALLOC_FL_COLLAPSE_RANGE for fallocate. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan Reviewed-by: Dave Chinner --- io/prealloc.c | 41 +++-- man/man8/xfs_io.8 |6 ++ 2 files changed, 45 insertions

[PATCH v5 5/10] xfstest: shared/001: Standard collapse range tests

2014-02-18 Thread Namjae Jeon
From: Namjae Jeon This testcase(001) tries to test various corner cases for fcollapse range functionality over different type of extents. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- common/punch | 156 ++- common/rc

[PATCH v5 3/10] ext4: Add support FALLOC_FL_COLLAPSE_RANGE for fallocate

2014-02-18 Thread Namjae Jeon
From: Namjae Jeon This patch implements fallocate's FALLOC_FL_COLLAPSE_RANGE for Ext4. The semantics of this flag are following: 1) It collapses the range lying between offset and length by removing any data blocks which are present in this range and than updates all the logical of

[PATCH v5 2/10] xfs: Add support FALLOC_FL_COLLAPSE_RANGE for fallocate

2014-02-18 Thread Namjae Jeon
From: Namjae Jeon This patch implements fallocate's FALLOC_FL_COLLAPSE_RANGE for XFS. The semantics of this flag are following: 1) It collapses the range lying between offset and length by removing any data blocks which are present in this range and than updates all the logical offse

[PATCH v5 8/10] xfstest: shared/004: Delayed allocation multi collapse

2014-02-18 Thread Namjae Jeon
From: Namjae Jeon This testcase(004) tries to test various corner cases with delayed extents and pre-existing holes for fcollapse range functionality over different type of extents. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- tests/shared/004 | 65

[PATCH v5 6/10] xfstest: shared/002: Delayed allocation collapse range

2014-02-18 Thread Namjae Jeon
From: Namjae Jeon This testcase(002) tries to test various corner cases with delayed extents for fcollapse range functionality over different type of extents. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- tests/shared/002 | 65

[PATCH v5 7/10] xfstest: shared/003: Multi collapse range tests

2014-02-18 Thread Namjae Jeon
From: Namjae Jeon This testcase(003) tries to test various corner cases with pre-existing holes for fcollapse range functionality over different type of extents. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- tests/shared/003 | 65

[PATCH v5 10/10] manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate

2014-02-18 Thread Namjae Jeon
From: Namjae Jeon Update FALLOC_FL_COLLAPSE_RANGE flag in fallocate. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- man2/fallocate.2 | 21 + 1 file changed, 21 insertions(+) diff --git a/man2/fallocate.2 b/man2/fallocate.2 index b31bbde..06a0b0c 100644

[PATCH v5 9/10] xfstest: shared/005: Test multiple fallocate collapse

2014-02-18 Thread Namjae Jeon
From: Namjae Jeon We execute collapse range multiple times on same file. Each collapse range call collapses a single alternate block. After the test execution, file will be left with 80 blocks and as much number of extents. We also check for file system consistency after the completion. Signed

Re: [PATCH RESEND 0/10] fs: Introduce new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocate

2014-02-18 Thread Namjae Jeon
2014-02-03 0:21 GMT+09:00, Matthew Wilcox : > On Sun, Feb 02, 2014 at 08:16:24AM -0700, Matthew Wilcox wrote: >> On Sun, Feb 02, 2014 at 02:41:34PM +0900, Namjae Jeon wrote: >> > The semantics of this flag are following: >> > 1) It collapses the range lying between of

Re: [PATCH RESEND 3/10] ext4: Add support FALLOC_FL_COLLAPSE_RANGE for fallocate

2014-02-18 Thread Namjae Jeon
2014-02-18 23:30 GMT+09:00, Theodore Ts'o : > Namjae, Hi Ted. > > Did you respond to Matthew Wilcox's comments/question from Feb. 2nd? Sorry, I didn't catch about this. I just replied from Matthew's mail. Thanks for your remind. > >> > What if the file is mmaped at the time somebody issues this com

Re: [PATCH v5 3/10] ext4: Add support FALLOC_FL_COLLAPSE_RANGE for fallocate

2014-02-19 Thread Namjae Jeon
2014-02-20 6:58 GMT+09:00, Dongsu Park : > Hi Namjae, > see below: Hi Dongsu. > > On 19.02.2014 01:38, Namjae Jeon wrote: >> This patch implements fallocate's FALLOC_FL_COLLAPSE_RANGE for Ext4. > .. >> +/* >> + * Don't start shifting

[PATCH v6] ext4: Add support FALLOC_FL_COLLAPSE_RANGE for fallocate

2014-02-20 Thread Namjae Jeon
From: Namjae Jeon This patch implements fallocate's FALLOC_FL_COLLAPSE_RANGE for Ext4. The semantics of this flag are following: 1) It collapses the range lying between offset and length by removing any data blocks which are present in this range and than updates all the logical of

Re: [PATCH 2/3] xfs: Add support FALLOC_FL_INSERT_RANGE for fallocate

2014-04-07 Thread Namjae Jeon
>> + >> +int >> +xfs_bmap_split_extent( >> +struct xfs_inode*ip, >> +xfs_fileoff_t split_fsb, >> +xfs_extnum_t*split_ext) >> +{ >> +struct xfs_mount*mp = ip->i_mount; >> +struct xfs_trans*tp; >> +struct xfs_bmap_freefree_list

Re: [patch] fat: double unlock on error path

2013-11-07 Thread Namjae Jeon
2013/11/8, OGAWA Hirofumi : > Dan Carpenter writes: > >> There is a stray unlock here which was not intended. I have removed it. >> >> Fixes: 3f9f3dfb5755 ('fat: add fat_fallocate operation') >> Signed-off-by: Dan Carpenter >> >> diff --git a/fs/fat/file.c b/fs/fat/file.c >> index 03f716f..befed

Re: [PATCH RESEND 2/7] xfs: add support FALLOC_FL_COLLAPSE_RANGE for fallocate

2013-10-13 Thread Namjae Jeon
2013/10/11 Dave Chinner : > On Thu, Oct 10, 2013 at 04:00:13PM +0900, Namjae Jeon wrote: >> > >> > /* >> > * Shift extent records to the left to cover a hole. >> > * >> > * The maximum number of extents to be shifted in a single operation >&g

Re: [PATCH 1/5] fat: add i_disksize to represent uninitialized size

2013-10-29 Thread Namjae Jeon
2013/10/27, OGAWA Hirofumi : > Namjae Jeon writes: Hi OGAWA. > > Code seems to be much became simpler. Thanks :) > >> diff --git a/fs/fat/cache.c b/fs/fat/cache.c >> index 91ad9e1..37572c2 100644 >> --- a/fs/fat/cache.c >> +++ b/fs/fat/cache.c >> @@ -3

Re: [PATCH 2/5] fat: add fat_fallocate operation

2013-10-29 Thread Namjae Jeon
2013/10/27, OGAWA Hirofumi : > Namjae Jeon writes: > >> diff --git a/fs/fat/inode.c b/fs/fat/inode.c >> index 578a5db..2211489 100644 >> --- a/fs/fat/inode.c >> +++ b/fs/fat/inode.c >> @@ -491,6 +491,13 @@ EXPORT_SYMBOL_GPL(fat_build_inode); >> >>

Re: [PATCH 1/5] fat: add i_disksize to represent uninitialized size

2013-10-29 Thread Namjae Jeon
2013/10/30, OGAWA Hirofumi : > Namjae Jeon writes: > >>>> diff --git a/fs/fat/cache.c b/fs/fat/cache.c >>>> index 91ad9e1..37572c2 100644 >>>> --- a/fs/fat/cache.c >>>> +++ b/fs/fat/cache.c >>>> @@ -329,10 +329,10 @@ int fat_b

Re: [PATCH 2/5] fat: add fat_fallocate operation

2013-10-29 Thread Namjae Jeon
2013/10/30, OGAWA Hirofumi : > Namjae Jeon writes: > >>>> + /* Release unwritten fallocated blocks on file release. */ >>>> + if (round_up(inode->i_size, sb->s_blocksize) < >>>> + MSDOS_I(inode)->i_disksize && inode->i_nli

RE: [PATCH 3/3] ext4: Add support IOC_MOV_DATA ioctl

2014-07-18 Thread Namjae Jeon
> On Tue, 8 Jul 2014 16:02:28 +0200 (CEST), Lukáš Czerner > wrote: > Non-text part: MULTIPART/MIXED > > On Tue, 8 Jul 2014, Namjae Jeon wrote: > > > > > Date: Tue, 08 Jul 2014 21:00:02 +0900 > > > From: Namjae Jeon > > > To: Dave Chinner , Theodor

Unifying XFS_IOC_SWAPEXT and EXT4_IOC_MOV_EXT (was Re: [PATCH 2/3] xfs: Add support IOC_MOV_DATA ioctl)

2014-09-24 Thread Namjae Jeon
> > FWIW, what we ideally need for these sorts of defrag programs is > per-file freezing. i.e. we freeze the file to be defragged, then do > the copy in userspace, swap/move the copied range and then unfreeze > it once complete. That guarantees that the file is not modified in > any way while us

Re: [PATCH v3 2/6] fat: add fat_fallocate operation

2014-02-13 Thread Namjae Jeon
>> [...] >> >>> + /* Release unwritten fallocated blocks on inode eviction. */ >>> + if (MSDOS_I(inode)->mmu_private < MSDOS_I(inode)->i_disksize) { >>> + int err; >>> + fat_truncate_blocks(inode, MSDOS_I(inode)->mmu_private); >>> +

Re: [PATCH v3 2/6] fat: add fat_fallocate operation

2014-02-14 Thread Namjae Jeon
2014-02-14 16:30 GMT+09:00, OGAWA Hirofumi : > Namjae Jeon writes: > >>>> [...] >>>> >>>>> + /* Release unwritten fallocated blocks on inode eviction. */ >>>>> + if (MSDOS_I(inode)->mmu_private

Re: [PATCH RESEND 3/10] ext4: Add support FALLOC_FL_COLLAPSE_RANGE for fallocate

2014-02-18 Thread Namjae Jeon
2014-02-18 18:05 GMT+09:00, Lukáš Czerner : > On Wed, 12 Feb 2014, Namjae Jeon wrote: > >> Date: Wed, 12 Feb 2014 11:28:35 +0900 >> From: Namjae Jeon >> To: Lukáš Czerner >> Cc: v...@zeniv.linux.org.uk, da...@fromorbit.com, b...@sgi.com, >> ty...@mit.edu

[PATCH v2 0/10] fs: Introduce FALLOC_FL_INSERT_RANGE for fallocate

2014-05-08 Thread Namjae Jeon
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

[PATCH v2 1/10] fs: Add support FALLOC_FL_INSERT_RANGE for fallocate

2014-05-08 Thread Namjae Jeon
has same limitation as FALLOC_FL_COLLAPSE_RANGE, block boundary and use ftruncate(2) for crosses EOF. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- fs/open.c | 8 +++- include/uapi/linux/falloc.h | 17 + 2 files changed, 24 insertions(+), 1

[PATCH v2 2/10] xfs: Add support FALLOC_FL_INSERT_RANGE for fallocate

2014-05-08 Thread Namjae Jeon
r the hole created in step 4. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- fs/xfs/xfs_bmap.c | 372 - fs/xfs/xfs_bmap.h | 9 +- fs/xfs/xfs_bmap_util.c | 129 - fs/xfs/xfs_bmap_util.h | 2 + fs/xfs/

[PATCH v2 3/10] ext4: Add support FALLOC_FL_INSERT_RANGE for fallocate

2014-05-08 Thread Namjae Jeon
r the hole created in step 4. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- fs/ext4/ext4.h | 1 + fs/ext4/extents.c | 333 ++-- include/trace/events/ext4.h | 25 3 files changed, 350 insertions(+), 9 deletion

[PATCH v2 4/10] xfsprogs: xfs_io: add finsert command for insert range via fallocate

2014-05-08 Thread Namjae Jeon
Add finsert command for fallocate FALLOC_FL_INSERT_RANGE flag. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- io/prealloc.c | 39 ++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/io/prealloc.c b/io/prealloc.c index aba6b44

[PATCH v2 5/10] xfstests: generic/027: Standard insert range tests

2014-05-08 Thread Namjae Jeon
This testcase(027) tries to test various corner cases for finsert range functionality over different type of extents. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- common/punch | 5 common/rc | 2 +- tests/generic/027 | 65

[PATCH v2 6/10] xfstests: generic/028: Delayed allocation insert range

2014-05-08 Thread Namjae Jeon
This testcase(028) tries to test various corner cases with delayed extents for finsert range functionality over different type of extents. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- tests/generic/028 | 65 ++ tests/generic

[PATCH v2 7/10] xfstests: generic/029: Multi insert range tests

2014-05-08 Thread Namjae Jeon
This testcase(029) tries to test various corner cases with pre-existing holes for finsert range functionality over different type of extents. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- tests/generic/029 | 65 +++ tests

[PATCH v2 8/10] xfstests: generic/030: Delayed allocation multi insert

2014-05-08 Thread Namjae Jeon
This testcase(030) tries to test various corner cases with delayed extents and pre-existing holes for finsert range functionality over different type of extents. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- tests/generic/030 | 65

[PATCH v2 9/9] xfstests: fsstress: Add fallocate insert range

2014-05-08 Thread Namjae Jeon
This commit adds insert operation support for fsstress, which is meant to exercise fallocate FALLOC_FL_INSERT_RANGE support. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- ltp/fsstress.c | 19 --- src/global.h | 4 2 files changed, 20 insertions(+), 3

[PATCH v2 10/10] xfstests: fsx: Add fallocate insert range operation

2014-05-08 Thread Namjae Jeon
This commit adds fallocate FALLOC_FL_INSERT_RANGE support for fsx. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- ltp/fsx.c | 96 +-- 1 file changed, 94 insertions(+), 2 deletions(-) diff --git a/ltp/fsx.c b/ltp/fsx.c

RE: [PATCH v2 2/10] xfs: Add support FALLOC_FL_INSERT_RANGE for fallocate

2014-05-12 Thread Namjae Jeon
> > +xfs_bmap_split_extent( > > + struct xfs_inode*ip, > > + xfs_fileoff_t split_fsb, > > + xfs_extnum_t*split_ext) > > +{ > > + struct xfs_mount*mp = ip->i_mount; > > + struct xfs_trans*tp; > > + struct xfs_bmap_freefree_list; > > +

RE: [PATCH v2 2/10] xfs: Add support FALLOC_FL_INSERT_RANGE for fallocate

2014-05-12 Thread Namjae Jeon
> > On Mon, May 12, 2014 at 06:42:37PM +0900, Namjae Jeon wrote: > > > > > > +xfs_bmap_split_extent( > > > > + struct xfs_inode*ip, > > > > + xfs_fileoff_t split_fsb, > > > > + xfs_extnum_t

Re: [PATCH 0/3] fs: Introduce FALLOC_FL_INSERT_RANGE for fallocate

2014-04-08 Thread Namjae Jeon
2014-04-08 9:54 GMT+09:00, Dave Chinner : > On Mon, Mar 31, 2014 at 11:53:31PM +0900, Namjae Jeon wrote: >> From: Namjae Jeon >> >> FALLOC_FL_INSERT_RANGE was mentioned as the opposite command of collapse >> range from discussion between Hugh Dickins and Dave Chinner. &

RE: [PATCH 2/3] xfs: Add support IOC_MOV_DATA ioctl

2014-07-08 Thread Namjae Jeon
> > On Tue, Jul 08, 2014 at 08:59:49PM +0900, Namjae Jeon wrote: > > This patch implements fs ioctl's IOC_MOV_DATA for XFS. > > Shouldn't this share code with the XFS_IOC_SWAPEXT implementation? Lukas has raised the same question for ext4. Both xfs(XFS_IOC_SWAPEXT

RE: [PATCH 3/3] ext4: Add support IOC_MOV_DATA ioctl

2014-07-08 Thread Namjae Jeon
> On Tue, 8 Jul 2014, Namjae Jeon wrote: > > > Date: Tue, 08 Jul 2014 21:00:02 +0900 > > From: Namjae Jeon > > To: Dave Chinner , Theodore Ts'o > > Cc: linux-ext4 , linux-fsde...@vger.kernel.org, > > linux-kernel@vger.kernel.org, Lukáš Czerner ,

[PATCH 0/3] fs: introduce IOC_MOV_DATA ioctl

2014-07-08 Thread Namjae Jeon
alls could additionaly go through the common interface. 3) Or it can be expanded just for swapping extents without copying. Note: These patchse are created on source included INSERT RANGE patches. Please Firstly Apply INSERT RANGE patches before applying IOC_MOV_DATA patches. Namjae Jeon (3): fs: A

[PATCH 2/3] xfs: Add support IOC_MOV_DATA ioctl

2014-07-08 Thread Namjae Jeon
ed to moved_len signifying that the hole range is succesfully transfered. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- fs/xfs/libxfs/xfs_bmap.c | 148 fs/xfs/libxfs/xfs_bmap.h | 4 + fs/xfs/xfs_bmap_util.c

[PATCH 1/3] fs: Add support IOC_MOV_DATA ioctl

2014-07-08 Thread Namjae Jeon
instead of current behavior of allocating unwritten extents. If the requirement is to create hole at the end of file, truncate(2) will suffice. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- fs/ioctl.c | 108 include/

[PATCH 3/3] ext4: Add support IOC_MOV_DATA ioctl

2014-07-08 Thread Namjae Jeon
ed to moved_len signifying that the hole range is succesfully transfered. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- fs/ext4/ext4.h| 2 + fs/ext4/extents.c | 375 ++ fs/ext4/file.c| 1 + 3 files changed, 378 inser

[PATCH 1/3] fs: Add FALLOC_FL_INSERT_RANGE flags for fallocate

2014-03-31 Thread Namjae Jeon
From: Namjae Jeon FALLOC_FL_INSERT_RANGE command is the opposite command of FALLOC_FL_COLLAPSE_RANGE that is needed for advertisers or someone who want to add some data in the middle of file. FALLOC_FL_INSERT_RANGE will insert a range of a file after shifting extents to right as given length

[PATCH 0/3] fs: Introduce FALLOC_FL_INSERT_RANGE for fallocate

2014-03-31 Thread Namjae Jeon
From: Namjae Jeon FALLOC_FL_INSERT_RANGE was mentioned as the opposite command of collapse range from discussion between Hugh Dickins and Dave Chinner. In continuation of the work of making the process of non linear editing of media files faster, we introduce here the new flag

[PATCH 2/3] xfs: Add support FALLOC_FL_INSERT_RANGE for fallocate

2014-03-31 Thread Namjae Jeon
From: Namjae Jeon This patch implements fallocate's FALLOC_FL_INSERT_RANGE for XFS. 1) Make sure that both offset and len are block size aligned. 2) Compute the file's logical block number against offset. If the computed block number is not the starting block of the extent, split

[PATCH 3/3] ext4: Add support FALLOC_FL_INSERT_RANGE for fallocate

2014-03-31 Thread Namjae Jeon
From: Namjae Jeon This patch implements fallocate's FALLOC_FL_INSERT_RANGE for Ext4. 1) Make sure that both offset and len are block size aligned. 2) Compute the file's logical block number against offset. If the computed block number is not the starting block of the extent,

Re: [PATCH 0/3] fs: Introduce FALLOC_FL_INSERT_RANGE for fallocate

2014-03-31 Thread Namjae Jeon
2014-03-31 23:56 GMT+09:00 Christoph Hellwig : > On Mon, Mar 31, 2014 at 11:53:31PM +0900, Namjae Jeon wrote: >> This flag will work opposite to the newly added FALLOC_FL_COLLAPSE_RANGE >> flag. >> As such, specifying FALLOC_FL_INSERT_RANGE flag will insert zeroed-out space &

RE: [PATCH v2 0/10] fs: Introduce FALLOC_FL_INSERT_RANGE for fallocate

2014-05-31 Thread Namjae Jeon
> > Date: Thu, 08 May 2014 19:23:19 +0900 > > From: Namjae Jeon > > To: Dave Chinner , Theodore Ts'o > > Cc: linux-ext4 , x...@oss.sgi.com, > > linux-fsde...@vger.kernel.org, linux-kernel@vger.kernel.org, > > Ashish Sangwan &

RE: [PATCH v2 0/10] fs: Introduce FALLOC_FL_INSERT_RANGE for fallocate

2014-06-02 Thread Namjae Jeon
> > > Date: Sat, 31 May 2014 16:40:29 +0900 > > From: Namjae Jeon > > To: 'Lukáš Czerner' > > Cc: 'Dave Chinner' , 'Theodore Ts'o' , > > 'linux-ext4' , x...@oss.sgi.com, > > linux-fsde...@vger.kernel.org

RE: [PATCH v2 0/10] fs: Introduce FALLOC_FL_INSERT_RANGE for fallocate

2014-06-03 Thread Namjae Jeon
> On Mon, Jun 02, 2014 at 03:06:13PM +0200, Lukáš Czerner wrote: > > > > So what will happen when there is not enough space when "inserting a > > > > range" ? And how should user proceed from there ? > > > If insert range fails with an ENOSPC error, user could use collapse > > > range on the same r

[PATCH RESEND 1/10] fs: Add new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocate

2014-02-01 Thread Namjae Jeon
From: Namjae Jeon Add new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocate. updated detailed semantics in comments. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- fs/open.c | 24 +--- include/uapi/linux/falloc.h | 21

[PATCH RESEND 0/10] fs: Introduce new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocate

2014-02-01 Thread Namjae Jeon
From: Namjae Jeon This patch series is in response of the following post: http://lwn.net/Articles/556136/ "ext4: introduce two new ioctls" Dave chinner suggested that truncate_block_range (which was one of the ioctls name) should be an fallocate operation and not any fs specific ioctl

[PATCH RESEND 2/10] xfs: Add support FALLOC_FL_COLLAPSE_RANGE for fallocate

2014-02-01 Thread Namjae Jeon
From: Namjae Jeon Add support FALLOC_FL_COLLAPSE_RANGE for fallocate. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- fs/xfs/xfs_bmap.c | 195 fs/xfs/xfs_bmap.h |5 ++ fs/xfs/xfs_bmap_util.c | 99

[PATCH RESEND 3/10] ext4: Add support FALLOC_FL_COLLAPSE_RANGE for fallocate

2014-02-01 Thread Namjae Jeon
From: Namjae Jeon Add support FALLOC_FL_COLLAPSE_RANGE for fallocate Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- fs/ext4/ext4.h |3 + fs/ext4/extents.c | 297 ++- fs/ext4/move_extent.c |2

[PATCH RESEND 4/10] xfsprog: xfsio: Add support FALLOC_FL_COLLAPSE_RANGE for fallocate

2014-02-01 Thread Namjae Jeon
From: Namjae Jeon Add support FALLOC_FL_COLLAPSE_RANGE for fallocate. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan Reviewed-by: Dave Chinner --- io/prealloc.c | 41 +++-- man/man8/xfs_io.8 |6 ++ 2 files changed, 45 insertions

[PATCH RESEND 5/10] xfstest: shared/001: Standard collapse range tests

2014-02-01 Thread Namjae Jeon
From: Namjae Jeon This testcase(001) tries to test various corner cases for fcollapse range functionality over different type of extents. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- common/punch | 133 -- common/rc

[PATCH RESEND 6/10] xfstest: shared/002: Delayed allocation collapse range

2014-02-01 Thread Namjae Jeon
From: Namjae Jeon This testcase(002) tries to test various corner cases with delayed extents for fcollapse range functionality over different type of extents. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- tests/shared/002 | 65

[PATCH RESEND 8/10] xfstest: shared/004: Delayed allocation multi collapse

2014-02-01 Thread Namjae Jeon
From: Namjae Jeon This testcase(004) tries to test various corner cases with delayed extents and pre-existing holes for fcollapse range functionality over different type of extents. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- tests/shared/004 | 65

[PATCH RESEND 7/10] xfstest: shared/003: Multi collapse range tests

2014-02-01 Thread Namjae Jeon
From: Namjae Jeon This testcase(003) tries to test various corner cases with pre-existing holes for fcollapse range functionality over different type of extents. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- tests/shared/003 | 65

[PATCH RESEND 9/10] xfstest: shared/005: Test multiple fallocate collapse

2014-02-01 Thread Namjae Jeon
From: Namjae Jeon We execute collapse range multiple times on same file. Each collapse range call collapses a single alternate block. After the test execution, file will be left with 80 blocks and as much number of extents. We also check for file system consistency after the completion. Signed

[PATCH RESEND 10/10] manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate

2014-02-01 Thread Namjae Jeon
From: Namjae Jeon Update FALLOC_FL_COLLAPSE_RANGE flag in fallocate. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- man2/fallocate.2 | 21 + 1 file changed, 21 insertions(+) diff --git a/man2/fallocate.2 b/man2/fallocate.2 index ec9011c..69a4dbd 100644

Re: [PATCH v3 2/6] fat: add fat_fallocate operation

2014-02-03 Thread Namjae Jeon
2014-02-03, OGAWA Hirofumi : > > Sorry for long delay. > > Namjae Jeon writes: > >> +if (mode & FALLOC_FL_KEEP_SIZE) { >> +/* First compute the number of clusters to be allocated */ >> +mm_bytes = offset + len -

Re: [PATCH v3 5/6] fat: permit to return phy block number by fibmap in fallocated region

2014-02-03 Thread Namjae Jeon
2014-02-03, OGAWA Hirofumi : > Namjae Jeon writes: > >> From: Namjae Jeon >> >> Make the fibmap call the return the proper physical block number for any >> offset request in the fallocated range. >> >> Signed-off-by: Namjae Jeon >> Signed-off-by:

Re: [PATCH RESEND 5/10] xfstest: shared/001: Standard collapse range tests

2014-02-03 Thread Namjae Jeon
2014-02-04, Dave Chinner : > On Sun, Feb 02, 2014 at 02:45:58PM +0900, Namjae Jeon wrote: >> From: Namjae Jeon >> >> This testcase(001) tries to test various corner cases >> for fcollapse range functionality over different type of extents. >> >> Signe

Re: [PATCH v3 5/6] fat: permit to return phy block number by fibmap in fallocated region

2014-02-03 Thread Namjae Jeon
2014-02-04, OGAWA Hirofumi : > Namjae Jeon writes: > >>>>/* fat_get_cluster() assumes the requested blocknr isn't truncated. >>>> */ >>>>down_read(&MSDOS_I(mapping->host)->truncate_lock); >>>> + /* To get block number

Re: [PATCH v3 5/6] fat: permit to return phy block number by fibmap in fallocated region

2014-02-03 Thread Namjae Jeon
2014-02-04, OGAWA Hirofumi : > Namjae Jeon writes: > >> 2014-02-04, OGAWA Hirofumi : >>> Namjae Jeon writes: >>> >>>>>> /* fat_get_cluster() assumes the requested blocknr isn't >>>>>> truncated. >

Re: [PATCH v3 1/6] fat: add i_disksize to represent uninitialized size

2014-02-04 Thread Namjae Jeon
2014-02-03, OGAWA Hirofumi : > Namjae Jeon writes: > >> From: Namjae Jeon >> >> Add i_disksize to represent uninitialized allocated size. >> And mmu_private represent initialized allocated size. > > Don't we need to update ->i_disksize after cont_write

[PATCH v2 0/5] fat: additions to support fat_fallocate

2013-11-17 Thread Namjae Jeon
From: Namjae Jeon This patch set provides support for doing fallocate operation on FAT filesystem. After series of review for the the feature The complete functionality is broken down into smaller subsets. v2: - remove a stary unlock(from Dan Carpenter) - check ->mmu_private and ->i_di

[PATCH v2 1/5] fat: add i_disksize to represent uninitialized size

2013-11-17 Thread Namjae Jeon
From: Namjae Jeon Add i_disksize to represent uninitialized allocated size. And mmu_private represent initialized allocated size. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat --- fs/fat/cache.c |6 +++--- fs/fat/fat.h |3 ++- fs/fat/file.c |4 +++- fs/fat/inode.c

[PATCH v2 2/5] fat: add fat_fallocate operation

2013-11-17 Thread Namjae Jeon
From: Namjae Jeon Implement preallocation via the fallocate syscall on VFAT partitions. This patch is based on an earlier patch of the same name which had some issues detailed below and did not get accepted. Refer https://lkml.org/lkml/2007/12/22/130. a) The preallocated space was not

[PATCH v2 3/5] fat: zero out seek range on _fat_get_block

2013-11-17 Thread Namjae Jeon
From: Namjae Jeon For normal buffered write operations, normally if we try to write to an offset > than file size, it does a cont_expand_zero till that offset. Now, in case of fallocated regions, since the blocks are already allocated. So, make it zero out that buffers for those blocks till

[PATCH v2 4/5] fat: fallback to buffered write in case of fallocatded region on direct IO

2013-11-17 Thread Namjae Jeon
From: Namjae Jeon For normal cases of direct IO write, trying to seek to location greater than file size, makes it fall back to buffered write to fill that region. Similarly, in case for write in Fallocated region, make it fall to buffered write. Signed-off-by: Namjae Jeon Signed-off-by: Amit

[PATCH v2 5/5] fat: permit to return phy block number by fibmap in fallocated region

2013-11-17 Thread Namjae Jeon
From: Namjae Jeon Make the fibmap call the return the proper physical block number for any offset request in the fallocated range. Signed-off-by: Namjae Jeon Signed-off-by: Amit Sahrawat --- fs/fat/cache.c | 16 ++-- fs/fat/inode.c |4 ++-- 2 files changed, 16 insertions

Re: [PATCH v3 1/6] fat: add i_disksize to represent uninitialized size

2014-02-05 Thread Namjae Jeon
2014-02-04, OGAWA Hirofumi : > OGAWA Hirofumi writes: > Don't we need to update ->i_disksize after cont_write_begin()? >>> We don't need to update i_disksize after cont_write_begin. >>> It is taken care by the fat_get_block after the allocation. >>> For all write paths we align the mmu_privat

Re: [PATCH v3 1/6] fat: add i_disksize to represent uninitialized size

2014-02-06 Thread Namjae Jeon
2014-02-06, OGAWA Hirofumi : > Namjae Jeon writes: > >>>> fat_fill_inode() just set i_disksize to i_size. So, it is not aligned >>>> by >>>> cluster size or block size. >>>> >>>> E.g. ->mmu_private = 500. Then, cont_write_begi

Re: [PATCH v2 1/5] fat: add i_disksize to represent uninitialized size

2013-12-05 Thread Namjae Jeon
Hi OGAWA. 2013/12/1, OGAWA Hirofumi : > Namjae Jeon writes: > >> /* NOTE: mmu_private is 64bits, so must hold ->i_mutex to access */ >> -loff_t mmu_private; /* physically allocated size */ >> +loff_t mmu_private; /* physically allocated size (unini

Re: [PATCH v2 2/5] fat: add fat_fallocate operation

2013-12-05 Thread Namjae Jeon
2013/12/1, OGAWA Hirofumi : > Namjae Jeon writes: > >> +err = fat_get_cluster(inode, FAT_ENT_EOF, >> +&fclus, &dclus); >> +if (err < 0) { >> +

Re: [PATCH v2 3/5] fat: zero out seek range on _fat_get_block

2013-12-05 Thread Namjae Jeon
2013/12/1, OGAWA Hirofumi : > Namjae Jeon writes: > >> --- a/fs/fat/cache.c >> +++ b/fs/fat/cache.c >> @@ -334,7 +334,8 @@ int fat_bmap(struct inode *inode, sector_t sector, >> sector_t *phys, >> */ >> last_block = (M

Re: [PATCH v2 4/5] fat: fallback to buffered write in case of fallocatded region on direct IO

2013-12-05 Thread Namjae Jeon
2013/12/1, OGAWA Hirofumi : > Namjae Jeon writes: > >> diff --git a/fs/fat/inode.c b/fs/fat/inode.c >> index 12a37a9..c9fb9b6 100644 >> --- a/fs/fat/inode.c >> +++ b/fs/fat/inode.c >> @@ -217,6 +217,14 @@ static ssize_t fat_direct_IO(int rw, struct kiocb &

Re: [PATCH v2 5/5] fat: permit to return phy block number by fibmap in fallocated region

2013-12-05 Thread Namjae Jeon
2013/12/1, OGAWA Hirofumi : > Namjae Jeon writes: > >> diff --git a/fs/fat/cache.c b/fs/fat/cache.c >> index c56bd7e..822 100644 >> --- a/fs/fat/cache.c >> +++ b/fs/fat/cache.c >> @@ -312,6 +312,7 @@ int fat_bmap(struct inode *inode, sector_t sector, >&

Re: [PATCH v2 0/5] fat: additions to support fat_fallocate

2013-12-05 Thread Namjae Jeon
2013/12/1, OGAWA Hirofumi : > Namjae Jeon writes: > >> From: Namjae Jeon >> >> This patch set provides support for doing fallocate operation >> on FAT filesystem. >> After series of review for the the feature >> The complete functionality is

Re: [PATCH v2 5/5] fat: permit to return phy block number by fibmap in fallocated region

2013-12-06 Thread Namjae Jeon
2013/12/6, OGAWA Hirofumi : > Namjae Jeon writes: > >>> ->i_mutex doesn't work for swapfile. >> Sorry, Actually, I don't understand why it is related with swapfile. >> Could you elaborate more ? > > swapfile.c calls ->bmap to know physical addres

[PATCH v4 0/10] fs: Introduce new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocate

2013-12-08 Thread Namjae Jeon
From: Namjae Jeon This patch series is in response of the following post: http://lwn.net/Articles/556136/ "ext4: introduce two new ioctls" Dave chinner suggested that truncate_block_range (which was one of the ioctls name) should be an fallocate operation and not any fs specific ioctl

[PATCH v4 1/10] fs: Add new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocate

2013-12-08 Thread Namjae Jeon
From: Namjae Jeon Add new flag(FALLOC_FL_COLLAPSE_RANGE) for fallocate. updated detailed semantics in comments. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- fs/open.c | 24 +--- include/uapi/linux/falloc.h | 21

[PATCH v4 3/10] ext4: Add support FALLOC_FL_COLLAPSE_RANGE for fallocate

2013-12-08 Thread Namjae Jeon
From: Namjae Jeon Add support FALLOC_FL_COLLAPSE_RANGE for fallocate Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- fs/ext4/ext4.h |3 + fs/ext4/extents.c | 297 ++- fs/ext4/move_extent.c |2

[PATCH v4 5/10] xfstest: shared/001: Standard collapse range tests

2013-12-08 Thread Namjae Jeon
From: Namjae Jeon This testcase(001) tries to test various corner cases for fcollapse range functionality over different type of extents. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- common/punch | 133 -- common/rc

[PATCH v4 4/10] xfsprog: xfsio: Add support FALLOC_FL_COLLAPSE_RANGE for fallocate

2013-12-08 Thread Namjae Jeon
From: Namjae Jeon Add support FALLOC_FL_COLLAPSE_RANGE for fallocate. Signed-off-by: Namjae Jeon Signed-off-by: Ashish Sangwan --- io/prealloc.c | 41 +++-- man/man8/xfs_io.8 |6 ++ 2 files changed, 45 insertions(+), 2 deletions(-) diff

<    3   4   5   6   7   8   9   10   >