*s++ = 'F';
s = gcap_string(s, c);
}
-
+
if (s == cap_str[i])
*s++ = '-';
*s = 0;
{
struct ceph_cap *cap;
spin_lock(&caps_list_lock);
- while (!list_empty(&caps_list)) {
+ while (!list_empty(&caps_list)) {
cap = list_first_entry(&caps_list, struct ceph_cap, caps_item);
list_del(&cap->caps_item);
kmem_cache_free(ceph_cap_cachep, cap);
continue;
mds_wanted |= cap->mds_wanted;
}
- return mds_wanted;
+ return mds_wanted;
}
/*
inode->i_mode = le32_to_cpu(grant->mode);
inode->i_uid = le32_to_cpu(grant->uid);
inode->i_gid = le32_to_cpu(grant->gid);
- dout(20, "%p mode 0%o uid.gid %d.%d\n", inode, inode->i_mode,
+ dout(20, "%p mode 0%o uid.gid %d.%d\n", inode, inode->i_mode,
inode->i_uid, inode->i_gid);
}
-
+
if ((issued & CEPH_CAP_LINK_EXCL) == 0) {
inode->i_nlink = le32_to_cpu(grant->nlink);
}
int dirty = __ceph_caps_dirty(ci);
int issued = __ceph_caps_issued(ceph_inode(inode), &implemented);
int queue_trunc = 0;
-
+
issued |= implemented | dirty;
dout(10, "handle_cap_trunc inode %p mds%d seq %d to %lld seq %d\n",
*
* caller holds s_mutex.
*/
-static void handle_cap_import(struct ceph_mds_client *mdsc,
+static void handle_cap_import(struct ceph_mds_client *mdsc,
struct inode *inode, struct ceph_mds_caps *im,
struct ceph_mds_session *session,
void *snaptrace, int snaptrace_len)
dout(10, "handle_cap_import inode %p ci %p mds%d mseq %d\n",
inode, ci, mds, mseq);
}
-
+
down_write(&mdsc->snap_rwsem);
ceph_update_snap_trace(mdsc, snaptrace, snaptrace+snaptrace_len,
false);
spin_unlock(&inode->i_lock);
goto done;
}
-
+
/* note that each of these drops i_lock for us */
switch (op) {
case CEPH_CAP_OP_REVOKE:
{
if (val)
ceph_bookkeeper_dump();
- return 0;
+ return 0;
}
static int debugfs_bookkeeper_get(void *data, u64 *val)
{
*val = 0;
- return 0;
+ return 0;
}
DEFINE_SIMPLE_ATTRIBUTE(bookkeeper_fops, debugfs_bookkeeper_get, debugfs_bookkeeper_set, "%llu\n");
req->r_args.mknod.mode = cpu_to_le32(mode);
req->r_args.mknod.rdev = cpu_to_le32(rdev);
req->r_dentry_drop = CEPH_CAP_FILE_SHARED;
- req->r_dentry_unless = CEPH_CAP_FILE_EXCL;
+ req->r_dentry_unless = CEPH_CAP_FILE_EXCL;
err = ceph_mdsc_do_request(mdsc, dir, req);
if (!err && !req->r_reply_info.head->is_dentry)
err = ceph_handle_notrace_create(dir, dentry);
BUG_ON(inode->i_fop->release == ceph_release);
/* call the proper open fop */
- ret = inode->i_fop->open(inode, file);
+ ret = inode->i_fop->open(inode, file);
}
return ret;
}
ceph_cap_string(issued));
__ceph_get_fmode(ci, fmode);
spin_unlock(&inode->i_lock);
-
+
/* adjust wanted? */
if ((issued & wanted) != wanted &&
(mds_wanted & wanted) != wanted &&
err = ceph_mdsc_do_request(mdsc, parent_inode, req);
dentry = ceph_finish_lookup(req, dentry, err);
if (!err && (flags & O_CREAT) && !req->r_reply_info.head->is_dentry)
- err = ceph_handle_notrace_create(dir, dentry);
+ err = ceph_handle_notrace_create(dir, dentry);
if (!err)
err = ceph_init_file(req->r_dentry->d_inode, file,
req->r_fmode);
inode->i_mode = le32_to_cpu(info->mode);
inode->i_uid = le32_to_cpu(info->uid);
inode->i_gid = le32_to_cpu(info->gid);
- dout(20, "%p mode 0%o uid.gid %d.%d\n", inode, inode->i_mode,
+ dout(20, "%p mode 0%o uid.gid %d.%d\n", inode, inode->i_mode,
inode->i_uid, inode->i_gid);
}
/* only track leases on regular dentries */
if (dentry->d_op != &ceph_dentry_ops)
- return;
-
+ return;
+
dout(10, "update_dentry_lease %p mask %d duration %lu ms ttl %lu\n",
dentry, le16_to_cpu(lease->mask), duration, ttl);
if (lease->mask == 0) {
{
/*
* 4 bytes for the length, and additional 4 bytes per each xattr name,
- * 4 bytes per each value
+ * 4 bytes per each value
*/
int size = 4 + ci->i_xattrs.count*(4 + 4) +
ci->i_xattrs.names_size +
ci->i_xattrs.vals_size;
dout(30, "__get_required_blob_size count=%d names.size=%d vals.size=%d\n", ci->i_xattrs.count, ci->i_xattrs.names_size,
- ci->i_xattrs.vals_size);
+ ci->i_xattrs.vals_size);
if (name_size)
size += 4 + 4 + name_size + val_size;
p = rb_next(p);
}
-
+
*xattrs_blob = ci->i_xattrs.prealloc_blob;
*blob_size = ci->i_xattrs.prealloc_size;
} else {
ceph_cap_string(issued),
ci->i_xattrs.version, ci->i_xattrs.index_version);
- if ((issued & CEPH_CAP_XATTR_SHARED) &&
+ if ((issued & CEPH_CAP_XATTR_SHARED) &&
(ci->i_xattrs.index_version >= ci->i_xattrs.version)) {
goto get_xattr;
} else {
ceph_cap_string(issued),
ci->i_xattrs.version, ci->i_xattrs.index_version);
- if ((issued & CEPH_CAP_XATTR_SHARED) &&
+ if ((issued & CEPH_CAP_XATTR_SHARED) &&
(ci->i_xattrs.index_version > ci->i_xattrs.version)) {
goto list_xattr;
} else {
/* cap releases */
releases = 0;
if (req->r_inode_drop)
- releases += ceph_encode_inode_release(&p,
+ releases += ceph_encode_inode_release(&p,
req->r_inode ? req->r_inode : req->r_dentry->d_inode,
mds, req->r_inode_drop, req->r_inode_unless);
if (req->r_dentry_drop)
dout(10, "handle_reply tid %lld result %d\n", tid, result);
/*
- * Tolerate 2 consecutive ESTALEs from the same mds.
+ * Tolerate 2 consecutive ESTALEs from the same mds.
* FIXME: we should be looking at the cap migrate_seq.
*/
if (result == -ESTALE) {
int r_old_dentry_drop, r_old_dentry_unless;
struct inode *r_old_inode;
int r_old_inode_drop, r_old_inode_unless;
-
+
struct inode *r_target_inode;
struct ceph_msg *r_request; /* original request */
struct ceph_client *client = con->msgr->parent;
int datacrc = !ceph_test_opt(client, NOCRC);
- dout(20, "read_partial_message con %p msg %p\n", con, m);
+ dout(20, "read_partial_message con %p msg %p\n", con, m);
/* header */
while (con->in_base_pos < sizeof(m->hdr)) {
p = kmap(m->pages[cur_page]);
printk("data page %d len %d\n", cur_page, left);
print_section("data", p, left);
-
+
kunmap(m->pages[0]);
mutex_unlock(&m->page_mutex);
}
/* statfs() is done a bit differently */
struct ceph_mon_statfs_request {
u64 tid;
- struct kobject kobj;
- struct ceph_mon_statfs_request_attr k_op, k_mon;
+ struct kobject kobj;
+ struct ceph_mon_statfs_request_attr k_op, k_mon;
int result;
struct ceph_statfs *buf;
struct completion completion;
dout(10, "__destroy_snap_realm %p %llx\n", realm, realm->ino);
radix_tree_delete(&mdsc->snap_realms, realm->ino);
-
+
if (realm->parent) {
list_del_init(&realm->child_item);
__put_snap_realm(mdsc, realm->parent);
}
-
+
kfree(realm->prior_parent_snaps);
kfree(realm->snaps);
ceph_put_snap_context(realm->cached_context);
}
}
-
+
dout(30, "mount opening root\n");
root = open_root_dentry(client, "", started);
if (IS_ERR(root)) {
goto out;
}
}
-
+
mnt->mnt_root = root;
mnt->mnt_sb = client->sb;
u64 follows;
int issued, dirty;
struct ceph_snap_context *context;
-
+
mode_t mode;
uid_t uid;
gid_t gid;