]> git.baikalelectronics.ru Git - kernel.git/commit
rbd: store snapshot id instead of index
authorJosh Durgin <josh.durgin@dreamhost.com>
Mon, 21 Nov 2011 21:04:42 +0000 (13:04 -0800)
committerAlex Elder <elder@dreamhost.com>
Mon, 14 May 2012 17:12:52 +0000 (12:12 -0500)
commitb2ffe62788a7153541141fb9d5176f60c120ca26
treead80a6b7d9a9be1880c44e3a91f6d42f674c2fd6
parent64ca7873c5d687185ba2891731a571095108b15d
rbd: store snapshot id instead of index

When a device was open at a snapshot, and snapshots were deleted or
added, data from the wrong snapshot could be read. Instead of
assuming the snap context is constant, store the actual snap id when
the device is initialized, and rely on the OSDs to signal an error
if we try reading from a snapshot that was deleted.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Reviewed-by: Alex Elder <elder@dreamhost.com>
Reviewed-by: Yehuda Sadeh <yehuda@hq.newdream.net>
drivers/block/rbd.c