android_kernel_xiaomi_sm8350/fs/gfs2
Fabio Massimo Di Nitto 0b7580c786 [GFS2] Check for installation of mount helpers for DLM mounts
The patch is a fix to abort mount if the mount.gfs* and possible
umount.* are missing from /sbin.

While we do what we can to guarantee that they are installed properly in
userland (CVS HEAD), we want to make sure that mount still aborts properly.

The only sign of missing helpers is that lock_dlm will receive no mount options
at all. According to David the problem does not exist for lock_nolock as the
helpers are not required.

The patch has been tested for both gfs and gfs2 and it works as expected. The
lack of mount.gfs* will generate an error that is propagated to mount:

oot@node1:~# mount -t  gfs2 /dev/nbd2 /mnt/
mount: wrong fs type, bad option, bad superblock on /dev/nbd2,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

[ 3513.303346] GFS2: fsid=: Trying to join cluster "lock_dlm", "gutsy:gfs2"
[ 3513.304546] DLM/GFS2/GFS ERROR: (u)mount helpers are not installed properly!
[ 3513.306290] GFS2: fsid=: can't mount proto=lock_dlm, table=gutsy:gfs2, hostdata=

You might want to notice that it will also avoid mount to hang or fail silently
or with strange errors that will require the cluster to reboot/restart before
you can actually mount the filesystem again.

Signed-off-by: Fabio M. Di Nitto <fabbione@ubuntu.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2008-01-25 08:08:01 +00:00
..
locking [GFS2] Check for installation of mount helpers for DLM mounts 2008-01-25 08:08:01 +00:00
acl.c
acl.h
bmap.c [GFS2] Add gfs2_is_writeback() 2008-01-25 08:07:21 +00:00
bmap.h
daemon.c [GFS2] Move gfs2_logd into log.c 2008-01-25 08:07:56 +00:00
daemon.h [GFS2] Move gfs2_logd into log.c 2008-01-25 08:07:56 +00:00
dir.c
dir.h
eaops.c
eaops.h
eattr.c
eattr.h
gfs2.h
glock.c [GFS2] Don't add glocks to the journal 2008-01-25 08:07:52 +00:00
glock.h
glops.c [GFS2] Reorder writeback for glock sync 2008-01-25 08:07:42 +00:00
glops.h
incore.h [GFS2] Don't periodically update the jindex 2008-01-25 08:07:59 +00:00
inode.c [GFS2] Don't add glocks to the journal 2008-01-25 08:07:52 +00:00
inode.h [GFS2] Introduce gfs2_set_aops() 2008-01-25 08:07:23 +00:00
Kconfig
lm.c
lm.h
locking.c
log.c [GFS2] Don't periodically update the jindex 2008-01-25 08:07:59 +00:00
log.h [GFS2] Move gfs2_logd into log.c 2008-01-25 08:07:56 +00:00
lops.c [GFS2] Don't add glocks to the journal 2008-01-25 08:07:52 +00:00
lops.h
main.c [GFS2] Remove useless i_cache from inodes 2008-01-25 08:07:16 +00:00
Makefile [GFS2] Use ->page_mkwrite() for mmap() 2008-01-25 08:07:13 +00:00
meta_io.c [GFS2] Add sync_page to metadata address space operations 2008-01-25 08:07:40 +00:00
meta_io.h [GFS2] Remove useless i_cache from inodes 2008-01-25 08:07:16 +00:00
mount.c
mount.h
ops_address.c [GFS2] Use correct include file in ops_address.c 2008-01-25 08:07:32 +00:00
ops_address.h [GFS2] Introduce gfs2_set_aops() 2008-01-25 08:07:23 +00:00
ops_dentry.c
ops_dentry.h
ops_export.c exportfs: make struct export_operations const 2007-10-22 08:13:21 -07:00
ops_file.c [GFS2] Introduce gfs2_set_aops() 2008-01-25 08:07:23 +00:00
ops_fstype.c [GFS2] Use atomic_t for journal free blocks counter 2008-01-25 08:07:54 +00:00
ops_fstype.h exportfs: make struct export_operations const 2007-10-22 08:13:21 -07:00
ops_inode.c
ops_inode.h [GFS2] Clean up internal read function 2008-01-25 08:07:11 +00:00
ops_super.c [GFS2] Remove unused field in struct gfs2_inode 2008-01-25 08:07:18 +00:00
ops_super.h
quota.c [GFS2] Clean up internal read function 2008-01-25 08:07:11 +00:00
quota.h
recovery.c
recovery.h
rgrp.c [GFS2] Clean up internal read function 2008-01-25 08:07:11 +00:00
rgrp.h
super.c [GFS2] Don't periodically update the jindex 2008-01-25 08:07:59 +00:00
super.h
sys.c [GFS2] Don't periodically update the jindex 2008-01-25 08:07:59 +00:00
sys.h
trans.c [GFS2] Don't add glocks to the journal 2008-01-25 08:07:52 +00:00
trans.h [GFS2] Don't add glocks to the journal 2008-01-25 08:07:52 +00:00
util.c
util.h