When copying an object with new attrs, we still need to
maintain the ETAG.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Conflicts:
src/rgw/rgw_rados.cc
The OSD processes only a single string. The existing example wouldn't
even be passed to the OSD, since it would be interpreted as an option
to the ceph command.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
A failure in the ceph tool -> osd connection may mean this command is sent
twice. This regularly causes failures in QA.
Signed-off-by: Sage Weil <sage@inktank.com>
* document osd capabilities
* fix librados user example
* fix example with outdated syntax (pool= and uid= are not supported)
* ignore auid, object prefix, and class restrictions for now since
they aren't usable yet
* fix header for keyring file section
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
* note that it's only for librbd
* put settings in the [client] section for clarity
* fix typo
* re-indent and clarify sentence about clustered fs on top of RBD
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
* 'Ceph common' is not a package name
* config dir is /etc/nova, not /etc/conf
* remove trailing whitespace
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
If we fill the request path from the dentry instead of the inode, we
need to use the dentry inode. This fixes a segfault that would occur
in the case where request->inode is in fact null.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Coverity 716907-716909 [FORWARD_NULL} doesn't like using a pointer
that might be null. Assertions check that pointers are valid
before dereferencing.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Fix for coverity defect 716891 [DEADCODE] in
Client::encode_dentry_release where the released var is initialized
to 0, but never set, so the pre-emptive release of the dentry
capability (if requested by the drop flag) never happens.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
In choose_target_mds, the mds number is initialized to 0 and
then a separate target mds number is chosen based on the inode
set in the request. If the inode isn't set, we drop to choosing
a random mds, but only if the mds number is < 0, which doesn't
happen with the initialize to 0. This fix initializes the mds
number to -1, ensuring a random mds is chosen.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Fixes coverity errors (CHECKED_RETURN) for all calls to
Client::path_walk() where return value wasn't getting checked
in case of error.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Fixes for two coverity bugs in cephfs.cc.
716840 (CHECKED_RETURN) reported that the return value from
fstat wasn't getting checked. It now is checked, reports an
error and returns to the caller.
716970 (NEGATIVE_RETURNS) reported that the file descriptor passed
to fstat (*fd) might be negative, which isn't allowed. The check at
the top that open failed wasn't aborting the function (when *fd < 0),
now it does.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
CID 716968: Data race condition (MISSING_LOCK)At (6): Accessing "this->op_seq"
("JournalingObjectStore.op_seq") requires the "Mutex._m" lock.
Doesn't really matter, but this should satisfy coverity.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 716836: Buffer not null terminated (BUFFER_SIZE_WARNING)At (1): Calling
strncpy with a maximum size argument of 4096 bytes on destination array
"dir_name" of size 4096 bytes might leave the destination string unterminated.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717334: Uninitialized pointer field (UNINIT_CTOR)At (2): Non-static class
member "parent" is not initialized in this constructor nor in any functions
that it calls.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717093: Resource leak (RESOURCE_LEAK)At (48): Variable "omap_store" going
out of scope leaks the storage it points to.
Signed-off-by: Samuel Just <sam.just@inktank.com>
ID 717092: Resource leak (RESOURCE_LEAK)At (40): Handle variable "r" going out
of scope leaks the handle.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717088: Resource leak (RESOURCE_LEAK)At (11): Handle variable "tmpfd" going
out of scope leaks the handle.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 716861: Other violation (CHECKED_RETURN)At (3): Calling function "lseek(fd,
off, 0)" without checking return value. This library function may fail and
return an error code.
CID 717090: Resource leak (RESOURCE_LEAK)At (10): Handle variable "fd" going
out of scope leaks the handle.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717091: Resource leak (RESOURCE_LEAK)At (39): Handle variable "fd" going
out of scope leaks the handle.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 716863: Other violation (CHECKED_RETURN)At (20): Calling function
"fstat(basedir_fd, &basest)" without checking return value. This library
function may fail and return an error code.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717333: Uninitialized pointer field (UNINIT_CTOR)At (2): Non-static class
member "aio_ctx" is not initialized in this constructor nor in any functions
that it calls.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 717332: Uninitialized pointer field (UNINIT_CTOR)At (12): Non-static class
member field "iocb.aio_fildes" is not initialized in this constructor nor in
any functions that it calls.
Signed-off-by: Samuel Just <sam.just@inktank.com>
CID 716859: Other violation (CHECKED_RETURN)At (1): Calling function
"lseek64(this->fd, pos, 0)" without checking return value. This library
function may fail and return an error code.
Signed-off-by: Samuel Just <sam.just@inktank.com>
Fixes bug #3184 where the ceph-fuse client segfaults if authx is
enabled but no keyring file is present. This was due to the
client->init() return value not getting checked.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
If we project an inode release, we need to follow through, even if for
some reason we decide to keep the session active. Clear out the session
interval_sets in case that happens.
Fixes: #1677
Signed-off-by: Sage Weil <sage@inktank.com>
* Modify the Makefile.am to run all gtest libcephfs tests through
a single binary: test_libcephfs.
* Add tests for #2285, #3186, and #2778
Signed-off-by: Sam Lang <sam.lang@inktank.com>