]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
14 years agoAdd control character detection
Colin Patrick McCabe [Thu, 14 Jul 2011 22:07:47 +0000 (15:07 -0700)]
Add control character detection

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoDon't build build tests unless requested
Colin Patrick McCabe [Wed, 13 Jul 2011 23:11:43 +0000 (16:11 -0700)]
Don't build build tests unless requested

Build tests (that check if there are unresolved symbols in libraries)
can slow down the build a lot. We should only enable them when
developers need them.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoReplicatedPG: data_subset may not contain data_needed
Samuel Just [Wed, 6 Jul 2011 18:23:14 +0000 (11:23 -0700)]
ReplicatedPG: data_subset may not contain data_needed

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoencoding.h: need to pass by reference
Samuel Just [Wed, 6 Jul 2011 18:22:34 +0000 (11:22 -0700)]
encoding.h: need to pass by reference

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agoReplicatedPG: fix snaps decode in recover_primary
Samuel Just [Wed, 29 Jun 2011 22:31:49 +0000 (15:31 -0700)]
ReplicatedPG: fix snaps decode in recover_primary

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agotest/osd: TestSnaps now writes large, random objects with holes
Samuel Just [Wed, 6 Jul 2011 18:24:41 +0000 (11:24 -0700)]
test/osd: TestSnaps now writes large, random objects with holes

In order to test clone recovery pathways, TestSnaps now writes to random
subsets of an object between snapshots.  Objects may now also be very
large.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
14 years agomds: fix handle_simple_lock on LOCK replica
Sage Weil [Wed, 13 Jul 2011 21:01:16 +0000 (14:01 -0700)]
mds: fix handle_simple_lock on LOCK replica

We were ignoring caps.  To avoid this kind of mistake, use eval_gather(),
like handle_file_lock() does.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: drop useless from field from MInodeFileCaps
Sage Weil [Wed, 13 Jul 2011 20:22:29 +0000 (13:22 -0700)]
mds: drop useless from field from MInodeFileCaps

While we're updating the protocol, clean this up too.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: print cur+nested auth_pins on inode
Sage Weil [Wed, 13 Jul 2011 03:56:14 +0000 (20:56 -0700)]
mds: print cur+nested auth_pins on inode

And clean up a bit.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: move to MIX state if writer wanted and no wanted loner
Sage Weil [Wed, 13 Jul 2011 00:27:41 +0000 (17:27 -0700)]
mds: move to MIX state if writer wanted and no wanted loner

We can just look at the target loner here, which also takes any caps wanted
by other replicas on other MDSs into account.  Otherwise we need to
to duplicate the CInode::calc_ideal_loner() logic.

This assumes the loner field is accurate.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: print mds_caps_wanted on inode
Sage Weil [Wed, 13 Jul 2011 00:24:47 +0000 (17:24 -0700)]
mds: print mds_caps_wanted on inode

along with the client caps info

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: improve print() for MInodeFileCaps
Sage Weil [Wed, 13 Jul 2011 00:24:19 +0000 (17:24 -0700)]
mds: improve print() for MInodeFileCaps

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: migrate loner_cap state
Sage Weil [Wed, 13 Jul 2011 20:18:38 +0000 (13:18 -0700)]
mds: migrate loner_cap state

It is tedious to infer what the old loner_cap was pre-migration. Just send
it over the wire and set it explicitly. Usually when we eval() we would
have come to the same conclusion, but when we didn't, we got into
inconsistent/impossible states where the issue caps don't match the loner
state (Asx issued but no loner_cap set).  That meant the next issue was
a revocation with no lock state change, which led to yet more problems
down the line.

This is an internal MDS protocol change.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: clear [want_]loner_cap on cap export
Sage Weil [Wed, 13 Jul 2011 17:39:18 +0000 (10:39 -0700)]
mds: clear [want_]loner_cap on cap export

These fields are meaningless on the replica.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorgw: clean up temp object if failed to PUT
Yehuda Sadeh [Wed, 13 Jul 2011 21:08:38 +0000 (14:08 -0700)]
rgw: clean up temp object if failed to PUT

Conflicts:

