]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG::do_op: don't return ENOENT for whiteout on snapdir read
authorSamuel Just <sam.just@inktank.com>
Tue, 22 Apr 2014 22:12:52 +0000 (15:12 -0700)
committerSamuel Just <sam.just@inktank.com>
Wed, 23 Apr 2014 21:11:17 +0000 (14:11 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/ReplicatedPG.cc

index 38fb6ef3bfbca346fad03ba0ee44846177e4c454..2a4efdc7d3c3421d1e87f726a9b7bb3ba6441b90 100644 (file)
@@ -1528,8 +1528,11 @@ void ReplicatedPG::do_op(OpRequestRef op)
     reply_ctx(ctx, -ENFILE);
     return;
   }
-  if (!op->may_write() && !op->may_cache() && (!obc->obs.exists ||
-                                              obc->obs.oi.is_whiteout())) {
+  if (!op->may_write() &&
+      !op->may_cache() &&
+      (!obc->obs.exists ||
+       ((m->get_snapid() != CEPH_SNAPDIR) &&
+       obc->obs.oi.is_whiteout()))) {
     reply_ctx(ctx, -ENOENT);
     return;
   }