Split -set_xstate callback into two callbacks - one for turning quotas
on (-quota_enable) and one for turning quotas off (-quota_disable). That
way we don't have to pass quotactl command into the callback which seems
cleaner.
Signed-off-by: Jan Kara j...@suse.cz
---
fs/quota/quota.c | 20
Hello,
this is another iteration of patches to unify VFS and XFS quota interfaces so
that XFS quotactls work for filesystems with VFS quotas and vice versa. This
is useful so that userspace doesn't have to care that much about which
filesystem it is using at least when using basic quota
Ext4 can just use the generic helpers provided by quota code for turning
quotas on and off when quota files are stored as system inodes. The only
difference is the feature test in ext4_quota_on_sysfile() but the same
is achieved in dquot_quota_enable() by checking whether usage tracking
for the
Create new internal interface for getting information about quota which
contains everything needed for both VFS quotas and XFS quotas. Make VFS
use this and hook it up to Q_GETINFO.
Signed-off-by: Jan Kara j...@suse.cz
---
fs/ext3/super.c | 2 +-
fs/ext4/super.c | 2 +-
There are no more users for quota_on_meta callback. Just remove it.
Signed-off-by: Jan Kara j...@suse.cz
---
fs/quota/quota.c | 5 +
include/linux/quota.h | 1 -
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/fs/quota/quota.c b/fs/quota/quota.c
index
Currently -get_dqblk() and -set_dqblk() use struct fs_disk_quota which
tracks space limits and usage in 512-byte blocks. However VFS quotas
track usage in bytes (as some filesystems require that) and we need to
somehow pass this information. Upto now it wasn't a problem because we
didn't do any
Add functions which translate -quota_enable / -quota_disable calls
into appropriate changes in VFS quota. This will enable filesystems
supporting VFS quota files in system inodes to be controlled via
Q_XQUOTA[ON|OFF] quotactls for better userspace compatibility.
Also provide a vector for quotactl
Ocfs2 can just use the generic helpers provided by quota code for
turning quotas on and off when quota files are stored as system inodes.
The only difference is the feature test in ocfs2_quota_on() and that is
covered by dquot_quota_enable() checking whether usage tracking is
enabled (which can
Make Q_QUOTAON / Q_QUOTAOFF quotactl call -quota_enable /
-quota_disable callback when provided. To match current behavior of
ocfs2 ext4 we make these quotactls turn on / off quota enforcement for
appropriate quota type.
Signed-off-by: Jan Kara j...@suse.cz
---
fs/quota/quota.c | 31
Add support to XFS so that time limits can be set through Q_SETINFO
quotactl.
Signed-off-by: Jan Kara j...@suse.cz
---
fs/xfs/xfs_qm.h | 2 ++
fs/xfs/xfs_qm_syscalls.c | 25 +
fs/xfs/xfs_quotaops.c| 16
3 files changed, 43 insertions(+)
Change -set_info to take new qc_info structure which contains all the
necessary information both for XFS and VFS. Convert Q_SETINFO handler
to use this structure.
Signed-off-by: Jan Kara j...@suse.cz
---
fs/quota/dquot.c | 27 ---
fs/quota/quota.c | 21
Currently maximum space limit quota format supports is in blocks however
since we store space limits in bytes, this is somewhat confusing. So
store the maximum limit in bytes as well. Also rename the field to match
the new unit and related inode field to match the new naming scheme.
Call -quota_sync method from Q_XQUOTASYNC for better userspace
compatibility.
Signed-off-by: Jan Kara j...@suse.cz
---
fs/quota/quota.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/quota/quota.c b/fs/quota/quota.c
index 2cc50b35a3b5..5ec04321aace 100644
---
Convert gfs2 to use -get_state callback instead of -get_xstate.
Signed-off-by: Jan Kara j...@suse.cz
---
fs/gfs2/quota.c | 28 +++-
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 3e193cb36996..aebfe50da6b1 100644
Setting timers or warning counts for id 0 via Q_XSETQLIM is used to
actually set time limits and warning limits for all users. Hook up
-set_info to this so that VFS quota time limits get set the same
way as XFS ones.
When doing this Q_XSETQLIM for XFS is effectively split into two
independent
Add appropriate conversion functions so that filesystems supporting
-get_state() method can be queried using Q_GETXSTATE and Q_GETXSTATV
calls.
Signed-off-by: Jan Kara j...@suse.cz
---
fs/quota/quota.c | 138 +--
1 file changed, 134
These callbacks are now unused. Remove them.
Signed-off-by: Jan Kara j...@suse.cz
---
fs/quota/quota.c | 14 --
include/linux/quota.h | 2 --
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/fs/quota/quota.c b/fs/quota/quota.c
index 7d04b95dfbbf..cb52a1d9c91a
Convert xfs to use -get_state callback instead of -get_xstate and
-get_xstatev.
Signed-off-by: Jan Kara j...@suse.cz
---
fs/xfs/xfs_qm.h | 6 +-
fs/xfs/xfs_qm_syscalls.c | 219 ---
fs/xfs/xfs_quotaops.c| 26 +-
3 files changed, 58
18 matches
Mail list logo