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
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
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
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
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
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
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
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..
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
>> +
>> +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
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
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
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
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);
>>
>>
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
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
> 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
>
> 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
>> [...]
>>
>>> + /* 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);
>>> +
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
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
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
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
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/
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
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
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
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
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
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
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
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
> > +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;
> > +
>
> 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
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.
&
>
> 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
> 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 ,
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
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
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/
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
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
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
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
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,
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
&
> > 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
&
>
> > 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
> 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
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
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
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
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
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
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
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
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
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
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
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
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 -
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:
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
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
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.
>
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
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
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
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
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
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
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
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
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
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
2013/12/1, OGAWA Hirofumi :
> Namjae Jeon writes:
>
>> +err = fat_get_cluster(inode, FAT_ENT_EOF,
>> +&fclus, &dclus);
>> +if (err < 0) {
>> +
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
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
&
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,
>&
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
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
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
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
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
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
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
701 - 800 of 972 matches
Mail list logo