]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
16 years agomds: fix LOCK_LOCK -> LOCK_LOCK_SYNC issue_lease transition logic
Sage Weil [Mon, 12 Jan 2009 23:02:44 +0000 (15:02 -0800)]
mds: fix LOCK_LOCK -> LOCK_LOCK_SYNC issue_lease transition logic

Bump the lock state even if we don't issue a lease now.

16 years agomds: allow FileLock wrlock when client holding FILE_EXCL
Sage Weil [Mon, 12 Jan 2009 23:02:13 +0000 (15:02 -0800)]
mds: allow FileLock wrlock when client holding FILE_EXCL

16 years agomds: issue cap on mkdir; set authlock to EXCL on open O_CREAT.
Sage Weil [Mon, 12 Jan 2009 22:56:39 +0000 (14:56 -0800)]
mds: issue cap on mkdir; set authlock to EXCL on open O_CREAT.

16 years agomds: fix encode_inode caps issue logic
Sage Weil [Mon, 12 Jan 2009 22:55:51 +0000 (14:55 -0800)]
mds: fix encode_inode caps issue logic

We must mask _likes_ against _allowed_.  Bump filelock if we're a directory
and we're a loner.

16 years agomds: loner if only client with cap on a dir
Sage Weil [Mon, 12 Jan 2009 22:54:22 +0000 (14:54 -0800)]
mds: loner if only client with cap on a dir

16 years agokclient: only release dir RDCACHE if we're not holding EXCL
Sage Weil [Mon, 12 Jan 2009 22:53:01 +0000 (14:53 -0800)]
kclient: only release dir RDCACHE if we're not holding EXCL

MDS will (soon) let us carry a wrlock if we have the EXCL lock.

16 years agokclient: hold onto dir EXCL cap
Sage Weil [Mon, 12 Jan 2009 22:52:24 +0000 (14:52 -0800)]
kclient: hold onto dir EXCL cap

16 years agokclient: track COMPLETE flag on directories with RDCACHE; lookup ENOENT locally when...
Sage Weil [Mon, 12 Jan 2009 20:45:40 +0000 (12:45 -0800)]
kclient: track COMPLETE flag on directories with RDCACHE; lookup ENOENT locally when possible

Maintain COMPLETE flag that indicates the client has all dentries for the
directory cached.  Only defined when holding FILE_RDCACHE cap.

16 years agomds: make Server use CDentry accessors
Sage Weil [Mon, 12 Jan 2009 18:32:02 +0000 (10:32 -0800)]
mds: make Server use CDentry accessors

16 years agokclient: handle case in which splice_dentry fails in fill_trace
Yehuda Sadeh [Mon, 12 Jan 2009 22:43:03 +0000 (14:43 -0800)]
kclient: handle case in which splice_dentry fails in fill_trace

16 years agokclient: avoid starvation when fsync on dir
Yehuda Sadeh [Mon, 12 Jan 2009 22:41:14 +0000 (14:41 -0800)]
kclient: avoid starvation when fsync on dir

16 years agomds: increase preallocated ino
Sage Weil [Mon, 12 Jan 2009 00:56:48 +0000 (16:56 -0800)]
mds: increase preallocated ino

Although we still seem to manage to use them all up...

16 years agomds: allow clients to traverse dentries they xlock.
Sage Weil [Mon, 12 Jan 2009 00:49:04 +0000 (16:49 -0800)]
mds: allow clients to traverse dentries they xlock.

This could be cleaner.. maybe CDentry::get_inode() should take
a client argument?  Would need to fix up direct access to
dn->inode...

16 years agomds: fix CInode::adjust_nested_auth_pin()
Sage Weil [Mon, 12 Jan 2009 00:48:02 +0000 (16:48 -0800)]
mds: fix CInode::adjust_nested_auth_pin()

Adjust nested_auth_pins even if no parent.  There will be eventually.

16 years agokclient: add missing parens in kick_requests
Sage Weil [Sun, 11 Jan 2009 20:02:08 +0000 (12:02 -0800)]
kclient: add missing parens in kick_requests