src/rgw/rgw_op.cc

14 years agorgw: remove include of curl/types.h
Yehuda Sadeh [Wed, 13 Jul 2011 19:23:47 +0000 (12:23 -0700)]
rgw: remove include of curl/types.h

14 years agotest/rgw_escape: add JSON + utf-8 test
Colin Patrick McCabe [Wed, 13 Jul 2011 18:47:24 +0000 (11:47 -0700)]
test/rgw_escape: add JSON + utf-8 test

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/rgw_escape.cc: add utf-8 test
Colin Patrick McCabe [Wed, 13 Jul 2011 18:24:48 +0000 (11:24 -0700)]
test/rgw_escape.cc: add utf-8 test

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorgw: fix escaping clobbering utf8
Yehuda Sadeh [Wed, 13 Jul 2011 17:46:39 +0000 (10:46 -0700)]
rgw: fix escaping clobbering utf8

14 years agoRevert "mds: handle importer failure on exporter"
Sage Weil [Wed, 13 Jul 2011 16:26:54 +0000 (09:26 -0700)]
Revert "mds: handle importer failure on exporter"

This reverts commit bf768cb146b23d345efcc51badfe668bf37d4046.

This won't actually happen with f44cffdb8ccc8cf258b418146dbbfc20a9b685f9

14 years agomds: verify deferred messages aren't stale
Sage Weil [Tue, 12 Jul 2011 23:49:25 +0000 (16:49 -0700)]
mds: verify deferred messages aren't stale

We may defer processing of some messages because we are laggy (in hearing
from the monitor).  When we eventually get to those messages, make sure
they haven't since become stale (i.e., the source mds isn't now down).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: handle importer failure on exporter
Sage Weil [Tue, 12 Jul 2011 23:47:16 +0000 (16:47 -0700)]
mds: handle importer failure on exporter

If the export is reversed but we still receive the ack, behave.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoclient: print ino along with &fh for ll_ file ops
Sage Weil [Tue, 12 Jul 2011 03:58:37 +0000 (20:58 -0700)]
client: print ino along with &fh for ll_ file ops

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorados: fix warning
Sage Weil [Tue, 12 Jul 2011 03:46:56 +0000 (20:46 -0700)]
rados: fix warning

warning: rados.cc:319: large integer implicitly truncated to unsigned type

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomime.c: avoid compiler warning
Colin Patrick McCabe [Mon, 11 Jul 2011 22:12:25 +0000 (15:12 -0700)]
mime.c: avoid compiler warning

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agotest/mime: test invalid decodes
Colin Patrick McCabe [Mon, 11 Jul 2011 22:11:40 +0000 (15:11 -0700)]
test/mime: test invalid decodes

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomime.h: better comments
Colin Patrick McCabe [Mon, 11 Jul 2011 22:11:24 +0000 (15:11 -0700)]
mime.h: better comments

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoAdd mime encoding
Colin Patrick McCabe [Mon, 11 Jul 2011 21:31:59 +0000 (14:31 -0700)]
Add mime encoding

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomds: only issue xlocker_caps if we are also the loner
Sage Weil [Mon, 11 Jul 2011 18:35:15 +0000 (11:35 -0700)]
mds: only issue xlocker_caps if we are also the loner

We cannot issue caps to a client purely because they have something
xlocked, because we do not revoke caps when we drop the xlock.  However,
if they are a loner AND have the object xlocked, we can; this is why the
xlock release code either moves to LOCK or EXCL state.

Remember, the goal here is to issue caps when we do operations on objects
that xlock them (e.g. setattr, mknod) and move directly to the EXCL state
afterward.  That only works (or makes sense) when we are the lone client
with caps.

Fix the get_caps_allowed_by_type() helper to do this properly.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: rely on master to do anchor locks for slave_link_prep
Sage Weil [Sun, 10 Jul 2011 21:15:38 +0000 (14:15 -0700)]
mds: rely on master to do anchor locks for slave_link_prep

The replica can't take all these locks without confusing things, since it
maybe need to unlock/relock, may screw up auth_pins, and worse.  The master
can take the locks.

