Re: [PATCH V3 5/6] null_blk: create a helper for zoned devices

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

 



Okay, will send the new version..

On 8/21/19 5:58 PM, Christoph Hellwig wrote:
>> +static inline blk_status_t null_handle_zoned(struct nullb_cmd *cmd,
>> +					     enum req_opf op, sector_t sector,
>> +					     sector_t nr_sectors)
>> +{
> Shouldn't this go into null_blk_zoned.c?  Also the indentation for the
> here seems odd.
>
>> +	blk_status_t sts = BLK_STS_OK;
>> +
>> +	switch (op) {
>> +	case REQ_OP_WRITE:
>> +		sts = null_zone_write(cmd, sector, nr_sectors);
>> +		break;
>> +	case REQ_OP_ZONE_RESET:
>> +		sts = null_zone_reset(cmd, sector);
>> +		break;
>> +	default:
>> +		break;
>> +	}
>> +
>> +	return sts;
> Why not:
>
> 	switch (op) {
> 	case REQ_OP_WRITE:
> 		return null_zone_write(cmd, sector, nr_sectors);
> 	case REQ_OP_ZONE_RESET:
> 		return null_zone_reset(cmd, sector);
> 	default:
> 		return BLK_STS_OK;
> }






[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