From: Alex Elder Date: Tue, 3 Jul 2012 21:01:19 +0000 (-0500) Subject: rbd: encapsulate code that gets snapshot info X-Git-Tag: v3.7-rc1~90^2~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd892126c617b3837b6088bf6c097ad2def4de83;p=pandora-kernel.git rbd: encapsulate code that gets snapshot info Create a function that encapsulates looking up the name, size and features related to a given snapshot, which is indicated by its index in an rbd device's snapshot context array of snapshot ids. This interface will be used to hide differences between the format 1 and format 2 images. At the moment this (looking up the name anyway) is slightly less efficient than what's done currently, but we may be able to optimize this a bit later on by cacheing the last lookup if it proves to be a problem. Signed-off-by: Alex Elder Reviewed-by: Josh Durgin --- Reading git-diff-tree failed