Re: About using on-stack fsdata pointer for write_begin() and write_end() callbacks

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

 





在 2024/11/12 16:36, Christoph Hellwig 写道:
On Tue, Nov 12, 2024 at 04:33:56PM +1030, Qu Wenruo wrote:
IIRC it's related to the get_user_page() shenanigans but not 100% sure.

While there might be a few stragglers left, everyone should be using
pin_user_pages when manipulating page contents.  The long tolerated
just pin and mark dirty is officially a bug now.

Great to know that.


I'm talking about the iomap_set_range_dirty() call inside
iomap_writepage_map(), for the "if (i_blocks_per_folio() > 1)" branch.

That does not set the page dirty.  It propagatates the per-folio
dirty state into the per-block dirty bitmap allocated in the line
above.

I know, I just want to say it's marking the whole folio to be written back.

And in that out-of-band case, shouldn't we error out now instead of
marking the range to be written back?
Especially such out-of-band folio is unstable and can lead to other
problems, like content change halfway and causing csum mismatch.

And if that's the case, I think it will be much easier for btrfs to get
rid of its cow fixup workaround.

Thanks,
Qu





[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