]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
13 years agoconfig: print warning on injectargs parse fail
Colin Patrick McCabe [Tue, 23 Aug 2011 21:46:05 +0000 (14:46 -0700)]
config: print warning on injectargs parse fail

injectargs should print a warning message when its parser fails.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agoinjectargs test: test foo=true
Colin Patrick McCabe [Tue, 23 Aug 2011 21:34:08 +0000 (14:34 -0700)]
injectargs test: test foo=true

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agomon: allow wildcards for mon cap command matching
Sage Weil [Tue, 23 Aug 2011 22:18:29 +0000 (15:18 -0700)]
mon: allow wildcards for mon cap command matching

We need wildcards, actually.  * is any token, ... is 1 or more tokens.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agocommon/config: fix get_val for booleans
Colin Patrick McCabe [Tue, 23 Aug 2011 21:25:25 +0000 (14:25 -0700)]
common/config: fix get_val for booleans

md_config_t::get_val should return true/false for booleans, not 0/1.
This is for consistency with the setter.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agoqa: add unit tests for mon cap 'allow command ...' stanzas
Sage Weil [Tue, 23 Aug 2011 21:03:47 +0000 (14:03 -0700)]
qa: add unit tests for mon cap 'allow command ...' stanzas

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: whitelist individual commands in mon cap string
Sage Weil [Tue, 23 Aug 2011 20:56:46 +0000 (13:56 -0700)]
mon: whitelist individual commands in mon cap string

This lets you whitelist a command prefix.  For example,

 'allow command osd foo'

will let you do any command that begins with 'osd foo', including
'osd foo' and 'osd foo bar baz bam'.

No deny, and no pattern matching.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: adjust max_devices when adding to crush map
Sage Weil [Tue, 23 Aug 2011 19:59:02 +0000 (12:59 -0700)]
mon: adjust max_devices when adding to crush map

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agocrush: refuse to add item >= max_devices
Sage Weil [Tue, 23 Aug 2011 19:58:46 +0000 (12:58 -0700)]
crush: refuse to add item >= max_devices

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: 'osd gstcrushmap' or 'osd crush set' both work
Sage Weil [Tue, 23 Aug 2011 19:47:17 +0000 (12:47 -0700)]
mon: 'osd gstcrushmap' or 'osd crush set' both work

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: fix arg count checks
Sage Weil [Tue, 23 Aug 2011 19:45:02 +0000 (12:45 -0700)]
mon: fix arg count checks

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: 'osd crush reweight <name> <weight>'
Sage Weil [Tue, 23 Aug 2011 19:40:14 +0000 (12:40 -0700)]
mon: 'osd crush reweight <name> <weight>'

Reweight a node in the crush map.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: 'osd crush rm <name>'
Sage Weil [Tue, 23 Aug 2011 19:33:46 +0000 (12:33 -0700)]
mon: 'osd crush rm <name>'

This is similar to crushtool --remove-item.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: 'osd crush add <id> <name> <weight> [<loc1=foo> [<loc2=bar> ...]]'
Sage Weil [Tue, 23 Aug 2011 19:31:35 +0000 (12:31 -0700)]
mon: 'osd crush add <id> <name> <weight> [<loc1=foo> [<loc2=bar> ...]]'

This is identical to the crushtool --add-item functionality, but does not
require a racy and tedious

 - get crush map
 - update crush map
 - set new crush map

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: return error message string when no other output string specified
Sage Weil [Tue, 23 Aug 2011 19:26:32 +0000 (12:26 -0700)]
mon: return error message string when no other output string specified

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agocommon/config: honor --
Colin Patrick McCabe [Tue, 23 Aug 2011 18:43:03 +0000 (11:43 -0700)]
common/config: honor --

Argument parsing should stop after --

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agomon: remove dead 'setmap' code
Sage Weil [Tue, 23 Aug 2011 18:23:31 +0000 (11:23 -0700)]
mon: remove dead 'setmap' code

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: make auto-marking of booting osds 'in' optional
Sage Weil [Tue, 23 Aug 2011 18:21:44 +0000 (11:21 -0700)]
mon: make auto-marking of booting osds 'in' optional

By default we mark a booting OSD 'in' so that it immediately gets data.
Make this optional.

Eventually we may want to make this default to off...

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoclient: kill dentry_of() macro
Sage Weil [Tue, 23 Aug 2011 18:20:53 +0000 (11:20 -0700)]
client: kill dentry_of() macro

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoMerge branch 'next'
Sage Weil [Tue, 23 Aug 2011 16:25:21 +0000 (09:25 -0700)]
Merge branch 'next'

