]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: cleanly flush dirty pages at umount
authorSage Weil <sage@newdream.net>
Thu, 3 Apr 2008 14:01:50 +0000 (07:01 -0700)
committerSage Weil <sage@newdream.net>
Thu, 3 Apr 2008 14:01:50 +0000 (07:01 -0700)
src/TODO
src/kernel/client.c
src/kernel/super.c
src/kernel/super.h

index a72066fe355f656745c305345a6b67d05f3e3ccf..636cd590f9774dd144043367f2b1e6c8a0ac4ac2 100644 (file)
--- a/src/TODO
+++ b/src/TODO
@@ -27,6 +27,7 @@ kernel client
 - vfs
  - can we use dentry_path(), if it gets merged into mainline?
 - io / osd client
+  - writepages should do io on more than 14 pages at a time!
   - carry wrbuffer/rdcache caps until data is flushed
     - this should make the utimes bit kick in
     - invalidate cache pages?
index 84cffe331d145bd4c0548c8d5a683b81d32b5830..5b6a12da6e6f3bb1cd1934b683158321b82ec6a2 100644 (file)
@@ -217,6 +217,11 @@ fail:
        return ERR_PTR(err);
 }
 
+void ceph_umount_start(struct ceph_client *cl)
+{
+       ceph_mdsc_stop(&cl->mdsc);      
+}
+
 void ceph_destroy_client(struct ceph_client *cl)
 {
        dout(10, "destroy_client %p\n", cl);
@@ -224,8 +229,6 @@ void ceph_destroy_client(struct ceph_client *cl)
        /* unmount */
        /* ... */
 
-       ceph_mdsc_stop(&cl->mdsc);      
-
        ceph_messenger_destroy(cl->msgr);
        put_client_counter();
        kfree(cl);
index 343ff1005f82873d8c6f38733bd30f5c75fe6099..8fb7953aef2cc1987485496f0d4eba23cf443b85 100644 (file)
@@ -43,6 +43,7 @@ static int ceph_write_inode(struct inode *inode, int unused)
 static void ceph_put_super(struct super_block *s)
 {
        dout(30, "ceph_put_super\n");
+       ceph_umount_start(ceph_client(s));
        return;
 }
 
@@ -515,8 +516,8 @@ static void ceph_kill_sb(struct super_block *s)
 {
        struct ceph_client *client = ceph_sb_to_client(s);
        dout(1, "kill_sb %p\n", s);
+       kill_anon_super(s);    /* will call put_super after sb is r/o */
        ceph_destroy_client(client);
-       kill_anon_super(s);
 }
 
 
index 3a16ff721f103f29e3a0eb220bd7791262cedbc5..527be8fd60b18522257e82fee3c5773075ed6fdc 100644 (file)
@@ -333,6 +333,7 @@ extern void ceph_destroy_client(struct ceph_client *cl);
 extern int ceph_mount(struct ceph_client *client, 
                      struct ceph_mount_args *args, 
                      struct vfsmount *mnt);
+extern void ceph_umount_start(struct ceph_client *cl);
 extern const char *ceph_msg_type_name(int type);