summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_file.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rgw/rgw_file.h')
-rw-r--r--src/rgw/rgw_file.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/rgw/rgw_file.h b/src/rgw/rgw_file.h
index 5d964f9c2aa..1edc37a9f60 100644
--- a/src/rgw/rgw_file.h
+++ b/src/rgw/rgw_file.h
@@ -282,7 +282,7 @@ namespace rgw {
variant_type = directory();
flags |= FLAG_BUCKET;
} else {
- bucket = (parent->flags & FLAG_BUCKET) ? parent
+ bucket = parent->is_bucket() ? parent
: parent->bucket;
if (flags & FLAG_DIRECTORY) {
fh.fh_type = RGW_FS_TYPE_DIRECTORY;
@@ -410,7 +410,7 @@ namespace rgw {
const std::string& bucket_name() const {
if (is_root())
return root_name;
- if (flags & FLAG_BUCKET)
+ if (is_bucket())
return name;
return bucket->object_name();
}
@@ -506,7 +506,7 @@ namespace rgw {
int open(uint32_t gsh_flags) {
lock_guard guard(mtx);
- if (! (flags & FLAG_OPEN)) {
+ if (! is_open()) {
if (gsh_flags & RGW_OPEN_FLAG_V3) {
flags |= FLAG_STATELESS_OPEN;
}
@@ -745,7 +745,7 @@ namespace rgw {
RGWUserInfo user;
RGWAccessKey key; // XXXX acc_key
- static atomic<uint32_t> fs_inst_counter;
+ static std::atomic<uint32_t> fs_inst_counter;
static uint32_t write_completion_interval_s;
std::string fsid;
@@ -778,7 +778,7 @@ namespace rgw {
}
void operator()() {
- rgw_fh.write_finish();
+ rgw_fh.close(); /* will finish in-progress write */
rgw_fh.get_fs()->unref(&rgw_fh);
}
};
@@ -1449,9 +1449,9 @@ public:
op = this;
}
- virtual bool only_bucket() override { return false; }
+ bool only_bucket() override { return false; }
- virtual int op_init() override {
+ int op_init() override {
// assign store, s, and dialect_handler
RGWObjectCtx* rados_ctx
= static_cast<RGWObjectCtx*>(get_state()->obj_ctx);
@@ -1462,7 +1462,7 @@ public:
return 0;
}
- virtual int header_init() override {
+ int header_init() override {
struct req_state* s = get_state();
s->info.method = "GET";
s->op = OP_GET;
@@ -1484,12 +1484,12 @@ public:
return 0;
}
- virtual int get_params() override {
+ int get_params() override {
max = default_max;
return 0;
}
- virtual void send_response() override {
+ void send_response() override {
valid = true;
if ((objs.size() > 1) ||
(! objs.empty() &&