]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
10 years agorgw: multipart meta object shouldn't be versioned
Yehuda Sadeh [Thu, 18 Dec 2014 19:41:27 +0000 (11:41 -0800)]
rgw: multipart meta object shouldn't be versioned

This object is already unique due to the upload id associated with it.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: remove clutter
Yehuda Sadeh [Thu, 18 Dec 2014 19:39:57 +0000 (11:39 -0800)]
rgw: remove clutter

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: fix caching for remove_system_obj()
Yehuda Sadeh [Thu, 18 Dec 2014 07:05:25 +0000 (23:05 -0800)]
rgw: fix caching for remove_system_obj()

Align the RGWCache method with the RGWRados method. Also, don't use obj
head removal objclass call, as it's for data objects, not metadata.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: fix get_system_obj() caching
Yehuda Sadeh [Thu, 18 Dec 2014 06:52:01 +0000 (22:52 -0800)]
rgw: fix get_system_obj() caching

Originally this was get_obj(), but in the cleanup work this was changed
to get_system_obj() with somewhat different params. Updated cache to use
new interface.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: use correct objv_tracker for bucket instance
Yehuda Sadeh [Thu, 18 Dec 2014 01:12:43 +0000 (17:12 -0800)]
rgw: use correct objv_tracker for bucket instance

When trying to create a bucket that already existed, use the
objv_tracker of the newly created instance, and not of the original
bucket.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: allow setting of explicit object version on non-versioned bucket
Yehuda Sadeh [Thu, 18 Dec 2014 00:04:10 +0000 (16:04 -0800)]
rgw: allow setting of explicit object version on non-versioned bucket

If system user has set explicit olh version and/or object instance id,
treat it as the bucket was versioned anyway. This can happen with a
racing bucket metadata vs. data sync.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: don't increase epoch when converting plain entry
Yehuda Sadeh [Wed, 17 Dec 2014 21:51:24 +0000 (13:51 -0800)]
cls_rgw: don't increase epoch when converting plain entry

Plain entries that are getting converted gets epoch 1, as these are non
versioned ones, and every entry following these will be versioned. Don't
increase the epoch for the operation.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: fix a few regressions
Yehuda Sadeh [Thu, 11 Dec 2014 23:43:17 +0000 (15:43 -0800)]
rgw: fix a few regressions

 - need to increase olh epoch if converting plain entry, otherwise
   ordering is skewed
 - if entry is olh (e.g., colocated data + olh), need to make sure we
   write olh idtag xattr
 - completely revalidate obj state after writing it, otherwise attrs
   won't have idtag, and later check to verify if it's olh will fail

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: move versioning handling to Object::Write::write_meta()
Yehuda Sadeh [Thu, 11 Dec 2014 18:58:23 +0000 (10:58 -0800)]
rgw: move versioning handling to Object::Write::write_meta()

Instead of having to call set_olh() after calling write_meta(), do it
inside that method. This way we (mostly) don't need to care about
versioning outside of it. This required moving bucket info around
instead of just passing the bucket owner.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: copy obj does versioning too
Yehuda Sadeh [Wed, 10 Dec 2014 22:39:27 +0000 (14:39 -0800)]
rgw: copy obj does versioning too

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: propagate version id when putting obj
Yehuda Sadeh [Wed, 10 Dec 2014 18:22:39 +0000 (10:22 -0800)]
rgw: propagate version id when putting obj

A system user can set the rgwx-version-id http param, and it's now sent
to the objclass.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: cleaup RGWRados::copy_obj()
Yehuda Sadeh [Tue, 9 Dec 2014 23:44:56 +0000 (15:44 -0800)]
rgw: cleaup RGWRados::copy_obj()

separate into multiple methods.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw, cls_rgw: provide optional version id, versioned epoch to olh ops
Yehuda Sadeh [Fri, 21 Nov 2014 21:17:25 +0000 (13:17 -0800)]
rgw, cls_rgw: provide optional version id, versioned epoch to olh ops

Let system users specify optional params: rgwx-version-id,
rgwx-versioned-epoch. These will apply to object modification operations
(put object, copy object, delete object), and provide the mechanism that
the sync agent will use to apply remote object changes.
Copy operation hasn't been done yet.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: link, unlink olh ops can get epoch
Yehuda Sadeh [Wed, 19 Nov 2014 21:15:26 +0000 (13:15 -0800)]
cls_rgw: link, unlink olh ops can get epoch

