[dm-devel] [PATCH v4 08/13] btrfs:zoned: make sb for npo2 zone devices align with sb log offsets

2022-05-16 Thread Pankaj Raghav
Superblocks for zoned devices are fixed as 2 zones at 0, 512GB and 4TB. These are fixed at these locations so that recovery tools can reliably retrieve the superblocks even if one of the mirror gets corrupted. power of 2 zone sizes align at these offsets irrespective of their value but non power o

Re: [dm-devel] [PATCH v4 08/13] btrfs:zoned: make sb for npo2 zone devices align with sb log offsets

2022-05-17 Thread Pankaj Raghav
On 2022-05-17 08:50, Johannes Thumshirn wrote: > On 16/05/2022 18:55, Pankaj Raghav wrote: >> Superblocks for zoned devices are fixed as 2 zones at 0, 512GB and 4TB. >> These are fixed at these locations so that recovery tools can reliably >> retrieve the superblocks even if one of the mirror gets

Re: [dm-devel] [PATCH v4 08/13] btrfs:zoned: make sb for npo2 zone devices align with sb log offsets

2022-05-17 Thread David Sterba
On Mon, May 16, 2022 at 06:54:11PM +0200, Pankaj Raghav wrote: > Superblocks for zoned devices are fixed as 2 zones at 0, 512GB and 4TB. > These are fixed at these locations so that recovery tools can reliably > retrieve the superblocks even if one of the mirror gets corrupted. > > power of 2 zone

Re: [dm-devel] [PATCH v4 08/13] btrfs:zoned: make sb for npo2 zone devices align with sb log offsets

2022-05-18 Thread Pankaj Raghav
On 2022-05-17 14:42, David Sterba wrote: > On Mon, May 16, 2022 at 06:54:11PM +0200, Pankaj Raghav wrote: >> Superblocks for zoned devices are fixed as 2 zones at 0, 512GB and 4TB. >> These are fixed at these locations so that recovery tools can reliably >> retrieve the superblocks even if one of t

Re: [dm-devel] [PATCH v4 08/13] btrfs:zoned: make sb for npo2 zone devices align with sb log offsets

2022-05-19 Thread Johannes Thumshirn
On 18/05/2022 11:17, Pankaj Raghav wrote: > On 2022-05-17 14:42, David Sterba wrote: >> On Mon, May 16, 2022 at 06:54:11PM +0200, Pankaj Raghav wrote: >>> Superblocks for zoned devices are fixed as 2 zones at 0, 512GB and 4TB. >>> These are fixed at these locations so that recovery tools can reliab

Re: [dm-devel] [PATCH v4 08/13] btrfs:zoned: make sb for npo2 zone devices align with sb log offsets

2022-05-20 Thread Pankaj Raghav
On 5/19/22 09:57, Johannes Thumshirn wrote: >> Unfortunately it is not possible to just move the WP in zoned devices. >> The only alternative that I could use is to do write zeroes which are >> natively supported by some devices such as ZNS. It would be nice to know >> if someone had a better solut

Re: [dm-devel] [PATCH v4 08/13] btrfs:zoned: make sb for npo2 zone devices align with sb log offsets

2022-05-20 Thread Pankaj Raghav
On 5/19/22 09:59, Naohiro Aota wrote: >> + >> static int sb_log_location(struct block_device *bdev, struct blk_zone >> *zones, >> - int rw, u64 *bytenr_ret) >> + int rw, int mirror, u64 *bytenr_ret) >> { >> u64 wp; >> int ret; >> +bool zo

Re: [dm-devel] [PATCH v4 08/13] btrfs:zoned: make sb for npo2 zone devices align with sb log offsets

2022-05-20 Thread Johannes Thumshirn
On 20/05/2022 11:07, Pankaj Raghav wrote: > On 5/19/22 09:57, Johannes Thumshirn wrote: >>> Unfortunately it is not possible to just move the WP in zoned devices. >>> The only alternative that I could use is to do write zeroes which are >>> natively supported by some devices such as ZNS. It would b