diff options
author | Alex Elder <elder@inktank.com> | 2013-05-06 09:51:29 -0500 |
---|---|---|
committer | Alex Elder <elder@inktank.com> | 2013-05-08 17:00:33 -0500 |
commit | bb23e37acb2ae9604130c4819fb8ae0f784a3a2b (patch) | |
tree | 847219a28fff93ecdf35df2adcf05a8755a26c35 /drivers/block/osdblk.c | |
parent | 46578dcdca951f3da70d3a5a9b5166b2a492a182 (diff) | |
download | blackbird-op-linux-bb23e37acb2ae9604130c4819fb8ae0f784a3a2b.tar.gz blackbird-op-linux-bb23e37acb2ae9604130c4819fb8ae0f784a3a2b.zip |
rbd: refactor rbd_header_from_disk()
This rearranges rbd_header_from_disk so that it:
- allocates the snapshot context right away
- keeps results in local variables, not changing the passed-in
header until it's known we'll succeed
- does initialization of set-once fields in a header only if
they have not already been set
The last point is moot at the moment, because rbd_read_header()
(the only caller) always supplies a zero-filled header buffer.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'drivers/block/osdblk.c')
0 files changed, 0 insertions, 0 deletions