On 11/02/2021 16:21, David Sterba wrote: > On Thu, Feb 11, 2021 at 09:58:09AM +0000, Johannes Thumshirn wrote: >> On 10/02/2021 21:02, David Sterba wrote: >>>> This series implements superblock log writing. It uses two zones as a >>>> circular buffer to write updated superblocks. Once the first zone is filled >>>> up, start writing into the second zone. The first zone will be reset once >>>> both zones are filled. We can determine the postion of the latest >>>> superblock by reading the write pointer information from a device. >>> >>> About that, in this patchset it's still leaving superblock at the fixed >>> zone number while we want it at a fixed location, spanning 2 zones >>> regardless of their size. >> >> We'll always need 2 zones or otherwise we won't be powercut safe. > > Yes we do, that hasn't changed. > OK that I don't understand, with the log structured superblocks on a zoned filesystem, we're writing a new superblock until the 1st zone is filled. Then we advance to the second zone. As soon as we wrote a superblock to the second zone we can reset the first. If we only use one zone, we would need to write until it's end, reset and start writing again from the beginning. But if a powercut happens between reset and first write after the reset, we end up with no superblock.