If epoch is specified, we need to handle updates differently, only
update the olh itself if passed epoch is newer than the olh current
epoch. Otherwise this is a replay of an older operation that doesn't
affect the olh (or the "current" property).

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw, rgw: pending_log can hold multiple entries per epoch
Yehuda Sadeh [Wed, 19 Nov 2014 01:29:30 +0000 (17:29 -0800)]
cls_rgw, rgw: pending_log can hold multiple entries per epoch

This is needed, so that we can later replay operations, using the epoch
for idempotency.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: parse copy location version id
Yehuda Sadeh [Tue, 18 Nov 2014 21:48:11 +0000 (13:48 -0800)]
rgw: parse copy location version id

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: reduce use of Object::get_obj()
Yehuda Sadeh [Tue, 18 Nov 2014 20:07:15 +0000 (12:07 -0800)]
rgw: reduce use of Object::get_obj()

We should avoid using this one, as it's not going to point at the object
instance in case it's an olh. Only kept the use in
Object::Delete, as we make explicit checks before using it.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: Object::Read operations should use state->obj
Yehuda Sadeh [Tue, 18 Nov 2014 19:32:37 +0000 (11:32 -0800)]
rgw: Object::Read operations should use state->obj

and not the provided obj, as it might have been an olh, therefore we
have prepare() that sets the state.obj as the effective object.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: Object::Read::read() returns total bytes read
Yehuda Sadeh [Tue, 18 Nov 2014 03:57:36 +0000 (19:57 -0800)]
rgw: Object::Read::read() returns total bytes read

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: time out pending olh entries
Yehuda Sadeh [Fri, 14 Nov 2014 03:29:30 +0000 (19:29 -0800)]
rgw: time out pending olh entries

remove old pending entries

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: don't write list entry when converting when deleting
Yehuda Sadeh [Thu, 13 Nov 2014 22:51:11 +0000 (14:51 -0800)]
cls_rgw: don't write list entry when converting when deleting

when converting the plain entry into a versioned entry, don't write the
list entry if this is a delete op with a null instance.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: revise null object instance handling, versioned epoch
Yehuda Sadeh [Thu, 13 Nov 2014 22:12:53 +0000 (14:12 -0800)]
cls_rgw: revise null object instance handling, versioned epoch

Separate the versioned epoch from the object entry version, since in the
case of null instane entries the object version actually contains
meaningful data that can be overwritten.
Keep separate instance entries for null versioned object and delete
marker, since the two can coexist for a period of time. With suspended
versioning bucket, when deleting a null versioned object we create an
delete marker, and set the olh log to remove the object instance, which
will make the gateway send a removal request. Had we kept the same
entry it'll remove the wrong entry.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: read bucket owner when following olh if pending entries
Yehuda Sadeh [Tue, 11 Nov 2014 01:09:21 +0000 (17:09 -0800)]
rgw: read bucket owner when following olh if pending entries

We need to read the bucket owner, so that we'd be able to apply any
changes to the object. Bucket owner is needed for quota related
accounting.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: remove warning
Yehuda Sadeh [Tue, 11 Nov 2014 00:15:49 +0000 (16:15 -0800)]
rgw: remove warning

This cleanup is not essential at this point

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: remove unused code
Yehuda Sadeh [Fri, 7 Nov 2014 06:00:27 +0000 (22:00 -0800)]
rgw: remove unused code

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: clean up compilation warnings
Yehuda Sadeh [Fri, 7 Nov 2014 05:52:00 +0000 (21:52 -0800)]
cls_rgw: clean up compilation warnings

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: implement dump() and generate test instances
Yehuda Sadeh [Fri, 7 Nov 2014 05:46:42 +0000 (21:46 -0800)]
cls_rgw: implement dump() and generate test instances

Add missing methods for some cls_rgw op types.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: guard certain operations using olh tag
Yehuda Sadeh [Fri, 7 Nov 2014 00:54:07 +0000 (16:54 -0800)]
cls_rgw: guard certain operations using olh tag

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw, cls_rgw: improve olh atomicity
Yehuda Sadeh [Tue, 4 Nov 2014 01:04:46 +0000 (17:04 -0800)]
rgw, cls_rgw: improve olh atomicity

