rpms/quota/F-13 quota-3.17-add-gfs2-support.patch, NONE, 1.1 quota.spec, 1.59, 1.60
Petr Pisar
ppisar at fedoraproject.org
Tue May 11 12:13:38 UTC 2010
- Previous message: rpms/emacs/F-13 emacs-23.2-m17ncheck.patch, NONE, 1.1 .cvsignore, 1.30, 1.31 emacs.spec, 1.160, 1.161 sources, 1.32, 1.33
- Next message: rpms/emacs/devel emacs.spec,1.167,1.168
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ppisar
Update of /cvs/pkgs/rpms/quota/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv26592
Modified Files:
quota.spec
Added Files:
quota-3.17-add-gfs2-support.patch
Log Message:
Add GFS2 support
quota-3.17-add-gfs2-support.patch:
mntopt.h | 1 +
quotacheck.c | 4 +++-
quotaio.c | 3 ++-
quotaon.c | 8 ++++++--
quotasys.c | 6 ++++--
5 files changed, 16 insertions(+), 6 deletions(-)
--- NEW FILE quota-3.17-add-gfs2-support.patch ---
Backport of patch from #547748 that is already in upstream.
Original patch adds some GFS checks to XFS checks in create_handle_list(),
but current RHEL-6 does not contain the checks for fro XFS. So ommiting them.
diff --git a/mntopt.h b/mntopt.h
index ee375c4..1730340 100644
--- a/mntopt.h
+++ b/mntopt.h
@@ -18,6 +18,7 @@
#define MNTTYPE_NFS4 "nfs4" /* NFSv4 filesystem */
#define MNTTYPE_MPFS "mpfs" /* EMC Celerra MPFS filesystem */
#define MNTTYPE_OCFS2 "ocfs2" /* Oracle Cluster filesystem */
+#define MNTTYPE_GFS2 "gfs2" /* Red Hat Global filesystem 2 */
/* mount options */
#define MNTOPT_NOQUOTA "noquota" /* don't enforce quota */
diff --git a/quotacheck.c b/quotacheck.c
index b5f7e2e..3c56eee 100644
--- a/quotacheck.c
+++ b/quotacheck.c
@@ -1048,7 +1048,9 @@ static void check_all(void)
while ((mnt = get_next_mount())) {
if (flags & FL_ALL && flags & FL_NOROOT && !strcmp(mnt->mnt_dir, "/"))
continue;
- if (!strcmp(mnt->mnt_type, MNTTYPE_XFS) || nfs_fstype(mnt->mnt_type) ||
+ if (!strcmp(mnt->mnt_type, MNTTYPE_XFS) ||
+ !strcmp(mnt->mnt_type, MNTTYPE_GFS2) ||
+ nfs_fstype(mnt->mnt_type) ||
meta_qf_fstype(mnt->mnt_type)) {
debug(FL_DEBUG | FL_VERBOSE, _("Skipping %s [%s]\n"), mnt->mnt_fsname, mnt->mnt_dir);
continue;
diff --git a/quotaio.c b/quotaio.c
index d74a37d..0dd8324 100644
--- a/quotaio.c
+++ b/quotaio.c
@@ -73,7 +73,8 @@ struct quota_handle *init_io(struct mntent *mnt, int type, int fmt, int flags)
#endif
}
- if (!strcmp(mnt->mnt_type, MNTTYPE_XFS)) { /* XFS filesystem? */
+ if (!strcmp(mnt->mnt_type, MNTTYPE_XFS) || /* XFS filesystem? */
+ !strcmp(mnt->mnt_type, MNTTYPE_GFS2)) { /* XFS filesystem? */
if (fmt != -1 && fmt != QF_XFS) { /* User wanted some other format? */
errstr(_("Only XFS quota format is allowed on XFS filesystem.\n"));
goto out_handle;
diff --git a/quotaon.c b/quotaon.c
index eafadef..0e6e363 100644
--- a/quotaon.c
+++ b/quotaon.c
@@ -163,7 +163,10 @@ static int newstate(struct mntent *mnt, int type, char *extra)
if (flags & FL_ALL)
sflags |= STATEFLAG_ALL;
- if (!strcmp(mnt->mnt_type, MNTTYPE_XFS)) { /* XFS filesystem has special handling... */
+ if (!strcmp(mnt->mnt_type, MNTTYPE_GFS2)) {
+ errstr(_("Cannot change state of GFS2 quota.\n"));
+ return 1;
+ } else if (!strcmp(mnt->mnt_type, MNTTYPE_XFS)) { /* XFS filesystem has special handling... */
if (!(kernel_formats & (1 << QF_XFS))) {
errstr(_("Cannot change state of XFS quota. It's not compiled in kernel.\n"));
return 1;
@@ -200,7 +203,8 @@ static int print_state(struct mntent *mnt, int type)
{
int on = 0;
- if (!strcmp(mnt->mnt_type, MNTTYPE_XFS)) {
+ if (!strcmp(mnt->mnt_type, MNTTYPE_XFS) ||
+ !strcmp(mnt->mnt_type, MNTTYPE_GFS2)) {
if (kernel_formats & (1 << QF_XFS))
on = kern_quota_on(mnt->mnt_fsname, type, 1 << QF_XFS) != -1;
}
diff --git a/quotasys.c b/quotasys.c
index 9a7f440..2ec23c4 100644
--- a/quotasys.c
+++ b/quotasys.c
@@ -82,7 +82,8 @@ static int correct_fstype(char *type)
!strcmp(type, MNTTYPE_NFS) ||
!strcmp(type, MNTTYPE_NFS4) ||
!strcmp(type, MNTTYPE_OCFS2) ||
- !strcmp(type, MNTTYPE_MPFS)) {
+ !strcmp(type, MNTTYPE_MPFS) ||
+ !strcmp(type, MNTTYPE_GFS2)) {
free(mtype);
return 1;
}
@@ -481,7 +482,8 @@ int hasquota(struct mntent *mnt, int type, int flags)
if (!correct_fstype(mnt->mnt_type) || hasmntopt(mnt, MNTOPT_NOQUOTA))
return 0;
- if (!strcmp(mnt->mnt_type, MNTTYPE_XFS))
+ if (!strcmp(mnt->mnt_type, MNTTYPE_GFS2) ||
+ !strcmp(mnt->mnt_type, MNTTYPE_XFS))
return hasxfsquota(mnt, type, flags);
if (nfs_fstype(mnt->mnt_type)) /* NFS always has quota or better there is no good way how to detect it */
return 1;
Index: quota.spec
===================================================================
RCS file: /cvs/pkgs/rpms/quota/F-13/quota.spec,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -p -r1.59 -r1.60
--- quota.spec 10 May 2010 15:25:50 -0000 1.59
+++ quota.spec 11 May 2010 12:13:38 -0000 1.60
@@ -5,7 +5,7 @@ Name: quota
Summary: System administration tools for monitoring users' disk usage
Epoch: 1
Version: 3.17
-Release: 10%{?dist}
+Release: 11%{?dist}
License: BSD and GPLv2+
URL: http://sourceforge.net/projects/linuxquota/
Group: System Environment/Base
@@ -26,6 +26,8 @@ Patch7: quota-3.17-quotactlmanpage.patch
Patch8: quota-3.17-ftbfs.patch
# Bug #528581, remove in upstream 4.00
Patch9: quota-3.17-quotactl_null_corruption.patch
+# Included in upstream 4.00_pre2
+Patch10: quota-3.17-add-gfs2-support.patch
%description
The quota package contains system administration tools for monitoring
@@ -58,6 +60,7 @@ on remote machines.
%patch7 -p1 -b .quotactlman
%patch8 -p1
%patch9 -p1 -b .quotactl_null_corruption
+%patch10 -p1 -b .gfs2
#fix typos/mistakes in localized documentation
for pofile in $(find ./po/*.p*)
@@ -120,6 +123,9 @@ rm -rf %{buildroot}
%attr(0644,root,root) %{_mandir}/man3/*
%changelog
+* Tue May 11 2010 Petr Pisar <ppisar at redhat.com> 1:3.17-11
+- Add GFS2 support
+
* Tue May 10 2010 Petr Pisar <ppisar at redhat.com> 1:3.17-10
- Prevent corruptive read/write from/to NULL address in rpc.rquotad
(Resolves #528581, example in #532342)
- Previous message: rpms/emacs/F-13 emacs-23.2-m17ncheck.patch, NONE, 1.1 .cvsignore, 1.30, 1.31 emacs.spec, 1.160, 1.161 sources, 1.32, 1.33
- Next message: rpms/emacs/devel emacs.spec,1.167,1.168
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list