]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: zoned: locate superblock position using zone capacity
authorNaohiro Aota <naohiro.aota@wdc.com>
Thu, 19 Aug 2021 12:19:13 +0000 (21:19 +0900)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Oct 2021 17:07:59 +0000 (19:07 +0200)
commit2d19b9c80e78414eb407d4d75164ba9e2e7bb641
tree225f100181fcc5030c273a787cc660ed129903f5
parent6f1fdbcbc5ca13799241b9896aaa8e8d2aaddad2
btrfs: zoned: locate superblock position using zone capacity

sb_write_pointer() returns the write position of next superblock. For READ,
we need a previous location. When the pointer is at the head, the previous
one is the last one of the other zone. Calculate the last one's position
from zone capacity.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/zoned.c