OSDN Git Service

block/rnbd-clt: Make path parameter optional for map_device
authorMd Haris Iqbal <haris.iqbal@cloud.ionos.com>
Thu, 26 Nov 2020 10:47:16 +0000 (11:47 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 4 Dec 2020 16:41:10 +0000 (09:41 -0700)
commitce9fe18abb7c86a71b545e1cdd60fe333bf462a3
treef909cf31013ebbfae3797d67762701aa6f898261
parent3b9351f0fd14f2e9ef3141f0d894076517400e6e
block/rnbd-clt: Make path parameter optional for map_device

During map_device if the given session exists, then the path parameter is
not used. In such a case, the path parameter is redundant.

This commit makes the path parameter optional for map_device. When the
path parameter is not given, if the session exists then that is used to
establish the rtrs connection.

If the session does not exist, and the path parameter is also missing,
then map_device fails.

Signed-off-by: Md Haris Iqbal <haris.iqbal@cloud.ionos.com>
Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/rnbd/rnbd-clt-sysfs.c
drivers/block/rnbd/rnbd-clt.c