quota: add supprt for gfs2
authorBjörn Jacke <bj@sernet.de>
Tue, 18 Sep 2012 11:57:30 +0000 (13:57 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 27 Sep 2012 10:42:43 +0000 (12:42 +0200)
gfs2 uses the same generic quota interface as xfs and it has the same base
block/quota block size ratio and seems to work nice with the xfs quota module.

(People using gfs should be aware that quota reporting is lagging quite a bit
on gfs.  If you copy a file on a gfs volume the quota values are being updated
with a delay of 30s here with kernel 3.5. This reporting can lead to data
corruption if a client thinks he can write but actually he suddently can't.)
(cherry picked from commit 0b57d1c07520f4995412f224945324fef29f5989)

Fix bug #9172 - quota on gfs2 being reported wrong.

source3/lib/sysquotas.c

index 9fdf3a0472f1a40e7f4b1f51e1972e3f0531a058..a2bd81a79c33ffe64d21a8b18e2af0aded0c4af9 100644 (file)
@@ -176,6 +176,8 @@ static struct {
 } sys_quota_backends[] = {
 #ifdef HAVE_XFS_QUOTAS
        {"xfs", sys_get_xfs_quota,      sys_set_xfs_quota},
+       {"gfs", sys_get_xfs_quota,      sys_set_xfs_quota},
+       {"gfs2", sys_get_xfs_quota,     sys_set_xfs_quota},
 #endif /* HAVE_XFS_QUOTAS */
 #ifdef HAVE_NFS_QUOTAS
        {"nfs", sys_get_nfs_quota,      sys_set_nfs_quota},