]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: super.c cleanup
authorSage Weil <sage@newdream.net>
Thu, 16 Jul 2009 21:25:11 +0000 (14:25 -0700)
committerSage Weil <sage@newdream.net>
Fri, 17 Jul 2009 20:53:38 +0000 (13:53 -0700)
src/kernel/caps.c
src/kernel/mds_client.c
src/kernel/mds_client.h
src/kernel/super.c

index 94d389461b346be59c7cd8d2329f79829f466a06..c7be92cc15c677d4ee7d2d51f5d6f3e3c483a8fd 100644 (file)
@@ -884,13 +884,14 @@ void ceph_queue_caps_release(struct inode *inode)
                session->s_num_cap_releases--;
 
                msg->front.iov_len += sizeof(*item);
-               if (le32_to_cpu(head->num) == CAPS_PER_RELEASE) {
+               if (le32_to_cpu(head->num) == CEPH_CAPS_PER_RELEASE) {
                        dout(" release msg %p full\n", msg);
                        list_move_tail(&msg->list_head,
                                      &session->s_cap_releases_done);
                } else {
                        dout(" release msg %p at %d/%d (%d)\n", msg,
-                            (int)le32_to_cpu(head->num), (int)CAPS_PER_RELEASE,
+                            (int)le32_to_cpu(head->num),
+                            (int)CEPH_CAPS_PER_RELEASE,
                             (int)msg->front.iov_len);
                }
                spin_unlock(&session->s_cap_lock);
index 19e0c72ded87381c87ca285c207e5bcf26dee581..11f43c8e42a2d7d983423cb7349060e7246cbfac 100644 (file)
@@ -886,7 +886,7 @@ static int add_cap_releases(struct ceph_mds_client *mdsc,
                                       struct ceph_msg,
                                 list_head);
                head = msg->front.iov_base;
-               extra += CAPS_PER_RELEASE - le32_to_cpu(head->num);
+               extra += CEPH_CAPS_PER_RELEASE - le32_to_cpu(head->num);
        }
 
        while (session->s_num_cap_releases < session->s_nr_caps + extra) {
@@ -902,7 +902,7 @@ static int add_cap_releases(struct ceph_mds_client *mdsc,
                msg->front.iov_len = sizeof(*head);
                spin_lock(&session->s_cap_lock);
                list_add(&msg->list_head, &session->s_cap_releases);
-               session->s_num_cap_releases += CAPS_PER_RELEASE;
+               session->s_num_cap_releases += CEPH_CAPS_PER_RELEASE;
        }
 
        if (!list_empty(&session->s_cap_releases)) {
@@ -916,7 +916,7 @@ static int add_cap_releases(struct ceph_mds_client *mdsc,
                        list_move_tail(&msg->list_head,
                                      &session->s_cap_releases_done);
                        session->s_num_cap_releases -=
-                               CAPS_PER_RELEASE - le32_to_cpu(head->num);
+                               CEPH_CAPS_PER_RELEASE - le32_to_cpu(head->num);
                }
        }
        err = 0;
index b7f78a6bd1a58e0f900988879939c6d148609d13..5a4db3332d12d08866b371c06f341b2fa2230d5a 100644 (file)
@@ -105,9 +105,9 @@ enum {
        CEPH_MDS_SESSION_RECONNECTING = 6
 };
 
-#define CAPS_PER_RELEASE ((PAGE_CACHE_SIZE - \
-                          sizeof(struct ceph_mds_cap_release)) /       \
-                         sizeof(struct ceph_mds_cap_item))
+#define CEPH_CAPS_PER_RELEASE ((PAGE_CACHE_SIZE -                      \
+                               sizeof(struct ceph_mds_cap_release)) /  \
+                              sizeof(struct ceph_mds_cap_item))
 
 struct ceph_mds_session {
        int               s_mds;
index 311a1ca583dbdf93a2192b5cc65c72813d2a129f..5bf56f3290a088a8860ef0ec729188b439d377d5 100644 (file)
@@ -475,7 +475,7 @@ static int parse_mount_args(int flags, char *options, const char *dev_name,
        args->caps_wanted_delay_min = CEPH_CAPS_WANTED_DELAY_MIN_DEFAULT;
        args->caps_wanted_delay_max = CEPH_CAPS_WANTED_DELAY_MAX_DEFAULT;
        args->snapdir_name = ".snap";
-       args->cap_release_safety = CAPS_PER_RELEASE * 4;
+       args->cap_release_safety = CEPH_CAPS_PER_RELEASE * 4;
        args->max_readdir = 1024;
 
        /* ip1[:port1][,ip2[:port2]...]:/subdir/in/fs */
@@ -737,7 +737,7 @@ static struct dentry *open_root_dentry(struct ceph_client *client,
 }
 
 /*
- * mount: join the ceph cluster.
+ * mount: join the ceph cluster, and open root directory.
  */
 static int ceph_mount(struct ceph_client *client, struct vfsmount *mnt,
                      const char *path)
@@ -957,9 +957,8 @@ static int ceph_compare_super(struct super_block *sb, void *data)
        struct ceph_mount_args *args = &new->mount_args;
        struct ceph_client *other = ceph_sb_to_client(sb);
        int i;
-       dout("ceph_compare_super %p\n", sb);
 
-       /* either compare fsid, or specified mon_hostname */
+       dout("ceph_compare_super %p\n", sb);
        if (args->flags & CEPH_OPT_FSID) {
                if (ceph_fsid_compare(&args->fsid, &other->fsid)) {
                        dout("fsid doesn't match\n");