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);
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) {
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)) {
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;
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;
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 */
}
/*
- * 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)
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");