From: Alex Elder Date: Thu, 2 Aug 2012 16:29:46 +0000 (-0500) Subject: rbd: separate reading header from decoding it X-Git-Tag: v3.7-rc1~90^2~63 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4156d998409be065aa8141b6bd2c6f18be1b21e9;p=pandora-kernel.git rbd: separate reading header from decoding it Right now rbd_read_header() both reads the header object for an rbd image and decodes its contents. It does this repeatedly if needed, in order to ensure a complete and intact header is obtained. Separate this process into two steps--reading of the raw header data (in new function, rbd_dev_v1_header_read()) and separately decoding its contents (in rbd_header_from_disk()). As a result, the latter function no longer requires its allocated_snaps argument. Signed-off-by: Alex Elder Reviewed-by: Josh Durgin --- Reading git-diff-tree failed