mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
quota: unify ->set_dqblk
Pass the larger struct fs_disk_quota to the ->set_dqblk operation so that the Q_SETQUOTA and Q_XSETQUOTA operations can be implemented with a single filesystem operation and we can retire the ->set_xquota operation. The additional information (RT-subvolume accounting and warn counts) are left zero for the VFS quota implementation. Add new fieldmask values for setting the numer of blocks and inodes values which is required for the VFS quota, but wasn't for XFS. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
b9b2dd36c1
commit
c472b43275
8 changed files with 98 additions and 40 deletions
|
|
@ -109,6 +109,15 @@ typedef struct fs_disk_quota {
|
|||
#define FS_DQ_RTBWARNS (1<<11)
|
||||
#define FS_DQ_WARNS_MASK (FS_DQ_BWARNS | FS_DQ_IWARNS | FS_DQ_RTBWARNS)
|
||||
|
||||
/*
|
||||
* Accounting values. These can only be set for filesystem with
|
||||
* non-transactional quotas that require quotacheck(8) in userspace.
|
||||
*/
|
||||
#define FS_DQ_BCOUNT (1<<12)
|
||||
#define FS_DQ_ICOUNT (1<<13)
|
||||
#define FS_DQ_RTBCOUNT (1<<14)
|
||||
#define FS_DQ_ACCT_MASK (FS_DQ_BCOUNT | FS_DQ_ICOUNT | FS_DQ_RTBCOUNT)
|
||||
|
||||
/*
|
||||
* Various flags related to quotactl(2). Only relevant to XFS filesystems.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -338,10 +338,9 @@ struct quotactl_ops {
|
|||
int (*get_info)(struct super_block *, int, struct if_dqinfo *);
|
||||
int (*set_info)(struct super_block *, int, struct if_dqinfo *);
|
||||
int (*get_dqblk)(struct super_block *, int, qid_t, struct fs_disk_quota *);
|
||||
int (*set_dqblk)(struct super_block *, int, qid_t, struct if_dqblk *);
|
||||
int (*set_dqblk)(struct super_block *, int, qid_t, struct fs_disk_quota *);
|
||||
int (*get_xstate)(struct super_block *, struct fs_quota_stat *);
|
||||
int (*set_xstate)(struct super_block *, unsigned int, int);
|
||||
int (*set_xquota)(struct super_block *, int, qid_t, struct fs_disk_quota *);
|
||||
};
|
||||
|
||||
struct quota_format_type {
|
||||
|
|
|
|||
|
|
@ -65,7 +65,8 @@ int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
|
|||
int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
|
||||
int vfs_get_dqblk(struct super_block *sb, int type, qid_t id,
|
||||
struct fs_disk_quota *di);
|
||||
int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di);
|
||||
int vfs_set_dqblk(struct super_block *sb, int type, qid_t id,
|
||||
struct fs_disk_quota *di);
|
||||
|
||||
int dquot_transfer(struct inode *inode, struct iattr *iattr);
|
||||
int vfs_dq_quota_on_remount(struct super_block *sb);
|
||||
|
|
|
|||
Loading…
Reference in a new issue