The only problem is that the master may not know if the inode has already
been anchored if the lock hasn't cycled since then.  In that case, we take
more locks than we need to.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoclient: set I_COMPLETE after adding cap
Sage Weil [Mon, 11 Jul 2011 19:07:57 +0000 (12:07 -0700)]
client: set I_COMPLETE after adding cap

This avoids immediately clearing it because we are newly (re)issued the
Fs cap (a generic check in the cap add code).

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoclient: reenable local ENOENT
Sage Weil [Mon, 11 Jul 2011 19:07:03 +0000 (12:07 -0700)]
client: reenable local ENOENT

This was accidentally disabled by commit:c7e248b.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: journal renamed dirino on rmdir
Sage Weil [Sun, 10 Jul 2011 21:10:18 +0000 (14:10 -0700)]
mds: journal renamed dirino on rmdir

This makes replay work on the auth by updating the subtrees accordingly
(since rmdir is really just renaming into the stray dir).

Note that this doesn't completely fix things for the dirfrag auth; see
#1295.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: defer lock eval if freezing or frozen
Sage Weil [Sun, 10 Jul 2011 21:05:10 +0000 (14:05 -0700)]
mds: defer lock eval if freezing or frozen

We were only deferring if frozen.  But if freezing we need to too, because
of the way cap messages are deferred.  We defer cap messages if

 - inode is frozen
 - inode is freezing and locks are stable (to avoid starvation)

So if we are in a stable freezing state and start deferring caps, we can't
twiddle locks further or else we can

 - potentially starve (okay, in rare cases)
 - get stuck because we already started deferring cap messages

We would also screw up the cap message ordering if we became unstable again
and were allowed to start processing cap messages while others were still
deferred.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoMerge remote branch 'origin/stable'
Sage Weil [Sat, 9 Jul 2011 21:37:31 +0000 (14:37 -0700)]
Merge remote branch 'origin/stable'

14 years agoclient: remove unused variable
Sage Weil [Fri, 8 Jul 2011 23:30:07 +0000 (16:30 -0700)]
client: remove unused variable

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorgw: fix put of zero sized objects
Yehuda Sadeh [Fri, 8 Jul 2011 22:33:41 +0000 (15:33 -0700)]
rgw: fix put of zero sized objects

14 years agov0.31 v0.31
Sage Weil [Fri, 8 Jul 2011 21:17:40 +0000 (14:17 -0700)]
v0.31

14 years agofilejournal: parse kernel version 3.0+
Sage Weil [Fri, 8 Jul 2011 21:15:56 +0000 (14:15 -0700)]
filejournal: parse kernel version 3.0+

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agorgw: fix copy operation (clean up acls)
Yehuda Sadeh [Thu, 7 Jul 2011 00:02:16 +0000 (17:02 -0700)]
rgw: fix copy operation (clean up acls)

14 years agorgw: when listing objects, set locator key only when needed
Yehuda Sadeh [Wed, 6 Jul 2011 20:32:31 +0000 (13:32 -0700)]
rgw: when listing objects, set locator key only when needed

14 years agoqa: make dir tests run by default in rename all.sh
Greg Farnum [Fri, 8 Jul 2011 17:33:08 +0000 (10:33 -0700)]
qa: make dir tests run by default in rename all.sh

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoMerge branch 'mds_wrlock'
Sage Weil [Fri, 8 Jul 2011 17:33:16 +0000 (10:33 -0700)]
Merge branch 'mds_wrlock'

14 years agomds: fix warning
Sage Weil [Fri, 8 Jul 2011 17:24:39 +0000 (10:24 -0700)]
mds: fix warning

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoosd: use shared helper for WRITE, CLONERANGE stats updates
Sage Weil [Thu, 7 Jul 2011 22:07:16 +0000 (15:07 -0700)]
osd: use shared helper for WRITE, CLONERANGE stats updates

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoosd: clean up a few things in do_osd_ops
Sage Weil [Thu, 7 Jul 2011 22:01:12 +0000 (15:01 -0700)]
osd: clean up a few things in do_osd_ops

