Commit Graph

21862 Commits

Author SHA1 Message Date
Sage Weil
091d16ab13 mds: init in cap_reconnect_t ctor
At (2): Non-static class member field "capinfo.cap_id" is not initialized in this constructor nor in any functions that it calls.
At (4): Non-static class member field "capinfo.wanted" is not initialized in this constructor nor in any functions that it calls.
At (6): Non-static class member field "capinfo.issued" is not initialized in this constructor nor in any functions that it calls.
At (8): Non-static class member field "capinfo.snaprealm" is not initialized in this constructor nor in any functions that it calls.
At (10): Non-static class member field "capinfo.pathbase" is not initialized in this constructor nor in any functions that it calls.
CID 717257 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
At (12): Non-static class member field "capinfo.flock_len" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-19 09:06:06 -07:00
Sage Weil
46054ce646 mds: init inode_t::dir_layout
At (2): Non-static class member field "dir_layout.dl_dir_hash" is not initialized in this constructor nor in any functions that it calls.
At (4): Non-static class member field "dir_layout.dl_unused1" is not initialized in this constructor nor in any functions that it calls.
At (6): Non-static class member field "dir_layout.dl_unused2" is not initialized in this constructor nor in any functions that it calls.
CID 717258 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)

Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-19 09:04:10 -07:00
Sam Lang
0166bd06c2 Merge branch 'wip-3346' 2012-10-18 22:14:24 -05:00
Sage Weil
86b43179d2 rbd: implement bench-write command
We may want to change the command line args around later to make this
more friendly.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-18 16:43:26 -07:00
Sage Weil
e5e076dfa1 Merge branch 'wip-rbd-stripe' (early part)
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-10-18 16:42:15 -07:00
Sage Weil
04d32e7eeb rbd: print useful error message if striping is specified for format 1
Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-18 16:41:17 -07:00
Sam Lang
58e920be97 client: Fix permissions checking for O_WRONLY
O_RDONLY is 0 in glibc, so we have to assume the
flags bits are mutually exclusive, otherwise we always
request read perms and write-only modes break.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-10-18 17:16:35 -05:00
Sam Lang
352a7e268e test: Make the test filename unique to test
This fixes up the chmod test to use a unique
filename to test with, and avoid clobbering of
other tests and commonly named files.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-10-18 17:15:45 -05:00
Sam Lang
b19ac61a7d client: Fix permissions error on open with O_CREAT
Posix allows creating/opening a file with
open() with a mode that doesn't allow write (or read)
access but flags that request it: O_CREAT|O_WRONLY.
This means that correct permissions checking against
the mode on open() only happens if the file already exists.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-10-18 17:15:45 -05:00
tamil
0571cb798d S3 test scripts
Signed-off-by: tamil <tamil.muthamizhan@inktank.com
2012-10-18 14:52:11 -07:00
John Wilkins
f6b7b5cb27 doc: minor fix on user name for GW script.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-10-18 14:47:37 -07:00
tamil
43e8f76070 Cleaned up
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2012-10-18 14:13:15 -07:00
Sage Weil
b5ce39fa6c Merge branch 'next' 2012-10-17 23:00:25 -07:00
Sage Weil
1c382869ba addr_parsing: make , and ; and ' ' all delimiters
Instead of just ,.  Currently "foo.com, bar.com" will fail because of the
space after the comma.  This patches fixes that, and makes all delim
chars interchangeable.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-17 23:00:10 -07:00
Sage Weil
e0b321323f vstart.sh: log client to out/$name.log
Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-17 22:57:10 -07:00
Sage Weil
03887e04d8 client: fix signed/unsigned comparison warning
Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-17 15:42:42 -07:00
Joao Eduardo Luis
1fc18c4681 mon: MonitorStore: fix error checks for mkdir operations
We introduced a bug on the monitor store a couple of commits back that
would trigger a EEXIST error message when the store tried to make sure
a directory exists by trying to 'mkdir' it.