13 years agoosd_types: fix category encoding in object_info_t
Sage Weil [Tue, 23 Aug 2011 16:24:25 +0000 (09:24 -0700)]
osd_types: fix category encoding in object_info_t

This was mis-merged in f6ff0f14e9a5b70d5ce0277975d321f10e3b39c7.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoqa: define _GNU_SOURCE for qa helpers; add btrfs dir makefile
Sage Weil [Tue, 23 Aug 2011 04:18:00 +0000 (21:18 -0700)]
qa: define _GNU_SOURCE for qa helpers; add btrfs dir makefile

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agolibrados: whitespace
Sage Weil [Mon, 22 Aug 2011 01:19:40 +0000 (18:19 -0700)]
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>
13 years agolibrbd: reimplement copy using read_iterate
Sage Weil [Mon, 22 Aug 2011 23:53:45 +0000 (16:53 -0700)]
librbd: reimplement copy using read_iterate

Ah, so much simpler!

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agorbd: fix check_io for snap
Sage Weil [Mon, 22 Aug 2011 23:52:45 +0000 (16:52 -0700)]
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>
13 years agolibrbd: fix copy
Sage Weil [Mon, 22 Aug 2011 23:38:05 +0000 (16:38 -0700)]
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>
13 years agoqa: add rbd copy workunit
Sage Weil [Mon, 22 Aug 2011 23:36:19 +0000 (16:36 -0700)]
qa: add rbd copy workunit

Test copying an image and snapshot.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomdcache: documentation for path_traverse
Greg Farnum [Mon, 22 Aug 2011 22:58:27 +0000 (15:58 -0700)]
mdcache: documentation for path_traverse

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
13 years agomdcache: Reduce the gratuitous references to onfail
Greg Farnum [Mon, 22 Aug 2011 22:58:16 +0000 (15:58 -0700)]
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>
13 years agomds: remove the unused MDS_TRAVERSE_FAIL flag.
Greg Farnum [Mon, 22 Aug 2011 22:56:35 +0000 (15:56 -0700)]
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>
13 years agomdcache: handle unreadable null dentries
Greg Farnum [Mon, 22 Aug 2011 22:00:18 +0000 (15:00 -0700)]
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>
13 years agolibrbd: specify copy src image as image handle
Sage Weil [Mon, 22 Aug 2011 23:02:36 +0000 (16:02 -0700)]
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>
13 years agoDefine _GNU_SOURCE in src/Makefile.am
Colin Patrick McCabe [Mon, 22 Aug 2011 22:35:13 +0000 (15:35 -0700)]
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>
13 years agopipe.c: #define GNU_SOURCE
Colin Patrick McCabe [Mon, 22 Aug 2011 22:06:16 +0000 (15:06 -0700)]
pipe.c: #define GNU_SOURCE

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agoMerge branch 'next'
Sage Weil [Mon, 22 Aug 2011 20:59:02 +0000 (13:59 -0700)]
Merge branch 'next'

13 years agomds: open+pin stray dirfrags on startup
Sage Weil [Mon, 22 Aug 2011 20:58:39 +0000 (13:58 -0700)]
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>
13 years agoRevert "mds: do not complain/assert about stray inode rstat/fragstat consistency"
Sage Weil [Mon, 22 Aug 2011 20:19:04 +0000 (13:19 -0700)]
Revert "mds: do not complain/assert about stray inode rstat/fragstat consistency"

This reverts commit d3d767a2a36caefdeb8a94abba1673cf8304c793.

A better solution is to keep the stray frags loaded+pinned.

