Commit Graph

5713 Commits

Author SHA1 Message Date
Yehuda Sadeh
18fdf6ea1c confutils: still not usable 2009-01-23 09:31:42 -08:00
Sage Weil
0af200da88 config: remove some old cruft 2009-01-22 16:17:04 -08:00
Sage Weil
f49f78d03b osd: reset peering, in-flight repops on every pg change
Instead of complicated (and flawed) logic for letting in-progress rep ops
complete while the PG changes (but primary remains the same), reset the
pg state entirely.  Apply any ops we have in hand, but drop everything
else, including PUSH/PULL ops.

This vastly simplifies the logic in the OSD and makes it easy to reason
about things.

Fix clients (Objecter, osd_client) to resubmit ops when PG membership
changes (not just on primary change).
2009-01-22 16:14:52 -08:00
Sage Weil
4b224b9b8d mds: eval_cap_gather in handle_client_caps even if no update
We may have recalled caps and journaled an update for some but
not all locks.  We should check for cap gathers even if something
(else) is journaled.
2009-01-22 11:22:04 -08:00
Sage Weil
2564622a32 script: find high latency requests in mds log 2009-01-22 11:04:54 -08:00
Sage Weil
4c75e0a8b7 mds: fix xattr projection 2009-01-21 16:44:21 -08:00
Sage Weil
1c2d62486f mds: drop rdlocks _after_ journaling; use new journal_and_reply helper
If we drop locks earlier we may run contexts that journal _other_
items out of order.  Badness.
2009-01-21 16:23:00 -08:00
Sage Weil
0c6ffaa905 mds: make cdentry debug print nicer 2009-01-21 15:34:47 -08:00
Sage Weil
004898a73e mds: unique (per mds) cap_id
A new cap_id is issued each time an MDS creates a new capability,
and is checked when releasing a capability to ensure it is the same
capability instance.  This specifically avoids a race like:

1- mds issues cap
2- mds sends cap message
3- mds and client time out cap
4- client receives cap message, sends release
5- mds reissues cap on same inode
6- mds receives release, doesn't realize the release is for the
   old capability

Checking seq numbers isn't enough because the MDS may reissue the
cap any number of times between 3 and 6.
2009-01-21 15:34:31 -08:00
Sage Weil
62e5b801bc mds: set straydn.first correctly during unlink
We need to do this in _unlink_local, not get_or_create_stray, just
as we set dn->first elsewhere in Server.cc.
2009-01-21 14:52:38 -08:00
Sage Weil
10943447a5 mds: make straydn.first match the inode 2009-01-21 11:47:04 -08:00
Sage Weil
7a0abc3776 uclient: flush/release buffered data on umount 2009-01-21 10:42:57 -08:00
Sage Weil
74f2a9c88d uclient: update caps code to match kclient logic 2009-01-21 10:38:06 -08:00
Sage Weil
33f44435fd kclient: some caps cleanup 2009-01-21 10:37:26 -08:00
Sage Weil
001771274b kclient: improve snap locking scheme
Because snap_rwsem is taken for read on every write, we want to
minimize contention.  We:

- allow cap removal to occur without snap_rwsem (read or write)
- allow fill_trace and add_cap with snap_rwsem (read)
- require write really only for update_snap_trace and on snap
  updates from the mds.

