]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
16 years agoconfutils: cleanup, bug fixes
Yehuda Sadeh [Thu, 22 Jan 2009 23:44:31 +0000 (15:44 -0800)]
confutils: cleanup, bug fixes

16 years agoconfutils: can flush config, preliminary config.cc integration
Yehuda Sadeh [Thu, 22 Jan 2009 21:41:56 +0000 (13:41 -0800)]
confutils: can flush config, preliminary config.cc integration

16 years agoconfutils: some cleanup
Yehuda Sadeh [Thu, 22 Jan 2009 20:09:06 +0000 (12:09 -0800)]
confutils: some cleanup

16 years agoconfutils: encoding/decoding using templates
Yehuda Sadeh [Thu, 22 Jan 2009 19:20:37 +0000 (11:20 -0800)]
confutils: encoding/decoding using templates

16 years agoconfutils: going forward
Yehuda Sadeh [Thu, 22 Jan 2009 01:09:04 +0000 (17:09 -0800)]
confutils: going forward

16 years agoconfutils: adding missing file
Yehuda Sadeh [Wed, 21 Jan 2009 22:23:15 +0000 (14:23 -0800)]
confutils: adding missing file

16 years agoconfutils: some more
Yehuda Sadeh [Wed, 21 Jan 2009 22:02:03 +0000 (14:02 -0800)]
confutils: some more

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
16 years agoconfutils: some more changes
Yehuda Sadeh [Wed, 21 Jan 2009 21:54:51 +0000 (13:54 -0800)]
confutils: some more changes

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
16 years agoconfig: some more changes
Yehuda Sadeh [Wed, 21 Jan 2009 00:41:40 +0000 (16:41 -0800)]
config: some more changes

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
16 years agoconfutils: still not usable
Yehuda Sadeh [Fri, 9 Jan 2009 05:46:02 +0000 (21:46 -0800)]
confutils: still not usable

16 years agoconfig: remove some old cruft
Sage Weil [Thu, 22 Jan 2009 23:48:18 +0000 (15:48 -0800)]
config: remove some old cruft

16 years agoosd: reset peering, in-flight repops on every pg change
Sage Weil [Fri, 23 Jan 2009 00:14:52 +0000 (16:14 -0800)]
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).

16 years agomds: eval_cap_gather in handle_client_caps even if no update
Sage Weil [Thu, 22 Jan 2009 19:22:04 +0000 (11:22 -0800)]
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.

16 years agoscript: find high latency requests in mds log
Sage Weil [Thu, 22 Jan 2009 19:04:54 +0000 (11:04 -0800)]
script: find high latency requests in mds log

16 years agomds: fix xattr projection
Sage Weil [Thu, 22 Jan 2009 00:44:21 +0000 (16:44 -0800)]
mds: fix xattr projection

16 years agomds: drop rdlocks _after_ journaling; use new journal_and_reply helper
Sage Weil [Thu, 22 Jan 2009 00:23:00 +0000 (16:23 -0800)]
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.

16 years agomds: make cdentry debug print nicer
Sage Weil [Wed, 21 Jan 2009 23:34:47 +0000 (15:34 -0800)]
mds: make cdentry debug print nicer

16 years agomds: unique (per mds) cap_id
Sage Weil [Wed, 21 Jan 2009 23:34:31 +0000 (15:34 -0800)]
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.

16 years agomds: set straydn.first correctly during unlink
Sage Weil [Wed, 21 Jan 2009 22:52:38 +0000 (14:52 -0800)]
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.

16 years agomds: make straydn.first match the inode
Sage Weil [Wed, 21 Jan 2009 19:47:04 +0000 (11:47 -0800)]
mds: make straydn.first match the inode

16 years agouclient: flush/release buffered data on umount
Sage Weil [Wed, 21 Jan 2009 18:42:57 +0000 (10:42 -0800)]
uclient: flush/release buffered data on umount

16 years agouclient: update caps code to match kclient logic
Sage Weil [Wed, 21 Jan 2009 18:38:06 +0000 (10:38 -0800)]
uclient: update caps code to match kclient logic

16 years agokclient: some caps cleanup
Sage Weil [Wed, 21 Jan 2009 18:37:26 +0000 (10:37 -0800)]
kclient: some caps cleanup

16 years agokclient: improve snap locking scheme
Sage Weil [Wed, 21 Jan 2009 00:35:43 +0000 (16:35 -0800)]
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.

16 years agov0.6 v0.6
Sage Weil [Tue, 20 Jan 2009 19:52:50 +0000 (11:52 -0800)]
v0.6

