Lines Matching defs:mdsc

15 	struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb);
17 atomic64_inc(&mdsc->quotarealms_count);
19 atomic64_dec(&mdsc->quotarealms_count);
25 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(sb);
28 if (atomic64_read(&mdsc->quotarealms_count) > 0)
37 void ceph_handle_quota(struct ceph_mds_client *mdsc,
41 struct super_block *sb = mdsc->fsc->sb;
82 find_quotarealm_inode(struct ceph_mds_client *mdsc, u64 ino)
87 mutex_lock(&mdsc->quotarealms_inodes_mutex);
88 node = &(mdsc->quotarealms_inodes.rb_node);
109 rb_insert_color(&qri->node, &mdsc->quotarealms_inodes);
113 mutex_unlock(&mdsc->quotarealms_inodes_mutex);
121 * maintained in the mdsc and freed only when the filesystem is umounted.
126 static struct inode *lookup_quotarealm_inode(struct ceph_mds_client *mdsc,
133 qri = find_quotarealm_inode(mdsc, realm->ino);
174 void ceph_cleanup_quotarealms_inodes(struct ceph_mds_client *mdsc)
181 * mdsc->quotarealms_inodes_mutex...
183 mutex_lock(&mdsc->quotarealms_inodes_mutex);
184 while (!RB_EMPTY_ROOT(&mdsc->quotarealms_inodes)) {
185 node = rb_first(&mdsc->quotarealms_inodes);
187 rb_erase(node, &mdsc->quotarealms_inodes);
191 mutex_unlock(&mdsc->quotarealms_inodes_mutex);
203 * Callers of this function need to hold mdsc->snap_rwsem. However, if there's
209 static struct ceph_snap_realm *get_quota_realm(struct ceph_mds_client *mdsc,
223 ceph_get_snap_realm(mdsc, realm);
237 up_read(&mdsc->snap_rwsem);
238 in = lookup_quotarealm_inode(mdsc, inode->i_sb, realm);
239 down_read(&mdsc->snap_rwsem);
242 ceph_put_snap_realm(mdsc, realm);
250 /* avoid calling iput_final() while holding mdsc->snap_rwsem */
257 ceph_get_snap_realm(mdsc, next);
258 ceph_put_snap_realm(mdsc, realm);
262 ceph_put_snap_realm(mdsc, realm);
269 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(old->i_sb);
280 down_read(&mdsc->snap_rwsem);
281 old_realm = get_quota_realm(mdsc, old, true);
282 new_realm = get_quota_realm(mdsc, new, false);
284 up_read(&mdsc->snap_rwsem);
286 ceph_put_snap_realm(mdsc, old_realm);
290 up_read(&mdsc->snap_rwsem);
293 ceph_put_snap_realm(mdsc, old_realm);
295 ceph_put_snap_realm(mdsc, new_realm);
316 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(inode->i_sb);
326 down_read(&mdsc->snap_rwsem);
330 ceph_get_snap_realm(mdsc, realm);
344 up_read(&mdsc->snap_rwsem);
345 in = lookup_quotarealm_inode(mdsc, inode->i_sb, realm);
346 down_read(&mdsc->snap_rwsem);
349 ceph_put_snap_realm(mdsc, realm);
386 /* avoid calling iput_final() while holding mdsc->snap_rwsem */
392 ceph_get_snap_realm(mdsc, next);
393 ceph_put_snap_realm(mdsc, realm);
397 ceph_put_snap_realm(mdsc, realm);
398 up_read(&mdsc->snap_rwsem);
478 struct ceph_mds_client *mdsc = fsc->mdsc;
485 down_read(&mdsc->snap_rwsem);
486 realm = get_quota_realm(mdsc, d_inode(fsc->sb->s_root), true);
487 up_read(&mdsc->snap_rwsem);
514 ceph_put_snap_realm(mdsc, realm);
521 * @mdsc: MDS client instance
533 int ceph_quota_check_rename(struct ceph_mds_client *mdsc,