f2fs: compress: remove unneeded read when rewrite whole cluster
PATCH v2 1/1 f2fs: compress: remove unneeded read when rewrite whole cluster
when we overwrite the whole page in cluster, we don't need read original data before write, because after write_end(), writepages() can help to load left data in that cluster.
--- fs/f2fs/data.c | 3 +++ 1 file changed, 3 insertions(+)
fs/f2fs/data.c +3 -0
@@ -3328,6 +3328,9 @@ static int f2fs_write_begin(struct file *file, struct address_space *mapping, *fsdata =NULL ; +if (len ==PAGE_SIZE ) + goto repeat; + ret =f2fs_prepare_compress_overwrite (inode, pagep, index, fsdata);if (ret <0 ) {
--
2.29.0
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Hi Jaegeuk:
FYI, I have run xfstest fast test on linux-5.13.0-rc1 + patch, no
new failure case.
Thanks.
Quoted 26 lines · Fengnan Chang
when we overwrite the whole page in cluster, we don't need read original data before write, because after
write_end(),writepages()can help to load left data in that cluster.Signed-off-by Fengnan Chang <[email protected]>Signed-off-by Chao Yu <[email protected]>Acked-by Chao Yu <[email protected]>--- fs/f2fs/data.c | 3 +++ 1 file changed, 3 insertions(+)fs/f2fs/data.c +3
-1@@ -3328,6 +3328,9 @@ static int f2fs_write_begin(struct file *file, struct address_space *mapping, *fsdata =NULL ; +if (len ==PAGE_SIZE ) + goto repeat; + ret =f2fs_prepare_compress_overwrite (inode, pagep, index, fsdata);if (ret <0 ) { --
Quoted 3 lines
2.29.0
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Hi Jaegeuk:
Any comments about this version?
Quoted 26 lines · Fengnan Chang
when we overwrite the whole page in cluster, we don't need read original data before write, because after
write_end(),writepages()can help to load left data in that cluster.Signed-off-by Fengnan Chang <[email protected]>Signed-off-by Chao Yu <[email protected]>Acked-by Chao Yu <[email protected]>--- fs/f2fs/data.c | 3 +++ 1 file changed, 3 insertions(+)fs/f2fs/data.c +3
-1@@ -3328,6 +3328,9 @@ static int f2fs_write_begin(struct file *file, struct address_space *mapping, *fsdata =NULL ; +if (len ==PAGE_SIZE ) + goto repeat; + ret =f2fs_prepare_compress_overwrite (inode, pagep, index, fsdata);if (ret <0 ) { --
Quoted 3 lines
2.29.0
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Chao Yu
maintainerQuoted 7 lines · Fengnan Chang
Hi Jaegeuk:
Any comments about this version?Quoted 3 lines · Fengnan Chang
when we overwrite the whole page in cluster, we don't need read original data before write, because after
write_end(),writepages()can help to load left data in that cluster.
Jaegeuk,
Let's queue this in dev-test for testing?
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Jaegeuk Kim
maintainerQuoted 4 lines · Chao Yu
Quoted 3 lines · Fengnan Chang
Hi Jaegeuk:
Any comments about this version?
Quoted 8 lines
Quoted 4 lines · Fengnan Chang
Quoted 3 lines
when we overwrite the whole page in cluster, we don't need read original data before write, because after
write_end(),writepages()can help to load left data in that cluster.Jaegeuk,
Let's queue this in dev-test for testing?
A bit worry about unknown corner cases tho, Chao, could you please test as well?
Quoted 2 lines
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Chao Yu
maintainerQuoted 10 lines · Jaegeuk Kim
Quoted 9 lines · Chao Yu
Quoted 7 lines · Fengnan Chang
Hi Jaegeuk:
Any comments about this version?Quoted 3 lines · Fengnan Chang
when we overwrite the whole page in cluster, we don't need read original data before write, because after
write_end(),writepages()can help to load left data in that cluster.
Quoted 6 lines
Quoted 3 lines
Jaegeuk,
Let's queue this in dev-test for testing?
A bit worry about unknown corner cases tho, Chao, could you please test as well?
Yup, I just plan to do this, may focus on data consistence.
Thanks,
Quoted 3 lines
Quoted 3 lines
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Chao Yu
maintainerQuoted 11 lines · Chao Yu
Quoted 10 lines · Jaegeuk Kim
Quoted 9 lines · Chao Yu
Quoted 7 lines · Fengnan Chang
Hi Jaegeuk:
Any comments about this version?Quoted 3 lines · Fengnan Chang
when we overwrite the whole page in cluster, we don't need read original data before write, because after
write_end(),writepages()can help to load left data in that cluster.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Jaegeuk,
Let's queue this in dev-test for testing?
A bit worry about unknown corner cases tho, Chao, could you please test as well?
Yup, I just plan to do this, may focus on data consistence.
I have time to check the data consistence for this change, I've ran a customized script (overwrite partial blocks of compressed cluster with original data, sync, drop cache and compare the data), there is no data corruption till now.
Thanks,
Quoted 5 lines
Thanks,
Quoted 2 lines
Quoted 2 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel