Re: [PATCH v2] exfat: move extend valid_size into ->page_mkwrite()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2024년 4월 8일 (월) 오후 1:09, Yuezhang.Mo@xxxxxxxx <Yuezhang.Mo@xxxxxxxx>님이 작성:
>
> 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@xxxxxxxx>
Applied it to #dev.
Thanks for your patch!





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux