]> git.baikalelectronics.ru Git - kernel.git/commit
ublk_drv: make sure that correct flags(features) returned to userspace
authorMing Lei <ming.lei@redhat.com>
Fri, 22 Jul 2022 10:38:17 +0000 (18:38 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 22 Jul 2022 15:22:53 +0000 (09:22 -0600)
commitba31778296c4c2f3e1325a6131368c77370d46cd
treea92d1aaca0444fde9446fb4b2316b2301c861726
parente793e7bac6fa3538435ccb6f365a830449832bc1
ublk_drv: make sure that correct flags(features) returned to userspace

Userspace may support more features or new added flags, but the driver
side can be old, so make sure correct flags(features) returned to
userpsace, then userspace can work as expected.

Also mark the 2nd flags as reversed, just use the 1st one. When we run
out of flags, the reserved one can be handled at that time.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: ZiyangZhang <ZiyangZhang@linux.alibaba.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20220722103817.631258-3-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c
include/uapi/linux/ublk_cmd.h