https://github.com/torvalds/linux
Revision 8e94af8e2b582e5915abc171a28130881d1c26e4 authored by Alex Elder on 25 July 2012, 14:32:40 UTC, committed by Sage Weil on 31 July 2012, 01:15:48 UTC
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>
1 parent aa711ee
History
Tip revision: 8e94af8e2b582e5915abc171a28130881d1c26e4 authored by Alex Elder on 25 July 2012, 14:32:40 UTC
rbd: encapsulate header validity test
Tip revision: 8e94af8
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 1014 bytes
.mailmap -rw-r--r-- 4.3 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 92.7 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 252 bytes
MAINTAINERS -rw-r--r-- 207.3 KB
Makefile -rw-r--r-- 46.0 KB
README -rw-r--r-- 17.3 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top