Re: [PATCH v2] null_blk: support read-only and offline zone conditions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/1/22 15:10, Shin'ichiro Kawasaki wrote:
> In zoned mode, zones with write pointers can have conditions "read-only"
> or "offline". In read-only condition, zones can not be written. In
> offline condition, the zones can be neither written nor read. These
> conditions are intended for zones with media failures, then it is
> difficult to set those conditions to zones on real devices.
> 
> To test handling of zones in the conditions, add a feature to null_blk
> to set up zones in read-only or offline condition. Add new configuration
> attributes "zone_readonly" and "zone_offline". Write a sector to the
> attribute files to specify the target zone to set the zone conditions.
> For example, following command lines do it:
> 
>    echo 0 > nullb1/zone_readonly
>    echo 524288 > nullb1/zone_offline
> 
> When the specified zones are already in read-only or offline condition,
> normal empty condition is restored to the zones. These condition changes
> can be done only after the null_blk device get powered, since status
> area of each zone is not yet allocated before power-on.
> 
> Also improve zone condition checks to inhibit all commands for zones in
> offline conditions. In same manner, inhibit write and zone management
> commands for zones in read-only condition.
> 
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>

Looks good to me.

Reviewed-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx>

-- 
Damien Le Moal
Western Digital Research




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux