block/rnbd: client: sysfs interface functions
authorJack Wang <jinpu.wang@cloud.ionos.com>
Mon, 11 May 2020 13:51:24 +0000 (15:51 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Sun, 17 May 2020 21:57:16 +0000 (18:57 -0300)
commit1eb54f8f5dd8ae09829caa37a50952d931bb79cf
treea81debcc6dd2e1731520411e8ee75e3b20cc87ae
parentf7a7a5c228d45efc45d6e26a199a3ea13d2f8754
block/rnbd: client: sysfs interface functions

This is the sysfs interface to rnbd block devices on client side:

  /sys/class/rnbd-client/ctl/
    |- map_device
    |  *** maps remote device
    |
    |- devices/
       *** all mapped devices

  /sys/block/rnbd<N>/rnbd/
    |- unmap_device
    |  *** unmaps device
    |
    |- state
    |  *** device state
    |
    |- session
    |  *** session name
    |
    |- mapping_path
       *** path of the dev that was mapped on server

Link: https://lore.kernel.org/r/20200511135131.27580-19-danil.kipnis@cloud.ionos.com
Signed-off-by: Danil Kipnis <danil.kipnis@cloud.ionos.com>
Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/block/rnbd/rnbd-clt-sysfs.c [new file with mode: 0644]