]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
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

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

16 years agonotes
Sage Weil [Sun, 4 Jan 2009 18:34:47 +0000 (10:34 -0800)]
notes

16 years agouclient: adjust cap release logic...
Sage Weil [Sun, 4 Jan 2009 18:28:50 +0000 (10:28 -0800)]
uclient: adjust cap release logic...

16 years agomds: only _do_cap_update if client held ANY_WR caps
Sage Weil [Sun, 4 Jan 2009 17:38:46 +0000 (09:38 -0800)]
mds: only _do_cap_update if client held ANY_WR caps

16 years agomds: issue RDCACHE caps to client when possible. add cap to do so if inode auth.
Sage Weil [Sat, 3 Jan 2009 19:33:35 +0000 (11:33 -0800)]
mds: issue RDCACHE caps to client when possible.  add cap to do so if inode auth.

16 years agouclient: sorta working
Sage Weil [Sat, 3 Jan 2009 01:03:47 +0000 (17:03 -0800)]
uclient: sorta working

16 years agomds: fix scatterlock print
Sage Weil [Sat, 3 Jan 2009 01:00:08 +0000 (17:00 -0800)]
mds: fix scatterlock print

16 years agomds: put a cap in each inode stat in trace; simplify snaprealm trace encoding
Sage Weil [Fri, 2 Jan 2009 23:29:29 +0000 (15:29 -0800)]
mds: put a cap in each inode stat in trace; simplify snaprealm trace encoding

16 years agomds: cap comments
Sage Weil [Fri, 2 Jan 2009 22:46:07 +0000 (14:46 -0800)]
mds: cap comments

16 years agomds: rewrite CEPH_STAT_MASK_* as CEPH_STAT_CAP_* (cap masks)
Sage Weil [Fri, 2 Jan 2009 22:42:58 +0000 (14:42 -0800)]
mds: rewrite CEPH_STAT_MASK_* as CEPH_STAT_CAP_* (cap masks)

16 years agomds: cap writeback authlock fields as well as filelock fields
Sage Weil [Fri, 2 Jan 2009 22:26:08 +0000 (14:26 -0800)]
mds: cap writeback authlock fields as well as filelock fields

No xattrs yet.

16 years agomds: don't rdlock and xlock at the same time
Sage Weil [Fri, 2 Jan 2009 22:25:00 +0000 (14:25 -0800)]
mds: don't rdlock and xlock at the same time

16 years agomds: check for xlock in simple_sync()
Sage Weil [Fri, 2 Jan 2009 22:24:51 +0000 (14:24 -0800)]
mds: check for xlock in simple_sync()

16 years agomds: fix lock print methods
Sage Weil [Fri, 2 Jan 2009 22:13:12 +0000 (14:13 -0800)]
mds: fix lock print methods

16 years agomds: share caps across multiple lock types.
Sage Weil [Fri, 2 Jan 2009 20:05:09 +0000 (12:05 -0800)]
mds: share caps across multiple lock types.

Very rough initial first pass.

16 years agotodo
Sage Weil [Fri, 2 Jan 2009 17:26:15 +0000 (09:26 -0800)]
todo

16 years agomds: clean up lock print methods
Sage Weil [Thu, 1 Jan 2009 19:06:13 +0000 (11:06 -0800)]
mds: clean up lock print methods

16 years agoMerge branch 'unstable' into asyncmds
Sage Weil [Wed, 31 Dec 2008 19:30:08 +0000 (11:30 -0800)]
Merge branch 'unstable' into asyncmds

Conflicts:

src/mon/OSDMonitor.cc

16 years agoobjecter: fix ack vs safe behavior
Sage Weil [Wed, 31 Dec 2008 19:20:29 +0000 (11:20 -0800)]
objecter: fix ack vs safe behavior

This was totally broken (ack was taken as a safe).  Doh!

16 years agojournaler: add --journaler_safe hack support back
Sage Weil [Wed, 31 Dec 2008 19:21:21 +0000 (11:21 -0800)]
journaler: add --journaler_safe hack support back

16 years agoobjecter: fix ack vs safe behavior
Sage Weil [Wed, 31 Dec 2008 19:20:29 +0000 (11:20 -0800)]
objecter: fix ack vs safe behavior

This was totally broken (ack was taken as a safe).  Doh!

16 years agokclient: setattr on inode (not path) if holding WR cap
Sage Weil [Wed, 31 Dec 2008 19:19:38 +0000 (11:19 -0800)]
kclient: setattr on inode (not path) if holding WR cap

For newly created files, this avoids contention in the MDS over the dentry
xlock (e.g., for an untar).

It is slightly risky, because we could race with a caps release and MDS
cache trim.  Pretty unlikely, however, because cap release would also
involve MDS journaling.

16 years agomds: fix xattr projection
Sage Weil [Wed, 31 Dec 2008 17:15:34 +0000 (09:15 -0800)]
mds: fix xattr projection

We do not want the new xattr to appear in the inode until the journal
entry commits.

16 years agokclient: update for ceph_fsid_t
Yehuda Sadeh [Wed, 31 Dec 2008 00:18:01 +0000 (16:18 -0800)]
kclient: update for ceph_fsid_t

