From: Alex Elder Date: Mon, 6 May 2013 12:40:30 +0000 (-0500) Subject: rbd: always set read-only flag in rbd_add() X-Git-Tag: v3.10-rc2~28^2~25 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51344a38ba2033be18a4ec23e318845caeccdc04;p=pandora-kernel.git rbd: always set read-only flag in rbd_add() Hold off setting the read-only flag in rbd_add() for an image being mapped until we have successfully probed the image. At that point we know whether it's a snapshot mapping or not, so we can set the read-only flag in that one place rather than doing so (for snapshots) in rbd_dev_mapping_set(). To do this, pass a flag to the image probe routine indicating whether we want a read-only mapping. Signed-off-by: Alex Elder Reviewed-by: Josh Durgin --- Reading git-diff-tree failed