16 years agoMerge branch 'unstable'
Sage Weil [Tue, 20 Jan 2009 19:19:42 +0000 (11:19 -0800)]
Merge branch 'unstable'

16 years agokclient: rename lookup_mds_session get_mds_session
Sage Weil [Tue, 20 Jan 2009 18:34:00 +0000 (10:34 -0800)]
kclient: rename lookup_mds_session get_mds_session

Since it bumps the ref count.

16 years agokclient: realm create does not take a ref count
Yehuda Sadeh [Tue, 20 Jan 2009 19:04:25 +0000 (11:04 -0800)]
kclient: realm create does not take a ref count

16 years agokclient: split get_snap_realm to lookup and create
Yehuda Sadeh [Tue, 20 Jan 2009 18:52:04 +0000 (10:52 -0800)]
kclient: split get_snap_realm to lookup and create

16 years agoobjectcacher: fix object trimming
Sage Weil [Tue, 20 Jan 2009 01:03:05 +0000 (17:03 -0800)]
objectcacher: fix object trimming

Do not trim object until it fully commits.

16 years agomds: count in-flight updates per cap, not release attempts. do not expire if updating.
Sage Weil [Tue, 20 Jan 2009 01:02:02 +0000 (17:02 -0800)]
mds: count in-flight updates per cap, not release attempts.  do not expire if updating.

16 years agomds: drop rdlocks after early reply is sent
Sage Weil [Mon, 19 Jan 2009 23:05:57 +0000 (15:05 -0800)]
mds: drop rdlocks after early reply is sent

We will still hold wrlocks and xlocks until journal entry commits.

16 years agomds: properly close session when inodes are still being preallocated
Sage Weil [Mon, 19 Jan 2009 23:04:55 +0000 (15:04 -0800)]
mds: properly close session when inodes are still being preallocated

16 years agokclient: set i_op for special inodes
Sage Weil [Mon, 19 Jan 2009 21:29:01 +0000 (13:29 -0800)]
kclient: set i_op for special inodes

16 years agotodos
Sage Weil [Mon, 19 Jan 2009 20:28:07 +0000 (12:28 -0800)]
todos

16 years agokclient: retain comments
Sage Weil [Mon, 19 Jan 2009 20:21:33 +0000 (12:21 -0800)]
kclient: retain comments

16 years agokclient: zero out *implemented in __ceph_caps_issued()
Sage Weil [Mon, 19 Jan 2009 20:10:53 +0000 (12:10 -0800)]
kclient: zero out *implemented in __ceph_caps_issued()

Otherwise we can get garbage

16 years agokclient: don't retain unwanted RD cap
Sage Weil [Mon, 19 Jan 2009 20:09:06 +0000 (12:09 -0800)]
kclient: don't retain unwanted RD cap

This will allow an open to succeed locally, without any mechanism
to update the MDS' wanted value.

16 years agomds: take srci lock during rename to ensure ctime change propagates
Sage Weil [Mon, 19 Jan 2009 19:52:30 +0000 (11:52 -0800)]
mds: take srci lock during rename to ensure ctime change propagates

16 years agomds: expose projected fields via caps if locks permit
Sage Weil [Mon, 19 Jan 2009 19:33:12 +0000 (11:33 -0800)]
mds: expose projected fields via caps if locks permit

The new CInode::encode_caps_message() mirrors the logic in
CInode::encode_inodestat().

16 years agokclient: shouldn't lookup_open with special inode
Yehuda Sadeh [Mon, 19 Jan 2009 19:09:39 +0000 (11:09 -0800)]
kclient: shouldn't lookup_open with special inode

16 years agokclient: considered _held_ caps when deciding what to ignore in fill_inode
Sage Weil [Sun, 18 Jan 2009 02:11:48 +0000 (18:11 -0800)]
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.

16 years agokclient: don't require all inode fields when just doing a lookup
Sage Weil [Sun, 18 Jan 2009 02:07:53 +0000 (18:07 -0800)]
kclient: don't require all inode fields when just doing a lookup

16 years agomds: check against client in rdlock_try
Sage Weil [Sun, 18 Jan 2009 02:07:34 +0000 (18:07 -0800)]
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!)

16 years agokclient: fix cap writeback vs revocation
Sage Weil [Sun, 18 Jan 2009 02:05:16 +0000 (18:05 -0800)]
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).

16 years agomds: fix rmdir ENOTEMPTY checks
Sage Weil [Sat, 17 Jan 2009 21:37:24 +0000 (13:37 -0800)]
mds: fix rmdir ENOTEMPTY checks

