On Wed, Mar 03, 2021 at 05:55:47PM +0900, Naohiro Aota wrote: > This commit moves the location of superblock logging zones basing on the > fixed address instead of the fixed zone number. > > By locating the superblock zones using fixed addresses, we can scan a > dumped file system image without the zone information. And, no drawbacks > exist. > > The following zones are reserved as the circular buffer on zoned btrfs. > - The primary superblock: zone at LBA 0 and the next zone > - The first copy: zone at LBA 16G and the next zone > - The second copy: zone at LBA 256G and the next zone > > If the location of the zones are outside of disk, we don't record the > superblock copy. > > The addresses are much larger than the usual superblock copies locations. > The copies' locations are decided to support possible future larger zone > size, not to overlap the log zones. We support zone size up to 8GB. One thing I don't see is that the reserved space for superblock is fixed regardless of the actual device zone size. In exclude_super_stripes. 0-16G for primary ... and now what, 16G would be the next copy thus reserving 16 up to 32G So the 64G offset for the 1st copy is more suitable: 0 - 16G primary 64G - 80G 1st copy 256G - 272G 2nd copy This still does not sound great because it just builds on the original offsets from 10 years ago. The device sizes are expected to be in terabytes but all the superblocks are in the first terabyte. What if we do that like 0 - 16G 1T - 1T+16G 8T - 8T+16G The HDD sizes start somewhere at 4T so the first two copies cover the small sizes, larger have all three copies. But we could go wild even more, like 0/4T/16T. I'm not sure if the capacities for non-HDD are going to be also that large, I could not find anything specific, the only existing ZNS is some DC ZN540 but no details. We need to get this right (best effort), so I'll postpone this patch until it's all sorted.