On Fri, 2017-09-15 at 19:06 +0900, Damien Le Moal wrote:
> @@ -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
> +
> #ifdef CONFIG_PM
> struct device *dev;
> int rpm_status;
> @@ -785,6 +794,11 @@ static inline unsigned int blk_queue_zone_sectors(struct
> request_queue *q)
> return blk_queue_is_zoned(q) ? q->limits.chunk_sectors : 0;
> }
>
> +static inline unsigned int blk_queue_nr_zones(struct request_queue *q)
> +{
> + return blk_queue_is_zoned(q) ? q->zoned.nr_zones : 0;
> +}
Does this code compile correctly if CONFIG_BLK_DEV_ZONED is disabled? Should
the definition of blk_queue_nr_zones() perhaps be surrounded by #ifdef
CONFIG_BLK_DEV_ZONED / #endif?
Thanks,
Bart.