Look at projected inode's dirstat.size().

16 years agomon: include fsid in MMonObserveNotify
Sage Weil [Sat, 17 Jan 2009 21:24:35 +0000 (13:24 -0800)]
mon: include fsid in MMonObserveNotify

16 years agomds: fix forward truncation
Sage Weil [Sat, 17 Jan 2009 19:45:18 +0000 (11:45 -0800)]
mds: fix forward truncation

16 years agovstart: -l | --localhost to use 127.0.0.1
Sage Weil [Sat, 17 Jan 2009 19:25:18 +0000 (11:25 -0800)]
vstart: -l | --localhost to use 127.0.0.1

16 years agobash, not sh
Sage Weil [Sat, 17 Jan 2009 18:06:03 +0000 (10:06 -0800)]
bash, not sh

16 years agobash, not sh
Sage Weil [Sat, 17 Jan 2009 18:06:03 +0000 (10:06 -0800)]
bash, not sh

16 years agomds: carry RDCACHE|WRBUFFER through xlock.
Sage Weil [Sat, 17 Jan 2009 00:52:37 +0000 (16:52 -0800)]
mds: carry RDCACHE|WRBUFFER through xlock.

16 years agokclient: fix fill_file_bits logic
Sage Weil [Sat, 17 Jan 2009 00:07:42 +0000 (16:07 -0800)]
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).

16 years agomds: include projected ctime if _any_ other fields are projected
Sage Weil [Sat, 17 Jan 2009 00:06:34 +0000 (16:06 -0800)]
mds: include projected ctime if _any_ other fields are projected

...or if client holds FILE_EXCL.

16 years agokclient: fix snap_rwsem link on non-existent cap release
Sage Weil [Fri, 16 Jan 2009 23:37:46 +0000 (15:37 -0800)]
kclient: fix snap_rwsem link on non-existent cap release

16 years agokclient: some cleanup
Yehuda Sadeh [Fri, 16 Jan 2009 23:51:31 +0000 (15:51 -0800)]
kclient: some cleanup

16 years agoMerge branch 'unstable' of ssh://ceph.newdream.net/git/ceph into unstable
Yehuda Sadeh [Fri, 16 Jan 2009 23:33:57 +0000 (15:33 -0800)]
Merge branch 'unstable' of ssh://ceph.newdream.net/git/ceph into unstable

16 years agokclient: fix gid setattr
Yehuda Sadeh [Fri, 16 Jan 2009 23:33:24 +0000 (15:33 -0800)]
kclient: fix gid setattr

16 years agomds: also verify in rename() that mds reintegrate/merge is valid
Sage Weil [Fri, 16 Jan 2009 23:18:10 +0000 (15:18 -0800)]
mds: also verify in rename() that mds reintegrate/merge is valid

16 years agomds: do not reintegrate stray if target dentry is projected
Sage Weil [Fri, 16 Jan 2009 23:06:34 +0000 (15:06 -0800)]
mds: do not reintegrate stray if target dentry is projected

Otherwise we break user semantics.  Remote parent might be
unlinking!  Then we move the file back into the position that
was just unlinked...

16 years agomds: look at issued(), not pending(), when putting cap on the rdcaps list
Sage Weil [Fri, 16 Jan 2009 22:58:52 +0000 (14:58 -0800)]
mds: look at issued(), not pending(), when putting cap on the rdcaps list

We want to be conservative in the MDS about dropping caps!  If the
client hasn't released a non-trimmable cap, we shouldn't expire
it.

16 years agomds: eval_cap_gather when trimming rdcaps
Sage Weil [Fri, 16 Jan 2009 22:49:55 +0000 (14:49 -0800)]
mds: eval_cap_gather when trimming rdcaps

16 years agomds: look at inode locks to determine whether to expose stable or projected inode...
Sage Weil [Fri, 16 Jan 2009 22:31:29 +0000 (14:31 -0800)]
mds: look at inode locks to determine whether to expose stable or projected inode fields

And clean up the set_trace_dist() hacks.

16 years agoMerge branch 'unstable' of ssh://ceph.newdream.net/git/ceph into unstable
Yehuda Sadeh [Fri, 16 Jan 2009 22:31:24 +0000 (14:31 -0800)]
Merge branch 'unstable' of ssh://ceph.newdream.net/git/ceph into unstable

16 years agokclient: some more sparse fixes
Yehuda Sadeh [Fri, 16 Jan 2009 22:31:03 +0000 (14:31 -0800)]
kclient: some more sparse fixes

