Add rados_ioctx_namespace_set_key() and librados::IoCtx::namespace_set_key()
Add namespace to admin-daemon operations
Support namespace in osd map command
Add namespace to object_locator_t and hobject_t
Add random namespaces to psim program
Feature: #4982 (OSD: namespaces pt 1 (librados/osd, not caps))
Signed-off-by: David Zafman <david.zafman@inktank.com>
Add ObjectOperation::write() that includes len instead of using bufferlist length
Have selfmanaged_snap_rollback_object() use mutate()
Signed-off-by: David Zafman <david.zafman@inktank.com>
Fixes: #5497
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Luis <joao.luis@inktank.com>
Otherwise, the first 32 get |'d together as ints. Then, the result
((int)-1) is sign extended to ((long long int)-1) before being |'d
with the 1LL entries. This results in ~((uint64_t)0).
Fixes: #5497
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Luis <joao.luis@inktank.com>
Fixes: #5497
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Luis <joao.luis@inktank.com>
If the CPu supposts SSE4.2, use the crc32c instructions. Use the magic
incantation from who knows where to do this. __builtin_cpu_supports()
is a nicer way to do it, but that is new in gcc 4.8.
Avoid static globals; they are bad. Sadly that means we redetect the CPU
feature on every call. I assume that is reasonably efficient...
Signed-off-by: Sage Weil <sage@inktank.com>
When truncating a file, we should xlock the corresponding filelock.
(revoke any Fw caps from clients).
[note from sw: setattr on size also takes the filelock xlock.]
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Remove code for 'mds cluster_fail', 'osd tell', and auth_usage()
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Match a symlink to a dir, not just dirs. This fixes the osd case of e.g.,
creating an osd in /data/osd$id in which ceph-disk makes a symlink from
/var/lib/ceph/osd/ceph-$id.
Fix proposed by Matt Thompson <matt.thompson@mandiant.com>; extended to
include the upstart users too.
Fixes: #5490
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Handle the case where the device is a full disk. Make the partition
check a bit more robust (don't make assumptions about naming aside from
the device being a prefix of the partition).
Signed-off-by: Sage Weil <sage@inktank.com>
We already do this for Ops and LingerOps, but missed this when we added
CommandOps to the mix. The result is that an ill-timed mon disconnect will
leave a command map check (and thus the command) hanging.
This misbehavior was introduced when CommandOp was introduced, back in
commit 2e172225b0, and we failed to fix it
in 8808ca57c6.
Fixes: #5493
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
When reading object_info_t from an existing object attribute, the pool
may be < 0 and should be set to the pool containing the object. This is done
on the oi object on the stack but overriden later by:
obc->obs.oi.decode(bv);
This decode is superfluous and is removed so that it does not override
the modified value of the pool.
Signed-off-by: Loic Dachary <loic@dachary.org>
Valgrind complains about an invalid read when we don't pad the allocation,
and because it is inlined we can't whitelist it for valgrind. Workaround
the warning by just padding our allocations a bit.
Fixes: #5346
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
We were adding this update to a transaction that would only be applied
on the leader. The peons would never see a first_committed > 0.
Fixes: #5484
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Automatically enable the 'filestore xattr use omap' option if the fs
does not appear to handle large xattrs on its own.
This makes for a more pleasant use experience as they are not told to
enable something that we already know they must enable in order to
continue.
Fixes: #5137
Signed-off-by: Sage Weil <sage@inktank.com>
http://tracker.ceph.com/issues/1779fixes#1779
Adjust the return value from rgw_get_user_info_by_swift call
in RGW_SWIFT_Auth_Get::execute() to have the correct
return code in response.
Make a well-defined maximum size of an object attribute. Since Linus has
a 64KB limit, and that is what we normally use to back this, use that as
the limit. This means that even when leveldb is backing large xattrs
(as ext4 users must do) we will return EFBIG on >64KB setxattr attempts.
Signed-off-by: Sage Weil <sage@inktank.com>
Make sure all MetaRequest reference put's go through the same path that
releases inode references, including all of the error paths.
Signed-off-by: Sage Weil <sage@inktank.com>
Not sure I can make this actually private and make Client::put_inode() a
friend method (making all of Client a friend would defeat the purpose).
This works well enough, though!
Signed-off-by: Sage Weil <sage@inktank.com>