* [f2fs-dev] [PATCH 1/2] f2fs: remove redundant atomic file check in defragment
@ 2024-10-31 5:59 Zhiguo Niu
2024-10-31 5:59 ` [f2fs-dev] [PATCH 2/2] f2fs: fix to adjust appropriate length for fiemap Zhiguo Niu
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Zhiguo Niu @ 2024-10-31 5:59 UTC (permalink / raw)
To: jaegeuk, chao
Cc: ke.wang, linux-kernel, linux-f2fs-devel, zhiguo.niu, Hao_hao.Wang
f2fs_is_atomic_file(inode) is checked in f2fs_defragment_range,
so remove the redundant checking in f2fs_ioc_defragment.
Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
---
fs/f2fs/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 75a8b22..3e22f6e 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -2883,7 +2883,7 @@ static int f2fs_ioc_defragment(struct file *filp, unsigned long arg)
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
- if (!S_ISREG(inode->i_mode) || f2fs_is_atomic_file(inode))
+ if (!S_ISREG(inode->i_mode))
return -EINVAL;
if (f2fs_readonly(sbi->sb))
--
1.9.1
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [f2fs-dev] [PATCH 2/2] f2fs: fix to adjust appropriate length for fiemap
2024-10-31 5:59 [f2fs-dev] [PATCH 1/2] f2fs: remove redundant atomic file check in defragment Zhiguo Niu
@ 2024-10-31 5:59 ` Zhiguo Niu
2024-11-01 2:36 ` Chao Yu via Linux-f2fs-devel
2024-10-31 7:52 ` [f2fs-dev] [PATCH 1/2] f2fs: remove redundant atomic file check in defragment Chao Yu via Linux-f2fs-devel
2024-11-07 20:30 ` patchwork-bot+f2fs--- via Linux-f2fs-devel
2 siblings, 1 reply; 8+ messages in thread
From: Zhiguo Niu @ 2024-10-31 5:59 UTC (permalink / raw)
To: jaegeuk, chao
Cc: ke.wang, linux-kernel, linux-f2fs-devel, zhiguo.niu, Hao_hao.Wang
If user give a file size as "length" parameter for fiemap
operations, but this size is non-block size aligned,
it will show 2 segments fiemap results even this whole file
is contiguous on disk, such as the following results, please
note that this f2fs_io has been modified for testing.
./f2fs_io fiemap 0 19304 ylog/analyzer.py
Fiemap: offset = 0 len = 19304
logical addr. physical addr. length flags
0 0000000000000000 0000000020baa000 0000000000004000 00001000
1 0000000000004000 0000000020bae000 0000000000001000 00001001
after this patch:
./f2fs_io fiemap 0 19304 ylog/analyzer.py
Fiemap: offset = 0 len = 19304
logical addr. physical addr. length flags
0 0000000000000000 00000000315f3000 0000000000005000 00001000
Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
---
f2fs_io has been modified for testing, the length for fiemap is
real file size, not block number
---
fs/f2fs/data.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 90fa8ab..8c9bb42 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1966,8 +1966,8 @@ int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
goto out;
}
- if (bytes_to_blks(inode, len) == 0)
- len = blks_to_bytes(inode, 1);
+ if (len & (blks_to_bytes(inode, 1) - 1))
+ len = round_up(len, blks_to_bytes(inode, 1));
start_blk = bytes_to_blks(inode, start);
last_blk = bytes_to_blks(inode, start + len - 1);
--
1.9.1
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [f2fs-dev] [PATCH 1/2] f2fs: remove redundant atomic file check in defragment
2024-10-31 5:59 [f2fs-dev] [PATCH 1/2] f2fs: remove redundant atomic file check in defragment Zhiguo Niu
2024-10-31 5:59 ` [f2fs-dev] [PATCH 2/2] f2fs: fix to adjust appropriate length for fiemap Zhiguo Niu
@ 2024-10-31 7:52 ` Chao Yu via Linux-f2fs-devel
2024-11-07 20:30 ` patchwork-bot+f2fs--- via Linux-f2fs-devel
2 siblings, 0 replies; 8+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2024-10-31 7:52 UTC (permalink / raw)
To: Zhiguo Niu, jaegeuk; +Cc: Hao_hao.Wang, ke.wang, linux-kernel, linux-f2fs-devel
On 2024/10/31 13:59, Zhiguo Niu wrote:
> f2fs_is_atomic_file(inode) is checked in f2fs_defragment_range,
> so remove the redundant checking in f2fs_ioc_defragment.
>
> Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [f2fs-dev] [PATCH 2/2] f2fs: fix to adjust appropriate length for fiemap
2024-10-31 5:59 ` [f2fs-dev] [PATCH 2/2] f2fs: fix to adjust appropriate length for fiemap Zhiguo Niu
@ 2024-11-01 2:36 ` Chao Yu via Linux-f2fs-devel
2024-11-01 3:27 ` Zhiguo Niu
2024-11-01 8:00 ` Zhiguo Niu
0 siblings, 2 replies; 8+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2024-11-01 2:36 UTC (permalink / raw)
To: Zhiguo Niu, jaegeuk; +Cc: ke.wang, linux-kernel, linux-f2fs-devel, Hao_hao.Wang
On 2024/10/31 13:59, Zhiguo Niu wrote:
> If user give a file size as "length" parameter for fiemap
> operations, but this size is non-block size aligned,
> it will show 2 segments fiemap results even this whole file
> is contiguous on disk, such as the following results, please
> note that this f2fs_io has been modified for testing.
>
> ./f2fs_io fiemap 0 19304 ylog/analyzer.py
> Fiemap: offset = 0 len = 19304
> logical addr. physical addr. length flags
> 0 0000000000000000 0000000020baa000 0000000000004000 00001000
> 1 0000000000004000 0000000020bae000 0000000000001000 00001001
>
> after this patch:
> ./f2fs_io fiemap 0 19304 ylog/analyzer.py
> Fiemap: offset = 0 len = 19304
> logical addr. physical addr. length flags
> 0 0000000000000000 00000000315f3000 0000000000005000 00001000
Why is FIEMAP_EXTENT_LAST missing in #0 extent? As we can see it
in #1 extent before your change.
1 0000000000004000 0000000020bae000 0000000000001000 00001001
Thanks,
>
> Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
> ---
> f2fs_io has been modified for testing, the length for fiemap is
> real file size, not block number
> ---
> fs/f2fs/data.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index 90fa8ab..8c9bb42 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -1966,8 +1966,8 @@ int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
> goto out;
> }
>
> - if (bytes_to_blks(inode, len) == 0)
> - len = blks_to_bytes(inode, 1);
> + if (len & (blks_to_bytes(inode, 1) - 1))
> + len = round_up(len, blks_to_bytes(inode, 1));
>
> start_blk = bytes_to_blks(inode, start);
> last_blk = bytes_to_blks(inode, start + len - 1);
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [f2fs-dev] [PATCH 2/2] f2fs: fix to adjust appropriate length for fiemap
2024-11-01 2:36 ` Chao Yu via Linux-f2fs-devel
@ 2024-11-01 3:27 ` Zhiguo Niu
2024-11-01 5:48 ` Zhiguo Niu
2024-11-01 8:00 ` Zhiguo Niu
1 sibling, 1 reply; 8+ messages in thread
From: Zhiguo Niu @ 2024-11-01 3:27 UTC (permalink / raw)
To: Chao Yu
Cc: ke.wang, linux-kernel, linux-f2fs-devel, Zhiguo Niu, jaegeuk,
Hao_hao.Wang
Chao Yu <chao@kernel.org> 于2024年11月1日周五 10:36写道:
>
> On 2024/10/31 13:59, Zhiguo Niu wrote:
> > If user give a file size as "length" parameter for fiemap
> > operations, but this size is non-block size aligned,
> > it will show 2 segments fiemap results even this whole file
> > is contiguous on disk, such as the following results, please
> > note that this f2fs_io has been modified for testing.
> >
> > ./f2fs_io fiemap 0 19304 ylog/analyzer.py
> > Fiemap: offset = 0 len = 19304
> > logical addr. physical addr. length flags
> > 0 0000000000000000 0000000020baa000 0000000000004000 00001000
> > 1 0000000000004000 0000000020bae000 0000000000001000 00001001
> >
> > after this patch:
> > ./f2fs_io fiemap 0 19304 ylog/analyzer.py
> > Fiemap: offset = 0 len = 19304
> > logical addr. physical addr. length flags
> > 0 0000000000000000 00000000315f3000 0000000000005000 00001000
>
> Why is FIEMAP_EXTENT_LAST missing in #0 extent? As we can see it
> in #1 extent before your change.
Hi Chao,
for normal fiemap, we just can tag FIEMAP_EXTENT_LAST in the following:
/* HOLE */
if (!compr_cluster && !(map.m_flags & F2FS_MAP_FLAGS)) {
start_blk = next_pgofs;
if (blks_to_bytes(inode, start_blk) < blks_to_bytes(inode,
max_inode_blocks(inode)))
goto prep_next;
flags |= FIEMAP_EXTENT_LAST;
}
but after this patch, if file length = 19304, blk len =5(page size=4096),
and f2fs_map_blocks will run once if the file is contiguous on disk,
and will tag
F2FS_MAP_FLAGS to map.m_flags, so the following case will not run.
then
if (size) {
flags |= FIEMAP_EXTENT_MERGED;
if (IS_ENCRYPTED(inode))
flags |= FIEMAP_EXTENT_DATA_ENCRYPTED;
ret = fiemap_fill_next_extent(fieinfo, logical,
phys, size, flags);
trace_f2fs_fiemap(inode, logical, phys, size, flags, ret);
if (ret)
goto out;
size = 0;
}
fiemap_fill_next_extent will return 1, then go out , this fiemap flow finishes.
>
> 1 0000000000004000 0000000020bae000 0000000000001000 00001001
but back to this case, because
next:
memset(&map, 0, sizeof(map));
map.m_lblk = start_blk;
map.m_len = bytes_to_blks(inode, len);
map.m_next_pgofs = &next_pgofs;
map.m_seg_type = NO_CHECK_TYPE;
map.m_len will not reduce the part that has beed maped even map.m_lbk
has changed,
for example, if file length = 19304, before patch, map.m_len=4,
after once f2fs_map_block, map.m_lbk=4, map.m_len still =4, so
there will be "HOLE" case in the follow-up f2fs_map_block
so it will loop until start_blk reaches the maxbytes.
/* HOLE */
if (!compr_cluster && !(map.m_flags & F2FS_MAP_FLAGS)) {
start_blk = next_pgofs;
if (blks_to_bytes(inode, start_blk) < blks_to_bytes(inode,
max_inode_blocks(inode)))
goto prep_next;
flags |= FIEMAP_EXTENT_LAST;
}
there is another case before this patch, file size = 5 blocks, if we
pass the len not
greater than or equal to 5, it will not tag FIEMAP_EXTENT_LAST
# ./f2fs_io_new fiemap 0 4 file.apk
Fiemap: offset = 0 len = 4
logical addr. physical addr. length flags
0 0000000000000000 000000070e08f000 0000000000004000 00001008
but if len equal or greater than 5, it will tag FIEMAP_EXTENT_LAST
# ./f2fs_io_new fiemap 0 5 file.apk
Fiemap: offset = 0 len = 5
logical addr. physical addr. length flags
0 0000000000000000 000000070e08f000 0000000000004000 00001008
1 0000000000004000 000000070e090000 0000000000001000 00001001
thanks!
>
> Thanks,
>
> >
> > Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
> > ---
> > f2fs_io has been modified for testing, the length for fiemap is
> > real file size, not block number
> > ---
> > fs/f2fs/data.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> > index 90fa8ab..8c9bb42 100644
> > --- a/fs/f2fs/data.c
> > +++ b/fs/f2fs/data.c
> > @@ -1966,8 +1966,8 @@ int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
> > goto out;
> > }
> >
> > - if (bytes_to_blks(inode, len) == 0)
> > - len = blks_to_bytes(inode, 1);
> > + if (len & (blks_to_bytes(inode, 1) - 1))
> > + len = round_up(len, blks_to_bytes(inode, 1));
> >
> > start_blk = bytes_to_blks(inode, start);
> > last_blk = bytes_to_blks(inode, start + len - 1);
>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [f2fs-dev] [PATCH 2/2] f2fs: fix to adjust appropriate length for fiemap
2024-11-01 3:27 ` Zhiguo Niu
@ 2024-11-01 5:48 ` Zhiguo Niu
0 siblings, 0 replies; 8+ messages in thread
From: Zhiguo Niu @ 2024-11-01 5:48 UTC (permalink / raw)
To: Chao Yu
Cc: ke.wang, linux-kernel, linux-f2fs-devel, Zhiguo Niu, jaegeuk,
Hao_hao.Wang
Zhiguo Niu <niuzhiguo84@gmail.com> 于2024年11月1日周五 11:27写道:
>
> Chao Yu <chao@kernel.org> 于2024年11月1日周五 10:36写道:
> >
> > On 2024/10/31 13:59, Zhiguo Niu wrote:
> > > If user give a file size as "length" parameter for fiemap
> > > operations, but this size is non-block size aligned,
> > > it will show 2 segments fiemap results even this whole file
> > > is contiguous on disk, such as the following results, please
> > > note that this f2fs_io has been modified for testing.
> > >
> > > ./f2fs_io fiemap 0 19304 ylog/analyzer.py
> > > Fiemap: offset = 0 len = 19304
> > > logical addr. physical addr. length flags
> > > 0 0000000000000000 0000000020baa000 0000000000004000 00001000
> > > 1 0000000000004000 0000000020bae000 0000000000001000 00001001
> > >
> > > after this patch:
> > > ./f2fs_io fiemap 0 19304 ylog/analyzer.py
> > > Fiemap: offset = 0 len = 19304
> > > logical addr. physical addr. length flags
> > > 0 0000000000000000 00000000315f3000 0000000000005000 00001000
> >
> > Why is FIEMAP_EXTENT_LAST missing in #0 extent? As we can see it
> > in #1 extent before your change.
> Hi Chao,
> for normal fiemap, we just can tag FIEMAP_EXTENT_LAST in the following:
>
> /* HOLE */
> if (!compr_cluster && !(map.m_flags & F2FS_MAP_FLAGS)) {
> start_blk = next_pgofs;
>
> if (blks_to_bytes(inode, start_blk) < blks_to_bytes(inode,
> max_inode_blocks(inode)))
> goto prep_next;
>
> flags |= FIEMAP_EXTENT_LAST;
> }
> but after this patch, if file length = 19304, blk len =5(page size=4096),
> and f2fs_map_blocks will run once if the file is contiguous on disk,
> and will tag
> F2FS_MAP_FLAGS to map.m_flags, so the following case will not run.
> then
>
> if (size) {
> flags |= FIEMAP_EXTENT_MERGED;
> if (IS_ENCRYPTED(inode))
> flags |= FIEMAP_EXTENT_DATA_ENCRYPTED;
>
> ret = fiemap_fill_next_extent(fieinfo, logical,
> phys, size, flags);
> trace_f2fs_fiemap(inode, logical, phys, size, flags, ret);
> if (ret)
> goto out;
> size = 0;
> }
> fiemap_fill_next_extent will return 1, then go out , this fiemap flow finishes.
>
> >
> > 1 0000000000004000 0000000020bae000 0000000000001000 00001001
> but back to this case, because
>
> next:
> memset(&map, 0, sizeof(map));
> map.m_lblk = start_blk;
> map.m_len = bytes_to_blks(inode, len);
> map.m_next_pgofs = &next_pgofs;
> map.m_seg_type = NO_CHECK_TYPE;
>
> map.m_len will not reduce the part that has beed maped even map.m_lbk
> has changed,
> for example, if file length = 19304, before patch, map.m_len=4,
> after once f2fs_map_block, map.m_lbk=4, map.m_len still =4, so
> there will be "HOLE" case in the follow-up f2fs_map_block
> so it will loop until start_blk reaches the maxbytes.
> /* HOLE */
> if (!compr_cluster && !(map.m_flags & F2FS_MAP_FLAGS)) {
> start_blk = next_pgofs;
>
> if (blks_to_bytes(inode, start_blk) < blks_to_bytes(inode,
> max_inode_blocks(inode)))
> goto prep_next;
>
> flags |= FIEMAP_EXTENT_LAST;
> }
>
> there is another case before this patch, file size = 5 blocks, if we
> pass the len not
> greater than or equal to 5, it will not tag FIEMAP_EXTENT_LAST
>
> # ./f2fs_io_new fiemap 0 4 file.apk
> Fiemap: offset = 0 len = 4
> logical addr. physical addr. length flags
> 0 0000000000000000 000000070e08f000 0000000000004000 00001008
>
> but if len equal or greater than 5, it will tag FIEMAP_EXTENT_LAST
> # ./f2fs_io_new fiemap 0 5 file.apk
> Fiemap: offset = 0 len = 5
> logical addr. physical addr. length flags
> 0 0000000000000000 000000070e08f000 0000000000004000 00001008
> 1 0000000000004000 000000070e090000 0000000000001000 00001001
> thanks!
Hi Chao, pls ignore this reply , I will confirm your questions.
thanks a lot~
> >
> > Thanks,
> >
> > >
> > > Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
> > > ---
> > > f2fs_io has been modified for testing, the length for fiemap is
> > > real file size, not block number
> > > ---
> > > fs/f2fs/data.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> > > index 90fa8ab..8c9bb42 100644
> > > --- a/fs/f2fs/data.c
> > > +++ b/fs/f2fs/data.c
> > > @@ -1966,8 +1966,8 @@ int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
> > > goto out;
> > > }
> > >
> > > - if (bytes_to_blks(inode, len) == 0)
> > > - len = blks_to_bytes(inode, 1);
> > > + if (len & (blks_to_bytes(inode, 1) - 1))
> > > + len = round_up(len, blks_to_bytes(inode, 1));
> > >
> > > start_blk = bytes_to_blks(inode, start);
> > > last_blk = bytes_to_blks(inode, start + len - 1);
> >
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [f2fs-dev] [PATCH 2/2] f2fs: fix to adjust appropriate length for fiemap
2024-11-01 2:36 ` Chao Yu via Linux-f2fs-devel
2024-11-01 3:27 ` Zhiguo Niu
@ 2024-11-01 8:00 ` Zhiguo Niu
1 sibling, 0 replies; 8+ messages in thread
From: Zhiguo Niu @ 2024-11-01 8:00 UTC (permalink / raw)
To: Chao Yu
Cc: ke.wang, linux-kernel, linux-f2fs-devel, Zhiguo Niu, jaegeuk,
Hao_hao.Wang
Chao Yu <chao@kernel.org> 于2024年11月1日周五 10:36写道:
>
> On 2024/10/31 13:59, Zhiguo Niu wrote:
> > If user give a file size as "length" parameter for fiemap
> > operations, but this size is non-block size aligned,
> > it will show 2 segments fiemap results even this whole file
> > is contiguous on disk, such as the following results, please
> > note that this f2fs_io has been modified for testing.
> >
> > ./f2fs_io fiemap 0 19304 ylog/analyzer.py
> > Fiemap: offset = 0 len = 19304
> > logical addr. physical addr. length flags
> > 0 0000000000000000 0000000020baa000 0000000000004000 00001000
> > 1 0000000000004000 0000000020bae000 0000000000001000 00001001
> >
> > after this patch:
> > ./f2fs_io fiemap 0 19304 ylog/analyzer.py
> > Fiemap: offset = 0 len = 19304
> > logical addr. physical addr. length flags
> > 0 0000000000000000 00000000315f3000 0000000000005000 00001000
>
> Why is FIEMAP_EXTENT_LAST missing in #0 extent? As we can see it
> in #1 extent before your change.
Hi Chao,
after I confirm, this log came from my local code and with some other
modification.
And after I use the f2fs original code with this patch , can see the
FIEMAP_EXTENT_LAST
has been tagged, the following is the fiemap log.
/f2fs_io fiemap 0 19034 ylog/analyzer.py <
Fiemap: offset = 0 len = 19034
logical addr. physical addr. length flags
0 0000000000000000 00000000315f3000 0000000000005000 00001001
I will update the commit msg in the next version after reviewing.
Thanks a lot.
>
> 1 0000000000004000 0000000020bae000 0000000000001000 00001001
>
> Thanks,
>
> >
> > Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
> > ---
> > f2fs_io has been modified for testing, the length for fiemap is
> > real file size, not block number
> > ---
> > fs/f2fs/data.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> > index 90fa8ab..8c9bb42 100644
> > --- a/fs/f2fs/data.c
> > +++ b/fs/f2fs/data.c
> > @@ -1966,8 +1966,8 @@ int f2fs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
> > goto out;
> > }
> >
> > - if (bytes_to_blks(inode, len) == 0)
> > - len = blks_to_bytes(inode, 1);
> > + if (len & (blks_to_bytes(inode, 1) - 1))
> > + len = round_up(len, blks_to_bytes(inode, 1));
> >
> > start_blk = bytes_to_blks(inode, start);
> > last_blk = bytes_to_blks(inode, start + len - 1);
>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [f2fs-dev] [PATCH 1/2] f2fs: remove redundant atomic file check in defragment
2024-10-31 5:59 [f2fs-dev] [PATCH 1/2] f2fs: remove redundant atomic file check in defragment Zhiguo Niu
2024-10-31 5:59 ` [f2fs-dev] [PATCH 2/2] f2fs: fix to adjust appropriate length for fiemap Zhiguo Niu
2024-10-31 7:52 ` [f2fs-dev] [PATCH 1/2] f2fs: remove redundant atomic file check in defragment Chao Yu via Linux-f2fs-devel
@ 2024-11-07 20:30 ` patchwork-bot+f2fs--- via Linux-f2fs-devel
2 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+f2fs--- via Linux-f2fs-devel @ 2024-11-07 20:30 UTC (permalink / raw)
To: Zhiguo Niu; +Cc: ke.wang, linux-kernel, linux-f2fs-devel, jaegeuk, Hao_hao.Wang
Hello:
This series was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:
On Thu, 31 Oct 2024 13:59:52 +0800 you wrote:
> f2fs_is_atomic_file(inode) is checked in f2fs_defragment_range,
> so remove the redundant checking in f2fs_ioc_defragment.
>
> Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
> ---
> fs/f2fs/file.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- [f2fs-dev,1/2] f2fs: remove redundant atomic file check in defragment
https://git.kernel.org/jaegeuk/f2fs/c/744e66cb8779
- [f2fs-dev,2/2] f2fs: fix to adjust appropriate length for fiemap
(no matching commit)
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-11-07 20:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-31 5:59 [f2fs-dev] [PATCH 1/2] f2fs: remove redundant atomic file check in defragment Zhiguo Niu
2024-10-31 5:59 ` [f2fs-dev] [PATCH 2/2] f2fs: fix to adjust appropriate length for fiemap Zhiguo Niu
2024-11-01 2:36 ` Chao Yu via Linux-f2fs-devel
2024-11-01 3:27 ` Zhiguo Niu
2024-11-01 5:48 ` Zhiguo Niu
2024-11-01 8:00 ` Zhiguo Niu
2024-10-31 7:52 ` [f2fs-dev] [PATCH 1/2] f2fs: remove redundant atomic file check in defragment Chao Yu via Linux-f2fs-devel
2024-11-07 20:30 ` patchwork-bot+f2fs--- via Linux-f2fs-devel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.