We now check if 'errno' is EEXIST and, if so, we ignore the error.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-10-17 21:22:07 +01:00
Sage Weil
e8df212ba7 leveldb: revert accidental rewind
In 51858b7864.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-17 12:00:52 -07:00
Sage Weil
85a26ad2b8 client: initialize tid in MetaRequest ctor
CID 717207 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
At (2): Non-static class member "tid" is not initialized in this constructor nor in any functions that it calls.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-17 11:59:55 -07:00
Sam Lang
676db60c80 test/libcephfs: Fix telldir/seekdir test
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-10-17 12:50:48 -05:00
Sam Lang
51858b7864 test: Add libcephfs tests for stat, lstat, chmod
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-10-17 12:50:48 -05:00
Sam Lang
c68c516fe6 client: Fix stat of relative symlinks
Stat of symlinks that are relative to their location
would return -ENOENT because the symlink target is
being appended to the path rather than replacing it.
This fix replaces the symlink component with the path
of the symlink target (in the case that its a relative
symlink), and avoids updating the inode to point the
symlink (keeps at the parent).

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-10-17 12:50:48 -05:00
Sam Lang
b4bfade1c2 doc: Fix wrong wording for symlink xattrs calls
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-10-17 12:50:48 -05:00
Sam Lang
809587c915 client: Implement lchown in Client and libcephfs
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-10-17 12:50:48 -05:00
Sam Lang
39fcd7e273 test: Add libcephfs tests for stat, lstat, chmod
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-10-17 12:50:48 -05:00
Sam Lang
9b0c88bf13 client: Implement stat and correct lstat
lstat is meant to not follow symbolic links in
the given path, whereas stat does.  This adds a
stat function to Client and libcephfs and changes
the behavior of lstat to not follow symlinks.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-10-17 12:50:48 -05:00
Sam Lang
14ef165534 client: Support for fchmod
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-10-17 12:50:47 -05:00
Sage Weil
e6cecabb55 Merge remote-tracking branch 'gh/mon-coverity-fixes'
Reviewed-by: Sage Weil <sage@inktank.com>
2012-10-17 09:59:19 -07:00
Joao Eduardo Luis
a0f65a161a mon: MonitorStore: check return value of 'rename' for errors
CID 716854: Unchecked return value (CHECKED_RETURN)
At (10): Calling function "rename(tfn, fn)" without checking return value.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-10-17 17:47:55 +01:00
Joao Eduardo Luis
e41caa190d mon: MonitorStore: check mkdir return value for errors
CID 728081: Unchecked return value (CHECKED_RETURN)
At (5): Calling function "mkdir(dfn, 493U)" without checking return value.
CID 716853: Unchecked return value (CHECKED_RETURN)
At (2): Calling function "mkdir(fn, 493U)" without checking return value.
CID 716855: Unchecked return value (CHECKED_RETURN)
At (2): Calling function "mkdir(fn, 493U)" without checking return value.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-10-17 17:47:55 +01:00
Joao Eduardo Luis
2549bb869a mon: MonitorStore: check return value for errors on 'open'
CID 728083: Argument cannot be negative (NEGATIVE_RETURNS)
At (22): "dirfd" is passed to a parameter that cannot be negative.
At (29): "dirfd" is passed to a parameter that cannot be negative.
CID 717445: Argument cannot be negative (NEGATIVE_RETURNS)
At (3): "dirfd" is passed to a parameter that cannot be negative.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-10-17 17:47:55 +01:00
Joao Eduardo Luis
6d7dea3588 mon: AuthMonitor: check return values
CID 716850: Unchecked return value (CHECKED_RETURN)
At (14): Calling function "KeyServer::get_auth(EntityName const &,
EntityAuth &) const" without checking return value.

