]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
GFS2: Don't flag consistency error if first mounter is a spectator
authorBob Peterson <rpeterso@redhat.com>
Wed, 4 Sep 2013 16:08:02 +0000 (12:08 -0400)
committerSteven Whitehouse <swhiteho@redhat.com>
Thu, 5 Sep 2013 08:03:57 +0000 (09:03 +0100)
commit1d12d175ea3b56fdf2573bf6f168cce8f39b19e3
tree2ab6f78a34ab951ba2a13f0c85ec637d30728c99
parent068213f7d3378d3e33d0f1b9415b2fdc3e9efa14
GFS2: Don't flag consistency error if first mounter is a spectator

This patch checks for the first mounter being a specator. If so, it
makes sure all the journals are clean. If there's a dirty journal,
the mount fails.

Testing results:

# insmod gfs2.ko
# mount -tgfs2 -o spectator /dev/sasdrives/scratch /mnt/gfs2
mount: permission denied
# dmesg | tail -2
[ 3390.655996] GFS2: fsid=MUSKETEER:home: Now mounting FS...
[ 3390.841336] GFS2: fsid=MUSKETEER:home.s: jid=0: Journal is dirty, so the first mounter must not be a spectator.
# mount -tgfs2 /dev/sasdrives/scratch /mnt/gfs2
# umount /mnt/gfs2
# mount -tgfs2 -o spectator /dev/sasdrives/scratch /mnt/gfs2
# ls /mnt/gfs2|wc -l
352
# umount /mnt/gfs2

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/ops_fstype.c