Re: [PATCH v3 1/3] block: introduce zone_write_granularity limit

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

 



> @@ -864,18 +891,20 @@ void blk_queue_set_zoned(struct gendisk *disk, enum blk_zoned_model model)
>  		 * partitions and zoned block device support is enabled, else
>  		 * we do nothing special as far as the block layer is concerned.
>  		 */
> -		if (!IS_ENABLED(CONFIG_BLK_DEV_ZONED) ||
> -		    disk_has_partitions(disk))
> -			model = BLK_ZONED_NONE;
> -		break;
> +		if (IS_ENABLED(CONFIG_BLK_DEV_ZONED) &&
> +		    !disk_has_partitions(disk))
> +			break;
> +		model = BLK_ZONED_NONE;
> +		fallthrough;
>  	case BLK_ZONED_NONE:
>  	default:
>  		if (WARN_ON_ONCE(model != BLK_ZONED_NONE))
>  			model = BLK_ZONED_NONE;
> +		q->limits.zone_write_granularity = 0;
>  		break;
>  	}
>  
> -	disk->queue->limits.zoned = model;
> +	q->limits.zoned = model;
>  }

This looks a little strange.  If we special case zoned vs not zoned
here anyway, why not set the zone_write_granularity to the logical
block size here by default.



[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