Commit Graph

15950 Commits

Author SHA1 Message Date
Sage Weil
ba4551d104 librados: whitespace
Don't do

some::class::
method(int foo)
{

}

...because then I can't '^S::method'. :)

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-22 17:21:35 -07:00
Sage Weil
3205441d3f librbd: reimplement copy using read_iterate
Ah, so much simpler!

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-22 16:53:55 -07:00
Sage Weil
f19e6131c3 rbd: fix check_io for snap
Need to look at image size for snapshot, not the head version.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-22 16:53:55 -07:00
Sage Weil
76e18e3d57 librbd: fix copy
This was croaking on sparse images.

Use an image ctx for the dest.

We should probably use read_iterate instead.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-22 16:53:55 -07:00
Sage Weil
39b6a9c495 qa: add rbd copy workunit
Test copying an image and snapshot.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-22 16:53:55 -07:00
Greg Farnum
b03a1841b4 mdcache: documentation for path_traverse
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-22 16:00:35 -07:00
Greg Farnum
e898fe7df8 mdcache: Reduce the gratuitous references to onfail
We've been setting flags at the beginning of path_traverse
for a while; use those instead of ongoing comparisons.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-22 16:00:35 -07:00
Greg Farnum
a1433a1df3 mds: remove the unused MDS_TRAVERSE_FAIL flag.
This isn't used, and judging by the comments was a horrible lie.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-22 16:00:35 -07:00
Greg Farnum
4a17d71c8e mdcache: handle unreadable null dentries
Previously, we were asserting (farther down) if the dentry was
null but blocked by a lock. Instead, we should here be waiting
until it's readable instead of just continuing on.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-08-22 16:00:35 -07:00
Sage Weil
a585c4d4fe librbd: specify copy src image as image handle
By specifying via an image handle we can set the snapshot on the src
image.  This also makes the API cleaner.

Fixes: #1416
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-22 16:02:56 -07:00
Colin Patrick McCabe
3ce41446a6 Define _GNU_SOURCE in src/Makefile.am
We end up needing _GNU_SOURCE in a bunch of places-- to get direct i/o,
pipe2, and some other Linux-specific interfaces.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-22 15:35:13 -07:00
Colin Patrick McCabe
4e9a0b6d30 pipe.c: #define GNU_SOURCE
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-22 15:06:16 -07:00
Sage Weil
4b7b5ec7dc Merge branch 'next' 2011-08-22 13:59:02 -07:00
Sage Weil
3d85872a0f mds: open+pin stray dirfrags on startup
This ensures that the stray dirfrags are always open, which in turn ensures
that whenever we add straydn items the rstats/fragstats will get updated
properly.  This is a better solution than d3d767a.

Now we can assert the stray dirfrag is open in
get_or_create_stray_dentry() instead of calling get_or_open_dirfrag().

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-22 13:58:39 -07:00
Sage Weil
3f134257e2 Revert "mds: do not complain/assert about stray inode rstat/fragstat consistency"
This reverts commit d3d767a2a3.

A better solution is to keep the stray frags loaded+pinned.
2011-08-22 13:19:04 -07:00
Colin Patrick McCabe
b00b6f685a common/pipe: add function to do pipe2(O_CLOEXEC)
Support old systems that don't have O_CLOEXEC.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-22 13:11:18 -07:00
Samuel Just
93c0565e59 PG: Move reset_last_warm_restart to Initial::exit
Previously, reset_last_warm_restart was only invoked when handle_create
was used.  This misses cases where the pg is initialized via a Notify,
Log, or Info message.  reset_last_warm_restart will now be called from
the Initial state exit handler in order to handle the other cases.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-08-22 13:11:15 -07:00
Colin Patrick McCabe
abe5cd28d1 common/pipe: add function to do pipe2(O_CLOEXEC)
Support old systems that don't have O_CLOEXEC.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-22 11:13:55 -07:00
Samuel Just
cf3b7cf6a9 PG: Move reset_last_warm_restart to Initial::exit
Previously, reset_last_warm_restart was only invoked when handle_create
was used.  This misses cases where the pg is initialized via a Notify,
Log, or Info message.  reset_last_warm_restart will now be called from
the Initial state exit handler in order to handle the other cases.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-08-22 10:20:33 -07:00
Sage Weil
3e9152546e osd: flush writes prior to PGLS
Make sure previous writes (which will include both object creation and
PG creation) are flushed before listing objects.