16 years agouclient: lease seq #'s; clean out inode leases
Sage Weil [Sun, 11 Jan 2009 20:01:52 +0000 (12:01 -0800)]
uclient: lease seq #'s; clean out inode leases

16 years agokclient: use lease seq #
Sage Weil [Sun, 11 Jan 2009 20:01:39 +0000 (12:01 -0800)]
kclient: use lease seq #

16 years agomds: introduce lease seq #
Sage Weil [Sun, 11 Jan 2009 20:01:07 +0000 (12:01 -0800)]
mds: introduce lease seq #

Only recognize a release message if the seq # matches.  This prevents
races between mds requested revocations and volunatry client releases.

16 years agoosd: fix ager missing open() arg
Sage Weil [Sat, 10 Jan 2009 05:21:49 +0000 (21:21 -0800)]
osd: fix ager missing open() arg

16 years agoosdmaptool: fix --test-map-pg
Sage Weil [Fri, 9 Jan 2009 23:19:40 +0000 (15:19 -0800)]
osdmaptool: fix --test-map-pg

16 years agotodo
Sage Weil [Fri, 9 Jan 2009 22:58:49 +0000 (14:58 -0800)]
todo

16 years agomds: do rename, unlink early replies; set_xlock_done as appropriate
Sage Weil [Fri, 9 Jan 2009 22:57:39 +0000 (14:57 -0800)]
mds: do rename, unlink early replies; set_xlock_done as appropriate

16 years agomds: early_reply for link, unlink, rename.
Sage Weil [Fri, 9 Jan 2009 22:46:08 +0000 (14:46 -0800)]
mds: early_reply for link, unlink, rename.

16 years agomds: by default, always wait for journal safe
Sage Weil [Fri, 9 Jan 2009 22:33:09 +0000 (14:33 -0800)]
mds: by default, always wait for journal safe

Waiting for just sync can make clients lose requests when mds and osds die
simultaneously.  Now that we have an early_reply, the performance impact
from always waiting for safe is mostly gone.

16 years agomds: wait for journal safe when doing ino allocations
Sage Weil [Fri, 9 Jan 2009 22:15:44 +0000 (14:15 -0800)]
mds: wait for journal safe when doing ino allocations

Stop-gap, I suppose.. we really want to wait for things to fully journal,
period.  Hmm.

16 years agokclient: resend unsafe requests just before to MClientReconnect
Sage Weil [Fri, 9 Jan 2009 21:54:46 +0000 (13:54 -0800)]
kclient: resend unsafe requests just before to MClientReconnect

This makes it clear ot the MDS which requests are being replayed (not that
it makes a difference at the moment).

16 years agokclient: list unsafe requests in the MDS session
Sage Weil [Fri, 9 Jan 2009 20:55:59 +0000 (12:55 -0800)]
kclient: list unsafe requests in the MDS session

This easily defines the requests needed during reconnect without having
to consult the larger request table.

16 years agokclient: break out __prepare_send_request helper
Sage Weil [Fri, 9 Jan 2009 20:49:17 +0000 (12:49 -0800)]
kclient: break out __prepare_send_request helper

This will be used for preparing the request when sent during reconnect
(instead of do_request, which exited after the first unsafe reply).

16 years agokclient: separate flag for got_safe and got_unsafe
Sage Weil [Fri, 9 Jan 2009 20:48:24 +0000 (12:48 -0800)]
kclient: separate flag for got_safe and got_unsafe

Slightly more informative debugging messages.  Avoid doing the safe cleanup
twice.

And the distinction will be important when replaying unsafe requests to
the mds during reconnect.  I think.

16 years agokclient: set ino in request if we got an early reply
Sage Weil [Fri, 9 Jan 2009 20:20:20 +0000 (12:20 -0800)]
kclient: set ino in request if we got an early reply

Make 'ino' a generic field so we don't have to look at the request type
when sending the message.  It'll be ignored by the MDS when it's not
relevant anyway.

16 years agokclient: missing spin_unlock
Yehuda Sadeh [Fri, 9 Jan 2009 20:41:14 +0000 (12:41 -0800)]
kclient: missing spin_unlock

16 years agokclient: replace radix tree with list for req dir listener
Yehuda Sadeh [Fri, 9 Jan 2009 20:38:02 +0000 (12:38 -0800)]
kclient: replace radix tree with list for req dir listener