Add olh_tag attr to olh object, and use it instead of obj_tag as object
data may be colocated with the olh. Use the olh_tag to guard various
operations.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: encode timestamp in pending olh info
Yehuda Sadeh [Mon, 3 Nov 2014 22:29:58 +0000 (14:29 -0800)]
rgw: encode timestamp in pending olh info

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: remove instance entry when removing delete marker
Yehuda Sadeh [Fri, 31 Oct 2014 00:15:26 +0000 (17:15 -0700)]
cls_rgw: remove instance entry when removing delete marker

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: send x-amz-version-id and x-amz-delete_marker header fields
Yehuda Sadeh [Fri, 31 Oct 2014 00:00:02 +0000 (17:00 -0700)]
rgw: send x-amz-version-id and x-amz-delete_marker header fields

send these fields on obj delete as defined by the api. This required
adding an index read so that we can identify whether an instance is
actually a delete marker.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: add dump_string_header()
Yehuda Sadeh [Thu, 30 Oct 2014 22:16:13 +0000 (15:16 -0700)]
rgw: add dump_string_header()

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: add missing cls_cxx_create()
Yehuda Sadeh [Thu, 30 Oct 2014 21:14:53 +0000 (14:14 -0700)]
cls_rgw: add missing cls_cxx_create()

This was found during code read, not necessarily a real issue, however,
we counted on the object being created implicitly by setting xattrs on
it. Instead make sure the object is created.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw, cls_rgw: fix update of olh to reflect non existing object
Yehuda Sadeh [Wed, 29 Oct 2014 22:37:58 +0000 (15:37 -0700)]
rgw, cls_rgw: fix update of olh to reflect non existing object

need to update olh appropriately when removing the last reference of an
object.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: inc olh epoch when updating log
Yehuda Sadeh [Wed, 29 Oct 2014 21:28:50 +0000 (14:28 -0700)]
cls_rgw: inc olh epoch when updating log

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: fix access to object through the null instance
Yehuda Sadeh [Wed, 29 Oct 2014 00:01:34 +0000 (17:01 -0700)]
rgw: fix access to object through the null instance

Beforehand we were following olh if the explicit 'null' instance was
specified.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: adjust versioning enable/suspend api
Yehuda Sadeh [Tue, 28 Oct 2014 23:14:10 +0000 (16:14 -0700)]
rgw: adjust versioning enable/suspend api

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: propagate object owner and mtime for deletion marker
Yehuda Sadeh [Tue, 28 Oct 2014 20:45:12 +0000 (13:45 -0700)]
rgw: propagate object owner and mtime for deletion marker

deletion marker needs to have object owner and mtime properties.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw, cls_rgw: multiple changes related to obj removal
Yehuda Sadeh [Tue, 28 Oct 2014 00:09:57 +0000 (17:09 -0700)]
rgw, cls_rgw: multiple changes related to obj removal

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: send "null" version id if needed
Yehuda Sadeh [Mon, 27 Oct 2014 20:50:46 +0000 (13:50 -0700)]
rgw: send "null" version id if needed

on bucket list versions

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoformatter: no need for dynamic allocation
Yehuda Sadeh [Fri, 24 Oct 2014 22:18:02 +0000 (15:18 -0700)]
formatter: no need for dynamic allocation

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agoosd: fix filter_prefix scoping in omap_get_vals
Yehuda Sadeh [Fri, 24 Oct 2014 22:07:13 +0000 (15:07 -0700)]
osd: fix filter_prefix scoping in omap_get_vals

filter_prefix should only affect the case where it's greater than
start_after, otherwise we'll end up with a key equals to start_after.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw, cls_rgw: add bi put
Yehuda Sadeh [Wed, 22 Oct 2014 01:30:23 +0000 (18:30 -0700)]
rgw, cls_rgw: add bi put

An admin operation to set bucket index entries.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw, rgw-admin: create bi list operation
Yehuda Sadeh [Tue, 21 Oct 2014 23:35:55 +0000 (16:35 -0700)]
cls_rgw, rgw-admin: create bi list operation

Can now list bucket index entries that correspond to a single key. This
is useful when debugging versioned objects issues.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw, rgw-admin: move bi_get() entry encoding to cls
Yehuda Sadeh [Tue, 21 Oct 2014 19:42:54 +0000 (12:42 -0700)]
cls_rgw, rgw-admin: move bi_get() entry encoding to cls

