bcachefs: Unwritten extents support
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 13 Nov 2022 23:59:01 +0000 (18:59 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:51 +0000 (17:09 -0400)
commit792031116bee35e13be7c8ae8cf1b8eec141b136
treef1334e71612d6af74210020546f181c259478732
parent2f1f7fe98d1da65c5ef646a90770b17cb012f1ee
bcachefs: Unwritten extents support

 - bch2_extent_merge checks unwritten bit
 - read path returns 0s for unwritten extents without actually reading
 - reflink path skips over unwritten extents
 - bch2_bkey_ptrs_invalid() checks for extents with both written and
   unwritten extents, and non-normal extents (stripes, btree ptrs) with
   unwritten ptrs
 - fiemap checks for unwritten extents and returns
   FIEMAP_EXTENT_UNWRITTEN

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bcachefs_format.h
fs/bcachefs/extents.c
fs/bcachefs/extents.h
fs/bcachefs/fs-io.c
fs/bcachefs/fs.c
fs/bcachefs/fsck.c
fs/bcachefs/io.c
fs/bcachefs/reflink.c