16 years agokclient: listener tree should use GFP_ATOMIC
Yehuda Sadeh [Fri, 9 Jan 2009 19:34:33 +0000 (11:34 -0800)]
kclient: listener tree should use GFP_ATOMIC

16 years agokclient: remove extra mutex_unlock
Yehuda Sadeh [Thu, 8 Jan 2009 19:17:59 +0000 (11:17 -0800)]
kclient: remove extra mutex_unlock

16 years agostart.sh: add $CEPH_BIN
Yehuda Sadeh [Thu, 8 Jan 2009 18:38:15 +0000 (10:38 -0800)]
start.sh: add $CEPH_BIN

16 years agokclient: fix fsync for directories
Yehuda Sadeh [Thu, 8 Jan 2009 18:37:56 +0000 (10:37 -0800)]
kclient: fix fsync for directories

16 years agokclient: handle safe reply, sync dir waits for safe reply
Yehuda Sadeh [Tue, 6 Jan 2009 23:01:26 +0000 (15:01 -0800)]
kclient: handle safe reply, sync dir waits for safe reply

16 years agomds: can_xlock_soon() should include LOCK_LOCK
Sage Weil [Fri, 9 Jan 2009 18:44:02 +0000 (10:44 -0800)]
mds: can_xlock_soon() should include LOCK_LOCK

i.e., if we are already xlocked.  This avoids calling {file,scatter}_lock
on an already LOCK_LOCK lock.

16 years agomds: for wrlock when updating max_size in issue_caps()
Sage Weil [Fri, 9 Jan 2009 18:25:15 +0000 (10:25 -0800)]
mds: for wrlock when updating max_size in issue_caps()

If check_inode_max_size() changes the lock state, teh issue_caps local
values for *_allowed etc. are out of date, and we do the wrong thing.

And in any case, we can safely update max_size even when a wrlock isn't
normally allowed, e.g. when in LONER state.

16 years agomds: drop dup code
Sage Weil [Fri, 9 Jan 2009 17:47:56 +0000 (09:47 -0800)]
mds: drop dup code

16 years agokclient: fix add_cap cap update
Sage Weil [Fri, 9 Jan 2009 17:45:59 +0000 (09:45 -0800)]
kclient: fix add_cap cap update

We want to _set_ cap->issued, and add bits to cap->implemented.  This
mirrors what we see in handle_cap_grant.  Note that this is dependent
on that fact that (currently, at least!) we should never see
a revocation here.

16 years agouclient: handle xattr updates
Sage Weil [Fri, 9 Jan 2009 05:29:06 +0000 (21:29 -0800)]
uclient: handle xattr updates

16 years agokclient: only update xattr blob when defined and newer (caps|reply)
Sage Weil [Fri, 9 Jan 2009 00:45:53 +0000 (16:45 -0800)]
kclient: only update xattr blob when defined and newer (caps|reply)

16 years agomds: send xattrs down to client efficiently
Sage Weil [Fri, 9 Jan 2009 00:42:44 +0000 (16:42 -0800)]
mds: send xattrs down to client efficiently

Track what xattr_version the client (should) have in the capability
so we can be smart about including the xattr blob in the inodestat
and in caps messages.

16 years agomove to generic ceph_seq_t 32-bit sequence number and comparator
Sage Weil [Thu, 8 Jan 2009 23:38:28 +0000 (15:38 -0800)]
move to generic ceph_seq_t 32-bit sequence number and comparator

We want to behave when the seq # rolls over.  We'll be fine as long
as we don't differ by more than 1<<31.

16 years agokclient: make fill_trace look for RDCACHE cap on directory
Sage Weil [Thu, 8 Jan 2009 22:59:51 +0000 (14:59 -0800)]
kclient: make fill_trace look for RDCACHE cap on directory

The dcache update logic depends on whether EITHER a dentry lease
or an RDCACHE cap on the whole directory is provided.  This detail
got lost in the lease->cap transition.

16 years agostop.sh: stop valgrind procs too
Sage Weil [Thu, 8 Jan 2009 22:43:04 +0000 (14:43 -0800)]
stop.sh: stop valgrind procs too

