File: [Development] / linux-2.4-xfs / split-patches / quota-delalloc (download)
Revision 1.2, Tue Aug 15 16:59:39 2006 UTC (11 years, 2 months ago) by nathans.longdrop.melbourne.sgi.com
Branch: MAIN
CVS Tags: HEAD Changes since 1.1: +0 -0
lines
Merge up to 2.4.33.
Merge of 2.4.x-xfs-melb:linux:26774a by kenmcd.
|
Index: 2.4.x-xfs/include/linux/dqblk_xfs.h
===================================================================
--- 2.4.x-xfs.orig/include/linux/dqblk_xfs.h 2005-06-06 12:41:17.370202431 +1000
+++ 2.4.x-xfs/include/linux/dqblk_xfs.h 2005-09-16 09:48:00.703626285 +1000
@@ -41,6 +41,7 @@
#define Q_XSETQLIM XQM_CMD(4) /* set disk limits */
#define Q_XGETQSTAT XQM_CMD(5) /* get quota subsystem status */
#define Q_XQUOTARM XQM_CMD(6) /* free disk space used by dquots */
+#define Q_XQUOTASYNC XQM_CMD(7) /* delalloc flush, updates dquots */
/*
* fs_disk_quota structure:
Index: 2.4.x-xfs/fs/quota.c
===================================================================
--- 2.4.x-xfs.orig/fs/quota.c 2005-06-06 12:41:17.369225868 +1000
+++ 2.4.x-xfs/fs/quota.c 2005-09-16 09:49:21.801704184 +1000
@@ -75,6 +75,10 @@
if (!sb->s_qcop->get_xquota)
return -ENOSYS;
break;
+ case Q_XQUOTASYNC:
+ if (!sb->s_qcop->quota_sync)
+ return -ENOSYS;
+ break;
default:
return -EINVAL;
}
@@ -97,9 +101,11 @@
!capable(CAP_SYS_ADMIN))
return -EPERM;
}
- else if (cmd != Q_GETFMT && cmd != Q_SYNC && cmd != Q_GETINFO && cmd != Q_XGETQSTAT)
+ else if (cmd != Q_GETFMT && cmd != Q_SYNC && cmd != Q_GETINFO &&
+ cmd != Q_XGETQSTAT && cmd != Q_XQUOTASYNC) {
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
+ }
return 0;
}
@@ -229,6 +235,8 @@
return -EFAULT;
return 0;
}
+ case Q_XQUOTASYNC:
+ return sb->s_qcop->quota_sync(sb, type);
/* We never reach here unless validity check is broken */
default:
BUG();