target: Implement Block Device Characteristics VPD page

Implement page B1h, Block Device Characteristics, so that we can report
a medium rotation rate of 1 (non-rotating / solid state) if the
is_nonrot device attribute is set; we update the iblock backend to set
this attribute if the underlying Linux block device has its nonrot
flag set.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
Roland Dreier
2011-07-05 13:34:52 -07:00
committed by Nicholas Bellinger
parent b2eb705e00
commit e22a7f0752
7 changed files with 41 additions and 0 deletions

View File

@@ -661,6 +661,7 @@ struct se_dev_attrib {
int emulate_reservations;
int emulate_alua;
int enforce_pr_isids;
int is_nonrot;
u32 hw_block_size;
u32 block_size;
u32 hw_max_sectors;