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. This is regarding to > Why this can happen? allocating large folio from other paths? > > referring to: > if (folio_test_private(folio) && folio_test_f2fs_nonpointer(folio)) > private_flags = (unsigned long)folio->private; Thanks, Nanzhe _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel