Home
last modified time | relevance | path

Searched refs:dquot (Results 1 – 25 of 29) sorted by relevance

12

/Linux-v5.4/fs/quota/
Ddquot.c275 static inline void insert_dquot_hash(struct dquot *dquot) in insert_dquot_hash() argument
278 head = dquot_hash + hashfn(dquot->dq_sb, dquot->dq_id); in insert_dquot_hash()
279 hlist_add_head(&dquot->dq_hash, head); in insert_dquot_hash()
282 static inline void remove_dquot_hash(struct dquot *dquot) in remove_dquot_hash() argument
284 hlist_del_init(&dquot->dq_hash); in remove_dquot_hash()
287 static struct dquot *find_dquot(unsigned int hashent, struct super_block *sb, in find_dquot()
291 struct dquot *dquot; in find_dquot() local
294 dquot = hlist_entry(node, struct dquot, dq_hash); in find_dquot()
295 if (dquot->dq_sb == sb && qid_eq(dquot->dq_id, qid)) in find_dquot()
296 return dquot; in find_dquot()
[all …]
Dquota_tree.c226 struct dquot *dquot, int *err) in find_free_dqentry() argument
255 mark_info_dirty(dquot->dq_sb, dquot->dq_id.type); in find_free_dqentry()
261 quota_error(dquot->dq_sb, "Can't remove block (%u) " in find_free_dqentry()
276 quota_error(dquot->dq_sb, "Data block full but it shouldn't"); in find_free_dqentry()
283 quota_error(dquot->dq_sb, "Can't write quota data block %u", in find_free_dqentry()
287 dquot->dq_off = (blk << info->dqi_blocksize_bits) + in find_free_dqentry()
298 static int do_insert_tree(struct qtree_mem_dqinfo *info, struct dquot *dquot, in do_insert_tree() argument
318 quota_error(dquot->dq_sb, "Can't read tree quota " in do_insert_tree()
324 newblk = le32_to_cpu(ref[get_index(info, dquot->dq_id, depth)]); in do_insert_tree()
330 quota_error(dquot->dq_sb, "Inserting already present " in do_insert_tree()
[all …]
Dquota_v2.c27 static void v2r0_mem2diskdqb(void *dp, struct dquot *dquot);
28 static void v2r0_disk2memdqb(struct dquot *dquot, void *dp);
29 static int v2r0_is_id(void *dp, struct dquot *dquot);
30 static void v2r1_mem2diskdqb(void *dp, struct dquot *dquot);
31 static void v2r1_disk2memdqb(struct dquot *dquot, void *dp);
32 static int v2r1_is_id(void *dp, struct dquot *dquot);
198 static void v2r0_disk2memdqb(struct dquot *dquot, void *dp) in v2r0_disk2memdqb() argument
201 struct mem_dqblk *m = &dquot->dq_dqb; in v2r0_disk2memdqb()
218 static void v2r0_mem2diskdqb(void *dp, struct dquot *dquot) in v2r0_mem2diskdqb() argument
221 struct mem_dqblk *m = &dquot->dq_dqb; in v2r0_mem2diskdqb()
[all …]
Dquota_v1.c56 static int v1_read_dqblk(struct dquot *dquot) in v1_read_dqblk() argument
58 int type = dquot->dq_id.type; in v1_read_dqblk()
60 struct quota_info *dqopt = sb_dqopt(dquot->dq_sb); in v1_read_dqblk()
67 dquot->dq_sb->s_op->quota_read(dquot->dq_sb, type, (char *)&dqblk, in v1_read_dqblk()
69 v1_dqoff(from_kqid(&init_user_ns, dquot->dq_id))); in v1_read_dqblk()
71 v1_disk2mem_dqblk(&dquot->dq_dqb, &dqblk); in v1_read_dqblk()
72 if (dquot->dq_dqb.dqb_bhardlimit == 0 && in v1_read_dqblk()
73 dquot->dq_dqb.dqb_bsoftlimit == 0 && in v1_read_dqblk()
74 dquot->dq_dqb.dqb_ihardlimit == 0 && in v1_read_dqblk()
75 dquot->dq_dqb.dqb_isoftlimit == 0) in v1_read_dqblk()
[all …]
DMakefile2 obj-$(CONFIG_QUOTA) += dquot.o
/Linux-v5.4/fs/ocfs2/
Dquota_global.c71 static void ocfs2_global_disk2memdqb(struct dquot *dquot, void *dp) in ocfs2_global_disk2memdqb() argument
74 struct mem_dqblk *m = &dquot->dq_dqb; in ocfs2_global_disk2memdqb()
77 if (!test_bit(DQ_LASTSET_B + QIF_ILIMITS_B, &dquot->dq_flags)) { in ocfs2_global_disk2memdqb()
81 if (!test_bit(DQ_LASTSET_B + QIF_INODES_B, &dquot->dq_flags)) in ocfs2_global_disk2memdqb()
83 if (!test_bit(DQ_LASTSET_B + QIF_BLIMITS_B, &dquot->dq_flags)) { in ocfs2_global_disk2memdqb()
87 if (!test_bit(DQ_LASTSET_B + QIF_SPACE_B, &dquot->dq_flags)) in ocfs2_global_disk2memdqb()
89 if (!test_bit(DQ_LASTSET_B + QIF_BTIME_B, &dquot->dq_flags)) in ocfs2_global_disk2memdqb()
91 if (!test_bit(DQ_LASTSET_B + QIF_ITIME_B, &dquot->dq_flags)) in ocfs2_global_disk2memdqb()
93 OCFS2_DQUOT(dquot)->dq_use_count = le32_to_cpu(d->dqb_use_count); in ocfs2_global_disk2memdqb()
96 static void ocfs2_global_mem2diskdqb(void *dp, struct dquot *dquot) in ocfs2_global_mem2diskdqb() argument
[all …]
Dquota.h28 struct dquot dq_dquot; /* Generic VFS dquot */
72 static inline struct ocfs2_dquot *OCFS2_DQUOT(struct dquot *dquot) in OCFS2_DQUOT() argument
74 return container_of(dquot, struct ocfs2_dquot, dq_dquot); in OCFS2_DQUOT()
100 int ocfs2_global_read_dquot(struct dquot *dquot);
101 int __ocfs2_sync_dquot(struct dquot *dquot, int freeing);
102 static inline int ocfs2_sync_dquot(struct dquot *dquot) in ocfs2_sync_dquot() argument
104 return __ocfs2_sync_dquot(dquot, 0); in ocfs2_sync_dquot()
106 static inline int ocfs2_global_release_dquot(struct dquot *dquot) in ocfs2_global_release_dquot() argument
108 return __ocfs2_sync_dquot(dquot, 1); in ocfs2_global_release_dquot()
116 int ocfs2_create_local_dquot(struct dquot *dquot);
[all …]
Dquota_local.c466 struct dquot *dquot; in ocfs2_recover_local_quota_file() local
498 dquot = dqget(sb, in ocfs2_recover_local_quota_file()
501 if (IS_ERR(dquot)) { in ocfs2_recover_local_quota_file()
502 status = PTR_ERR(dquot); in ocfs2_recover_local_quota_file()
524 spin_lock(&dquot->dq_dqb_lock); in ocfs2_recover_local_quota_file()
530 dquot->dq_dqb.dqb_curspace += spacechange; in ocfs2_recover_local_quota_file()
531 dquot->dq_dqb.dqb_curinodes += inodechange; in ocfs2_recover_local_quota_file()
532 spin_unlock(&dquot->dq_dqb_lock); in ocfs2_recover_local_quota_file()
536 status = ocfs2_global_release_dquot(dquot); in ocfs2_recover_local_quota_file()
561 dqput(dquot); in ocfs2_recover_local_quota_file()
[all …]
Dinode.h70 struct dquot *i_dquot[MAXQUOTAS];
Dsuper.c128 static struct dquot **ocfs2_get_dquots(struct inode *inode) in ocfs2_get_dquots()
Dfile.c1124 struct dquot *transfer_to[MAXQUOTAS] = { }; in ocfs2_setattr()
/Linux-v5.4/include/linux/
Ddqblk_qtree.h18 struct dquot;
23 …void (*mem2disk_dqblk)(void *disk, struct dquot *dquot); /* Convert given entry from in memory for…
24 …void (*disk2mem_dqblk)(struct dquot *dquot, void *disk); /* Convert given entry from disk format t…
25 int (*is_id)(void *disk, struct dquot *dquot); /* Is this structure for given id? */
42 int qtree_write_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot);
43 int qtree_read_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot);
44 int qtree_delete_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot);
45 int qtree_release_dquot(struct qtree_mem_dqinfo *info, struct dquot *dquot);
Dquotaops.h48 struct dquot *dqget(struct super_block *sb, struct kqid qid);
49 static inline struct dquot *dqgrab(struct dquot *dquot) in dqgrab() argument
52 WARN_ON_ONCE(!atomic_read(&dquot->dq_count)); in dqgrab()
53 WARN_ON_ONCE(!test_bit(DQ_ACTIVE_B, &dquot->dq_flags)); in dqgrab()
54 atomic_inc(&dquot->dq_count); in dqgrab()
55 return dquot; in dqgrab()
57 void dqput(struct dquot *dquot);
59 int (*fn)(struct dquot *dquot, unsigned long priv),
61 struct dquot *dquot_alloc(struct super_block *sb, int type);
62 void dquot_destroy(struct dquot *dquot);
[all …]
Dquota.h294 struct dquot { struct
315 int (*read_dqblk)(struct dquot *dquot); /* Read structure for one user */ argument
316 int (*commit_dqblk)(struct dquot *dquot); /* Write structure for one user */
317 …int (*release_dqblk)(struct dquot *dquot); /* Called when last reference to dquot is being dropped…
323 int (*write_dquot) (struct dquot *); /* Ordinary dquot write */
324 struct dquot *(*alloc_dquot)(struct super_block *, int); /* Allocate memory for new dquot */
325 void (*destroy_dquot)(struct dquot *); /* Free memory for dquot */
326 int (*acquire_dquot) (struct dquot *); /* Quota is going to be created on disk */
327 int (*release_dquot) (struct dquot *); /* Quota is going to be deleted from disk */
328 int (*mark_dirty) (struct dquot *); /* Dquot is marked dirty */
/Linux-v5.4/fs/reiserfs/
Dsuper.c804 static struct dquot **reiserfs_get_dquots(struct inode *inode) in reiserfs_get_dquots()
833 static int reiserfs_write_dquot(struct dquot *);
834 static int reiserfs_acquire_dquot(struct dquot *);
835 static int reiserfs_release_dquot(struct dquot *);
836 static int reiserfs_mark_dquot_dirty(struct dquot *);
2266 static int reiserfs_write_dquot(struct dquot *dquot) in reiserfs_write_dquot() argument
2272 reiserfs_write_lock(dquot->dq_sb); in reiserfs_write_dquot()
2274 journal_begin(&th, dquot->dq_sb, in reiserfs_write_dquot()
2275 REISERFS_QUOTA_TRANS_BLOCKS(dquot->dq_sb)); in reiserfs_write_dquot()
2278 depth = reiserfs_write_unlock_nested(dquot->dq_sb); in reiserfs_write_dquot()
[all …]
/Linux-v5.4/fs/f2fs/
Dsuper.c1206 struct dquot *dquot; in f2fs_statfs_project() local
1211 dquot = dqget(sb, qid); in f2fs_statfs_project()
1212 if (IS_ERR(dquot)) in f2fs_statfs_project()
1213 return PTR_ERR(dquot); in f2fs_statfs_project()
1214 spin_lock(&dquot->dq_dqb_lock); in f2fs_statfs_project()
1216 limit = (dquot->dq_dqb.dqb_bsoftlimit ? in f2fs_statfs_project()
1217 dquot->dq_dqb.dqb_bsoftlimit : in f2fs_statfs_project()
1218 dquot->dq_dqb.dqb_bhardlimit) >> sb->s_blocksize_bits; in f2fs_statfs_project()
1220 curblock = dquot->dq_dqb.dqb_curspace >> sb->s_blocksize_bits; in f2fs_statfs_project()
1227 limit = dquot->dq_dqb.dqb_isoftlimit ? in f2fs_statfs_project()
[all …]
/Linux-v5.4/fs/ext4/
Dsuper.c1362 static int ext4_write_dquot(struct dquot *dquot);
1363 static int ext4_acquire_dquot(struct dquot *dquot);
1364 static int ext4_release_dquot(struct dquot *dquot);
1365 static int ext4_mark_dquot_dirty(struct dquot *dquot);
1379 static struct dquot **ext4_get_dquots(struct inode *inode) in ext4_get_dquots()
5539 struct dquot *dquot; in ext4_statfs_project() local
5544 dquot = dqget(sb, qid); in ext4_statfs_project()
5545 if (IS_ERR(dquot)) in ext4_statfs_project()
5546 return PTR_ERR(dquot); in ext4_statfs_project()
5547 spin_lock(&dquot->dq_dqb_lock); in ext4_statfs_project()
[all …]
Dioctl.c441 struct dquot *transfer_to[MAXQUOTAS] = { }; in ext4_ioctl_setproject()
Dext4.h1088 struct dquot *i_dquot[MAXQUOTAS];
/Linux-v5.4/Documentation/admin-guide/sysctl/
Dfs.rst32 - dquot-max
33 - dquot-nr
94 dquot-max & dquot-nr
97 The file dquot-max shows the maximum number of cached disk
100 The file dquot-nr shows the number of allocated disk quota
/Linux-v5.4/fs/jfs/
Djfs_incore.h88 struct dquot *i_dquot[MAXQUOTAS];
Dsuper.c835 static struct dquot **jfs_get_dquots(struct inode *inode) in jfs_get_dquots()
/Linux-v5.4/Documentation/filesystems/
Dlocking.rst573 int (*write_dquot) (struct dquot *);
574 int (*acquire_dquot) (struct dquot *);
575 int (*release_dquot) (struct dquot *);
576 int (*mark_dirty) (struct dquot *);
597 More details about quota locking can be found in fs/dquot.c.
/Linux-v5.4/fs/ext2/
Dext2.h687 struct dquot *i_dquot[MAXQUOTAS];
Dsuper.c329 static struct dquot **ext2_get_dquots(struct inode *inode) in ext2_get_dquots()

12