16 years agomds: fix uninitialized value in ceph_inode_holds_cap()
Sage Weil [Fri, 16 Jan 2009 21:55:00 +0000 (13:55 -0800)]
mds: fix uninitialized value in ceph_inode_holds_cap()

16 years agomds: fix inode version projected on open O_CREAT, too
Sage Weil [Fri, 16 Jan 2009 21:28:10 +0000 (13:28 -0800)]
mds: fix inode version projected on open O_CREAT, too

See 461cb1a6438d5f474d2958019fa5d42628d3a490

16 years agomds: set .inode in projected linkages; add dentry to remote_parents only when active
Sage Weil [Fri, 16 Jan 2009 21:17:25 +0000 (13:17 -0800)]
mds: set .inode in projected linkages; add dentry to remote_parents only when active

This let's us do dnl->get_inode() on projected linkages for
remote links.

16 years agomds: fix link() dn linkage projection
Sage Weil [Fri, 16 Jan 2009 20:56:08 +0000 (12:56 -0800)]
mds: fix link() dn linkage projection

16 years agoMerge branch 'unstable' of ssh://ceph.newdream.net/git/ceph into unstable
Yehuda Sadeh [Fri, 16 Jan 2009 20:47:41 +0000 (12:47 -0800)]
Merge branch 'unstable' of ssh://ceph.newdream.net/git/ceph into unstable

16 years agokclient: some sparse cleanups
Yehuda Sadeh [Fri, 16 Jan 2009 20:47:24 +0000 (12:47 -0800)]
kclient: some sparse cleanups

16 years agomds: only set max_size on open+O_CREAT if file opened for writing
Sage Weil [Fri, 16 Jan 2009 20:36:52 +0000 (12:36 -0800)]
mds: only set max_size on open+O_CREAT if file opened for writing

16 years agomds: optionally pass a specific linkage for journal_cow_dentry to use
Sage Weil [Fri, 16 Jan 2009 20:25:32 +0000 (12:25 -0800)]
mds: optionally pass a specific linkage for journal_cow_dentry to use

This is needed just for rename(), which up pushes projected linkages
before calling journal_cow_dentry and friend.  Consequently, they
can't just use dn->get_projected_linkage() like they usually do.

16 years agomds: fix fast create + rm failure
Sage Weil [Fri, 16 Jan 2009 19:57:39 +0000 (11:57 -0800)]
mds: fix fast create + rm failure

The inode projected_version() needs to be accurate or we run into
problems later.  So, change the way the inode creation version is
initialized by moving the hack to right before mark_dirty() is
called (to keep the v < pv assertion in place).

16 years agomds: make xlock stable
Sage Weil [Fri, 16 Jan 2009 19:27:08 +0000 (11:27 -0800)]
mds: make xlock stable

16 years agokclient: set dentry d_time when doing local ENOENT
Sage Weil [Fri, 16 Jan 2009 19:16:13 +0000 (11:16 -0800)]
kclient: set dentry d_time when doing local ENOENT

This allows a subsequent d_revalidate to succeed.

16 years agomds: get_linkage() should return projected if xlocked by self
Sage Weil [Fri, 16 Jan 2009 19:15:47 +0000 (11:15 -0800)]
mds: get_linkage() should return projected if xlocked by self

Also, move set_xlocks_done() to _below_ set_trace_dist, in case some
other request comes in and xlocks the dentry.

Allow read_projected in XLOCK state too.  Note that other requests
_still_ won't be able to re-xlock or rdlock until the prior request
set xlock done.

16 years agomds: touch using projected parents too
Sage Weil [Fri, 16 Jan 2009 18:46:52 +0000 (10:46 -0800)]
mds: touch using projected parents too

16 years agomds: journal using projected parent
Sage Weil [Fri, 16 Jan 2009 18:46:06 +0000 (10:46 -0800)]
mds: journal using projected parent

16 years agokclient: one more update_parent fix
Sage Weil [Fri, 16 Jan 2009 18:44:34 +0000 (10:44 -0800)]
kclient: one more update_parent fix

16 years agokclient: don't mark root complete (empty); debug complete flag
Sage Weil [Fri, 16 Jan 2009 18:37:08 +0000 (10:37 -0800)]
kclient: don't mark root complete (empty); debug complete flag

16 years agouclient: small bug fix
Sage Weil [Fri, 16 Jan 2009 18:26:58 +0000 (10:26 -0800)]
uclient: small bug fix

