Re: [PATCH v2] spc: implement spc 0xb1 and support rotation rate

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

 



On Mon, Apr 8, 2019 at 11:38 AM zhenwei pi <pizhenwei@xxxxxxxxxxxxx> wrote:
>
> Rotation rate is sensitive to some applications, typically database need to
> recognize sdx device is HDD or SSD.
>
> This patch implements basic vpd 0xb1, and supports parameter 'rotation_rate',
> we can update rotation_rate by tgtadm command.
>
> Test case 1:
> T# tgtadm --lld iscsi --mode logicalunit --op update --tid 1 --lun 1 --params rotation_rate=1
> I# cat /sys/block/sdb/queue/rotational
>    0
> I# sg_vpd -p 0xb1 /dev/sdb
>    Block device characteristics VPD page (SBC):
>      Non-rotating medium (e.g. solid state)
>
> Test case 2:
> T# tgtadm --lld iscsi --mode logicalunit --op update --tid 1 --lun 1 --params rotation_rate=15000
> I# cat /sys/block/sdb/queue/rotational
>    1
> I# sg_vpd -p 0xb1 /dev/sdb
>    Block device characteristics VPD page (SBC):
>      Nominal rotation rate: 15000 rpm
>
> All of testing case work well.
>
> Signed-off-by: zhenwei pi <pizhenwei@xxxxxxxxxxxxx>
> ---
>  usr/spc.c  | 36 ++++++++++++++++++++++++++++++++++++
>  usr/tgtd.h |  2 ++
>  2 files changed, 38 insertions(+)

Applied, thanks.



[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux