Commit Graph

9521 Commits

Author SHA1 Message Date
Sage Weil
7d88f7fdb0 qa: add fsx workunit 2010-03-18 10:20:37 -07:00
Greg Farnum
80c9ee220d mon: msg: better output 2010-03-17 14:57:12 -07:00
Greg Farnum
c763f64a67 mon: don't use get_priv() without put! 2010-03-17 14:57:12 -07:00
Greg Farnum
0d1b8023ab mon: forwarded messages should use the same connection as their carrier message 2010-03-17 14:57:12 -07:00
Greg Farnum
1f0cc52828 mon: when possible, fill PaxosServiceMap::caps before exiting ms_dispatch 2010-03-17 14:57:12 -07:00
Greg Farnum
47e2864c2b mon: let ms_dispatch be non-locking for forwards 2010-03-17 14:57:12 -07:00
Greg Farnum
cf719baba3 mon: Encapsulate forwarded PaxosServiceMessages into MForward with their caps 2010-03-17 14:57:12 -07:00
Greg Farnum
001b5f1fe3 mon: Use PaxosServiceMessage::caps instead of Session::caps where applicable 2010-03-17 14:57:12 -07:00
Greg Farnum
40179fbeac msg: Add a new MForward message for encapsulating client caps and messages 2010-03-17 14:57:12 -07:00
Sage Weil
60677da9af qa: add loopall.sh 2010-03-17 11:13:53 -07:00
Sage Weil
a4bdcdd2a2 mds: fix up root/base inode special cases 2010-03-17 11:08:21 -07:00
Sage Weil
31dbd12015 todo: more kclient bugs 2010-03-17 10:45:03 -07:00
Sage Weil
3ebbec2708 qa: runallonce.sh each workunit in a clean directory 2010-03-16 15:51:04 -07:00
Sage Weil
a431c527dc filestore: fix CLONE_RANGE detection 2010-03-16 15:51:01 -07:00
Sage Weil
b8e47ad3a5 todo kclient osd_client bug 2010-03-16 14:36:04 -07:00
Sage Weil
1d72d1888a mds: fix SimpleLock::try_clear_more()
We were dropping gather state on the floor, which resulted in
general confusion and errors like this

