cluster: RHEL56 - gfs2-utils, gfs-kernel: Better error reporting when mounting a gfs fs without enough journals

Abhijith Das adas at fedoraproject.org
Fri Jun 4 16:30:28 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=fabddd788110b7812b4d4d856db02644ef36756f
Commit:        fabddd788110b7812b4d4d856db02644ef36756f
Parent:        805e0bae5db683fb33ec2e3c14b12c6380885494
Author:        Abhijith Das <adas at redhat.com>
AuthorDate:    Fri Jun 4 11:23:23 2010 -0500
Committer:     Abhijith Das <adas at redhat.com>
CommitterDate: Fri Jun 4 11:23:23 2010 -0500

gfs2-utils, gfs-kernel: Better error reporting when mounting a gfs fs without enough journals

use EUSERS to signal to mount helper about insufficient journals so it doesn't
display a cryptic message

Resolves: rhbz#537201
Signed-off-by: Abhi Das <adas at redhat.com>
---
 gfs-kernel/src/gfs/ops_fstype.c |    2 +-
 gfs2/mount/mount.gfs2.c         |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/gfs-kernel/src/gfs/ops_fstype.c b/gfs-kernel/src/gfs/ops_fstype.c
index a9d7733..1f5e8a5 100644
--- a/gfs-kernel/src/gfs/ops_fstype.c
+++ b/gfs-kernel/src/gfs/ops_fstype.c
@@ -447,7 +447,7 @@ static int init_journal(struct gfs_sbd *sdp, int undo)
 	else {
 		/*  Discover this node's journal number (lock module tells us
 		    which one to use), and lock it */
-		error = -EINVAL;
+		error = -EUSERS;
 		if (sdp->sd_lockstruct.ls_jid >= sdp->sd_journals) {
 			printk("GFS: fsid=%s: can't mount journal #%u\n",
 			       sdp->sd_fsname, sdp->sd_lockstruct.ls_jid);
diff --git a/gfs2/mount/mount.gfs2.c b/gfs2/mount/mount.gfs2.c
index d8a60c3..1ef6ccd 100644
--- a/gfs2/mount/mount.gfs2.c
+++ b/gfs2/mount/mount.gfs2.c
@@ -243,6 +243,8 @@ int main(int argc, char **argv)
 
 		if (errno == EBUSY)
 			die("%s already mounted or %s busy\n", mo.dev, mo.dir);
+		else if (errno == EUSERS)
+			die("Too many nodes mounting filesystem, no free journals\n");
 		die("error mounting %s on %s: %s\n", mo.dev, mo.dir,
 		    strerror(errno));
 	}


More information about the cluster-commits mailing list