]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/osd_types: add WHITEOUT flag to object_info_t
authorSage Weil <sage@inktank.com>
Fri, 27 Sep 2013 22:51:40 +0000 (15:51 -0700)
committerSage Weil <sage@inktank.com>
Tue, 1 Oct 2013 21:17:58 +0000 (14:17 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/osd_types.cc
src/osd/osd_types.h

index 84ebb393f72b5ce554a08af43d2fbc146175847a..e8960584c251b803ee7f2107e408b0f195494bfd 100644 (file)
@@ -2966,6 +2966,8 @@ ostream& operator<<(ostream& out, const object_info_t& oi)
     out << " " << oi.snaps;
   if (oi.is_lost())
     out << " LOST";
+  if (oi.is_whiteout())
+    out << " WHITEOUT";
   out << ")";
   return out;
 }
index aa1b08193628cef644fb72eb866837b8126260b1..fb1fe3617742e0e0bbd8e0a2645a54084dba07cf 100644 (file)
@@ -2097,6 +2097,7 @@ struct object_info_t {
   // note: these are currently encoded into 8 bits; see encode()/decode()
   typedef enum {
     FLAG_LOST     = 1<<0,
+    FLAG_WHITEOUT = 1<<1,  // object logically does not exist
   } flag_t;
   flag_t flags;
 
@@ -2126,6 +2127,9 @@ struct object_info_t {
   bool is_lost() const {
     return test_flag(FLAG_LOST);
   }
+  bool is_whiteout() const {
+    return test_flag(FLAG_WHITEOUT);
+  }
 
   void encode(bufferlist& bl) const;
   void decode(bufferlist::iterator& bl);