]> www.infradead.org Git - users/hch/blktests.git/commit
common/rc: Add _test_dev_max_active_zones() helper function
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Thu, 1 Oct 2020 10:15:29 +0000 (19:15 +0900)
committerOmar Sandoval <osandov@fb.com>
Thu, 22 Oct 2020 21:36:31 +0000 (14:36 -0700)
commite6981bb2d9ceb06b2f310e149346d638ffd62681
treeba2127707b0fa09eb0e473186af1d23c0c5cffb9
parent20445c5eb6456addca9131ec6917d2a2d7414e04
common/rc: Add _test_dev_max_active_zones() helper function

Linux kernel 5.9 introduced a new sysfs attribute "max_active_zones". It
is an attribute of zoned block devices which indicates the limit of zones
in open or close status. To refer the attribute from test cases,
introduce the helper function _test_dev_max_active_zones(). If the
attribute is available, the function returns the attribute value.
Otherwise, returns 0 to indicate that the device does not have the limit.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
common/rc