iomap: Rename iomap_page to iomap_folio_state and others
authorRitesh Harjani (IBM) <ritesh.list@gmail.com>
Mon, 10 Jul 2023 21:11:19 +0000 (14:11 -0700)
committerRitesh Harjani (IBM) <ritesh.list@gmail.com>
Tue, 25 Jul 2023 05:25:54 +0000 (10:55 +0530)
commit04f52c4e6f8001e2d81006027dac08badddafde8
treefbb600b5de04a261127d9ddb1acabe0fd113a524
parentd42bd17c6a20638ddf96862bfc0c47e481c28392
iomap: Rename iomap_page to iomap_folio_state and others

struct iomap_page actually tracks per-block state of a folio.
Hence it make sense to rename some of these function names and data
structures for e.g.
1. struct iomap_page (iop) -> struct iomap_folio_state (ifs)
2. iomap_page_create() -> ifs_alloc()
3. iomap_page_release() -> ifs_free()
4. iomap_iop_set_range_uptodate() -> ifs_set_range_uptodate()
5. to_iomap_page() -> folio->private

Since in later patches we are also going to add per-block dirty state
tracking to iomap_folio_state. Hence this patch also renames "uptodate"
& "uptodate_lock" members of iomap_folio_state to "state" and"state_lock".

We don't really need to_iomap_page() function, instead directly open code
it as folio->private;

Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
fs/iomap/buffered-io.c