Re: [f2fs-dev] [RFC PATCH v2 01/10] f2fs: extend folio state for large folio write path
Nanzhe Zhao via Linux-f2fs-devel <[email protected]>
| Newsgroups | net.sourceforge.lists.linux-f2fs-devel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi Chao, Yes, this can happen. By design, prepare_large_folio_write_begin() skips f2fs_folio_state allocation when the write fully covers the entire large folio (i.e., the folio is already uptodate or len == folio_size(folio)). This is an optimization for normal buffered writes; I somehow didn't apply the same optimization to atomic buffered writes since they are relatively rare. In that case, f2fs_update_dirty_folio() may call folio_set_f2fs_reference() on a large folio that does not yet have an ffs, so the flag is stored directly in folio->private. But I agree this is a bit subtle and worth discussing. Thanks, Nanzhe _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel