I'm making headway on this now. It mostly is taking the form of
cleaning up code as I walk through how things get set up and torn
down. I'm sort of working on this together with issues 4802
and 4803, and it's not always clear where I should record
progress.
In any case, most of the patches I just posted are really
connected to this... So:
The following have been posted for review. They are available
in the "review/wip-rbd-cleanup-3" branch of the ceph-client
git respository.
The first patch of this series doesn't really belong,
but I threw it in anyway. The other three defer doing
some initialization of an rbd device until just before
it gets activated by a call to add_disk().
-Alex
[PATCH 1/4] rbd: fix up some sysfs stuff
[PATCH 2/4] rbd: only set device exists flag when ready
[PATCH 3/4] rbd: defer setting disk capacity
[PATCH 4/4] rbd: defer setting the mapping size and features
And
This series cleans up some code in the are of probing
for parent images.
-Alex
[PATCH 1/6] rbd: encapsulate probing for parent devices
[PATCH 2/6] rbd: encapsulate removing parent devices
[PATCH 3/6] rbd: kill __rbd_remove()
[PATCH 4/6] rbd: fix rbd_dev_remove_parent()
[PATCH 5/6] rbd: remove parent devices on probe error
[PATCH 6/6] rbd: probe for the parent earlier