Re: [PATCH V3 03/12] block: Add zoned block device information to request queue

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

 



> +struct blk_zoned {
> +	unsigned int	nr_zones;
> +	unsigned long	*seq_zones;
> +};
> +
>  struct blk_zone_report_hdr {
>  	unsigned int	nr_zones;
>  	u8		padding[60];
> @@ -492,6 +497,10 @@ struct request_queue {
>  	struct blk_integrity integrity;
>  #endif	/* CONFIG_BLK_DEV_INTEGRITY */
>  
> +#ifdef CONFIG_BLK_DEV_ZONED
> +	struct blk_zoned	zoned;
> +#endif

I'd prefer to just add the two fields direct to struct request_queue
instead of the container structure.

> +static inline unsigned int blk_queue_nr_zones(struct request_queue *q)
> +{
> +	return blk_queue_is_zoned(q) ? q->zoned.nr_zones : 0;
> +}

I don't think this is going to compile without CONFIG_BLK_DEV_ZONED,
we'd either need two versions of it, or just always add nr_zones to
the request queue.

With nr_zones always present we could then remove the first check,
too as it would always be initialized to zero.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux