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:37 -0500 |
commit | 662518b128c27def65e9af4bea2b56a1e04b3251 (patch) | |
tree | 195365fca5ff452ad5364fb876f2b9a720e8ee5a /lib/Kconfig.kmemcheck | |
parent | bb23e37acb2ae9604130c4819fb8ae0f784a3a2b (diff) | |
download | op-kernel-dev-662518b128c27def65e9af4bea2b56a1e04b3251.zip op-kernel-dev-662518b128c27def65e9af4bea2b56a1e04b3251.tar.gz |
rbd: update in-core header directly
Now that rbd_header_from_disk() only fills in one-time fields once,
we can extend it slightly so it releases the other fields before
replacing their values. This way there's no need to pass a
temporary buffer and then copy all the results in. Just use the rbd
device header structure in rbd_header_from_disk() so its values get
updated directly.
Note that this means we need to take the header semaphore at the
point we update things. So pass the rbd_dev rather than the address
of its header as its first argument to rbd_header_from_disk(), and
have it return an error code.
As a result, rbd_dev_v1_header_read() does all the work,
rbd_read_header() becomes unnecessary, and rbd_dev_v1_refresh()
becomes a very simple wrapper.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'lib/Kconfig.kmemcheck')
0 files changed, 0 insertions, 0 deletions