don't set head_exists
remove dup touch on setxattr
set maybe_created for clonerange

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: refactor drop_*_locks() to use helpers
Sage Weil [Fri, 8 Jul 2011 16:47:34 +0000 (09:47 -0700)]
mds: refactor drop_*_locks() to use helpers

This slightly changes the unlock order for drop_locks() (rdlocks now
last instead of after xlocks, before [remote_]wrlocks).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: take a remote_wrlock on srcdir for cross-mds rename
Sage Weil [Fri, 8 Jul 2011 16:32:04 +0000 (09:32 -0700)]
mds: take a remote_wrlock on srcdir for cross-mds rename

This ensures that we hold a wrlock on the srcdn auth when the slave
makes it's changes to the src directory, and prevents us from corrupting
the scatterlock state.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: implement remote_wrlock
Sage Weil [Fri, 8 Jul 2011 16:30:29 +0000 (09:30 -0700)]
mds: implement remote_wrlock

For the rename code to behave, we need to hold a wrlock on the slave node
to ensure that any racing gather (mix->lock) is not sent prior to the
_rename_prepare() running; otherwise we violate the locking rules and
corrupt rstats.

Implement a remote_wrlock that will be used by rename.  The wrlock is held
on a remote node instead of the local node, and is set up similarly to
remote_xlocks.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoclient: clean up debug output
Sage Weil [Fri, 8 Jul 2011 16:27:50 +0000 (09:27 -0700)]
client: clean up debug output

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: add mix->lock(2) state
Sage Weil [Wed, 6 Jul 2011 20:48:35 +0000 (13:48 -0700)]
mds: add mix->lock(2) state

There is a problem with the wrlocks and cross-mds renames:

 - master (dest auth, srci auth, srcdir replica) takes wrlock on srcdiri
 - something triggers a srcdiri lock, putting inest/ifile lock in mix->lock
   state
 - slave (srcdir auth) sends LOCKACK
 - master sends prepare_rename
 - slave (srcdir auth) does rename prepare, which modifies srcdir

Even though the master holds a wrlock on the srcdiri, the gather starts
immediately and the slave sends the LOCKACK before the master's wrlock is
released.

To fix this, we add a new mix->lock(2) state, and we do not start the
mix->lock gather from replicas until the local gather completes, _after_
the auth's wrlock is released.  This makes the master's wrlock sufficient
to ensure the prepare_rename on the slave is save.

This also works when the slave is the srci auth, since the gather won't
complete until the master releases its wrlock.  BUT, it does NOT work if a
third MDS is the srcdiri auth, since it can still gather from the slave
prior to the master releasing its wrlock.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorados: fix usage()
Sage Weil [Thu, 7 Jul 2011 23:05:16 +0000 (16:05 -0700)]
rados: fix usage()

Exit after dumping usage to stderr on error.

Print to stdout for -h.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge branch 'next'
Greg Farnum [Thu, 7 Jul 2011 22:28:37 +0000 (15:28 -0700)]
Merge branch 'next'

14 years agomds: check that dnl exists before dereferencing it.
Greg Farnum [Thu, 7 Jul 2011 22:28:21 +0000 (15:28 -0700)]
mds: check that dnl exists before dereferencing it.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomon: fix pool vs unmanaged snaps check
Sage Weil [Thu, 7 Jul 2011 21:19:12 +0000 (14:19 -0700)]
mon: fix pool vs unmanaged snaps check

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: don't use pending_inc in poolop preprocess_*
Sage Weil [Thu, 7 Jul 2011 21:20:19 +0000 (14:20 -0700)]
mon: don't use pending_inc in poolop preprocess_*

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomon: fix up pending_inc pool op mess
Sage Weil [Thu, 7 Jul 2011 21:13:14 +0000 (14:13 -0700)]
mon: fix up pending_inc pool op mess

You can't look at pending_inc in preprocess methods.  Or return an error
based on pending_inc before it commits.  Fix up the snap-related error
checking.

Rename _pool_op() to _pool_op_reply().

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: set old and new dentry lease bits
Sage Weil [Thu, 7 Jul 2011 20:35:32 +0000 (13:35 -0700)]
mds: set old and new dentry lease bits

