]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge branch 'master' of ssh://github.com/NewDreamNetwork/ceph
authorYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 25 Oct 2011 23:29:40 +0000 (16:29 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 25 Oct 2011 23:29:40 +0000 (16:29 -0700)
Conflicts:
src/rgw/rgw_rados.cc

1  2 
src/rgw/rgw_cls_api.h
src/rgw/rgw_common.h
src/rgw/rgw_fs.cc
src/rgw/rgw_main.cc
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h

index 3f2d21d8f2f66f7b86f0eab1ecc20a33b0027bcc,4eb81ebfa49f858f1fd5a06f9eca93f79f4c6b9a..f19fd9634866f558f9b49933a9ffdd5130ec5896
@@@ -49,10 -54,12 +54,13 @@@ struct rgw_bucket_dir_entry_meta 
    string owner;
    string owner_display_name;
    string tag;
 +  string content_type;
  
+   rgw_bucket_dir_entry_meta() :
+   category(0), size(0) { mtime.set_from_double(0); }
    void encode(bufferlist &bl) const {
 -    __u8 struct_v = 1;
 +    __u8 struct_v = 2;
      ::encode(struct_v, bl);
      ::encode(category, bl);
      ::encode(size, bl);
Simple merge
Simple merge
Simple merge
index c2a90f3b53cd6ee76185899946c5917260dcd2dd,93e3cd6bd707de7152a91564834a0c179b59296f..480564f744be667575ca526bed18942e04d89c5e
@@@ -2179,7 -2161,20 +2183,21 @@@ int RGWRados::cls_bucket_list(rgw_bucke
      e.etag = dirent.meta.etag;
      e.owner = dirent.meta.owner;
      e.owner_display_name = dirent.meta.owner_display_name;
 +    e.content_type = dirent.meta.content_type;
+     if (!dirent.exists || !dirent.pending_map.empty()) {
+       /* there are uncommitted ops. We need to check the current state,
+        * and if the tags are old we need to do cleanup as well. */
+       librados::IoCtx sub_ctx;
+       sub_ctx.dup(io_ctx);
+       r = check_disk_state(sub_ctx, bucket, dirent, e, updates);
+       if (r < 0) {
+         if (r == -ENOENT)
+           continue;
+         else
+           return r;
+       }
+     }
      m[e.name] = e;
      dout(0) << " got " << e.name << dendl;
    }
index aca9e3565b7c0bd62ade297615725d2dd5740b03,e697d0ab14750ab1e84cc50954a06af3edb05d9f..63379be990a64bb4e82d5528a369d78f04caeaea
@@@ -308,19 -297,23 +308,23 @@@ public
  
    int decode_policy(bufferlist& bl, ACLOwner *owner);
    int get_bucket_stats(rgw_bucket& bucket, map<RGWObjCategory, RGWBucketStats>& stats);
 -  virtual int get_bucket_info(string& bucket_name, RGWBucketInfo& info);
 +  virtual int get_bucket_info(void *ctx, string& bucket_name, RGWBucketInfo& info);
  
    int cls_rgw_init_index(rgw_bucket& bucket, string& oid);
-   int cls_obj_prepare_op(rgw_bucket& bucket, uint8_t op, string& tag, string& name);
+   int cls_obj_prepare_op(rgw_bucket& bucket, uint8_t op, string& tag,
+                          string& name, string& locator);
    int cls_obj_complete_op(rgw_bucket& bucket, uint8_t op, string& tag, uint64_t epoch,
                            RGWObjEnt& ent, RGWObjCategory category);
    int cls_obj_complete_add(rgw_bucket& bucket, string& tag, uint64_t epoch, RGWObjEnt& ent, RGWObjCategory category);
    int cls_obj_complete_del(rgw_bucket& bucket, string& tag, uint64_t epoch, string& name);
-   int cls_bucket_list(rgw_bucket& bucket, string start, uint32_t num, map<string, RGWObjEnt>& m, bool *is_truncated);
+   int cls_bucket_list(rgw_bucket& bucket, string start, uint32_t num,
+                       map<string, RGWObjEnt>& m, bool *is_truncated,
+                       string *last_entry = NULL);
    int cls_bucket_head(rgw_bucket& bucket, struct rgw_bucket_dir_header& header);
-   int prepare_update_index(RGWObjState *state, rgw_bucket& bucket, string& oid, string& tag);
+   int prepare_update_index(RGWObjState *state, rgw_bucket& bucket,
+                            rgw_obj& oid, string& tag);
    int complete_update_index(rgw_bucket& bucket, string& oid, string& tag, uint64_t epoch, uint64_t size,
 -                            utime_t& ut, string& etag, bufferlist *acl_bl, RGWObjCategory category);
 +                            utime_t& ut, string& etag, string& content_type, bufferlist *acl_bl, RGWObjCategory category);
    int complete_update_index_del(rgw_bucket& bucket, string& oid, string& tag, uint64_t epoch) {
      return cls_obj_complete_del(bucket, tag, epoch, oid);
    }