Create a new structure to hold entry info, so that we can later creata a
bi_list() operation.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: add missing flags encoding to rgw_bucket_dir_entry::dump()
Yehuda Sadeh [Tue, 21 Oct 2014 18:58:05 +0000 (11:58 -0700)]
cls_rgw: add missing flags encoding to rgw_bucket_dir_entry::dump()

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocommon, rgw: json escaping gets input buf size
Yehuda Sadeh [Tue, 21 Oct 2014 18:35:50 +0000 (11:35 -0700)]
common, rgw: json escaping gets input buf size

We now deal with strings that embed a null character.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw-admin, cls_rgw: add bi_get objclass operation
Yehuda Sadeh [Mon, 20 Oct 2014 22:11:12 +0000 (15:11 -0700)]
rgw-admin, cls_rgw: add bi_get objclass operation

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: keep null-versioned object as versioned object
Yehuda Sadeh [Sat, 18 Oct 2014 00:08:19 +0000 (17:08 -0700)]
cls_rgw: keep null-versioned object as versioned object

when olh is created. Mark the object as such, so that we'll know to
handle it correctly. This is needed so that we could handle the 'null'
version as required.
Still doesn't work correctly.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: follow olh where needed
Yehuda Sadeh [Fri, 17 Oct 2014 18:08:13 +0000 (11:08 -0700)]
rgw: follow olh where needed

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: unlink obj instance
Yehuda Sadeh [Fri, 17 Oct 2014 00:15:38 +0000 (17:15 -0700)]
rgw: unlink obj instance

use new objclass method

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: unlink object instance
Yehuda Sadeh [Thu, 16 Oct 2014 23:38:49 +0000 (16:38 -0700)]
cls_rgw: unlink object instance

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: update olh log when unlinking entry
Yehuda Sadeh [Thu, 16 Oct 2014 21:26:37 +0000 (14:26 -0700)]
cls_rgw: update olh log when unlinking entry

Need to update log so that later client will be able to appropriately
remove the object.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: more cleanup
Yehuda Sadeh [Thu, 16 Oct 2014 20:46:05 +0000 (13:46 -0700)]
cls_rgw: more cleanup

move versioned data and olh handling into class methods.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: more cleanup
Yehuda Sadeh [Thu, 16 Oct 2014 17:22:14 +0000 (10:22 -0700)]
cls_rgw: more cleanup

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: reorganize rgw_bucket_link_olh()
Yehuda Sadeh [Thu, 16 Oct 2014 16:43:58 +0000 (09:43 -0700)]
cls_rgw: reorganize rgw_bucket_link_olh()

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: convert RGWRados::get_attr() to new interface
Yehuda Sadeh [Tue, 14 Oct 2014 23:10:05 +0000 (16:10 -0700)]
rgw: convert RGWRados::get_attr() to new interface

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: switch get_obj_iterate() to new interface
Yehuda Sadeh [Tue, 14 Oct 2014 20:52:41 +0000 (13:52 -0700)]
rgw: switch get_obj_iterate() to new interface

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: remove unused code
Yehuda Sadeh [Fri, 10 Oct 2014 00:07:41 +0000 (17:07 -0700)]
rgw: remove unused code

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: purge intent log
Yehuda Sadeh [Fri, 10 Oct 2014 00:00:36 +0000 (17:00 -0700)]
rgw: purge intent log

We don't use the intent log anymore, just remove it.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: adjust to new interfaces
Yehuda Sadeh [Thu, 9 Oct 2014 03:33:57 +0000 (20:33 -0700)]
rgw: adjust to new interfaces

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: s/RGWRados::ObjectCtx/RGWObjectCtx
Yehuda Sadeh [Thu, 9 Oct 2014 03:20:43 +0000 (20:20 -0700)]
rgw: s/RGWRados::ObjectCtx/RGWObjectCtx

Can't forward declare nested class.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: clean up system obj interfaces
Yehuda Sadeh [Wed, 8 Oct 2014 00:07:22 +0000 (17:07 -0700)]
rgw: clean up system obj interfaces