Recent kernels got the new CEPH_LOCK_DN definition but we were still
setting the old bit.  Set both so we work with both classes of clients. In
the meantime, update the kernel to ignore this field so that eventually we
can drop/reuse it.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoMerge branch 'next'
Greg Farnum [Thu, 7 Jul 2011 20:12:32 +0000 (13:12 -0700)]
Merge branch 'next'

14 years agomds: conclude ENOENT during travrse if we have a readable null dentry
Sage Weil [Thu, 7 Jul 2011 18:47:52 +0000 (11:47 -0700)]
mds: conclude ENOENT during travrse if we have a readable null dentry

Only if the lock is readable.  For example, replicas with dn lock state
of LOCK aren't readable.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoRevert "mds: fail out of path_traverse if we have a null dentry."
Sage Weil [Thu, 7 Jul 2011 18:42:43 +0000 (11:42 -0700)]
Revert "mds: fail out of path_traverse if we have a null dentry."

This reverts commit 39d50c1362db1d86782a60a5714e088d9ef7deaa.

14 years agorgw: fix copy operation (clean up acls)
Yehuda Sadeh [Thu, 7 Jul 2011 00:02:16 +0000 (17:02 -0700)]
rgw: fix copy operation (clean up acls)

14 years agoqa: mds rename: account for not being in the ceph root dir
Greg Farnum [Wed, 6 Jul 2011 22:02:42 +0000 (15:02 -0700)]
qa: mds rename: account for not being in the ceph root dir

