Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 6c62ef54d3d90d424c055cb950e0e3aef27a6601
Parent: b55c086de3d0eba532f8ced97da92d1117718b22
Author: Abhijith Das <adas(a)redhat.com>
AuthorDate: Fri Feb 5 16:53:37 2010 -0600
Committer: Abhijith Das <adas(a)redhat.com>
CommitterDate: Fri Feb 5 16:53:37 2010 -0600
mount.gfs2: 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
rhbz#537201
---
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 2e74d04..8bc76bf 100644
--- a/gfs-kernel/src/gfs/ops_fstype.c
+++ b/gfs-kernel/src/gfs/ops_fstype.c
@@ -437,7 +437,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 2442f59..38ec9a1 100644
--- a/gfs2/mount/mount.gfs2.c
+++ b/gfs2/mount/mount.gfs2.c
@@ -210,6 +210,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));
}