/Linux-v6.6/fs/quota/ |
D | dquot.c | 289 static inline void insert_dquot_hash(struct dquot *dquot) in insert_dquot_hash() argument 292 head = dquot_hash + hashfn(dquot->dq_sb, dquot->dq_id); in insert_dquot_hash() 293 hlist_add_head(&dquot->dq_hash, head); in insert_dquot_hash() 296 static inline void remove_dquot_hash(struct dquot *dquot) in remove_dquot_hash() argument 298 hlist_del_init(&dquot->dq_hash); in remove_dquot_hash() 301 static struct dquot *find_dquot(unsigned int hashent, struct super_block *sb, in find_dquot() 304 struct dquot *dquot; in find_dquot() local 306 hlist_for_each_entry(dquot, dquot_hash+hashent, dq_hash) in find_dquot() 307 if (dquot->dq_sb == sb && qid_eq(dquot->dq_id, qid)) in find_dquot() 308 return dquot; in find_dquot() [all …]
|
D | quota_tree.c | 254 struct dquot *dquot, int *err) in find_free_dqentry() argument 286 mark_info_dirty(dquot->dq_sb, dquot->dq_id.type); in find_free_dqentry() 292 quota_error(dquot->dq_sb, "Can't remove block (%u) " in find_free_dqentry() 307 quota_error(dquot->dq_sb, "Data block full but it shouldn't"); in find_free_dqentry() 314 quota_error(dquot->dq_sb, "Can't write quota data block %u", in find_free_dqentry() 318 dquot->dq_off = ((loff_t)blk << info->dqi_blocksize_bits) + in find_free_dqentry() 329 static int do_insert_tree(struct qtree_mem_dqinfo *info, struct dquot *dquot, in do_insert_tree() argument 349 quota_error(dquot->dq_sb, "Can't read tree quota " in do_insert_tree() 355 newblk = le32_to_cpu(ref[get_index(info, dquot->dq_id, depth)]); in do_insert_tree() 356 ret = do_check_range(dquot->dq_sb, "block", newblk, 0, in do_insert_tree() [all …]
|
D | quota_v2.c | 25 static void v2r0_mem2diskdqb(void *dp, struct dquot *dquot); 26 static void v2r0_disk2memdqb(struct dquot *dquot, void *dp); 27 static int v2r0_is_id(void *dp, struct dquot *dquot); 28 static void v2r1_mem2diskdqb(void *dp, struct dquot *dquot); 29 static void v2r1_disk2memdqb(struct dquot *dquot, void *dp); 30 static int v2r1_is_id(void *dp, struct dquot *dquot); 220 static void v2r0_disk2memdqb(struct dquot *dquot, void *dp) in v2r0_disk2memdqb() argument 223 struct mem_dqblk *m = &dquot->dq_dqb; in v2r0_disk2memdqb() 240 static void v2r0_mem2diskdqb(void *dp, struct dquot *dquot) in v2r0_mem2diskdqb() argument 243 struct mem_dqblk *m = &dquot->dq_dqb; in v2r0_mem2diskdqb() [all …]
|
D | quota_v1.c | 56 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 …]
|
D | Makefile | 2 obj-$(CONFIG_QUOTA) += dquot.o
|
/Linux-v6.6/fs/ocfs2/ |
D | quota_global.c | 71 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 …]
|
D | quota.h | 28 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 …]
|
D | quota_local.c | 466 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 …]
|
D | inode.h | 68 struct dquot *i_dquot[MAXQUOTAS];
|
D | super.c | 125 static struct dquot **ocfs2_get_dquots(struct inode *inode) in ocfs2_get_dquots()
|
/Linux-v6.6/mm/ |
D | shmem_quota.c | 165 static int shmem_acquire_dquot(struct dquot *dquot) in shmem_acquire_dquot() argument 167 struct mem_dqinfo *info = sb_dqinfo(dquot->dq_sb, dquot->dq_id.type); in shmem_acquire_dquot() 169 struct shmem_sb_info *sbinfo = dquot->dq_sb->s_fs_info; in shmem_acquire_dquot() 172 qid_t id = from_kqid(&init_user_ns, dquot->dq_id); in shmem_acquire_dquot() 173 struct quota_info *dqopt = sb_dqopt(dquot->dq_sb); in shmem_acquire_dquot() 176 mutex_lock(&dquot->dq_lock); in shmem_acquire_dquot() 199 if (dquot->dq_id.type == USRQUOTA) { in shmem_acquire_dquot() 202 } else if (dquot->dq_id.type == GRPQUOTA) { in shmem_acquire_dquot() 214 spin_lock(&dquot->dq_dqb_lock); in shmem_acquire_dquot() 215 dquot->dq_dqb.dqb_bhardlimit = entry->bhardlimit; in shmem_acquire_dquot() [all …]
|
/Linux-v6.6/include/linux/ |
D | dqblk_qtree.h | 18 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);
|
D | quotaops.h | 46 struct dquot *dqget(struct super_block *sb, struct kqid qid); 47 static inline struct dquot *dqgrab(struct dquot *dquot) in dqgrab() argument 50 WARN_ON_ONCE(!atomic_read(&dquot->dq_count)); in dqgrab() 51 WARN_ON_ONCE(!test_bit(DQ_ACTIVE_B, &dquot->dq_flags)); in dqgrab() 52 atomic_inc(&dquot->dq_count); in dqgrab() 53 return dquot; in dqgrab() 56 static inline bool dquot_is_busy(struct dquot *dquot) in dquot_is_busy() argument 58 if (test_bit(DQ_MOD_B, &dquot->dq_flags)) in dquot_is_busy() 60 if (atomic_read(&dquot->dq_count) > 0) in dquot_is_busy() 65 void dqput(struct dquot *dquot); [all …]
|
D | quota.h | 296 struct dquot { struct 317 int (*read_dqblk)(struct dquot *dquot); /* Read structure for one user */ argument 318 int (*commit_dqblk)(struct dquot *dquot); /* Write structure for one user */ 319 …int (*release_dqblk)(struct dquot *dquot); /* Called when last reference to dquot is being dropped… 325 int (*write_dquot) (struct dquot *); /* Ordinary dquot write */ 326 struct dquot *(*alloc_dquot)(struct super_block *, int); /* Allocate memory for new dquot */ 327 void (*destroy_dquot)(struct dquot *); /* Free memory for dquot */ 328 int (*acquire_dquot) (struct dquot *); /* Quota is going to be created on disk */ 329 int (*release_dquot) (struct dquot *); /* Quota is going to be deleted from disk */ 330 int (*mark_dirty) (struct dquot *); /* Dquot is marked dirty */
|
D | shmem_fs.h | 35 struct dquot *i_dquot[MAXQUOTAS];
|
/Linux-v6.6/fs/reiserfs/ |
D | super.c | 805 static struct dquot **reiserfs_get_dquots(struct inode *inode) in reiserfs_get_dquots() 834 static int reiserfs_write_dquot(struct dquot *); 835 static int reiserfs_acquire_dquot(struct dquot *); 836 static int reiserfs_release_dquot(struct dquot *); 837 static int reiserfs_mark_dquot_dirty(struct dquot *); 2268 static int reiserfs_write_dquot(struct dquot *dquot) in reiserfs_write_dquot() argument 2274 reiserfs_write_lock(dquot->dq_sb); in reiserfs_write_dquot() 2276 journal_begin(&th, dquot->dq_sb, in reiserfs_write_dquot() 2277 REISERFS_QUOTA_TRANS_BLOCKS(dquot->dq_sb)); in reiserfs_write_dquot() 2280 depth = reiserfs_write_unlock_nested(dquot->dq_sb); in reiserfs_write_dquot() [all …]
|
/Linux-v6.6/fs/ext4/ |
D | super.c | 1581 static int ext4_write_dquot(struct dquot *dquot); 1582 static int ext4_acquire_dquot(struct dquot *dquot); 1583 static int ext4_release_dquot(struct dquot *dquot); 1584 static int ext4_mark_dquot_dirty(struct dquot *dquot); 1595 static struct dquot **ext4_get_dquots(struct inode *inode) in ext4_get_dquots() 6755 struct dquot *dquot; in ext4_statfs_project() local 6760 dquot = dqget(sb, qid); in ext4_statfs_project() 6761 if (IS_ERR(dquot)) in ext4_statfs_project() 6762 return PTR_ERR(dquot); in ext4_statfs_project() 6763 spin_lock(&dquot->dq_dqb_lock); in ext4_statfs_project() [all …]
|
D | ioctl.c | 712 struct dquot *transfer_to[MAXQUOTAS] = { }; in ext4_ioctl_setproject()
|
/Linux-v6.6/fs/f2fs/ |
D | super.c | 1751 struct dquot *dquot; in f2fs_statfs_project() local 1756 dquot = dqget(sb, qid); in f2fs_statfs_project() 1757 if (IS_ERR(dquot)) in f2fs_statfs_project() 1758 return PTR_ERR(dquot); in f2fs_statfs_project() 1759 spin_lock(&dquot->dq_dqb_lock); in f2fs_statfs_project() 1761 limit = min_not_zero(dquot->dq_dqb.dqb_bsoftlimit, in f2fs_statfs_project() 1762 dquot->dq_dqb.dqb_bhardlimit); in f2fs_statfs_project() 1767 curblock = (dquot->dq_dqb.dqb_curspace + in f2fs_statfs_project() 1768 dquot->dq_dqb.dqb_rsvspace) >> sb->s_blocksize_bits; in f2fs_statfs_project() 1775 limit = min_not_zero(dquot->dq_dqb.dqb_isoftlimit, in f2fs_statfs_project() [all …]
|
/Linux-v6.6/fs/jfs/ |
D | jfs_incore.h | 95 struct dquot *i_dquot[MAXQUOTAS];
|
D | super.c | 827 static struct dquot **jfs_get_dquots(struct inode *inode) in jfs_get_dquots()
|
/Linux-v6.6/Documentation/filesystems/ |
D | locking.rst | 607 int (*write_dquot) (struct dquot *); 608 int (*acquire_dquot) (struct dquot *); 609 int (*release_dquot) (struct dquot *); 610 int (*mark_dirty) (struct dquot *); 631 More details about quota locking can be found in fs/dquot.c.
|
D | xfs-online-fsck-design.rst | 552 and commit those changes to a dquot side file when the transaction commits. 3346 8. Incore dquot references, if a file is being repaired. 3624 Add each file's resource usage to the incore dquot. 3626 3. Walk each incore dquot. 3627 If the incore dquot is not being flushed, add the ondisk buffer backing the 3628 incore dquot to a delayed write (delwri) list. 3635 Therefore, online quotacheck records file resource usage to a shadow dquot 3643 2. For each dquot attached to the file: 3645 a. The dquot is locked. 3647 b. A quota reservation is added to the dquot's resource usage. [all …]
|
/Linux-v6.6/fs/ext2/ |
D | ext2.h | 677 struct dquot *i_dquot[MAXQUOTAS];
|
D | super.c | 323 static struct dquot **ext2_get_dquots(struct inode *inode) in ext2_get_dquots()
|