From c3a392437a2ec4793f2b1112058de0c3b459b6fe Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Thu, 5 May 2011 16:14:07 +0200 Subject: Implement repquota for filesystems without quota files Some filesystem do not have quota files accessible from userspace. For these implementing ->scan_dquots() used by repquota is problematic. What we do is that we iterate over all users and ask for quota information for each of them. XFS already does this so make its code generic and use it for all filesystems using quotaio_meta.c - only OCFS2 these days. Signed-off-by: Jan Kara --- quotaio_meta.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'quotaio_meta.c') diff --git a/quotaio_meta.c b/quotaio_meta.c index f1f714f..e52b4f4 100644 --- a/quotaio_meta.c +++ b/quotaio_meta.c @@ -53,9 +53,15 @@ static int meta_commit_dquot(struct dquot *dquot, int flags) return vfs_set_dquot(dquot, flags); } +static int meta_scan_dquots(struct quota_handle *h, int (*process_dquot)(struct dquot *dquot, char *dqname)) +{ + return generic_scan_dquots(h, process_dquot, vfs_get_dquot); +} + struct quotafile_ops quotafile_ops_meta = { init_io: meta_init_io, write_info: meta_write_info, read_dquot: meta_read_dquot, commit_dquot: meta_commit_dquot, +scan_dquots: meta_scan_dquots, }; -- cgit v1.2.3