All of lore.kernel.org
 help / color / mirror / Atom feed
From: <changfengnan@vivo.com>
To: "'Chao Yu'" <yuchao0@huawei.com>, <jaegeuk@kernel.org>,
	<chao@kernel.org>, <linux-f2fs-devel@lists.sourceforge.net>
Subject: [f2fs-dev] 答复:  [RFC PATCH] f2fs: compress: remove unneeded read when rewrite whole cluster
Date: Tue, 25 May 2021 20:05:33 +0800	[thread overview]
Message-ID: <000001d7515e$458f3db0$d0adb910$@vivo.com> (raw)
In-Reply-To: <7ad8bae8-6e38-5ff7-add8-fe1023569f43@huawei.com>

yes, I just check wheather the whole page was dirty, because of when write
cache f2fs_prepare_compress_overwrite will be called again, 
when update whole cluster,  cc in prepare_compress_overwrite will be empty,
so will not submit bio.
when only update one page in cluster,  cc in prepare_compress_overwrite will
not be empty, so will submit bio.
This is my thinking, not sure if I've missed anything


-----邮件原件-----
发件人: Chao Yu <yuchao0@huawei.com> 
发送时间: 2021年5月24日 19:39
收件人: Fengnan Chang <changfengnan@vivo.com>; jaegeuk@kernel.org;
chao@kernel.org; linux-f2fs-devel@lists.sourceforge.net
主题: Re: [f2fs-dev] [RFC PATCH] f2fs: compress: remove unneeded read when
rewrite whole cluster

On 2021/5/18 20:51, Fengnan Chang wrote:
> For now,when overwrite compressed file, we need read old data to page 
> cache first and update pages.
> But when we need overwrite whole cluster, we don't need old data 
> anymore.

I only see you just check the whole page was dirty as below rather than the
whole cluster is dirty during write().

Thanks,

> +	if (len == PAGE_SIZE)
> +		return 0;
>   	/* compressed case */
>   	prealloc = (ret < cc->cluster_size);
>   




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

  reply	other threads:[~2021-05-25 12:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 12:51 [f2fs-dev] [RFC PATCH] f2fs: compress: remove unneeded read when rewrite whole cluster Fengnan Chang
2021-05-21  8:38 ` [f2fs-dev] 答复: " changfengnan
2021-05-24 11:38 ` [f2fs-dev] " Chao Yu
2021-05-25 12:05   ` changfengnan [this message]
2021-05-28  2:49     ` [f2fs-dev] 答复: " Chao Yu
2021-05-29  1:13       ` Chao Yu
2021-06-08 12:47         ` [f2fs-dev] 答复: " changfengnan--- via Linux-f2fs-devel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000001d7515e$458f3db0$d0adb910$@vivo.com' \
    --to=changfengnan@vivo.com \
    --cc=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=yuchao0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.