We need to know the Ceph absolute path. We can't actually
derive that for sure (if we aren't mounted into the root), but this
at least lets us deal with being in our own subdirectories.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomove mds rename tests to workunits directory
Greg Farnum [Wed, 6 Jul 2011 17:54:06 +0000 (10:54 -0700)]
move mds rename tests to workunits directory

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agoqa: mds rename: Rework so it will function in teuthology as a workunit:
Greg Farnum [Tue, 5 Jul 2011 22:57:26 +0000 (15:57 -0700)]
qa: mds rename: Rework so it will function in teuthology as a workunit:

work in current directory, not hardcoded mnt path
use CEPH_TOOL variable rather than hardcoded local executable
pass CEPH_ARGS to scripts so you don't need to export it into the environment.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
14 years agomds: cleanup: use enum for lock states
Sage Weil [Wed, 6 Jul 2011 16:49:51 +0000 (09:49 -0700)]
mds: cleanup: use enum for lock states

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoMerge branch 'next'
Sage Weil [Wed, 6 Jul 2011 20:49:14 +0000 (13:49 -0700)]
Merge branch 'next'

14 years agorgw: when listing objects, set locator key only when needed
Yehuda Sadeh [Wed, 6 Jul 2011 20:32:31 +0000 (13:32 -0700)]
rgw: when listing objects, set locator key only when needed

14 years agorados: rename load-gen options
Sage Weil [Tue, 5 Jul 2011 21:05:22 +0000 (14:05 -0700)]
rados: rename load-gen options

No abbreviations, update usage().

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agohonor CINIT_FLAG_NO_DEFAULT_CONFIG_FILE
Colin Patrick McCabe [Tue, 5 Jul 2011 21:47:55 +0000 (14:47 -0700)]
honor CINIT_FLAG_NO_DEFAULT_CONFIG_FILE

Don't use CEPH_CONF_FILE_DEFAULT when CINIT_FLAG_NO_DEFAULT_CONFIG_FILE
is set.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomkcephfs: Only create OSD journal dir if we have a journal.
Tommi Virtanen [Tue, 5 Jul 2011 21:56:51 +0000 (14:56 -0700)]
mkcephfs: Only create OSD journal dir if we have a journal.

Thanks to huang jun <hjwsm1989@gmail.com> for finding the bug.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agomds: always clear_flushed() after finish_flush()
Sage Weil [Tue, 5 Jul 2011 21:22:24 +0000 (14:22 -0700)]
mds: always clear_flushed() after finish_flush()

The scatter_writebehind_finish() is always followed up by an eval_gather(),
which does the clear_flushed().  For everyone else (replicas!), we need to
clear it immediately to avoid confusing things later.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoclient: fix num_flushing_caps accounting
Sage Weil [Tue, 5 Jul 2011 20:58:53 +0000 (13:58 -0700)]
client: fix num_flushing_caps accounting

This only affects debug output, fwiw.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoclient: don't call flush_snaps when nothing to flush
Sage Weil [Tue, 5 Jul 2011 20:40:24 +0000 (13:40 -0700)]
client: don't call flush_snaps when nothing to flush

Otherwise we fail an assert.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: kill stray break
Sage Weil [Tue, 5 Jul 2011 20:37:24 +0000 (13:37 -0700)]
mds: kill stray break

This broke with the gatherbuilder addition.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agocontext: implement complete()
Sage Weil [Tue, 5 Jul 2011 20:33:40 +0000 (13:33 -0700)]
context: implement complete()

finish() requires the caller to delete.  complete() does that for you by
calling finish() and then doing delete this.  Unless you overload it and
do something else.  This will allow us to make Contexts are are reusable,
for example, by overloading complete() instead of finish() and managing
the lifecycle in some other way.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoMerge branch 'stable'
Sage Weil [Tue, 5 Jul 2011 17:07:11 +0000 (10:07 -0700)]
Merge branch 'stable'

14 years agologrotate.conf: Mark stat/*.log as "missingok"; it's not always there.
Tommi Virtanen [Tue, 5 Jul 2011 17:00:51 +0000 (10:00 -0700)]
logrotate.conf: Mark stat/*.log as "missingok"; it's not always there.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
14 years agoMerge branch 'stable'
Sage Weil [Tue, 5 Jul 2011 16:18:27 +0000 (09:18 -0700)]
Merge branch 'stable'

14 years agoMove stat/*.log to the end of logrotate.conf
Alexandre Oliva [Mon, 4 Jul 2011 16:14:11 +0000 (13:14 -0300)]
Move stat/*.log to the end of logrotate.conf

Logrotate ignores entries after a rule that doesn't match any files.

Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agomds: fix file_excl assert
Sage Weil [Tue, 5 Jul 2011 15:58:26 +0000 (08:58 -0700)]
mds: fix file_excl assert

If we are in XSYN state and want to move to anything else, we must go via
EXCL, but we may not be loner anymore.  Weaken the file_excl() assert so we
don't crash.

Reported-by: Fyodor Ustinov <ufm@ufm.su>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoobsync: improve formatting a little bit
Colin Patrick McCabe [Fri, 1 Jul 2011 22:44:33 +0000 (15:44 -0700)]
obsync: improve formatting a little bit

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoobsync: add man page, documentation line
Colin Patrick McCabe [Fri, 1 Jul 2011 22:28:37 +0000 (15:28 -0700)]
obsync: add man page, documentation line

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agobuffer: remove do_cow, clone_in_place
Colin Patrick McCabe [Fri, 1 Jul 2011 17:56:06 +0000 (10:56 -0700)]
buffer: remove do_cow,  clone_in_place

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoMerge remote branch 'origin/wip-client'
Sage Weil [Fri, 1 Jul 2011 15:52:07 +0000 (08:52 -0700)]
Merge remote branch 'origin/wip-client'

14 years agolibrados: close very small race condition
Colin Patrick McCabe [Fri, 1 Jul 2011 07:18:42 +0000 (00:18 -0700)]
librados: close very small race condition

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agomon: add 'osd create [id]' command
Sage Weil [Fri, 1 Jul 2011 06:17:39 +0000 (23:17 -0700)]
mon: add 'osd create [id]' command

If the id is specified, mark a non-existant osd rank as existant.  The id
must fall within the current [0,max) range.  This is the counterpart of
'osd rm <id>'.

If the id is not specified, allocate an unused osd id and set the EXISTS
flag.  Increase max_osd as needed.

Closes: #1244
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoclient: clean up cap flush methods
Sage Weil [Thu, 30 Jun 2011 20:01:29 +0000 (13:01 -0700)]
client: clean up cap flush methods

We grew several copies of this code, and it turns out none of them were correct.

- assign flush tid in send_cap() helper
- pin inode on (dirty | flushing), not either/both
- add a proper mark_caps_flushing helper

and a bunch of other stuff.  This brings this bit of code in alignment with
the kernel implementation.

And, flush_caps() on cap import.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoMakefile: libmds.a, not libmds.la
Sage Weil [Fri, 1 Jul 2011 05:15:11 +0000 (22:15 -0700)]
Makefile: libmds.a, not libmds.la

We never link this into a .so, so avoid building it again with -fPIC.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agomds: fix off-by-one in cow_inode vs snap flushes
Sage Weil [Fri, 1 Jul 2011 05:04:42 +0000 (22:04 -0700)]
mds: fix off-by-one in cow_inode vs snap flushes

We need to wait for the client to flush snapped caps if the client has
not already flushed for the given snap.  If the client has already flushed
caps through the last snapid for the old inode, we do not need to set up
the snapped inode's locks to wait for that.

This fixes an occasional hang on the snaps/snaptest-multiple-capsnaps.sh
workunit.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agorgw: fix of users are created suspended
Yehuda Sadeh [Thu, 30 Jun 2011 21:45:32 +0000 (14:45 -0700)]
rgw: fix of users are created suspended

14 years agoFix handling of CEPH_CONF
Colin Patrick McCabe [Thu, 30 Jun 2011 20:42:48 +0000 (13:42 -0700)]
Fix handling of CEPH_CONF

Formerly, CEPH_CONF was not respected by libraries. But now it is.
It overrides the default when reading the config file.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agorados: fix warning
Yehuda Sadeh [Thu, 30 Jun 2011 21:00:23 +0000 (14:00 -0700)]
rados: fix warning

14 years agoclient: only send one flushsnap once per mds session
Sage Weil [Thu, 30 Jun 2011 20:44:24 +0000 (13:44 -0700)]
client: only send one flushsnap once per mds session

This mirrors a kclient change a while back (e835124).

We only want to send one flushsnap cap message per MDS session:
 - it's a waste to send multiples
 - the mds will only reply to the first one

If the mds restarts we need to resend.

This fixes a hang where we send multiples, the first (and only) reply is
ignored (due to tid mismatch), and we are left with dangling references to
the inode and hang on umount.  (Reliably reproduced by running the full
snaps/ workunit directory.)

Fixes: #1239
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
14 years agoMerge branch 'rados-load-gen'
Yehuda Sadeh [Thu, 30 Jun 2011 20:33:28 +0000 (13:33 -0700)]
Merge branch 'rados-load-gen'

14 years agorados tool: load generator
Yehuda Sadeh [Thu, 30 Jun 2011 20:32:59 +0000 (13:32 -0700)]
rados tool: load generator

14 years agoAdd "How to use C_GatherBuilder" comment
Colin Patrick McCabe [Tue, 28 Jun 2011 19:55:45 +0000 (12:55 -0700)]
Add "How to use C_GatherBuilder" comment

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoC_GatherBuilder: add C_GatherBuilder::activate()
Colin Patrick McCabe [Tue, 28 Jun 2011 19:29:17 +0000 (12:29 -0700)]
C_GatherBuilder: add C_GatherBuilder::activate()

Add an activate() function that must be called before we call the
onfinish callback. This is especially important in multi-threaded
contexts, since otherwise if completions come in in the wrong order, we
may delete the C_Gather object right before calling new_sub on it!

Also delete rm_subs because it is redundant with sub_finish.

Finally, num_subs_created, num_subs_remaining are now methods on
C_GatherBuilder rather than C_Gather.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoC_Gather: remove unused "any" option
Colin Patrick McCabe [Tue, 28 Jun 2011 18:43:55 +0000 (11:43 -0700)]
C_Gather: remove unused "any" option

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
14 years agoC_Gather: hide constructor, convert uses
Colin Patrick McCabe [Tue, 28 Jun 2011 18:40:02 +0000 (11:40 -0700)]
C_Gather: hide constructor, convert uses

Note: this fixes a small memory leak in MDCache::open_snap_parents.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>