linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namjae Jeon <linkinjeon@kernel.org>
To: "Yuezhang.Mo@sony.com" <Yuezhang.Mo@sony.com>
Cc: "sj1557.seo@samsung.com" <sj1557.seo@samsung.com>,
	 "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"Andy.Wu@sony.com" <Andy.Wu@sony.com>,
	 "Wataru.Aoyama@sony.com" <Wataru.Aoyama@sony.com>,
	Matthew Wilcox <willy@infradead.org>,
	 "dchinner@redhat.com" <dchinner@redhat.com>
Subject: Re: [PATCH v2] exfat: move extend valid_size into ->page_mkwrite()
Date: Fri, 12 Apr 2024 10:06:28 +0900	[thread overview]
Message-ID: <CAKYAXd9o8o2CPk_i2COJW4JrjNc0_BTha5dvm76X4=FiBnyeuw@mail.gmail.com> (raw)
In-Reply-To: <PUZPR04MB63160EDE1B2FB47D80B717D481002@PUZPR04MB6316.apcprd04.prod.outlook.com>

2024년 4월 8일 (월) 오후 1:09, Yuezhang.Mo@sony.com <Yuezhang.Mo@sony.com>님이 작성:
>
> It is not a good way to extend valid_size to the end of the
> mmap area by writing zeros in mmap. Because after calling mmap,
> no data may be written, or only a small amount of data may be
> written to the head of the mmap area.
>
> This commit moves extending valid_size to exfat_page_mkwrite().
> In exfat_page_mkwrite() only extend valid_size to the starting
> position of new data writing, which reduces unnecessary writing
> of zeros.
>
> If the block is not mapped and is marked as new after being
> mapped for writing, block_write_begin() will zero the page
> cache corresponding to the block, so there is no need to call
> zero_user_segment() in exfat_file_zeroed_range(). And after moving
> extending valid_size to exfat_page_mkwrite(), the data written by
> mmap will be copied to the page cache but the page cache may be
> not mapped to the disk. Calling zero_user_segment() will cause
> the data written by mmap to be cleared. So this commit removes
> calling zero_user_segment() from exfat_file_zeroed_range() and
> renames exfat_file_zeroed_range() to exfat_extend_valid_size().
>
> Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Applied it to #dev.
Thanks for your patch!

      reply	other threads:[~2024-04-12  1:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08  4:09 [PATCH v2] exfat: move extend valid_size into ->page_mkwrite() Yuezhang.Mo
2024-04-12  1:06 ` Namjae Jeon [this message]

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='CAKYAXd9o8o2CPk_i2COJW4JrjNc0_BTha5dvm76X4=FiBnyeuw@mail.gmail.com' \
    --to=linkinjeon@kernel.org \
    --cc=Andy.Wu@sony.com \
    --cc=Wataru.Aoyama@sony.com \
    --cc=Yuezhang.Mo@sony.com \
    --cc=dchinner@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=sj1557.seo@samsung.com \
    --cc=willy@infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).