13 years agocommon/pipe: add function to do pipe2(O_CLOEXEC)
Colin Patrick McCabe [Mon, 22 Aug 2011 17:48:15 +0000 (10:48 -0700)]
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>
13 years agoPG: Move reset_last_warm_restart to Initial::exit
Samuel Just [Mon, 22 Aug 2011 17:09:06 +0000 (10:09 -0700)]
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>
13 years agocommon/pipe: add function to do pipe2(O_CLOEXEC)
Colin Patrick McCabe [Mon, 22 Aug 2011 17:48:15 +0000 (10:48 -0700)]
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>
13 years agoPG: Move reset_last_warm_restart to Initial::exit
Samuel Just [Mon, 22 Aug 2011 17:09:06 +0000 (10:09 -0700)]
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>
13 years agoosd: flush writes prior to PGLS
Sage Weil [Mon, 22 Aug 2011 16:24:32 +0000 (09:24 -0700)]
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>
13 years agoosd: remove dead code, whitespace
Sage Weil [Mon, 22 Aug 2011 16:01:37 +0000 (09:01 -0700)]
osd: remove dead code, whitespace

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agolibrados: prefix api test pools
Sage Weil [Mon, 22 Aug 2011 00:53:03 +0000 (17:53 -0700)]
librados: prefix api test pools

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agolibrados: statically link gtest into librados unit tests
Sage Weil [Sun, 21 Aug 2011 23:38:50 +0000 (16:38 -0700)]
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>
13 years agoMakefile: allow gtest to be linked in statically
Sage Weil [Sun, 21 Aug 2011 23:38:01 +0000 (16:38 -0700)]
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>
13 years ago.gitignore: scratchtool
Sage Weil [Sun, 21 Aug 2011 23:17:32 +0000 (16:17 -0700)]
.gitignore: scratchtool

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoMakefile: rule to upload + submit coverity job
Sage Weil [Sun, 21 Aug 2011 23:45:57 +0000 (16:45 -0700)]
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>
13 years agoaddr_parsing: fix warning
Sage Weil [Sun, 21 Aug 2011 23:42:14 +0000 (16:42 -0700)]
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>
13 years agoescape: fix snprintf args
Sage Weil [Sun, 21 Aug 2011 23:26:54 +0000 (16:26 -0700)]
escape: fix snprintf args

Include space for null termination.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years ago.gitignore: scratchtool
Sage Weil [Sun, 21 Aug 2011 23:17:32 +0000 (16:17 -0700)]
.gitignore: scratchtool

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agolibrados: fix shadow
Sage Weil [Sun, 21 Aug 2011 21:24:44 +0000 (14:24 -0700)]
librados: fix shadow

Coverity cid 23

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomds: fix shadow
Sage Weil [Sun, 21 Aug 2011 21:23:46 +0000 (14:23 -0700)]
mds: fix shadow

Coverity cid 24

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomds: fix shadow
Sage Weil [Sun, 21 Aug 2011 21:22:41 +0000 (14:22 -0700)]
mds: fix shadow

Coverity cid 25

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomds: fix shadow
Sage Weil [Sun, 21 Aug 2011 21:22:07 +0000 (14:22 -0700)]
mds: fix shadow

Coverity cid 26

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomds: fix shadow
Sage Weil [Sun, 21 Aug 2011 21:21:10 +0000 (14:21 -0700)]
mds: fix shadow

Coverity cid 27

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomds: fix shadow
Sage Weil [Sun, 21 Aug 2011 21:20:13 +0000 (14:20 -0700)]
mds: fix shadow

Coverity cid 28

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomoncaps: fix shadow
Sage Weil [Sun, 21 Aug 2011 21:18:05 +0000 (14:18 -0700)]
moncaps: fix shadow

Coverity cid 30

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomonclient: fix shadow
Sage Weil [Sun, 21 Aug 2011 21:17:08 +0000 (14:17 -0700)]
monclient: fix shadow

Coverity cid 31

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomonclient: fix shadow
Sage Weil [Sun, 21 Aug 2011 21:16:35 +0000 (14:16 -0700)]
monclient: fix shadow

Coverity cid 32

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomsg: fix shadow
Sage Weil [Sun, 21 Aug 2011 21:15:58 +0000 (14:15 -0700)]
msg: fix shadow

Coverity cid 33

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosd: fix shadow
Sage Weil [Sun, 21 Aug 2011 21:14:21 +0000 (14:14 -0700)]
osd: fix shadow

Coverity cid 34

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoosdcaps: fix shadow
Sage Weil [Sun, 21 Aug 2011 21:12:25 +0000 (14:12 -0700)]
osdcaps: fix shadow

Coverity cid 35

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoescape: use snprintf
Sage Weil [Sun, 21 Aug 2011 21:10:41 +0000 (14:10 -0700)]
escape: use snprintf

Coverity cid 41, 40

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agosecret: use strncpy, snprintf
Sage Weil [Sun, 21 Aug 2011 21:07:21 +0000 (14:07 -0700)]
secret: use strncpy, snprintf

Coverity cid 42

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoaddr_parsing: use strncpy
Sage Weil [Sun, 21 Aug 2011 21:03:49 +0000 (14:03 -0700)]
addr_parsing: use strncpy

