]> git.baikalelectronics.ru Git - kernel.git/commit
rbd: fetch object order before using it
authorJosh Durgin <josh.durgin@inktank.com>
Wed, 12 Jun 2013 21:43:10 +0000 (14:43 -0700)
committerSage Weil <sage@inktank.com>
Tue, 25 Jun 2013 19:27:31 +0000 (12:27 -0700)
commit22fa423d31ea4e69e2b94de47e8b01e561c8f7d1
tree9dc61d610aadb7fb43163ea22dca87df166fb79a
parent06ac8c9a99900a8e171239636443f876ad10bd15
rbd: fetch object order before using it

rbd_dev_v2_header_onetime() fetches striping information, and
checks whether the image can be read by compariing the stripe unit
to the object size. It determines the object size by shifting
the object order, which is 0 at this point since it has not been
read yet. Move the call to get the image size and object order
before rbd_dev_v2_header_onetime() so it is set before use.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
drivers/block/rbd.c