This is just client in-memory state, and allows us to address objects >4GiB,
to match the existing librados/Objecter interfaces.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
RadosClient still does a few different things, but at least it
no longer does all the work of an IoCtx.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
This makes 'make check' happy, otherwise we need to create
a bucket name that starts with a period. This version is better.
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
The source object may either not exist or be the wrong size
during replay if the destination object was deleted in a future
already-applied operation. This should not impact correctness
of the replay.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
We want to be able to provide alternative default config values, than
the ones we set in common/config_opts.h. This can be useful when we
want different default for different modules (e.g., rgw, rgw-admin).
Just passing it on the command line won't do because then we'd override
any config set by the user, so we need to process that before the regular
parsing (but after initializing the config context).
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
It's turned on by default. So now we're using the
'rgw enable ops log' config param in ceph.conf, instead
of RGW_SHOULD_LOG_DEFAULT in the apache conf.
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Need this to make a linker error go away on my squeeze dev box. We
probably need to make sure librgw doesn't touch fcgi, once that is
revisited down the line. Opened #2166.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
We need to sync the object_map too. We can _almost_ check to see if there
are keys for the object and only do it then, except that they may have
existed previously and then been deleted.
So, always sync. leveldb is reasonably nice about this... it should just
be another fsync.
Signed-off-by: Sage Weil <sage@newdream.net>
The old strategy was to initiate a commit after any non-idempotent
transaction. This only worked if the transaction was idempotent with
respect to itself, or could be replayed partially without problems,
and in reality that isn't the case. For example:
- clone A -> B
- write to A
- <sync>
If we crash before the sync, and replay the clone A->B, we corrupt B with
the new A data.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Also, do the getxattr using fgetxattr, to avoid duplicating code. This is
slightly slower probably because we open a file handle, but if we care we
should really clean up the code to use lfn_open instead of lfn_find and
avoid the repeated path traversal too.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>