16 years agomds: fix capability off-by-one bug
Sage Weil [Thu, 8 Jan 2009 22:42:50 +0000 (14:42 -0800)]
mds: fix capability off-by-one bug

16 years agomds: safely allow client to rdlock|lease dentries it xlocked
Sage Weil [Thu, 8 Jan 2009 23:04:32 +0000 (15:04 -0800)]
mds: safely allow client to rdlock|lease dentries it xlocked

If the locked item is in it's final state, we can call
set_xlock_done().  Thereafter, we allow new rdlocks or leases
to be issued if the client matches the xlocker.  Move the lock
state to LOCK_LOCK_SYNC to ensure it is not relocked.

16 years agomds: fix SimpleLock release evals
Sage Weil [Thu, 8 Jan 2009 22:15:43 +0000 (14:15 -0800)]
mds: fix SimpleLock release evals

16 years agotodos
Sage Weil [Thu, 8 Jan 2009 21:38:07 +0000 (13:38 -0800)]
todos

16 years agomds: use projected parent when updating max_size
Sage Weil [Thu, 8 Jan 2009 20:59:16 +0000 (12:59 -0800)]
mds: use projected parent when updating max_size

May be new file, or renaming.

16 years agomds: only check max_size if inode is a file
Sage Weil [Thu, 8 Jan 2009 20:36:15 +0000 (12:36 -0800)]
mds: only check max_size if inode is a file

16 years agomon: fix uninitialized variable
Sage Weil [Thu, 8 Jan 2009 20:31:16 +0000 (12:31 -0800)]
mon: fix uninitialized variable

16 years agoMerge branch 'unstable' into caps
Sage Weil [Thu, 8 Jan 2009 20:26:51 +0000 (12:26 -0800)]
Merge branch 'unstable' into caps

16 years agovstart: run cmon through crun, valgrind
Sage Weil [Thu, 8 Jan 2009 20:25:39 +0000 (12:25 -0800)]
vstart: run cmon through crun, valgrind

16 years agomds: set issue_stamp on cap reconnect
Sage Weil [Thu, 8 Jan 2009 20:25:26 +0000 (12:25 -0800)]
mds: set issue_stamp on cap reconnect

16 years agokclient: exclude expireable caps from reconnect
Sage Weil [Thu, 8 Jan 2009 19:50:26 +0000 (11:50 -0800)]
kclient: exclude expireable caps from reconnect

No need to remove them; they are already invalid as the gen is out
of date.

16 years agomds: fix sessionmap->version value during EMetaBlob replay
Sage Weil [Thu, 8 Jan 2009 20:15:19 +0000 (12:15 -0800)]
mds: fix sessionmap->version value during EMetaBlob replay

++v, not v++.

16 years agomds: fix EMetaBlob initialization
Sage Weil [Thu, 8 Jan 2009 19:42:18 +0000 (11:42 -0800)]
mds: fix EMetaBlob initialization

Use a single constructor.

16 years agomds: only file_eval on xlock_finish if stable
Sage Weil [Thu, 8 Jan 2009 18:43:29 +0000 (10:43 -0800)]
mds: only file_eval on xlock_finish if stable

16 years agomds: only file_eval on xlock_finish if stable
Sage Weil [Thu, 8 Jan 2009 18:43:29 +0000 (10:43 -0800)]
mds: only file_eval on xlock_finish if stable

16 years agotodos
Sage Weil [Wed, 7 Jan 2009 23:44:45 +0000 (15:44 -0800)]
todos

16 years agokclient: don't pin dentry with lease
Sage Weil [Wed, 7 Jan 2009 23:44:28 +0000 (15:44 -0800)]
kclient: don't pin dentry with lease

Discard when we notice it is invalid, or when we release the
dentry.

16 years agokclient: separate mds session lookup from ref get
Sage Weil [Wed, 7 Jan 2009 23:43:31 +0000 (15:43 -0800)]
kclient: separate mds session lookup from ref get

16 years agoMerge branch 'unstable' into caps
Sage Weil [Wed, 7 Jan 2009 23:12:44 +0000 (15:12 -0800)]
Merge branch 'unstable' into caps

