bcachefs: folio pos to bch_folio_sector index helper
authorBrian Foster <bfoster@redhat.com>
Mon, 3 Apr 2023 12:17:26 +0000 (08:17 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:00 +0000 (17:10 -0400)
commitbf98ee10d45af8e97c0802e39cc77ee607072633
treeff208e015921eecbaced1c6201a47cbfb7d2f901
parente3dc75eb551599c356a9a3f8c00ae6396164457d
bcachefs: folio pos to bch_folio_sector index helper

Create a small helper to translate from file offset to the
associated bch_folio_sector index in the underlying bch_folio. The
helper assumes the file offset is covered by the passed folio.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs-io.c