Create a new structure to use, RGWRados::SystemObject, similar to the
previous changes made for the data objects.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: change RGWRados::get_attr()
Yehuda Sadeh [Tue, 7 Oct 2014 22:34:29 +0000 (15:34 -0700)]
rgw: change RGWRados::get_attr()

This is an interim fix, will need to make it work similarly to the other
calls.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: rework prepare_get_obj(), get_obj()
Yehuda Sadeh [Tue, 7 Oct 2014 00:10:42 +0000 (17:10 -0700)]
rgw: rework prepare_get_obj(), get_obj()

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: remove more unused code
Yehuda Sadeh [Mon, 6 Oct 2014 22:36:22 +0000 (15:36 -0700)]
rgw: remove more unused code

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: fix missing state initalization
Yehuda Sadeh [Mon, 6 Oct 2014 22:28:06 +0000 (15:28 -0700)]
rgw: fix missing state initalization

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: switch RGWRados::delete_obj() to new interface
Yehuda Sadeh [Mon, 6 Oct 2014 22:27:01 +0000 (15:27 -0700)]
rgw: switch RGWRados::delete_obj() to new interface

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: remove unused code
Yehuda Sadeh [Mon, 6 Oct 2014 21:21:06 +0000 (14:21 -0700)]
rgw: remove unused code

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: remove old index update calls
Yehuda Sadeh [Mon, 6 Oct 2014 21:02:04 +0000 (14:02 -0700)]
rgw: remove old index update calls

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: get rid of put_obj_meta(), replace with put_system_obj()
Yehuda Sadeh [Sat, 4 Oct 2014 04:49:45 +0000 (21:49 -0700)]
rgw: get rid of put_obj_meta(), replace with put_system_obj()

Last use of put_obj_meta() was for system object, simplify it for that
specific use case and rename.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: don't use put_system_obj() for data objects
Yehuda Sadeh [Sat, 4 Oct 2014 04:28:23 +0000 (21:28 -0700)]
rgw: don't use put_system_obj() for data objects

Use the new interface instead.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: pass around object context refrences, remove unused code
Yehuda Sadeh [Fri, 3 Oct 2014 23:59:26 +0000 (16:59 -0700)]
rgw: pass around object context refrences, remove unused code

We want to make it clear that the object context is required for
non-system objects, pass it by reference (rather than by pointer). Make
the put processors get it as a constructor param and keep it on the
object.
Still haven't updated everything, as some stuff is going to change
anyway.
Remove the plain put processor, as it is not used anymore.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: remove plain object processor
Yehuda Sadeh [Fri, 3 Oct 2014 23:05:34 +0000 (16:05 -0700)]
rgw: remove plain object processor

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: start reorganizing RGWRados
Yehuda Sadeh [Fri, 3 Oct 2014 22:55:23 +0000 (15:55 -0700)]
rgw: start reorganizing RGWRados

Need to reduce the various states of the different operations. The aim
is to separate the system objects operations from the data objects
operations, and compartmentalize the various systems.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: s/RGWRadosCtx/ObjectCtx
Yehuda Sadeh [Fri, 3 Oct 2014 16:43:28 +0000 (09:43 -0700)]
rgw: s/RGWRadosCtx/ObjectCtx

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: move RGWRadosCtx into RGWRados
Yehuda Sadeh [Fri, 3 Oct 2014 16:41:53 +0000 (09:41 -0700)]
rgw: move RGWRadosCtx into RGWRados

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: set olh if object has been versioned
Yehuda Sadeh [Fri, 3 Oct 2014 00:05:06 +0000 (17:05 -0700)]
rgw: set olh if object has been versioned

Bucket could have versioning suspended, but object has been versioned,
so once object has olh pointer in it, we need to continue maintainig it.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: allow olh linking to null instance objects
Yehuda Sadeh [Thu, 2 Oct 2014 23:46:57 +0000 (16:46 -0700)]
cls_rgw: allow olh linking to null instance objects

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw, cls_rgw: don't remove olh objects
Yehuda Sadeh [Thu, 2 Oct 2014 22:02:42 +0000 (15:02 -0700)]
rgw, cls_rgw: don't remove olh objects

A single head object can contain both olh data, and object data. Don't
remove object if it has olh information on it, just reset the other
info.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: initial versioned object removal implementation
Yehuda Sadeh [Tue, 30 Sep 2014 00:03:45 +0000 (17:03 -0700)]
rgw: initial versioned object removal implementation

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: bucket versioning status is tri-state
Yehuda Sadeh [Mon, 29 Sep 2014 22:10:02 +0000 (15:10 -0700)]
rgw: bucket versioning status is tri-state

