summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-09-27 15:51:40 -0700
committerSage Weil <sage@inktank.com>2013-10-01 12:04:42 -0700
commitdb479b525bff75b6e0fe908601b5a963e1ded30f (patch)
treec4b9a787a1cf7af892ec965f3485eb54f6403979
parent933fe643b2f9a44850e69282d25ab7832a488dd7 (diff)
downloadceph-db479b525bff75b6e0fe908601b5a963e1ded30f.tar.gz
osd/osd_types: add WHITEOUT flag to object_info_t
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/osd/osd_types.cc2
-rw-r--r--src/osd/osd_types.h4
2 files changed, 6 insertions, 0 deletions
diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc
index 84ebb393f72..e8960584c25 100644
--- a/src/osd/osd_types.cc
+++ b/src/osd/osd_types.cc
@@ -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;
}
diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h
index a912d3cf5f0..aebfd113838 100644
--- a/src/osd/osd_types.h
+++ b/src/osd/osd_types.h
@@ -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);