Coverity cid 43

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoaddr_parsing: avoid strcpy
Sage Weil [Sun, 21 Aug 2011 21:03:00 +0000 (14:03 -0700)]
addr_parsing: avoid strcpy

Make coverity shut up.

Coverity cid 44

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomount: fix path leak
Sage Weil [Sun, 21 Aug 2011 21:00:56 +0000 (14:00 -0700)]
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>
13 years agomount: avoid unguarded strcpy
Sage Weil [Sun, 21 Aug 2011 20:56:38 +0000 (13:56 -0700)]
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>
13 years agotest_ioctls: reduce stack use
Sage Weil [Sun, 21 Aug 2011 20:52:37 +0000 (13:52 -0700)]
test_ioctls: reduce stack use

Coverity cid 51

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoformatter: less big buffer for dump format string
Sage Weil [Sun, 21 Aug 2011 20:51:55 +0000 (13:51 -0700)]
formatter: less big buffer for dump format string

Coverity cid 53

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomount: avoid big stack item
Sage Weil [Sun, 21 Aug 2011 20:50:45 +0000 (13:50 -0700)]
mount: avoid big stack item

Coverity cid 54

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomount: avoid big stack item
Sage Weil [Sun, 21 Aug 2011 20:49:10 +0000 (13:49 -0700)]
mount: avoid big stack item

Coverity cid 55

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agotestlibrbd: add missing va_end()
Sage Weil [Sun, 21 Aug 2011 04:05:47 +0000 (21:05 -0700)]
testlibrbd: add missing va_end()

Coverity cid 57, 58

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agorgw: remove redundant line
Yehuda Sadeh [Sun, 21 Aug 2011 06:32:12 +0000 (23:32 -0700)]
rgw: remove redundant line

13 years agomds: do not complain/assert about stray inode rstat/fragstat consistency
Sage Weil [Sun, 21 Aug 2011 03:42:30 +0000 (20:42 -0700)]
mds: do not complain/assert about stray inode rstat/fragstat consistency

We instantiate the stray dirfrags without reading the fragstat off of disk
because it's faster, we know the dentry is unique, and we don't care about
the stats.  It can lead to inconsistency between the dirfrag frag/rstat
and the inodes, though.  Silently clean it up when we hit it; that's
simpler than not maintaining it at all for those directories.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agopaxos: fix store_state
Sage Weil [Sat, 20 Aug 2011 22:04:55 +0000 (15:04 -0700)]
paxos: fix store_state

Stop if we empty out the map completely.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agomonclient: be less chatty about stray messages
Sage Weil [Sat, 20 Aug 2011 16:56:49 +0000 (09:56 -0700)]
monclient: be less chatty about stray messages

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agodebian: librbd headers require librados headers
Sage Weil [Sat, 20 Aug 2011 14:31:54 +0000 (07:31 -0700)]
debian: librbd headers require librados headers

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agoscratchtool: not a test suite
Yehuda Sadeh [Sat, 20 Aug 2011 06:40:40 +0000 (23:40 -0700)]
scratchtool: not a test suite

13 years agoRevert "Remove old rados tests"
Yehuda Sadeh [Sat, 20 Aug 2011 06:36:51 +0000 (23:36 -0700)]
Revert "Remove old rados tests"

This reverts commit 665fd8214d4f8fa54a675c2998b22613424a6cb3.

Conflicts:

src/testradospp.cc

13 years agoosd: fix compilation
Yehuda Sadeh [Sat, 20 Aug 2011 06:32:36 +0000 (23:32 -0700)]
osd: fix compilation

13 years agoosd: call incorrect osdmap addrs errors
Sage Weil [Sat, 20 Aug 2011 03:37:33 +0000 (20:37 -0700)]
osd: call incorrect osdmap addrs errors

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agorgw: fail operation when trying to clone to the same shadow
Yehuda Sadeh [Sat, 20 Aug 2011 00:33:27 +0000 (17:33 -0700)]
rgw: fail operation when trying to clone to the same shadow

not necessary to recreate the same shadow, and also provides mutual
exclusion

13 years agomds: xlocker_caps are supplemental to caps
Sage Weil [Fri, 19 Aug 2011 23:16:26 +0000 (16:16 -0700)]
mds: xlocker_caps are supplemental to caps

Like loner_caps, xlocker_caps are additional caps to the any caps.

In practical terms, this only affects (currently) the LOCK_XLOCKDONE state
for the filelock, where it's less work than making sure what is in the any
column is also |'d onto the xlocker column.  Easier to read :)

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomds: only client hold xlock in xlockdone can change lock state
Sage Weil [Fri, 19 Aug 2011 23:15:06 +0000 (16:15 -0700)]
mds: only client hold xlock in xlockdone can change lock state

