Re: [RFC] [PATCH] vfs: remount all file-systems R/O on emergency remount.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il 24/08/2012 09:26, Artem Bityutskiy ha scritto:
From: Artem Bityutskiy <artem.bityutskiy@xxxxxxxxxxxxxxx>

Currently the emergency remount (triggered by Sysrq-u) re-mounting only
those file-systems R/O, which have an associated block device (sb->s_bdev).
This does not work for file-systems like UBIFS and JFFS2 which work on top
of MTD devices (character devices) and always have sb->s_bdev = NULL.

This also does not work for tmpfs.

Most probably the intention was to avoid re-mounting R/O file-systems like
procfs, sysfs, cgroup, and debugfs. However, I do not really see why not
to remount them R/O as well in case of emergency.

This patch removes the 'sb->s_bdev != NULL' check from
'do_emergency_remount()', so _all_ file-systems will be re-mounted R/O.

Tested in Fedora - all file-systems (ext4, ubifs, procfs, sysfs, cgroup, and
debugfs) become R/O on Sysrq-u with this patch.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@xxxxxxxxxxxxxxx>

Does it make sense to remount r/o for example debugfs in this case? Maybe if there is something wrong I want enable something to catch debug info. Similar things for other pseudo-fs. Sure, the s_bdev seems a strong check. We could add a new flag to know if the emergency remount should be happen. It would give us the fs granularity, and maybe it could be turned on/off with the mount.

Marco
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux