diff options
Diffstat (limited to 'fs/gfs2/quota.c')
-rw-r--r-- | fs/gfs2/quota.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 6aaa6c5e21bc..e7114be7b449 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/gfs2_ondisk.h> | 47 | #include <linux/gfs2_ondisk.h> |
48 | #include <linux/kthread.h> | 48 | #include <linux/kthread.h> |
49 | #include <linux/freezer.h> | 49 | #include <linux/freezer.h> |
50 | #include <linux/dqblk_xfs.h> | ||
50 | 51 | ||
51 | #include "gfs2.h" | 52 | #include "gfs2.h" |
52 | #include "incore.h" | 53 | #include "incore.h" |
@@ -1375,7 +1376,29 @@ int gfs2_quotad(void *data) | |||
1375 | return 0; | 1376 | return 0; |
1376 | } | 1377 | } |
1377 | 1378 | ||
1379 | static int gfs2_quota_get_xstate(struct super_block *sb, | ||
1380 | struct fs_quota_stat *fqs) | ||
1381 | { | ||
1382 | struct gfs2_sbd *sdp = sb->s_fs_info; | ||
1383 | |||
1384 | memset(fqs, 0, sizeof(struct fs_quota_stat)); | ||
1385 | fqs->qs_version = FS_QSTAT_VERSION; | ||
1386 | if (sdp->sd_args.ar_quota == GFS2_QUOTA_ON) | ||
1387 | fqs->qs_flags = (XFS_QUOTA_UDQ_ENFD | XFS_QUOTA_GDQ_ENFD); | ||
1388 | else if (sdp->sd_args.ar_quota == GFS2_QUOTA_ACCOUNT) | ||
1389 | fqs->qs_flags = (XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_GDQ_ACCT); | ||
1390 | if (sdp->sd_quota_inode) { | ||
1391 | fqs->qs_uquota.qfs_ino = GFS2_I(sdp->sd_quota_inode)->i_no_addr; | ||
1392 | fqs->qs_uquota.qfs_nblks = sdp->sd_quota_inode->i_blocks; | ||
1393 | } | ||
1394 | fqs->qs_uquota.qfs_nextents = 1; /* unsupported */ | ||
1395 | fqs->qs_gquota = fqs->qs_uquota; /* its the same inode in both cases */ | ||
1396 | fqs->qs_incoredqs = atomic_read(&qd_lru_count); | ||
1397 | return 0; | ||
1398 | } | ||
1399 | |||
1378 | const struct quotactl_ops gfs2_quotactl_ops = { | 1400 | const struct quotactl_ops gfs2_quotactl_ops = { |
1379 | .quota_sync = gfs2_quota_sync, | 1401 | .quota_sync = gfs2_quota_sync, |
1402 | .get_xstate = gfs2_quota_get_xstate, | ||
1380 | }; | 1403 | }; |
1381 | 1404 | ||