• Home
  • Raw
  • Download

Lines Matching refs:type

253 static void __dquot_initialize(struct inode *inode, int type);
256 hashfn(const struct super_block *sb, unsigned int id, int type) in hashfn() argument
260 tmp = (((unsigned long)sb>>L1_CACHE_SHIFT) ^ id) * (MAXQUOTAS - type); in hashfn()
280 unsigned int id, int type) in find_dquot() argument
288 dquot->dq_type == type) in find_dquot()
395 void mark_info_dirty(struct super_block *sb, int type) in mark_info_dirty() argument
397 set_bit(DQF_INFO_DIRTY_B, &sb_dqopt(sb)->info[type].dqi_flags); in mark_info_dirty()
515 static void invalidate_dquots(struct super_block *sb, int type) in invalidate_dquots() argument
524 if (dquot->dq_type != type) in invalidate_dquots()
598 int dquot_quota_sync(struct super_block *sb, int type, int wait) in dquot_quota_sync() argument
607 if (type != -1 && cnt != type) in dquot_quota_sync()
635 if ((cnt == type || type == -1) && sb_has_quota_active(sb, cnt) in dquot_quota_sync()
657 if (type != -1 && cnt != type) in dquot_quota_sync()
780 struct dquot *dquot_alloc(struct super_block *sb, int type) in dquot_alloc() argument
786 static struct dquot *get_empty_dquot(struct super_block *sb, int type) in get_empty_dquot() argument
790 dquot = sb->dq_op->alloc_dquot(sb, type); in get_empty_dquot()
801 dquot->dq_type = type; in get_empty_dquot()
815 struct dquot *dqget(struct super_block *sb, unsigned int id, int type) in dqget() argument
817 unsigned int hashent = hashfn(sb, id, type); in dqget()
820 if (!sb_has_quota_active(sb, type)) in dqget()
825 if (!sb_has_quota_active(sb, type)) { in dqget()
832 dquot = find_dquot(hashent, sb, id, type); in dqget()
836 empty = get_empty_dquot(sb, type); in dqget()
879 static int dqinit_needed(struct inode *inode, int type) in dqinit_needed() argument
885 if (type != -1) in dqinit_needed()
886 return !inode->i_dquot[type]; in dqinit_needed()
894 static void add_dquot_ref(struct super_block *sb, int type) in add_dquot_ref() argument
906 !dqinit_needed(inode, type)) { in add_dquot_ref()
919 __dquot_initialize(inode, type); in add_dquot_ref()
960 static int remove_inode_dquot_ref(struct inode *inode, int type, in remove_inode_dquot_ref() argument
963 struct dquot *dquot = inode->i_dquot[type]; in remove_inode_dquot_ref()
965 inode->i_dquot[type] = NULL; in remove_inode_dquot_ref()
1007 static void remove_dquot_ref(struct super_block *sb, int type, in remove_dquot_ref() argument
1024 remove_inode_dquot_ref(inode, type, tofree_head); in remove_dquot_ref()
1038 static void drop_dquot_ref(struct super_block *sb, int type) in drop_dquot_ref() argument
1044 remove_dquot_ref(sb, type, &tofree_head); in drop_dquot_ref()
1374 static void __dquot_initialize(struct inode *inode, int type) in __dquot_initialize() argument
1390 if (type != -1 && cnt != type) in __dquot_initialize()
1407 if (type != -1 && cnt != type) in __dquot_initialize()
1897 int dquot_commit_info(struct super_block *sb, int type) in dquot_commit_info() argument
1903 ret = dqopt->ops[type]->write_file_info(sb, type); in dquot_commit_info()
1940 int dquot_disable(struct super_block *sb, int type, unsigned int flags) in dquot_disable() argument
1967 if (type != -1 && cnt != type) in dquot_disable()
2072 int dquot_quota_off(struct super_block *sb, int type) in dquot_quota_off() argument
2074 return dquot_disable(sb, type, in dquot_quota_off()
2087 static int vfs_load_quota_inode(struct inode *inode, int type, int format_id, in vfs_load_quota_inode() argument
2127 if (sb_has_quota_loaded(sb, type)) { in vfs_load_quota_inode()
2149 dqopt->files[type] = igrab(inode); in vfs_load_quota_inode()
2150 if (!dqopt->files[type]) in vfs_load_quota_inode()
2153 if (!fmt->qf_ops->check_quota_file(sb, type)) in vfs_load_quota_inode()
2156 dqopt->ops[type] = fmt->qf_ops; in vfs_load_quota_inode()
2157 dqopt->info[type].dqi_format = fmt; in vfs_load_quota_inode()
2158 dqopt->info[type].dqi_fmt_id = format_id; in vfs_load_quota_inode()
2159 INIT_LIST_HEAD(&dqopt->info[type].dqi_dirty_list); in vfs_load_quota_inode()
2161 error = dqopt->ops[type]->read_file_info(sb, type); in vfs_load_quota_inode()
2167 dqopt->info[type].dqi_flags |= DQF_SYS_FILE; in vfs_load_quota_inode()
2170 dqopt->flags |= dquot_state_flag(flags, type); in vfs_load_quota_inode()
2173 add_dquot_ref(sb, type); in vfs_load_quota_inode()
2179 dqopt->files[type] = NULL; in vfs_load_quota_inode()
2198 int dquot_resume(struct super_block *sb, int type) in dquot_resume() argument
2206 if (type != -1 && cnt != type) in dquot_resume()
2234 int dquot_quota_on(struct super_block *sb, int type, int format_id, in dquot_quota_on() argument
2244 error = vfs_load_quota_inode(path->dentry->d_inode, type, in dquot_quota_on()
2255 int dquot_enable(struct inode *inode, int type, int format_id, in dquot_enable() argument
2268 if (sb_has_quota_loaded(sb, type)) { in dquot_enable()
2271 if (!sb_has_quota_loaded(sb, type)) { in dquot_enable()
2276 sb_has_quota_usage_enabled(sb, type)) { in dquot_enable()
2281 sb_has_quota_limits_enabled(sb, type)) { in dquot_enable()
2286 sb_dqopt(sb)->flags |= dquot_state_flag(flags, type); in dquot_enable()
2294 return vfs_load_quota_inode(inode, type, format_id, flags); in dquot_enable()
2303 int format_id, int type) in dquot_quota_on_mount() argument
2321 error = vfs_load_quota_inode(dentry->d_inode, type, format_id, in dquot_quota_on_mount()
2363 int dquot_get_dqblk(struct super_block *sb, int type, qid_t id, in dquot_get_dqblk() argument
2368 dquot = dqget(sb, id, type); in dquot_get_dqblk()
2475 int dquot_set_dqblk(struct super_block *sb, int type, qid_t id, in dquot_set_dqblk() argument
2481 dquot = dqget(sb, id, type); in dquot_set_dqblk()
2494 int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii) in dquot_get_dqinfo() argument
2499 if (!sb_has_quota_active(sb, type)) { in dquot_get_dqinfo()
2503 mi = sb_dqopt(sb)->info + type; in dquot_get_dqinfo()
2516 int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii) in dquot_set_dqinfo() argument
2522 if (!sb_has_quota_active(sb, type)) { in dquot_set_dqinfo()
2526 mi = sb_dqopt(sb)->info + type; in dquot_set_dqinfo()
2536 mark_info_dirty(sb, type); in dquot_set_dqinfo()
2538 sb->dq_op->write_info(sb, type); in dquot_set_dqinfo()
2559 unsigned int type = (int *)table->data - dqstats.stat; in do_proc_dqstats() local
2562 dqstats.stat[type] = in do_proc_dqstats()
2563 percpu_counter_sum_positive(&dqstats.counter[type]); in do_proc_dqstats()