All of lore.kernel.org
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH v2] f2fs: compress: remove unneeded read when rewrite whole cluster
@ 2021-06-22 11:50 Fengnan Chang
  2021-06-25  3:56 ` Fengnan Chang
  2021-07-13  2:35 ` Fengnan Chang
  0 siblings, 2 replies; 7+ messages in thread
From: Fengnan Chang @ 2021-06-22 11:50 UTC (permalink / raw)
  To: jaegeuk, chao, linux-f2fs-devel; +Cc: 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 <changfengnan@vivo.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Acked-by: Chao Yu <yuchao0@huawei.com>
---
 fs/f2fs/data.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 3a01a1b50104..2aeb1196cd5f 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -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
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [f2fs-dev] [PATCH v2] f2fs: compress: remove unneeded read when rewrite whole cluster
  2021-06-22 11:50 [f2fs-dev] [PATCH v2] f2fs: compress: remove unneeded read when rewrite whole cluster Fengnan Chang
@ 2021-06-25  3:56 ` Fengnan Chang
  2021-07-13  2:35 ` Fengnan Chang
  1 sibling, 0 replies; 7+ messages in thread
From: Fengnan Chang @ 2021-06-25  3:56 UTC (permalink / raw)
  To: jaegeuk, chao, linux-f2fs-devel

Hi Jaegeuk:

    FYI, I have run xfstest fast test on linux-5.13.0-rc1 + patch, no 
new failure case.

Thanks.

On 2021/6/22 19:50, Fengnan Chang wrote:
> 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 <changfengnan@vivo.com>
> Signed-off-by: Chao Yu <yuchao0@huawei.com>
> Acked-by: Chao Yu <yuchao0@huawei.com>
> ---
>   fs/f2fs/data.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index 3a01a1b50104..2aeb1196cd5f 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -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
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [f2fs-dev] [PATCH v2] f2fs: compress: remove unneeded read when rewrite whole cluster
  2021-06-22 11:50 [f2fs-dev] [PATCH v2] f2fs: compress: remove unneeded read when rewrite whole cluster Fengnan Chang
  2021-06-25  3:56 ` Fengnan Chang
@ 2021-07-13  2:35 ` Fengnan Chang
  2021-07-13  9:45   ` Chao Yu
  1 sibling, 1 reply; 7+ messages in thread
From: Fengnan Chang @ 2021-07-13  2:35 UTC (permalink / raw)
  To: jaegeuk, chao, linux-f2fs-devel; +Cc: Chao Yu

Hi Jaegeuk:
	Any comments about this version?

On 2021/6/22 19:50, Fengnan Chang wrote:
> 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 <changfengnan@vivo.com>
> Signed-off-by: Chao Yu <yuchao0@huawei.com>
> Acked-by: Chao Yu <yuchao0@huawei.com>
> ---
>   fs/f2fs/data.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index 3a01a1b50104..2aeb1196cd5f 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -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
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [f2fs-dev] [PATCH v2] f2fs: compress: remove unneeded read when rewrite whole cluster
  2021-07-13  2:35 ` Fengnan Chang
@ 2021-07-13  9:45   ` Chao Yu
  2021-07-13 23:44     ` Jaegeuk Kim
  0 siblings, 1 reply; 7+ messages in thread
From: Chao Yu @ 2021-07-13  9:45 UTC (permalink / raw)
  To: jaegeuk; +Cc: Fengnan Chang, linux-f2fs-devel

On 2021/7/13 10:35, Fengnan Chang wrote:
> Hi Jaegeuk:
> 	Any comments about this version?
> 
> On 2021/6/22 19:50, Fengnan Chang wrote:
>> 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
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [f2fs-dev] [PATCH v2] f2fs: compress: remove unneeded read when rewrite whole cluster
  2021-07-13  9:45   ` Chao Yu
@ 2021-07-13 23:44     ` Jaegeuk Kim
  2021-07-14  1:18       ` Chao Yu
  0 siblings, 1 reply; 7+ messages in thread
From: Jaegeuk Kim @ 2021-07-13 23:44 UTC (permalink / raw)
  To: Chao Yu; +Cc: Fengnan Chang, linux-f2fs-devel

On 07/13, Chao Yu wrote:
> On 2021/7/13 10:35, Fengnan Chang wrote:
> > Hi Jaegeuk:
> > 	Any comments about this version?
> > 
> > On 2021/6/22 19:50, Fengnan Chang wrote:
> > > 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?

> 
> 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] 7+ messages in thread

* Re: [f2fs-dev] [PATCH v2] f2fs: compress: remove unneeded read when rewrite whole cluster
  2021-07-13 23:44     ` Jaegeuk Kim
@ 2021-07-14  1:18       ` Chao Yu
  2021-07-19 10:14         ` Chao Yu
  0 siblings, 1 reply; 7+ messages in thread
From: Chao Yu @ 2021-07-14  1:18 UTC (permalink / raw)
  To: Jaegeuk Kim; +Cc: Fengnan Chang, linux-f2fs-devel

On 2021/7/14 7:44, Jaegeuk Kim wrote:
> On 07/13, Chao Yu wrote:
>> On 2021/7/13 10:35, Fengnan Chang wrote:
>>> Hi Jaegeuk:
>>> 	Any comments about this version?
>>>
>>> On 2021/6/22 19:50, Fengnan Chang wrote:
>>>> 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?

Yup, I just plan to do this, may focus on data consistence.

Thanks,

> 
>>
>> 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] 7+ messages in thread

* Re: [f2fs-dev] [PATCH v2] f2fs: compress: remove unneeded read when rewrite whole cluster
  2021-07-14  1:18       ` Chao Yu
@ 2021-07-19 10:14         ` Chao Yu
  0 siblings, 0 replies; 7+ messages in thread
From: Chao Yu @ 2021-07-19 10:14 UTC (permalink / raw)
  To: Jaegeuk Kim; +Cc: Fengnan Chang, linux-f2fs-devel

On 2021/7/14 9:18, Chao Yu wrote:
> On 2021/7/14 7:44, Jaegeuk Kim wrote:
>> On 07/13, Chao Yu wrote:
>>> On 2021/7/13 10:35, Fengnan Chang wrote:
>>>> Hi Jaegeuk:
>>>> 	Any comments about this version?
>>>>
>>>> On 2021/6/22 19:50, Fengnan Chang wrote:
>>>>> 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?
> 
> 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,

> 
> Thanks,
> 
>>
>>>
>>> Thanks,
> 
> 
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
> 


_______________________________________________
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] 7+ messages in thread

end of thread, other threads:[~2021-07-19 10:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-22 11:50 [f2fs-dev] [PATCH v2] f2fs: compress: remove unneeded read when rewrite whole cluster Fengnan Chang
2021-06-25  3:56 ` Fengnan Chang
2021-07-13  2:35 ` Fengnan Chang
2021-07-13  9:45   ` Chao Yu
2021-07-13 23:44     ` Jaegeuk Kim
2021-07-14  1:18       ` Chao Yu
2021-07-19 10:14         ` Chao Yu

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.