block/rnbd: server: sysfs interface functions
authorJack Wang <jinpu.wang@cloud.ionos.com>
Mon, 11 May 2020 13:51:28 +0000 (15:51 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Sun, 17 May 2020 21:57:17 +0000 (18:57 -0300)
commit8cee532f469bbcdb6ac0ab161ebff36fbc6439d7
tree9df5159d400c22b8969a623492a7bba18a519888
parentf0aad9baadb5b2933e6f4fbb2fd3ffbdcc35b2cf
block/rnbd: server: sysfs interface functions

This is the sysfs interface to rnbd mapped devices on server side:

  /sys/class/rnbd-server/ctl/devices/<device_name>/
    |- block_dev
    |  *** link pointing to the corresponding block device sysfs entry
    |
    |- sessions/<session-name>/
    |  *** sessions directory
       |
       |- read_only
       |  *** is devices mapped as read only
       |
       |- mapping_path
          *** relative device path provided by the client during mapping

Link: https://lore.kernel.org/r/20200511135131.27580-23-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-srv-sysfs.c [new file with mode: 0644]