16 years agoMerge branch 'unstable' of ssh://ceph.newdream.net/git/ceph into unstable
Yehuda Sadeh [Thu, 25 Dec 2008 00:39:59 +0000 (16:39 -0800)]
Merge branch 'unstable' of ssh://ceph.newdream.net/git/ceph into unstable

16 years agovstart.sh: disable lockdep in default
Yehuda Sadeh [Thu, 25 Dec 2008 00:39:28 +0000 (16:39 -0800)]
vstart.sh: disable lockdep in default

16 years agomds todos
Sage Weil [Wed, 24 Dec 2008 22:40:23 +0000 (14:40 -0800)]
mds todos

16 years agomds: avoid recursion on log trim
Sage Weil [Wed, 24 Dec 2008 22:18:59 +0000 (14:18 -0800)]
mds: avoid recursion on log trim

16 years agomds: add wrlock to simplelock; wrlock authlock on chmod, chown
Sage Weil [Wed, 24 Dec 2008 22:18:45 +0000 (14:18 -0800)]
mds: add wrlock to simplelock; wrlock authlock on chmod, chown

16 years agomds: link on commit in openc; make find_snaprealm() follow projected_parent for unlin...
Sage Weil [Wed, 24 Dec 2008 22:18:06 +0000 (14:18 -0800)]
mds: link on commit in openc; make find_snaprealm() follow projected_parent for unlinked inode

Linking inode in early confuses CDir::_committed().

16 years agomon: make 'osd setmap' take epoch, to avoid executing multiple times
Sage Weil [Wed, 24 Dec 2008 22:14:59 +0000 (14:14 -0800)]
mon: make 'osd setmap' take epoch, to avoid executing multiple times

16 years agoceph: increase command timeout
Sage Weil [Wed, 24 Dec 2008 20:45:07 +0000 (12:45 -0800)]
ceph: increase command timeout

16 years agomds: flush log only when we need to
Sage Weil [Wed, 24 Dec 2008 20:11:50 +0000 (12:11 -0800)]
mds: flush log only when we need to

In particular, don't flush immediately on cap flush unless the lock is
unstable.  If we later wait on the lock state, make sure the log flushes.

16 years agomds: add --mds_early_reply option
Sage Weil [Wed, 24 Dec 2008 00:36:27 +0000 (16:36 -0800)]
mds: add --mds_early_reply option

16 years agomds: only include trace in first reply
Sage Weil [Wed, 24 Dec 2008 00:36:12 +0000 (16:36 -0800)]
mds: only include trace in first reply

No need to do it twice.

16 years agomds: rewrite, clean up mds open+O_CREAT; issue dn lease to xlocker; many other server...
Sage Weil [Tue, 23 Dec 2008 23:43:10 +0000 (15:43 -0800)]
mds: rewrite, clean up mds open+O_CREAT; issue dn lease to xlocker; many other server cleanups

16 years agochange ceph_fsid
Sage Weil [Tue, 23 Dec 2008 21:39:25 +0000 (13:39 -0800)]
change ceph_fsid

Make it look more like uuid_t.  Rename type, comparator.

16 years agomds: early_reply on open, mknod, symlink, mkdir when possible
Sage Weil [Tue, 23 Dec 2008 21:36:46 +0000 (13:36 -0800)]
mds: early_reply on open, mknod, symlink, mkdir when possible

Use client-provided ino, if defined.

16 years agoos: start_sync osd operation
Sage Weil [Tue, 23 Dec 2008 20:29:04 +0000 (12:29 -0800)]
os: start_sync osd operation

If a client has a time sensitive operation, it can include a start_sync
in the op vector to start an immediate commit to disk.  It should then
get the ONDISK ack sooner.

16 years agoosd: use .version in eversion_t to determine divergence
Sage Weil [Mon, 22 Dec 2008 21:13:55 +0000 (13:13 -0800)]
osd: use .version in eversion_t to determine divergence

16 years agoosd: cleanup
Sage Weil [Mon, 22 Dec 2008 21:13:38 +0000 (13:13 -0800)]
osd: cleanup

16 years agoosd: clear entire pushing map on_change()
Sage Weil [Mon, 22 Dec 2008 20:09:57 +0000 (12:09 -0800)]
osd: clear entire pushing map on_change()

Primary state is reset; clear pushing map entirely.  We wouldn't know how
to handle the push acks properly anyway.

16 years agoosd: fix read_log version attr check
Sage Weil [Mon, 22 Dec 2008 20:09:15 +0000 (12:09 -0800)]
osd: fix read_log version attr check

16 years agoosd: only request replica backlogs one at a time when searching for lost objects
Sage Weil [Mon, 22 Dec 2008 19:39:36 +0000 (11:39 -0800)]
osd: only request replica backlogs one at a time when searching for lost objects

16 years agoosd: cancel_generate_backlog on activate
Sage Weil [Mon, 22 Dec 2008 19:39:18 +0000 (11:39 -0800)]
osd: cancel_generate_backlog on activate