If we are in xlockdone, only the client holding that xlock can adjus the
lock state (e.g., relock).  Other clients have to wait until the xlock
cycle unwinds completely.

Fixes: #1417
Signed-off-by: Sage Weil <sage@newdream.net>
13 years agorgw: fix prepare_atomic_for_write
Yehuda Sadeh [Fri, 19 Aug 2011 23:20:55 +0000 (16:20 -0700)]
rgw: fix prepare_atomic_for_write

13 years agomds: update truncate_pending on O_TRUNC; pass old_size on O_TRUNC open
Sage Weil [Fri, 19 Aug 2011 20:53:06 +0000 (13:53 -0700)]
mds: update truncate_pending on O_TRUNC; pass old_size on O_TRUNC open

We were missing truncate_pending++ in O_TRUNC path.  Use a common helper.

Pass old_size on O_TRUNC open.  (This was the real bug we worked around in
79db9fc509933429f4a8f4aca6d3da5517c43d1f.)

Only do an actual truncate if old_size > 0.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
13 years agorados-api: fix #include order
Sage Weil [Fri, 19 Aug 2011 20:07:42 +0000 (13:07 -0700)]
rados-api: fix #include order

Fixes conflict with linux types on fatty.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agocconf: fix clitest
Sage Weil [Fri, 19 Aug 2011 20:05:42 +0000 (13:05 -0700)]
cconf: fix clitest

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agocconf: --filter-key and --filter-key-value
Sage Weil [Fri, 19 Aug 2011 19:50:11 +0000 (12:50 -0700)]
cconf: --filter-key and --filter-key-value

Filter out section list to sections that define a given key or that
set a key to a given value.

This is useful to, for example, filter out sections mapped to the current
host.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomds: fix LOCK_LOCK_XLOCK lock state name/string
Sage Weil [Fri, 19 Aug 2011 19:51:00 +0000 (12:51 -0700)]
mds: fix LOCK_LOCK_XLOCK lock state name/string

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agorgw: add missing cache locking
Yehuda Sadeh [Fri, 19 Aug 2011 19:56:38 +0000 (12:56 -0700)]
rgw: add missing cache locking

this was overlooked when switch to the multithreaded configuration

13 years agorgw: was missing return value
Yehuda Sadeh [Fri, 19 Aug 2011 19:33:08 +0000 (12:33 -0700)]
rgw: was missing return value

13 years agorgw: some more race fixes
Yehuda Sadeh [Fri, 19 Aug 2011 19:27:43 +0000 (12:27 -0700)]
rgw: some more race fixes

13 years agotest/rados-api/misc.cc: update tests after API change
Colin Patrick McCabe [Fri, 19 Aug 2011 16:51:04 +0000 (09:51 -0700)]
test/rados-api/misc.cc: update tests after API change

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
13 years agomonitorstore: drop unused sync value
Sage Weil [Fri, 19 Aug 2011 16:49:16 +0000 (09:49 -0700)]
monitorstore: drop unused sync value

This is inherently unsafe, because we write to a final filename without
ensuring the data is on disk.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agopaxos: use MonitorStore::put_bl_sn_map() to commit batches of values
Sage Weil [Fri, 19 Aug 2011 16:47:29 +0000 (09:47 -0700)]
paxos: use MonitorStore::put_bl_sn_map() to commit batches of values

This allows us to (safely) do fsync vs sync optimizations.  The old code
would write values to the final names and then sync(2), but a crash in
between could leave 0-length (non-temporary) files and crash.

Fixes: #1414
Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomonitorstore: implement put_bl_sn_map
Sage Weil [Fri, 19 Aug 2011 16:46:14 +0000 (09:46 -0700)]
monitorstore: implement put_bl_sn_map

This will commit a big batch of values safely.  We push it down into
MonitorStore so we can avoid an fsync(2) per file.

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agomon: whitespace
Sage Weil [Fri, 19 Aug 2011 16:15:56 +0000 (09:15 -0700)]
mon: whitespace

Signed-off-by: Sage Weil <sage@newdream.net>
13 years agoatomic_t: update spinlock implementation.
Greg Farnum [Fri, 19 Aug 2011 16:15:42 +0000 (09:15 -0700)]
atomic_t: update spinlock implementation.

Somebody added a 'set' function without adding the non-atomic_ops
version!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>