diff options
author | Michael Tokarev <mjt@tls.msk.ru> | 2012-12-25 14:08:16 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-12-25 14:08:16 -0500 |
commit | d096ad0f79a782935d2e06ae8fb235e8c5397775 (patch) | |
tree | b6590d5236e831a6b4564fb88d3fc791952ee1f8 /virt | |
parent | 0875a2b448fcaba67010850cf9649293a5ef653d (diff) | |
download | linux-d096ad0f79a782935d2e06ae8fb235e8c5397775.tar.gz linux-d096ad0f79a782935d2e06ae8fb235e8c5397775.tar.bz2 linux-d096ad0f79a782935d2e06ae8fb235e8c5397775.zip |
ext4: do not try to write superblock on ro remount w/o journal
When a journal-less ext4 filesystem is mounted on a read-only block
device (blockdev --setro will do), each remount (for other, unrelated,
flags, like suid=>nosuid etc) results in a series of scary messages
from kernel telling about I/O errors on the device.
This is becauese of the following code ext4_remount():
if (sbi->s_journal == NULL)
ext4_commit_super(sb, 1);
at the end of remount procedure, which forces writing (flushing) of
a superblock regardless whenever it is dirty or not, if the filesystem
is readonly or not, and whenever the device itself is readonly or not.
We only need call ext4_commit_super when the file system had been
previously mounted read/write.
Thanks to Eric Sandeen for help in diagnosing this issue.
Signed-off-By: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
Diffstat (limited to 'virt')
0 files changed, 0 insertions, 0 deletions