Sage Weil [Fri, 17 Oct 2008 21:12:35 +0000 (14:12 -0700)]
kclient: fix cap_snap flush to reference correct snap
The client was passing the snapid the data was to fall into
instead of the snap it _follows_ (which is now the mds tends
to look at things). Use snapid-1 instead. This fixes the
problem of files being written while the snapshot was taken
appearing as 0 bytes in the snapshot.
Sage Weil [Fri, 17 Oct 2008 19:43:15 +0000 (12:43 -0700)]
mds: cleanly update snapserver table after snap purge
Any modifications to the table need to be journaled. Create MDSTableServer infrastructure
for a simple update done by the server (no prepare/commit), and use it to
remove the snapid(s). Replay no works.
Sage Weil [Fri, 17 Oct 2008 14:26:03 +0000 (07:26 -0700)]
kclient: adjust ceph_finish_cap behavior
Look at capsnap->dirty instead of used cap refs, as this directly indicates
whether _this_ capsnap can be flushed (used bit indicates whether _all_
capsnaps can be flushed.. no need to wait that long!). Avoid an extra
call to ceph_flush_snaps by waiting until after to call it.
Sage Weil [Thu, 16 Oct 2008 23:34:44 +0000 (16:34 -0700)]
kclient: addr.c comments, cleanup
I'm leaving the ability to redirty a page within a given
snapc in ceph_set_page_dirty (even though it isn't used)
because I'm not sure about the failure paths.. I suspect
we will need it later.
Sage Weil [Thu, 16 Oct 2008 22:33:54 +0000 (15:33 -0700)]
debian: make ceph-source include module source
There's a bunch of weirdness in the rules file, though, that I don't understand.
What's rules.modules.in? Why was it being populated (along with a debian dir)
in /usr/src/modules/ceph?
Sage Weil [Wed, 15 Oct 2008 20:52:33 +0000 (13:52 -0700)]
kclient: fix inode refcount problems in ceph_fill_trace
If we fail to take i_mutex, we get the inode via ceph_get_inode, which bumps
i_count. Make sure we iput() it before jumping to update_inode label. Note
that d_instantiate consumes the ref, but the other paths (d_alloc_anon,
d_find_alias) do not.
Sage Weil [Tue, 14 Oct 2008 23:53:38 +0000 (16:53 -0700)]
kclient: preallocate cap if we expect it
Preallocate memory for a capability when doing an open request. If we don't
use it, free it with the mds_request. This avoids the possibility of an ENOMEM
in the reply handler, which is a little difficult to deal with intelligently.
Sage Weil [Tue, 14 Oct 2008 23:18:24 +0000 (16:18 -0700)]
kclient: remove static caps from inode
Since most inodes will never have a capability, there is no point in embedding them
in the ceph_inode_info and paying the memory overhead in the general case.
Sage Weil [Tue, 14 Oct 2008 00:42:44 +0000 (17:42 -0700)]
kclient: ping osds whose requests are timing out
This ensures the client detects when the osd tcp session has closed and
a reply may have been lost. If that does happen, the handle_reset handler
will be called and the request(s) will be resent.
Sage Weil [Mon, 13 Oct 2008 19:50:06 +0000 (12:50 -0700)]
msgr: handle incoming lossy connection when outgoing policy is lossless
Basically, try to wake up our lossless connection. The lossy attempt never
survives. This avoids worrying about keeping session state alive (connect_seq,
etc.).
Sage Weil [Thu, 9 Oct 2008 18:58:10 +0000 (11:58 -0700)]
mon: populate last_beacon properly for mds liveness check
It was only populating on paxos updates, but that missed the case where the
leader moves from one monitor to another (live) peon, who has an empty last_beacon.
Move it where it makes the most sense.
Sage Weil [Wed, 8 Oct 2008 17:49:12 +0000 (10:49 -0700)]
msgr: include priority in msg header, make dispatch a priority queue
Generalizes previous hack that put messages from the monitor at the front of the
dispatch queue. Monitor now just sets a (non-default) default_send_priority
of CEPH_MSG_PRIO_HIGH. That value is used only if the message priority isn't
set explicitly by set_priority() before being queued for send.