]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: zoned: bail out if we can't read a reliable write pointer
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Fri, 30 Apr 2021 13:34:18 +0000 (15:34 +0200)
committerDavid Sterba <dsterba@suse.com>
Tue, 4 May 2021 12:41:57 +0000 (14:41 +0200)
commit84772b10025b646a0e8cd705b68c7fbfdb53612e
tree6c07a3ed55ef1c6e69ff839d261665cdeef4be29
parent784daf2b9628f2d0117f1f0b578cfe5ab6634919
btrfs: zoned: bail out if we can't read a reliable write pointer

If we can't read a reliable write pointer from a sequential zone fail
creating the block group with an I/O error.

Also if the read write pointer is beyond the end of the respective zone,
fail the creation of the block group on this zone with an I/O error.

While this could also happen in real world scenarios with misbehaving
drives, this issue addresses a problem uncovered by fstests' test case
generic/475.

CC: stable@vger.kernel.org # 5.12+
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/zoned.c