On 09/19/16 14:27, Damien Le Moal wrote:
+/*
+ * Zoned block device models (zoned limit).
+ */
+enum blk_zoned_model {
+       BLK_ZONED_NONE, /* Regular block device */
+       BLK_ZONED_HA,   /* Host-aware zoned block device */
+       BLK_ZONED_HM,   /* Host-managed zoned block device */
+};


[ ... ]

+static inline unsigned int blk_queue_zoned(struct request_queue *q)
+{
+       return q->limits.zoned;
+}
+
 /*
  * We regard a request as sync, if either a read or a sync write
  */
@@ -1354,6 +1369,16 @@ static inline unsigned int bdev_write_same(struct 
block_device *bdev)
        return 0;
 }

+static inline unsigned int bdev_zoned(struct block_device *bdev)
+{
+       struct request_queue *q = bdev_get_queue(bdev);
+
+       if (q)
+               return blk_queue_zoned(q);
+
+       return 0;
+}

Hello Damien,

Please consider changing the return type of the above two functions into "enum blk_zoned_model" to make it clear that both return one of the BLK_ZONED_* constants.

Thanks,

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to