rbd: expand rbd_dev_ondisk_valid() checks
authorAlex Elder <elder@inktank.com>
Thu, 2 Aug 2012 16:29:45 +0000 (11:29 -0500)
committerAlex Elder <elder@inktank.com>
Mon, 1 Oct 2012 19:30:48 +0000 (14:30 -0500)
commit103a150f0cc57576b1c4b80bf07af60a14349eee
tree792d889aa95fe748a7c402b5ac7d6af4c397bb80
parent28cb775de1bd1bcc62c43f767ab81b7b9cfb6678
rbd: expand rbd_dev_ondisk_valid() checks

Add checks on the validity of the snap_count and snap_names_len
field values in rbd_dev_ondisk_valid().  This eliminates the
need to do them in rbd_header_from_disk().

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