disabled, enabled, suspended.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: add support for version-id-marker
Yehuda Sadeh [Mon, 29 Sep 2014 21:06:22 +0000 (14:06 -0700)]
rgw: add support for version-id-marker

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw, cls_rgw: cls_bucket_list returns raw key in map
Yehuda Sadeh [Mon, 29 Sep 2014 20:17:11 +0000 (13:17 -0700)]
rgw, cls_rgw: cls_bucket_list returns raw key in map

This is needed so that we dump the objects in the required order (from
newest to oldest versions for each object). While we're at it, revert to
the original encoding of rgw_bucket_dir, which will be better for
backward compatibility.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: update the appropriate prev key entry
Yehuda Sadeh [Mon, 29 Sep 2014 17:47:19 +0000 (10:47 -0700)]
cls_rgw: update the appropriate prev key entry

We need to update the previous key entry that it's no longer the latest,
need to use the list entry, not the data entry (which only serves as a
pointer to the list entry).

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: fix rgw_obj initialization
Yehuda Sadeh [Sun, 28 Sep 2014 01:05:30 +0000 (18:05 -0700)]
rgw: fix rgw_obj initialization

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: request state and various op functionality use rgw_obj_key
Yehuda Sadeh [Fri, 26 Sep 2014 21:18:41 +0000 (14:18 -0700)]
rgw: request state and various op functionality use rgw_obj_key

instead of plain string. This is needed so that we use the object
instance in the processing.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: cleanup, get rid of req_state::object
Yehuda Sadeh [Fri, 26 Sep 2014 20:14:02 +0000 (13:14 -0700)]
rgw: cleanup, get rid of req_state::object

We don't want this extra memory allocation

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: restful api now dumps versions
Yehuda Sadeh [Fri, 26 Sep 2014 18:11:17 +0000 (11:11 -0700)]
rgw: restful api now dumps versions

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: propagate dirent flags to rgw (from cls), other fixes
Yehuda Sadeh [Fri, 26 Sep 2014 16:48:17 +0000 (09:48 -0700)]
rgw: propagate dirent flags to rgw (from cls), other fixes

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: deletion marker needs to keep instance entry
Yehuda Sadeh [Wed, 24 Sep 2014 19:45:33 +0000 (12:45 -0700)]
cls_rgw: deletion marker needs to keep instance entry

Otherwise we wouldn't be able to find it when we remove it.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw, cls_rgw: list object versions is optional
Yehuda Sadeh [Wed, 24 Sep 2014 17:21:20 +0000 (10:21 -0700)]
rgw, cls_rgw: list object versions is optional

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: bucket listing gets extra param for versioning
Yehuda Sadeh [Wed, 24 Sep 2014 00:01:28 +0000 (17:01 -0700)]
rgw: bucket listing gets extra param for versioning

Can specify whether we want to see versions or not.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agocls_rgw: revise the data model
Yehuda Sadeh [Wed, 24 Sep 2014 00:00:37 +0000 (17:00 -0700)]
cls_rgw: revise the data model

We don't need to keep a listing entry for the olh.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: add get_type() to rgw ops
Yehuda Sadeh [Mon, 22 Sep 2014 23:08:57 +0000 (16:08 -0700)]
rgw: add get_type() to rgw ops

This is needed so that we can identify ops correctly.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: add 'versioning', and 'versions' to handled subresources
Yehuda Sadeh [Mon, 22 Sep 2014 22:10:56 +0000 (15:10 -0700)]
rgw: add 'versioning', and 'versions' to handled subresources

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: object manifest should reflect instance
Yehuda Sadeh [Wed, 17 Sep 2014 17:22:58 +0000 (10:22 -0700)]
rgw: object manifest should reflect instance

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: update json encoding for rgw_obj
Yehuda Sadeh [Wed, 17 Sep 2014 17:02:14 +0000 (10:02 -0700)]
rgw: update json encoding for rgw_obj

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
10 years agorgw: follow olh if needed
Yehuda Sadeh [Wed, 17 Sep 2014 16:52:44 +0000 (09:52 -0700)]
rgw: follow olh if needed

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>