16 years agovstart: fix ip determination
Sage Weil [Wed, 7 Jan 2009 23:12:02 +0000 (15:12 -0800)]
vstart: fix ip determination

16 years agomds: disable inode leases
Sage Weil [Wed, 7 Jan 2009 22:29:55 +0000 (14:29 -0800)]
mds: disable inode leases

16 years agomds: no inode lease in lssnap
Sage Weil [Wed, 7 Jan 2009 22:29:47 +0000 (14:29 -0800)]
mds: no inode lease in lssnap

16 years agokclient: fix cap release logic a bit
Sage Weil [Wed, 7 Jan 2009 22:11:48 +0000 (14:11 -0800)]
kclient: fix cap release logic a bit

Keep an EXCL bits we have, as long as we have something wanted or
used.

Fix wanted update vs delayed cap release behavior.

16 years agokclient: fix request ref count leak from duplicate replies
Sage Weil [Wed, 7 Jan 2009 21:53:28 +0000 (13:53 -0800)]
kclient: fix request ref count leak from duplicate replies

16 years agomds: expire rdcaps
Sage Weil [Wed, 7 Jan 2009 21:33:17 +0000 (13:33 -0800)]
mds: expire rdcaps

Make sure mds and client agree on the wanted value.

16 years agokclient: trim expired rdcaps; ignored issued but timed out caps
Sage Weil [Wed, 7 Jan 2009 19:29:50 +0000 (11:29 -0800)]
kclient: trim expired rdcaps; ignored issued but timed out caps

Introduce new CEPH_CAP_EXPIREABLE mask to control which caps (if
alone) time out.

16 years agokclient: fix buffer overrun in parse_reply_info_trace()
Sage Weil [Wed, 7 Jan 2009 18:40:56 +0000 (10:40 -0800)]
kclient: fix buffer overrun in parse_reply_info_trace()

Bug introduced by fb882d34c1be8fc7058f0f636bb68b134d638743.

16 years agomds: issue AUTH_EXCL if also issuing FILE_EXCL
Sage Weil [Wed, 7 Jan 2009 18:26:05 +0000 (10:26 -0800)]
mds: issue AUTH_EXCL if also issuing FILE_EXCL

This will let e.g. untar chmod/chown without talking to the mds.

16 years agomds: update cap notes
Sage Weil [Wed, 7 Jan 2009 00:47:48 +0000 (16:47 -0800)]
mds: update cap notes

16 years agokclient: implement ceph_release_caps
Sage Weil [Wed, 7 Jan 2009 00:45:41 +0000 (16:45 -0800)]
kclient: implement ceph_release_caps

Just pass a 'drop' mask to check_caps, and tell it not to
delay.

16 years agomds: set ttl_ms in cap IMPORT message
Sage Weil [Wed, 7 Jan 2009 00:33:44 +0000 (16:33 -0800)]
mds: set ttl_ms in cap IMPORT message

16 years agokclient: keep readonly caps on per-session lru
Sage Weil [Wed, 7 Jan 2009 00:33:31 +0000 (16:33 -0800)]
kclient: keep readonly caps on per-session lru

16 years agomds: keep caps in lru; put ttl in cap issue to clients
Sage Weil [Wed, 7 Jan 2009 00:08:50 +0000 (16:08 -0800)]
mds: keep caps in lru; put ttl in cap issue to clients

16 years agokclient: local chmod/chown if holding CEPH_CAP_AUTH_EXCL
Sage Weil [Tue, 6 Jan 2009 22:50:26 +0000 (14:50 -0800)]
kclient: local chmod/chown if holding CEPH_CAP_AUTH_EXCL

16 years agoclient: send release anytime we get a caps message and have no inode or cap
Sage Weil [Tue, 6 Jan 2009 22:40:06 +0000 (14:40 -0800)]
client: send release anytime we get a caps message and have no inode or cap

The exceptions are IMPORT, EXPORT, and FLUSHSNAP_ACK.

16 years agomds: always issue cap in inodestat
Sage Weil [Tue, 6 Jan 2009 22:38:08 +0000 (14:38 -0800)]
mds: always issue cap in inodestat

