• Naohiro Aota's avatar
    btrfs: zoned: use regular super block location on zone emulation · d6639b35
    Naohiro Aota authored
    A zoned filesystem currently has a superblock at the beginning of the
    superblock logging zones if the zones are conventional. This difference
    in superblock position causes a chicken-and-egg problem for filesystems
    with emulated zones. Since the device is a regular (non-zoned) device,
    we cannot know if the filesystem is regular or zoned while reading the
    superblock. But, to load the superblock, we need to see if it is
    emulated zoned or not.
    
    Place the superblocks at the same location as they are on regular
    filesystem on regular devices to solve the problem. It is possible
    because it's ensured that all the superblock locations are at an
    (emulated) conventional zone on regular devices.
    Reviewed-by: default avatarAnand Jain <anand.jain@oracle.com>
    Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Signed-off-by: default avatarNaohiro Aota <naohiro.aota@wdc.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    d6639b35
zoned.c 16.1 KB