]> git.baikalelectronics.ru Git - kernel.git/commit
rbd: encapsulate header validity test
authorAlex Elder <elder@inktank.com>
Wed, 25 Jul 2012 14:32:40 +0000 (09:32 -0500)
committerSage Weil <sage@inktank.com>
Tue, 31 Jul 2012 01:15:48 +0000 (18:15 -0700)
commitf91e3e756782d87505c3ef075e084ca5cbe02dce
treeddc6135050fcb792fb4b4b45ee9aadbd050a5526
parent05a763e0b92c0205274972fa07fa619530b3c844
rbd: encapsulate header validity test

If an rbd image header is read and it doesn't begin with the
expected magic information, a warning is displayed.  This is
a fairly simple test, but it could be extended at some point.
Fix the comparison so it actually looks at the "text" field
rather than the front of the structure.

In any case, encapsulate the validity test in its own function.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c