CID 716849: Unchecked return value (CHECKED_RETURN)
At (14): Calling function "EntityName::from_str(std::string const &)"
without checking return value.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-10-17 17:47:54 +01:00
Joao Eduardo Luis
0292349dfd mon: LogMonitor: check return value when writing to file
CID 716851: Unchecked return value (CHECKED_RETURN)
At (51): Calling function "ceph::buffer::list::write_fd(int) const"
without checking return value.


Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-10-17 15:41:36 +01:00
Joao Eduardo Luis
47a4a7c6e0 mon: Monitor: unlock before returning
CID 716947 (#1 of 2): Missing unlock (LOCK)
CID 716947 (#2 of 2): Missing unlock (LOCK)
At (25): Returning without unlocking "this->lock._m".

There were a couple of cases in Monitor::init() that could lead us to
return without properly unlocking. Coverity gets mad props for uncovering
this.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-10-17 15:31:44 +01:00
Joao Eduardo Luis
52dedc8986 mon: Monitor: fix potential null-pointer dereference
CID 717443: Dereference after null check (FORWARD_NULL)
At (14): Passing null pointer "detailbl" to function
"ceph::buffer::list::append(std::string const &)", which dereferences it.


Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-10-17 15:23:11 +01:00
Sage Weil
64bf7f9b28 leveldb: update .gitignore
Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-16 21:29:34 -07:00
Sage Weil
ad6840ce5c Merge branch 'wip-3301'
Reviewed-by: Sage Weil <sage@inktank.com>
2012-10-16 21:06:00 -07:00
Sam Lang
8ed86eea3f test: Add func. test for chmod in libcephfs
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-10-16 18:26:29 -07:00
Sam Lang
328bf48234 client: Add permissions checking to open
Users of the libcephfs api (fuse in particular)
don't check the mode against the open flags.  This
commit does the proper checks to grant/deny access
to the file.  The check_mode() function constructs
a requested mode based on the flags, and compares that
to the mode of the file.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-10-16 18:26:29 -07:00
Dan Mick
ee20cd02ab rbd: reject negative size (can make image that is hard to delete)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-10-16 18:25:52 -07:00
Sage Weil
6f74e6b36a radosgw: fix compile warning
Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-16 17:27:28 -07:00
Gary Lowell
d78ba6af94 Merge branch 'next' 2012-10-16 23:27:21 +00:00
John Wilkins
ab4d8b75f3 doc: Updated the cephx section of the toc for cluster ops.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-10-16 15:24:11 -07:00
John Wilkins
256c665eab doc: Did a little clean-up work in the cephx guide.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-10-16 15:23:34 -07:00
John Wilkins
0818e1e95a doc: Added a new intro for cephx authentication.
Signed-off-by: John Wilkins <john.wilkins@inktank.com>
2012-10-16 15:22:25 -07:00
Yehuda Sadeh
d2afddd457 rgw: multiple coverity fixes
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-10-16 14:13:38 -07:00
Sam Lang
58020d44c7 test: Add a workunit for chmod
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-10-16 15:17:38 -05:00
Sage Weil
db976663a5 mds: explicitly queue messages for unconnected clients
Previously, the messenger would queue messages for a destination that
didn't exist when you were a server; that changed a while back with the
wip-msgr merge (circa v0.52).  The result is that when we force open
client sessions and queue messages, they are dropped on the floor and the
client--when it does connect--gets confusing stuff from the MDS.

Instead, explicitly queue and send these messages.  Also, *always* send
via the Connection* instead of the inst.

Fixes: #2681
Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-16 13:04:43 -07:00
Sage Weil
2542dd5364 client: fix implemented caps update on release/flush
When we release caps, clear them out of implemented as well, unless we
still hold references.  Otherwise implemented ends up holding all sorts of
extra caps (e.g., when nothing is getting revoked), leading to confusion
later down the line.

This now mirrors the kernel code.

Fixes: #3301
Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-16 11:47:29 -07:00
Sage Weil
b290dc3a30 MClientRequest: fix mode formatting
Signed-off-by: Sage Weil <sage@inktank.com>
2012-10-16 11:11:16 -07:00