• Damien Le Moal's avatar
    zonfs: Fix handling of read-only zones · ccf4ad7d
    Damien Le Moal authored
    The write pointer of zones in the read-only consition is defined as
    invalid by the SCSI ZBC and ATA ZAC specifications. It is thus not
    possible to determine the correct size of a read-only zone file on
    mount. Fix this by handling read-only zones in the same manner as
    offline zones by disabling all accesses to the zone (read and write)
    and initializing the inode size of the read-only zone to 0).
    
    For zones found to be in the read-only condition at runtime, only
    disable write access to the zone and keep the size of the zone file to
    its last updated value to allow the user to recover previously written
    data.
    
    Also fix zonefs documentation file to reflect this change.
    Signed-off-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
    Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
    ccf4ad7d
zonefs.txt 19.7 KB