The previous (wrong) optimization was trying to avoid the old
pending_caps list in Capability.

16 years agomds: don't let release race with any caps
Sage Weil [Tue, 6 Jan 2009 22:37:20 +0000 (14:37 -0800)]
mds: don't let release race with any caps

16 years agomds: simplify capability issued tracking
Sage Weil [Tue, 6 Jan 2009 21:46:34 +0000 (13:46 -0800)]
mds: simplify capability issued tracking

The original was really stupid.. keeping track of every issued
value in a list and traversing it to calculate the effective
issued mask.

New version has a small, fixed array that is used only when bits
are revoked.

16 years agouclient: fix likes bits
Sage Weil [Tue, 6 Jan 2009 21:44:44 +0000 (13:44 -0800)]
uclient: fix likes bits

16 years agokclient: use new caps protocol
Sage Weil [Tue, 6 Jan 2009 20:47:29 +0000 (12:47 -0800)]
kclient: use new caps protocol

Also,
- Stat root inode instead of opening it.  We will keep the PIN cap
  and be happy.
- add ceph_cap_string helper to make cap values readable

16 years agomds: fix stat mask
Sage Weil [Tue, 6 Jan 2009 20:46:00 +0000 (12:46 -0800)]
mds: fix stat mask

16 years agomds: only send clientcaps if we need to revoke, or we can issue explicitly wanted...
Sage Weil [Tue, 6 Jan 2009 20:45:49 +0000 (12:45 -0800)]
mds: only send clientcaps if we need to revoke, or we can issue explicitly wanted caps

16 years agomds: fix cap release seq check
Sage Weil [Tue, 6 Jan 2009 20:45:24 +0000 (12:45 -0800)]
mds: fix cap release seq check

16 years agouclient: set dirty bits in cap_snap
Sage Weil [Tue, 6 Jan 2009 19:08:44 +0000 (11:08 -0800)]
uclient: set dirty bits in cap_snap

16 years agomds: bunch of cap protocol changes, and user client adjustments.
Sage Weil [Tue, 6 Jan 2009 00:30:10 +0000 (16:30 -0800)]
mds: bunch of cap protocol changes, and user client adjustments.

See capability protocol notes in mds/Capability.h

16 years agokclient: fix snap realm update on reply
Sage Weil [Mon, 5 Jan 2009 19:20:13 +0000 (11:20 -0800)]
kclient: fix snap realm update on reply

Take snap_rwsem always, since we usually get caps.  Drop trailing
snaprealm ref after trace is fully processed.

16 years agomds: fix set_trace_dist snaprealm problem on unlink
Sage Weil [Mon, 5 Jan 2009 19:06:26 +0000 (11:06 -0800)]
mds: fix set_trace_dist snaprealm problem on unlink

Set snaprealm trace based on the first inode we see.

16 years agokclient: ref count cap_snap to avoid unnecessarily copying into temp variables
Sage Weil [Sun, 4 Jan 2009 23:41:03 +0000 (15:41 -0800)]
kclient: ref count cap_snap to avoid unnecessarily copying into temp variables

16 years agokclient: take fmode ref atomically while adding cap
Sage Weil [Sun, 4 Jan 2009 20:14:40 +0000 (12:14 -0800)]
kclient: take fmode ref atomically while adding cap

16 years agoclient: do not update when already holding EXCL cap
Sage Weil [Sun, 4 Jan 2009 19:38:31 +0000 (11:38 -0800)]
client: do not update when already holding EXCL cap

16 years agokclient: caps basically working
Sage Weil [Sun, 4 Jan 2009 19:17:20 +0000 (11:17 -0800)]
kclient: caps basically working

handle caps on any inode in reply.  no more inode leases.

16 years agokclient: use ceph_caps_release instead of dropping inode lease
Yehuda Sadeh [Sat, 3 Jan 2009 01:04:00 +0000 (17:04 -0800)]
kclient: use ceph_caps_release instead of dropping inode lease

16 years agokclient: switch from inode leases to new caps
Yehuda Sadeh [Sun, 4 Jan 2009 18:50:56 +0000 (10:50 -0800)]
kclient: switch from inode leases to new caps

----------------------------