10.03.16 14:17:17.622280 mds0.locker handle_simple_lock lock(a=lockack dn 1000000019c/NEWS1_1B.PRN snap head) on (dn xlock x=1 by 0x307c050) [dentry #1/clients/client2/~dmtmp/WORDPRO/NEWS1_1B.PRN [2,head] auth{1=1} (dn xlock x=1 by 0x307c050) v=90 inode=0x7f2fe90a7980 | nref=5 0x7f2fe0349b80]
mds/Locker.cc: In function 'void Locker::handle_simple_lock(SimpleLock*, MLock*)':
mds/Locker.cc:2424: FAILED assert(lock->get_state() == 7 || lock->get_state() == 12)
 1: (Locker::handle_simple_lock(SimpleLock*, MLock*)+0x374) [0x8607bc]
 2: (Locker::handle_lock(MLock*)+0x18b) [0x861b91]
 3: (Locker::dispatch(Message*)+0x41) [0x86470b]
 4: (MDS::_dispatch(Message*)+0x1b42) [0x72ce68]
 5: (MDS::ms_dispatch(Message*)+0x2f) [0x72e1e9]
 6: (Messenger::ms_deliver_dispatch(Message*)+0x55) [0x72086b]
 7: (SimpleMessenger::dispatch_entry()+0x4f4) [0x70d50e]
 8: (SimpleMessenger::DispatchThread::entry()+0x29) [0x7095bd]
 9: (Thread::_entry_func(void*)+0x20) [0x71a9e1]
 10: /lib/libpthread.so.0 [0x7f2fe8d6573a]
 11: (clone()+0x6d) [0x7f2fe7f906dd]
 NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
2010-03-16 14:28:05 -07:00
Sage Weil
eb47abf28a mds: fix add_replica_dir to use is_base() helper for adjusting subtree auth 2010-03-16 13:58:03 -07:00
Sage Weil
ebeef975ea mds: fix SimpleLock state encode/decode
This was broken when we changed the size of SimpleLock::state
to __u16.
2010-03-16 12:51:58 -07:00
Sage Weil
f645421b61 Merge branch 'unstable' into mds 2010-03-16 12:39:17 -07:00
Sage Weil
389e313d89 mds: remove unlinked metadata after replay
We can get unlink metadata after replay:

 create some auth metadata (possibly a whole tree)
 export to another mds
 other mds deletes it
 reimport tree, original link to root is broken by EImportStart
-> entire tree is unlinked

Find any unlinked metadata (that's not a base inode) and remove
it (recursively) after journal replay.
2010-03-16 12:35:28 -07:00
Sage Weil
f2172eb2dd mds: do not add null dentry to frozen dir
Otherwise we get confused when we unfreeze:

mds/mdstypes.h:1193: FAILED assert(ref_set.count(by) > 0)
 1: (MDSCacheObject::bad_put(int)+0x3e) [0x79acfc]
 2: (MDSCacheObject::put(int)+0x5a) [0x79e332]
 3: (CDentry::finish_export()+0x52) [0x8874ba]
 4: (Migrator::finish_export_dir(CDir*, std::list<Context*, std::allocator<Context*> >&, utime_t)+0x1a4) [0x8751fc]
 5: (Migrator::finish_export_dir(CDir*, std::list<Context*, std::allocator<Context*> >&, utime_t)+0x243) [0x87529b]
2010-03-16 12:14:22 -07:00
Sage Weil
c10496040a mon: declare class MonCaps in PaxosServiceMessage 2010-03-16 11:41:50 -07:00
Sage Weil
99941807fc osd: do no index reqid for CLONE ops (or BACKLOG ops)
We don't want to index the Log::Entry reqid for CLONE ops because
each CLONE is followed by a real op with the same reqid.. that's
the one that should get indexed.  Introduce a helper to keep
the logic consistent.
2010-03-16 11:38:41 -07:00
Sage Weil
b1cc16fb22 ceph: drop (broken) poll mode (use -w instead)
It wasn't working anyway.
2010-03-16 11:38:41 -07:00
Sage Weil
a472338951 ceph: add -s|--status command
Print one-shot summary of each paxos service.
2010-03-16 11:38:41 -07:00
Greg Farnum
797ee53ab0 Revert "mon: PaxosServiceMessages now routed through paxos_dispatch and get caps set"
This reverts commit 0c688f94be.

Revert "mon: Use PaxosServiceMessage::caps instead of Session::caps where applicable"

This reverts commit e33e17ec2f.

This needs to be reworked slightly to handle inter-mon communication better.
2010-03-16 11:18:26 -07:00
Greg Farnum
49ab1697dc mon: handle_route uses lazy_send_message for unknown MRoutes 2010-03-16 11:18:26 -07:00
Greg Farnum
9f59a1edf0 mon: add encode/decode functions to MonCaps 2010-03-16 11:18:26 -07:00
Sage Weil
3941ee2e77 mds: adjust rdlock forwarding on replicas
Include LOCK, MIX, and associated gather states.  An EXCL on the
auth (which is not temporary) is a LOCK on the replica, so fw.
(Otherwise we'd need another state.)  MIX should fw too, since
it is also stable and the replcia can't rdlock.

Include leading states because rdlock waits for WAIT_RD, not
stable.
2010-03-16 11:10:58 -07:00
Sage Weil
b818f5bc8a mds: send resolve to resolve_set
Not RESOLVE|REJOIN|CLIENTREPLAY|ACTIVE|STOPPING, according to
the current MDSMap.

Fixes problem where the resolve_set is empty, but we send
resolves out, and got != needed because got is a superset.
2010-03-16 10:21:59 -07:00
Sage Weil
5c70d30b28 mds: fix replica dentry linkage updates
Previously we have a broken hack that would drop a replicated
null dentry if it got new linkage.  We already get an explicit
message if it was unlinked, that unlinks it cleanly.  Do the
same for links, and replicate the newly linked inode as
needed.  This is much cleaner and more correct.

Specifically, this fixes a problem where a create (link) and
unlink are pipelined by the same client under the same xlock,
so that the previous hack (in the handle_lock handler) never
triggers because the lock state doesn't toggle between the link
and unlink.

send_dentry_link sends current, not projected, linkage
2010-03-16 10:21:47 -07:00
Sage Weil
a4d2caa563 osd: only insert non-zero intervals into interval_set 2010-03-15 23:47:24 -07:00
Sage Weil
f059e49d5c qa: fix snaptest1.sh 2010-03-15 23:47:24 -07:00
Sage Weil
3ac3e896d8 mds: add array bounds check for null dentry lease 2010-03-15 23:47:24 -07:00
Greg Farnum
e33e17ec2f mon: Use PaxosServiceMessage::caps instead of Session::caps where applicable 2010-03-15 17:05:41 -07:00
Greg Farnum
0c688f94be mon: PaxosServiceMessages now routed through paxos_dispatch and get caps set 2010-03-15 17:03:38 -07:00
Greg Farnum
167b28a0d4 msg: PaxosServiceMessage includes a MonCap* 2010-03-15 15:58:52 -07:00
Greg Farnum
390258a73f mon: Add a Session operator<<, use it in OSDMonitor 2010-03-15 14:45:30 -07:00
Sage Weil
7af73ac84b mds: avoid null deref of SimpleLock::_unstable 2010-03-15 11:05:20 -07:00
Sage Weil
5b1726410e mds: use CDir::item_new for LogSegment::new_dirfrags elist 2010-03-15 10:59:23 -07:00
Greg Farnum
795035669b auth: update documentation on caps 2010-03-15 10:40:42 -07:00
Greg Farnum
5c2319f2fa mon: return error codes from prepare_new_pool 2010-03-15 10:40:42 -07:00
Greg Farnum
0dca240b8c mon: add warning/debugging prints to prepare_new_pool 2010-03-15 10:40:34 -07:00
Sage Weil
e06922fcb9 Merge branch 'mds_mem' into unstable 2010-03-12 16:48:32 -08:00
Sage Weil
b38ef13ecd mds: be consistent about list<>::item naming (item_foo) 2010-03-12 16:08:36 -08:00
Sage Weil
a58243de3a dlist: fix pop_front/back 2010-03-12 15:57:04 -08:00
Sage Weil
718d6468e2 xlist: clean up interface 2010-03-12 15:56:53 -08:00
Sage Weil
1c928369d5 dlist: clean up interface 2010-03-12 15:56:53 -08:00
Sage Weil
e092710f09 mds: use elist instead of dlist 2010-03-12 15:56:50 -08:00
Sage Weil
c1e8d37dec 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.)

elist: add to makefile

elist: require offset for cosntructor

elist: fix pop_front/back
2010-03-12 15:56:47 -08:00