]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: do not flush request stream on lease release
authorSage Weil <sage@newdream.net>
Mon, 16 Mar 2009 22:47:42 +0000 (15:47 -0700)
committerSage Weil <sage@newdream.net>
Mon, 16 Mar 2009 22:51:36 +0000 (15:51 -0700)
We only release leases this way when they are about to be followed
by a request.  Presumably to the same MDS..

src/TODO
src/kernel/mds_client.c

index 4f97fbde37b518dcdd41c5c2899e7577e8c364a0..26564da1939295f3ed048012347533e1a086dfda 100644 (file)
--- a/src/TODO
+++ b/src/TODO
@@ -56,12 +56,12 @@ repair
 
 
 kernel client
+- unwind writeback start error in addr.c (see fixme)... by redirtying pages?
 - inotify for updates from other clients?
 - optional or no fill_trace?
 - flock, fnctl locks
 - async xattrs
 - avoid pinning inodes with expireable caps?
-- avoid flushing tcp socket when sending client_lease release messages (when the request is about to follow)
 - ACLs
 - make writepages maybe skip pages with errors?
   - EIO, or ENOSPC?
index 6959d461bab77b418930a3a9b6bc5fc202d547f0..736bf24b3cbea7b0a7da18f27e40f60b90ee7737 100644 (file)
@@ -2030,6 +2030,14 @@ void ceph_mdsc_lease_send_msg(struct ceph_mds_client *mdsc, int mds,
        *(__le32 *)((void *)lease + sizeof(*lease)) = cpu_to_le32(dnamelen);
        memcpy((void *)lease + sizeof(*lease) + 4, dentry->d_name.name,
               dnamelen);
+
+       /*
+        * if this is a preemptive lease RELEASE, no need to
+        * flush request stream, since the actual request will
+        * soon follow.
+        */
+       msg->more_to_follow = (action == CEPH_MDS_LEASE_RELEASE);
+
        ceph_send_msg_mds(mdsc, msg, mds);
 }