Dropping realm references without snap_rwsem gets a bit tricky.  We
keep an empty (nref==0) realm list and purge it periodically to
avoid contention in the general case.
2009-01-20 16:35:43 -08:00
Sage Weil
a4c752df71 v0.6 2009-01-20 11:52:50 -08:00
Sage Weil
584f8311a6 Merge branch 'unstable' 2009-01-20 11:19:42 -08:00
Sage Weil
00577b5441 kclient: rename lookup_mds_session get_mds_session
Since it bumps the ref count.
2009-01-20 11:08:23 -08:00
Yehuda Sadeh
b078856cd5 kclient: realm create does not take a ref count 2009-01-20 11:04:25 -08:00
Yehuda Sadeh
70365be770 kclient: split get_snap_realm to lookup and create 2009-01-20 10:52:04 -08:00
Sage Weil
c784a5431a objectcacher: fix object trimming
Do not trim object until it fully commits.
2009-01-19 17:03:05 -08:00
Sage Weil
26cec48ebb mds: count in-flight updates per cap, not release attempts. do not expire if updating. 2009-01-19 17:02:02 -08:00
Sage Weil
f62bb44529 mds: drop rdlocks after early reply is sent
We will still hold wrlocks and xlocks until journal entry commits.
2009-01-19 15:05:57 -08:00
Sage Weil
ac59f6d9e2 mds: properly close session when inodes are still being preallocated 2009-01-19 15:04:55 -08:00
Sage Weil
773bc5f946 kclient: set i_op for special inodes 2009-01-19 13:29:01 -08:00
Sage Weil
96a16b6a91 todos 2009-01-19 12:28:07 -08:00
Sage Weil
9ccd599f20 kclient: retain comments 2009-01-19 12:21:33 -08:00
Sage Weil
3b1d6b5a4b kclient: zero out *implemented in __ceph_caps_issued()
Otherwise we can get garbage
2009-01-19 12:10:53 -08:00
Sage Weil
ca29a2a68e kclient: don't retain unwanted RD cap
This will allow an open to succeed locally, without any mechanism
to update the MDS' wanted value.
2009-01-19 12:09:06 -08:00
Sage Weil
b76be04c00 mds: take srci lock during rename to ensure ctime change propagates 2009-01-19 11:52:30 -08:00
Sage Weil
14a1ebfa3a mds: expose projected fields via caps if locks permit
The new CInode::encode_caps_message() mirrors the logic in
CInode::encode_inodestat().
2009-01-19 11:34:49 -08:00
Yehuda Sadeh
878b649477 kclient: shouldn't lookup_open with special inode 2009-01-19 11:11:45 -08:00
Sage Weil
490d04a355 kclient: considered _held_ caps when deciding what to ignore in fill_inode
If EXCL is being revoked, we still "hold" it and should ignore inode values
provided by the MDS in fill_inode.
2009-01-17 18:11:48 -08:00
Sage Weil
b9cb8668b6 kclient: don't require all inode fields when just doing a lookup 2009-01-17 18:07:53 -08:00
Sage Weil
6c6f75dae1 mds: check against client in rdlock_try
This affects our auth check in path_traverse.  No need to wait for that to
flush.. we can look at the projected version.  (Not that we're actually
checking permissions yet!)
2009-01-17 18:07:34 -08:00
Sage Weil
413d5e6aa7 kclient: fix cap writeback vs revocation
We need to reply to a revocation via check_caps and __send_cap if we are
writing back dirty metadata.

We also need to take care to look at issued|implemented (not just issued)
when deciding what to write back (since it may be being revoked).
2009-01-17 18:05:16 -08:00
Sage Weil
5ac7642138 mds: fix rmdir ENOTEMPTY checks
Look at projected inode's dirstat.size().
2009-01-17 13:37:24 -08:00
Sage Weil
764b0b32ac mon: include fsid in MMonObserveNotify 2009-01-17 13:24:35 -08:00
Sage Weil
468fbbe1c9 mds: fix forward truncation 2009-01-17 11:45:18 -08:00
Sage Weil
cd058c9828 vstart: -l | --localhost to use 127.0.0.1 2009-01-17 11:25:18 -08:00
Sage Weil
96dbed744a bash, not sh 2009-01-17 10:08:53 -08:00
Sage Weil
a4ab37719e bash, not sh 2009-01-17 10:06:03 -08:00
Sage Weil
6ffdd4367b mds: carry RDCACHE|WRBUFFER through xlock. 2009-01-16 16:52:37 -08:00
Sage Weil
f4644acd0d kclient: fix fill_file_bits logic
ctime should be the max if we hold any wr caps, otherwise it's
the mds value, regardless of time_warp_seq (which does not modify
ctime).
2009-01-16 16:07:54 -08:00
Sage Weil
b8bb36edf9 mds: include projected ctime if _any_ other fields are projected
...or if client holds FILE_EXCL.
2009-01-16 16:07:54 -08:00
Sage Weil
96080a352e kclient: fix snap_rwsem link on non-existent cap release 2009-01-16 16:07:54 -08:00
Yehuda Sadeh
88e3e31739 kclient: some cleanup 2009-01-16 15:51:31 -08:00
Yehuda Sadeh
e930bf0cfd Merge branch 'unstable' of ssh://ceph.newdream.net/git/ceph into unstable 2009-01-16 15:33:57 -08:00
Yehuda Sadeh
997e9988f3 kclient: fix gid setattr 2009-01-16 15:33:24 -08:00
Sage Weil
c95211018f mds: also verify in rename() that mds reintegrate/merge is valid 2009-01-16 15:18:10 -08:00