Commit Graph

7357 Commits

Author SHA1 Message Date
Sage Weil
feca5cd4c6 mds: adjust all lock states in process_reconnected_caps
The old code only adjusted the filelock, and didn't do it
correctly.
2009-07-08 15:11:28 -07:00
Sage Weil
17201c6892 mds: set cap_id on caps reconnected after a delayed load 2009-07-08 10:48:11 -07:00
Sage Weil
ed6a18d90f mds: replay client ops one at a time
Before we were assuming we could queue up all replayed ops and the locking
would ensure they'd occur in the proper order (and in so doing unwind
any dependencies).  Not so fast.  Instead, do one at a time and queue
the next up as each finishes.
2009-07-08 10:48:10 -07:00
Sage Weil
cad13f2059 mds: maybe eval instead of eval_gather on file recovery
This fixes an assertion failure, but not the underlying issues with the
current file recovery strategy.
2009-07-08 10:48:10 -07:00
Sage Weil
105d791ed7 mds: reissue all caps after recovery
This ensures that locks get kicked after recovery.  Otherwise we may have
a client who ends up with the caps they had before, waiting for the MDS to
issue say RD and no progress being made.
2009-07-08 10:48:10 -07:00
Sage Weil
f19b7c42c0 kclient: make mds map checks more robust
Look at state AND address to reliably determine when an MDS has failed
and restarted.  Otherwise we may skip from reconnect to (the next
incarnation's) reconnect and not 'notice'.
2009-07-08 10:48:10 -07:00
Sage Weil
e5cc6c229e kclient: clean out caps that don't reconnect
We still need some additional work to turn these into EBADF.
2009-07-08 10:48:10 -07:00
Sage Weil
c930281f4f kclient: request _next_ mdsmap epoch
We were off by.
2009-07-08 10:48:10 -07:00
Sage Weil
21a3a940e4 kclient: send mds reconnect regardless of who we get the mdsmap from
Sure, the MDS will always send it to us, but if we've already seen it,
we'll ignore the message.  Make the reconnect check more robust.
2009-07-08 10:48:10 -07:00
Sage Weil
79b8a5d739 kclient: don't skip most recent mds op
We were skipping the most recent.  last_tid is the last tid we used.
2009-07-08 10:48:10 -07:00
Sage Weil
92dff86a3b mds: add reconnected caps whose paths are loaded
We weren't calling in->reconnect_cap.  Do so via rejoin_import_cap(),
even tho the naming is a bit weird.
2009-07-08 10:48:10 -07:00
Greg Farnum
d9b1ddf580 libceph: Split into .h and .cc files
And now builds as a library, if I did it right.
2009-07-07 12:01:27 -07:00
Greg Farnum
d957488c71 libceph: Now exists! client/libceph.h.
The automake magic may not be done though.
2009-07-07 10:16:30 -07:00
Greg Farnum
85e3e062ee mon:Initialize rank to NULL to avoid warning. 2009-07-07 10:03:12 -07:00
Sage Weil
8ae6719909 osd: no need for RMW flags in op reply
In particular, they may not have even been calculated when we reply to
the message.
2009-07-06 12:08:35 -07:00
Sage Weil
9a7cb3be46 filer: remove bad memset
OSDOp has a proper constructor.  Also remove unnecessary
bufferlist instances.
2009-07-06 10:07:41 -07:00
Sage Weil
9a2c17bb15 msg: allow multiple dispatchers to chain together 2009-07-06 10:03:27 -07:00
Sage Weil
ada466a272 mds: alloc cleanup, log recoverable journal errors 2009-07-06 10:03:12 -07:00
Sage Weil
b042df7a80 mds: fix session close ino release journaling 2009-07-06 09:18:50 -07:00
Sage Weil
661b6bc4e1 uclient: make_request returns int, not MClientReply
Simplifies callers.
2009-07-02 15:09:16 -07:00
Sage Weil
9e4c776091 uclient: insert_trace in reply handler
This will avoid the ugly kickback crap.

Also, after mds reconnect, we may get a safe reply (after we already
got an unsafe from the previous mds) that includes the new cap.
2009-07-02 14:53:14 -07:00
Sage Weil
d871b6cb9a uclient: fix make_long_path, and thus reconnect 2009-07-02 14:31:52 -07:00
Sage Weil
f7616a11a1 uclient: fix op replay
Clear msg payload so it gets reencoded with adjusted values.
2009-07-02 14:15:20 -07:00
Greg Farnum
52e53f5379 uclient: Cleaned up resend_unsafe_requests; handle_client_reply; debugging. 2009-07-02 12:23:26 -07:00
Sage Weil
5fb8b639be mds: drop loner on gather before doing waiters
Otherwise we would reissue/use caps on loner in non-loner states, and go
back.
2009-07-02 10:21:51 -07:00
Sage Weil
cc95ab07bd uclient: fix order of session cap removal
Remove caps and kick reqeusts before erasing session.
2009-07-01 17:04:11 -07:00
Sage Weil
00f448006d mds: refcount MDRequest so that timed out client sessions behave
We need to ref count MDRequest so that it will remain valid over the
(possibly extended) lifetime C_RetryRequest.

Give ownership of {client,slave}_request to MDRequest so that cleanup
is consistent.
2009-07-01 17:03:23 -07:00
Sage Weil
5fd1b70927 uclient: use session->caps list an lru
Touch caps on use, via bool caps_issued_mask(mask)
2009-07-01 16:46:36 -07:00
Sage Weil
a9940680d1 osd: change log terminology: bottom..top -> tail..head
Hopefully less confusing.
2009-07-01 15:45:29 -07:00
Sage Weil
9f05cb46af uclient: fix kickback, reply handler logic
We kickback cond test used to look at the request map, but since the
reply handler removes that, it was never true.  Instead, clear the
dispatch_cond pointer.

Also fix up the reply handler logic.  Any reply implies unsafe.  If it
is the first, signal the calling thread.
2009-07-01 15:43:46 -07:00
Sage Weil
ea211137cc uclient: fix MMDSGetMap 'have' epoch
This broke with the monitor changes last week.
2009-07-01 15:25:27 -07:00
Sage Weil
d3a0683f61 Merge commit 'gregskinny/unstable' into unstable
Conflicts:

	src/client/Client.cc
2009-07-01 15:21:33 -07:00
Greg Farnum
6f5f50795f DON'T USE, BROKEN. uclient's MetaRequest extra ref counts removed. 2009-07-01 15:15:06 -07:00
Greg Farnum
bb23de4cee BROKEN, DON'T USE.
uclient changes that somehow broke message delivery without changing anything in that process
2009-07-01 12:02:42 -07:00
Sage Weil
53b9bf434d mon: better warning with injectargs on non-up mds 2009-07-01 11:43:10 -07:00
Sage Weil
843700b7b1 osd: make write mode per-PG
We can't do it per-object because the access mode determines the order
we append to the log, and that has to be sequential.  It has to be per-PG,
unless a whole ton of other stuff is reworked.

This lets us capture the best access mode at least on a per-pool basis,
instead of imposing a global default.
2009-07-01 11:41:38 -07:00
Sage Weil
5f43310150 uclient: support mds recall_state
Trim old caps.  Still need to make it an LRU.
2009-07-01 11:39:59 -07:00
Sage Weil
f5142102c1 uclient: remove debug print 2009-07-01 11:20:37 -07:00
Greg Farnum
3bbdbafb65 uclient: DOESN'T WORK, but more ref counting stuff. Now attempts to resend unsafe ops on a reconnect. 2009-07-01 08:33:48 -07:00
Greg Farnum
0908e107e3 uclient: MetaRequests go on the heap and are ref-counted; safe/unsafe replies dealt with better. 2009-07-01 08:10:44 -07:00
Sage Weil
8b054d3281 kclient: checkpatch fixes 2009-06-30 14:20:45 -07:00
Sage Weil
e57a5bd0be kclient: use list_for_each_entry macro when possible 2009-06-30 14:20:45 -07:00
Sage Weil
1e381cc0a0 osd: fix hb down check 2009-06-30 14:20:13 -07:00
Sage Weil
5d89b6e684 osd: fix failure report on already-down osd
We were potentially sending an osd failure on an osd that was already
down.  Double check before doing so.
2009-06-30 13:10:49 -07:00
Sage Weil
fed00ae416 osd: fix log msg after var name changes 2009-06-30 13:10:07 -07:00
Sage Weil
3f7ef163c0 mds: don't choke on path_traverse_to_dir that fully exists 2009-06-30 12:33:00 -07:00
Sage Weil
6f8342062e osd: nicer scrub ok message 2009-06-30 12:33:00 -07:00
Sage Weil
9505c098d2 osd: rearrange make_writeable prints 2009-06-30 12:33:00 -07:00
Sage Weil
f8ef1c2a2b osd: fix pg log trimming
We were zeroing out too much of the pg log!
2009-06-30 12:33:00 -07:00
Sage Weil
4583506404 initscripts: fix do_root_cmd
sudo bash -c "echo foo" works, sudo "echo foo" does not.
2009-06-30 12:16:54 -07:00