[PATCH 0/7] rbd: implement single-major device number allocation scheme

2013-12-16 Thread Ilya Dryomov
at once. See individual commit messages for details. Fixes: http://tracker.ceph.com/issues/5048 Thanks, Ilya Ilya Dryomov (7): rbd: rbd_device::dev_id is an int, format it as such rbd: tweak loaded message and module description rbd: refactor rbd_init() a bit rbd: switch

[PATCH 2/7] rbd: tweak loaded message and module description

2013-12-16 Thread Ilya Dryomov
Tweak loaded message, so that it looks like [ 30.184235] rbd: loaded instead of [ 38.056564] rbd: loaded rbd (rados block device) Also move (and slightly tweak) MODULE_DESCRIPTION so that all authors are next to each other in modinfo output. Signed-off-by: Ilya Dryomov ilya.dryo

[PATCH 5/7] rbd: add 'minor' sysfs rbd device attribute

2013-12-16 Thread Ilya Dryomov
Introduce /sys/bus/rbd/devices/id/minor sysfs attribute for exporting rbd whole disk minor numbers. This is a step towards single-major device number allocation scheme, but also a good thing on its own. Signed-off-by: Ilya Dryomov ilya.dryo...@inktank.com Reviewed-by: Alex Elder el...@linaro.org

[PATCH 4/7] rbd: switch to ida for rbd id assignments

2013-12-16 Thread Ilya Dryomov
completely unpredictable. So, in preparation for single-major device number allocation scheme, which is going to establish and rely on a constant mapping between rbd ids and device numbers, switch to ida for rbd id assignments. Signed-off-by: Ilya Dryomov ilya.dryo...@inktank.com Reviewed-by: Alex Elder

[PATCH 1/7] rbd: rbd_device::dev_id is an int, format it as such

2013-12-16 Thread Ilya Dryomov
rbd_device::dev_id is an int, format it as such. Signed-off-by: Ilya Dryomov ilya.dryo...@inktank.com Reviewed-by: Alex Elder el...@linaro.org Reviewed-by: Josh Durgin josh.dur...@inktank.com --- drivers/block/rbd.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[PATCH 6/7] rbd: wire up is_visible() sysfs callback for rbd bus

2013-12-16 Thread Ilya Dryomov
In preparation for single-major device number allocation scheme, wire up attribute_group::is_visible() callback for rbd bus. This allows us to make the new single-major attributes conditional. Signed-off-by: Ilya Dryomov ilya.dryo...@inktank.com Reviewed-by: Alex Elder el...@linaro.org Reviewed

[PATCH] rbd: enable extended devt in single-major mode

2013-12-16 Thread Ilya Dryomov
... 259 23 0 rbd1p39 259 24 0 rbd1p40 251 32 1024 rbd2 251 33 0 rbd2p1 251 34 0 rbd2p2 (major 251 was assigned dynamically at module load time) Signed-off-by: Ilya Dryomov ilya.dryo...@inktank.com Reviewed-by: Josh Durgin

[PATCH 0/2] rbd: tear down watch request if rbd_dev_device_setup() fails

2013-12-16 Thread Ilya Dryomov
, Ilya Ilya Dryomov (2): rbd: introduce rbd_dev_header_unwatch_sync() and switch to it rbd: tear down watch request if rbd_dev_device_setup() fails drivers/block/rbd.c | 41 - 1 file changed, 28 insertions(+), 13 deletions

[PATCH 1/2] rbd: introduce rbd_dev_header_unwatch_sync() and switch to it

2013-12-16 Thread Ilya Dryomov
Rename rbd_dev_header_watch_sync() to __rbd_dev_header_watch_sync() and introduce two helpers: rbd_dev_header_{,un}watch_sync() to make it more clear what is going on. Signed-off-by: Ilya Dryomov ilya.dryo...@inktank.com --- drivers/block/rbd.c | 35 ++- 1 file

[PATCH 2/2] rbd: tear down watch request if rbd_dev_device_setup() fails

2013-12-16 Thread Ilya Dryomov
Tear down watch request if rbd_dev_device_setup() fails. Signed-off-by: Ilya Dryomov ilya.dryo...@inktank.com --- drivers/block/rbd.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index c91108b760cf..e709f4ae117f 100644 --- a/drivers/block

<    1   2   3   4   5   6