Fixes: #1427
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-22 09:24:32 -07:00
Sage Weil
c412da8a92 osd: remove dead code, whitespace
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-22 09:01:37 -07:00
Sage Weil
3a623bb327 librados: prefix api test pools
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 17:53:19 -07:00
Sage Weil
2fb3af45ca librados: statically link gtest into librados unit tests
This way they can run via teuthology.

We should do this for anything that we expect to run outside of the
immediate build environment.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 17:53:19 -07:00
Sage Weil
6decfa742f Makefile: allow gtest to be linked in statically
Use UNITTEST_STATIC_LDADD instead of UNITTEST_LDADD.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 17:53:19 -07:00
Sage Weil
239f61e781 .gitignore: scratchtool
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 16:46:23 -07:00
Sage Weil
b02a347136 Makefile: rule to upload + submit coverity job
You need to

 make project.tgz
 make submit-coverity

and have .coverity.build.pass with the right password in CWD
(ceph.git/src).

The submit-coverity rule doesn't do the project.tgz for you because it
always cleans+rebuilds every time.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 16:45:57 -07:00
Sage Weil
aa3a8dd662 addr_parsing: fix warning
warning: include/addr_parsing.c:45: ‘saveptr’ may be used uninitialized in this function

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 16:42:14 -07:00
Sage Weil
7d2f4a5112 escape: fix snprintf args
Include space for null termination.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 16:26:54 -07:00
Sage Weil
952009c600 .gitignore: scratchtool
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 16:17:32 -07:00
Sage Weil
febe232742 librados: fix shadow
Coverity cid 23

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 14:24:44 -07:00
Sage Weil
244b6ee3b1 mds: fix shadow
Coverity cid 24

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 14:23:46 -07:00
Sage Weil
56b1484d69 mds: fix shadow
Coverity cid 25

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 14:22:41 -07:00
Sage Weil
6de1e53832 mds: fix shadow
Coverity cid 26

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 14:22:07 -07:00
Sage Weil
6b8ccb21df mds: fix shadow
Coverity cid 27

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 14:21:10 -07:00
Sage Weil
e6467ef4a3 mds: fix shadow
Coverity cid 28

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 14:20:13 -07:00
Sage Weil
b3821cc592 moncaps: fix shadow
Coverity cid 30

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 14:18:05 -07:00
Sage Weil
14096a8f37 monclient: fix shadow
Coverity cid 31

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 14:17:08 -07:00
Sage Weil
0d73ad8edd monclient: fix shadow
Coverity cid 32

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 14:16:35 -07:00
Sage Weil
1cbc242c64 msg: fix shadow
Coverity cid 33

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 14:15:58 -07:00
Sage Weil
87a5026146 osd: fix shadow
Coverity cid 34

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 14:14:21 -07:00
Sage Weil
3283e8ee98 osdcaps: fix shadow
Coverity cid 35

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 14:12:25 -07:00
Sage Weil
b5a2ad0e86 escape: use snprintf
Coverity cid 41, 40

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 14:10:41 -07:00
Sage Weil
41745a9166 secret: use strncpy, snprintf
Coverity cid 42

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 14:07:21 -07:00
Sage Weil
5fb99fa795 addr_parsing: use strncpy
Coverity cid 43

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 14:03:49 -07:00
Sage Weil
05c38faa83 addr_parsing: avoid strcpy
Make coverity shut up.

Coverity cid 44

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 14:03:00 -07:00
Sage Weil
ef80b0acf8 mount: fix path leak
canonicalize_path() does not free/touch it's argument; no need to strdup()
here.

Coverity cid 39

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 14:00:56 -07:00
Sage Weil
2ebf14147f mount: avoid unguarded strcpy
Use strdup here, mostly to make coverity shut up.

Coverity cid 45

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 13:56:38 -07:00
Sage Weil
40fcd2e10e test_ioctls: reduce stack use
Coverity cid 51

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 13:52:37 -07:00
Sage Weil
8b0d065145 formatter: less big buffer for dump format string
Coverity cid 53

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 13:51:55 -07:00
Sage Weil
3ff9068ed3 mount: avoid big stack item
Coverity cid 54

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 13:50:45 -07:00