Re: [PATCH v1 01/12] f2fs: cache: implement metadata cache

From: Wenjie Qi

Date: Sun Aug 23 2026 - 08:53:30 EST


Hi Chao,

> static void f2fs_zone_write_end_io(struct bio *bio)
> {
> bio->bi_private = io->bi_private;
> complete(&io->zone_wait);
> if (io->fio.is_cache)
> f2fs_cache_write_end_io(bio);
> else
> f2fs_write_end_io(bio);
> }

`io->fio` is updated when the next BIO is prepared. Once
`complete(&io->zone_wait)` wakes the waiting writer, that preparation can
run before this callback reads `io->fio.is_cache`.

Is there another serialization condition that keeps `io->fio.is_cache`
unchanged between `complete()` and this read?