16 years agojournaler: don't request ACKs if in safe mode; do safe mode by default (since mds...
Sage Weil [Fri, 16 Jan 2009 18:06:23 +0000 (10:06 -0800)]
journaler: don't request ACKs if in safe mode; do safe mode by default (since mds does too)

This avoids ACK replies from the OSDs, which the MDS ignores
anyway.

16 years agokclient: refine dir complete/readdir handling
Yehuda Sadeh [Fri, 16 Jan 2009 18:21:41 +0000 (10:21 -0800)]
kclient: refine dir complete/readdir handling

16 years agomds: kill FileLock
Sage Weil [Fri, 16 Jan 2009 17:10:36 +0000 (09:10 -0800)]
mds: kill FileLock

Keep ScatterLock.. it has the xlist nodes for tracking dirty scattered
metadata (used by sm_filelock and sm_scatterlock).

16 years agomds: redo choose_loner/drop_loner
Sage Weil [Fri, 16 Jan 2009 17:07:15 +0000 (09:07 -0800)]
mds: redo choose_loner/drop_loner

Still need a simple_excl() with a try_choose_loner() check, and something
in simple_eval.

16 years agomds: merge *_sync() methods
Sage Weil [Fri, 16 Jan 2009 04:22:31 +0000 (20:22 -0800)]
mds: merge *_sync() methods

16 years agomds: more lock refactoring. merge *_lock() methods.
Sage Weil [Fri, 16 Jan 2009 04:14:00 +0000 (20:14 -0800)]
mds: more lock refactoring.  merge *_lock() methods.

16 years agomds: ENOENT on null dentry in unlink()
Sage Weil [Fri, 16 Jan 2009 00:44:09 +0000 (16:44 -0800)]
mds: ENOENT on null dentry in unlink()

16 years agomds: add lock->xlock state
Sage Weil [Fri, 16 Jan 2009 00:39:28 +0000 (16:39 -0800)]
mds: add lock->xlock state

16 years agomds: simplify loner_cap update
Sage Weil [Fri, 16 Jan 2009 00:33:48 +0000 (16:33 -0800)]
mds: simplify loner_cap update

This may still not be right...

16 years agomds: generic locking helpers, step 1
Sage Weil [Fri, 16 Jan 2009 00:26:55 +0000 (16:26 -0800)]
mds: generic locking helpers, step 1

Still need to refactor :*_sync(), *_lock(), etc... and test.

16 years agomds: rewrite SimpleLock using generic state specifications; new xlock semantics
Sage Weil [Thu, 15 Jan 2009 20:41:30 +0000 (12:41 -0800)]
mds: rewrite SimpleLock using generic state specifications; new xlock semantics

Same client can re-xlock an item (or read_projected) if the prior
locker set_xlock_done().  Move from XLOCKDONE to either SYNC or
LOCK, depending on whether read leases/locks have been issued.

Still need to convert FileLock and ScatterLock to use the new
state machine specification.  (This will probably make those lock
types mostly go away.)

16 years agolease: difrentiate lease release cases (revoke, preemptive)
Yehuda Sadeh [Fri, 16 Jan 2009 00:16:47 +0000 (16:16 -0800)]
lease: difrentiate lease release cases (revoke, preemptive)

16 years agokclient: clear dir complete/readdir bits when appropriate
Yehuda Sadeh [Thu, 15 Jan 2009 23:22:28 +0000 (15:22 -0800)]
kclient: clear dir complete/readdir bits when appropriate

16 years agomds: remove some uninitialized cases
Yehuda Sadeh [Thu, 15 Jan 2009 23:21:44 +0000 (15:21 -0800)]
mds: remove some uninitialized cases

16 years agomds: disable empty directory fastpath check
Sage Weil [Thu, 15 Jan 2009 18:05:50 +0000 (10:05 -0800)]
mds: disable empty directory fastpath check

We need to look at the _projected_ directory size for this to work.
Until then, disable the fastpath check.

16 years agomds: fix unlink
Sage Weil [Thu, 15 Jan 2009 18:00:21 +0000 (10:00 -0800)]
mds: fix unlink

Need to project linkage.

16 years agomds: path_traverse cleanup
Sage Weil [Thu, 15 Jan 2009 04:35:57 +0000 (20:35 -0800)]
mds: path_traverse cleanup

16 years agomds: always traverse projected hierarchy; xlocks will handle client views
Sage Weil [Thu, 15 Jan 2009 00:56:11 +0000 (16:56 -0800)]
mds: always traverse projected hierarchy; xlocks will handle client views

If another client starts to follow a projected dentry, it will stop
on the xlock.  Unless it's a rename, in which case we do want the
projected value.