rbd: return errors for mapped but deleted snapshot
authorJosh Durgin <josh.durgin@inktank.com>
Tue, 22 Nov 2011 02:14:25 +0000 (18:14 -0800)
committerSage Weil <sage@inktank.com>
Tue, 31 Jul 2012 01:15:36 +0000 (18:15 -0700)
When a snapshot is deleted, the OSD will return ENOENT when reading
from it. This is normally interpreted as a hole by rbd, which will
return zeroes. To minimize the time in which this can happen, stop
requests early when we are notified that our snapshot no longer
exists.

[elder@inktank.com: updated __rbd_init_snaps_header() logic]

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Alex Elder <elder@inktank.com>
drivers/block/rbd.c

Simple merge