On Mon, Feb 22, 2021 at 04:50:43PM +0900, Naohiro Aota wrote: > > For real hardware I think this is not relevant but for the emulated mode > > we need to deal with that case. The reserved size is wasteful and this > > will become noticeable for devices < 16G but I'd rather keep the logic > > simple and not care much about this corner case. So, the superblock > > range would be reserved and if there's not enough to store the secondary > > sb, then don't. > > Sure. That works. I'm running xfstests with these new SB > locations. Once it passed, I'll post the patch. > > One corner case left. What should we do with zone size > 8G? In this > case, the primary SB zones and the 1st copy SB zones overlap. I know > this is unrealistic for real hardware, but you can still create such a > device with null_blk. > > 1) Use the following zones (zones #2, #3) as the primary SB zones > 2) Do not write the primary SBs > 3) Reject to mkfs > > To be simple logic, method #3 would be appropriate here? > > Technically, all the log zones overlap with zone size > 128 GB. I'm > considering to reject to mkfs in this insane case anyway. The 8G zone size idea is to buy us some time to support future hardware, once this won't suffice we'll add an incompat bit like BIGZONES that will allow larger zone sizes. At that time we'll probably have a better idea about an exact number. So it's #3.