Sage Weil [Fri, 12 Mar 2010 18:13:20 +0000 (10:13 -0800)]
elist: simpler embedded list
This is more or less equivalent to the linux kernel list_head:
each embedded item struct has only a next and prev pointer. As
long as the same member item is always used, at a fixed offset
from the containing class, we can go from an item to a contained
class.
The offset can either be passed to the list (head) constructor,
or to the begin(), front(), back() members explicitly.
Iterator has 3 modes.. current (list_for_each), cache_next
(list_for_each_safe), and magic (uses cached next iff current is
empty). Magic will work most of the time... as long as we don't
re-add ourselves to a different list inside the iterator loop.
(Note that if we do, we will iterator up to the other list's
head, not detect it is a head, an get an invalid pointer and
crash.)
Sage Weil [Tue, 9 Mar 2010 23:02:30 +0000 (15:02 -0800)]
thread: mask all signals on child threads
Mask all signals on any threads we create. Since we don't use
signals for anything, this leaves the signal behavior to the
original parent thread or process linking in librados or
libceph.
Sage Weil [Tue, 9 Mar 2010 18:41:42 +0000 (10:41 -0800)]
mds: fix MDentryUnlink
Need to replicate mds dir + stray dir dentry as well as the stray
inode, dir, dentry. This was overlooked when the /.ceph and
per-mds directories were set up.
Greg Farnum [Fri, 5 Mar 2010 19:13:59 +0000 (11:13 -0800)]
cephx: Piece-wise initialization of structs is BAD!
If you add, say, a field "auid" to the struct and it's being
piece-wise initialized then you need to change every copy to include it.
Or you assume it's just copied wholesale and then spend many hours trying
to find where it isn't. Like in this one.
Greg Farnum [Fri, 5 Mar 2010 20:37:56 +0000 (12:37 -0800)]
After discussing with Sage, we do want auid to be a part
of AuthTicket, et al. Let's do it that way.
Revert "authtool: give generated key specific uid if one is provided on the cli."
Sage Weil [Thu, 4 Mar 2010 00:49:58 +0000 (16:49 -0800)]
mds: accept stray reconnects
Hmm. Ultimately this is the direction we want to go, so that,
for example, a client that is forcefully disconnected can at
least attempt a reconnect (even if all its caps go ESTALE).
There are undoubtably some issues that need to be dealt with to
keep the mds from choking on weird client data, but those things
need to be fixed regardless.
Sage Weil [Thu, 4 Mar 2010 17:29:23 +0000 (09:29 -0800)]
crushtool: fix parsing with new boost library (compress whitespace)
The latest spirit breaks parsing. It seems to choke on
whitespace (e.g., fail to parse if there is any trailing
whitespace). I couldn't find any obvious problems with how
spirit is beign used, so work around it by stripping out any
extra whitespace from the input. Bleh!
Greg Farnum [Wed, 3 Mar 2010 21:02:06 +0000 (13:02 -0800)]
Revert a number of auth_uid commits.
Attempting to add an auth_uid to all the relevant structs has gotten too messy;
it *will* get messed up at some point in the future. So we're moving it into
the string map caps, and the machines can store it in their local structs
however they like.
Note to self: In future, do not attempt to extend mirrored structs without
great cause. Or else commit to making them properly-encapsulated objects.
Revert "auth: Add an auth_uid to AuthTicket. Still to do: copy it around"
Sage Weil [Tue, 2 Mar 2010 23:35:49 +0000 (15:35 -0800)]
mds: fix snapid tests in encode_inodestat
Snapid should always be non-zero; assert as much.
This fixes bug where valid was set to false when stating dir
inodes on non-auth mds's, which in turn returned no caps to
clients and, in the case of cfuse, caused a crash.
Sage Weil [Wed, 3 Mar 2010 17:47:00 +0000 (09:47 -0800)]
journal: set committing_seq in commit_start
We need to set committing_seq when we first block access to the
fs in commit_start(), NOT in commit_started(), as by that time
we may have queued all sorts of additional entries for the
journal. The committing_seq is all about syncing up with the
live fs (via op_apply_start), not what's queued for the journal.
Sage Weil [Tue, 2 Mar 2010 23:09:24 +0000 (15:09 -0800)]
osd: use per-PG ObjectStore::Sequencer when possible
Otherwise, when it doesn't matter, use the default. This
serialized io submission to btrfs at the lower layer within a
single PG. In general this is not significant, since we have
lots of PGs. We could potentionally do per object in some cases,
but we'd have to be careful about snapshots and such. Keep it
simple for now.
Sage Weil [Tue, 2 Mar 2010 23:07:29 +0000 (15:07 -0800)]
filestore: add Sequencer to queue_transaction interface
The (optional) sequencer parameter lets you order operations
submitted via the same Sequencer relative to each other. If no
sequencer is specified, a default one is used. Operations are
single-threaded with respect to an individual sequencer, so you
effectively get single threaded io submission to btrfs/whatever
if you do not specify a sequencer.