diff options
author | Alex Elder <elder@inktank.com> | 2013-04-26 15:44:36 -0500 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-01 21:19:46 -0700 |
commit | fc71d8330e39ef3af816a9c869150250952cb712 (patch) | |
tree | f77e909f0d41ce244342e316b4478cdf2098e66c /drivers/auxdisplay | |
parent | e28626a08b3e7412158551a639dd36887e2d728d (diff) |
rbd: fix up some sysfs stuff
This just tweaks a few things in the routines that implement
rbd sysfs files.
All of the entries for an rbd device in /sys/bus/rbd/devices/<id>/
will represent information whose valid values are known by the time
they are accessible.
Right now we get the size of the mapped image by a call to
get_capacity(). There's no need to do this, because that will
return what we last set the capacity to, which is just the size
recorded for the mapping. So just show that value instead.
We also get this under protection of the header semaphore, in order
to provide a precisely correct value. This isn't really necessary;
these files are really informational only and it's not necessary to
be so careful.
Finally, print a special value in case the major device number is
not recorded. Right now that won't matter much but soon the parent
images won't have devices associated with them.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'drivers/auxdisplay')
0 files changed, 0 insertions, 0 deletions