This fixes issue where primary requests backlog, finds its missing objects,
activates (by sending a backlog), and replica generates backlog only to
find that it already has it.

16 years agomon: fix mds cluster expansion
Sage Weil [Tue, 23 Dec 2008 20:14:21 +0000 (12:14 -0800)]
mon: fix mds cluster expansion

If we can't find a suitable standby, stop looping.

16 years agomount.ceph: fix warnings, add to Makefile.am
Sage Weil [Tue, 23 Dec 2008 20:09:13 +0000 (12:09 -0800)]
mount.ceph: fix warnings, add to Makefile.am

16 years agomds: fix inotable project, sessionmap projection, ino (pre)allocation.
Sage Weil [Tue, 23 Dec 2008 03:09:39 +0000 (19:09 -0800)]
mds: fix inotable project, sessionmap projection, ino (pre)allocation.

Table changes must be projected so that the saved table is never
newer than the end of the journal.

16 years agomds: optional ino for mknod/mkdir/open requests
Sage Weil [Tue, 23 Dec 2008 00:12:26 +0000 (16:12 -0800)]
mds: optional ino for mknod/mkdir/open requests

Will be needed for replaying those requests if we get an early
reply, to ensure that the same ino is used.

16 years agomds: preallocate inos for each client session
Sage Weil [Tue, 23 Dec 2008 00:11:39 +0000 (16:11 -0800)]
mds: preallocate inos for each client session

Do not use preallocated inos until we have journaled the
preallocation.  If we use a newly allocated ino, do not do an
early_reply.

When the session closes, release the inos.

16 years agomds: do early replies for basic inode update operations
Sage Weil [Mon, 22 Dec 2008 22:03:43 +0000 (14:03 -0800)]
mds: do early replies for basic inode update operations

chmod, chown, etc.  Not for mknod/mkdir, which allocate inos.

16 years agomds: early_reply infrastructure
Sage Weil [Mon, 22 Dec 2008 21:48:40 +0000 (13:48 -0800)]
mds: early_reply infrastructure

16 years agomds: fix null_okay traverse logic
Sage Weil [Mon, 22 Dec 2008 21:43:29 +0000 (13:43 -0800)]
mds: fix null_okay traverse logic

16 years agomds: add safe flag to mds reply
Sage Weil [Mon, 22 Dec 2008 21:42:12 +0000 (13:42 -0800)]
mds: add safe flag to mds reply

16 years agomds: process caps if freezing and unstable lock
Sage Weil [Fri, 19 Dec 2008 23:46:06 +0000 (15:46 -0800)]
mds: process caps if freezing and unstable lock

The caps message may be a revocation ack that is needed to complete
the freeze.  In general, though, we back off even if freezing,
since we want to avoid starving the freeze as much as possible.

16 years agomds: misc filelock fixes
Sage Weil [Fri, 19 Dec 2008 22:53:43 +0000 (14:53 -0800)]
mds: misc filelock fixes

16 years agomds: auth_pin rdlocks too
Sage Weil [Fri, 19 Dec 2008 22:53:30 +0000 (14:53 -0800)]
mds: auth_pin rdlocks too

Not sure why we didn't before... :/

16 years agokclient: make mdsmap_decode print nicer info
Sage Weil [Fri, 19 Dec 2008 22:27:36 +0000 (14:27 -0800)]
kclient: make mdsmap_decode print nicer info

16 years agokclient: update num_fwd in client requests
Sage Weil [Fri, 19 Dec 2008 22:27:00 +0000 (14:27 -0800)]
kclient: update num_fwd in client requests

We were keeping our local copy, but not updating the message sent.

Also fix buggy maybe_dup behavior (dup, then set rhead pointer)!

16 years agokclient: allow mds to force open a client session
Sage Weil [Fri, 19 Dec 2008 22:24:35 +0000 (14:24 -0800)]
kclient: allow mds to force open a client session

16 years agomds: don't bump to sync if dir and subtree root
Sage Weil [Fri, 19 Dec 2008 21:54:42 +0000 (13:54 -0800)]
mds: don't bump to sync if dir and subtree root

16 years agomds: fix file_wrlock_start waiting
Sage Weil [Fri, 19 Dec 2008 21:54:17 +0000 (13:54 -0800)]
mds: fix file_wrlock_start waiting

16 years agomds: filelock typo in can_rdlock
Sage Weil [Fri, 19 Dec 2008 21:01:29 +0000 (13:01 -0800)]
mds: filelock typo in can_rdlock

16 years agomds: cleanup
Sage Weil [Thu, 18 Dec 2008 20:12:37 +0000 (12:12 -0800)]
mds: cleanup

16 years agovstart: 1 mds
Sage Weil [Thu, 18 Dec 2008 20:12:33 +0000 (12:12 -0800)]
vstart: 1 mds

16 years agomds: check_inode_max_size only change filelock state if needed
Sage Weil [Thu, 18 Dec 2008 20:12:23 +0000 (12:12 -0800)]
mds: check_inode_max_size only change filelock state if needed

Don't try to change lock state unless we actually have something
to update.