Re: [PATCH v2 2/3] blkid: add magic and probing for zoned btrfs

2021-04-16 Thread David Sterba
On Wed, Apr 14, 2021 at 10:33:38AM +0900, Naohiro Aota wrote: > It also supports temporary magic ("!BHRfS_M") in zone #0. The mkfs.btrfs > first writes the temporary superblock to the zone during the mkfs process. > It will survive there until the zones are filled up and reset. So, we also > need t

Re: [PATCH v2 2/3] blkid: add magic and probing for zoned btrfs

2021-04-14 Thread Naohiro Aota
On Wed, Apr 14, 2021 at 03:47:08PM +0200, Karel Zak wrote: > On Wed, Apr 14, 2021 at 10:33:38AM +0900, Naohiro Aota wrote: > > +#define ASSERT(x) assert(x) > > Really? ;-) > > > +typedef uint64_t u64; > > +typedef uint64_t sector_t; > > +typedef uint8_t u8; > > I do not see a reason for u64 and

Re: [PATCH v2 2/3] blkid: add magic and probing for zoned btrfs

2021-04-14 Thread Karel Zak
On Wed, Apr 14, 2021 at 10:33:38AM +0900, Naohiro Aota wrote: > +#define ASSERT(x) assert(x) Really? ;-) > +typedef uint64_t u64; > +typedef uint64_t sector_t; > +typedef uint8_t u8; I do not see a reason for u64 and u8 here. > + > +#ifdef HAVE_LINUX_BLKZONED_H > +static int sb_write_pointer(in

Re: [PATCH v2 2/3] blkid: add magic and probing for zoned btrfs

2021-04-14 Thread Johannes Thumshirn
On 14/04/2021 03:33, Naohiro Aota wrote: > This commit adds zone-aware magics and probing functions for zoned btrfs. > > Superblock (and its copies) is the only data structure in btrfs with a The superblock? > fixed location on a device. Since we cannot overwrite in a sequential write cannot do

[PATCH v2 2/3] blkid: add magic and probing for zoned btrfs

2021-04-13 Thread Naohiro Aota
This commit adds zone-aware magics and probing functions for zoned btrfs. Superblock (and its copies) is the only data structure in btrfs with a fixed location on a device. Since we cannot overwrite in a sequential write required zone, we cannot place superblock in the zone. Thus, zoned btrfs use