ext4: mention noload when recovering on read-only device

Message ID 977f189abb1ff382dedd6916b7140081d47d3e8d.1505383806.git.simon@ruderich.org
State Awaiting Upstream
Headers show
Series
  • ext4: mention noload when recovering on read-only device
Related show

Commit Message

Simon Ruderich Sept. 14, 2017, 10:23 a.m.
Help the user to find the appropriate mount option to continue mounting
the file system on a read-only device if the journal requires recovery.

Signed-off-by: Simon Ruderich <simon@ruderich.org>
---
Hello,

I tried to mount an ext4 which required recovery from a read-only
device and stumbled over this error. I freaked out for a second
(trying to restore from a backup) and it took me a (short) while
to figure out what to do and I thought it would be useful to give
the user a hand by pointing to the required mount option.

Regards
Simon

 fs/ext4/super.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Theodore Ts'o Oct. 18, 2017, 5:10 p.m. | #1
On Thu, Sep 14, 2017 at 12:23:06PM +0200, Simon Ruderich wrote:
> Help the user to find the appropriate mount option to continue mounting
> the file system on a read-only device if the journal requires recovery.
> 
> Signed-off-by: Simon Ruderich <simon@ruderich.org>

Applied, thanks.

						- Ted

Patch

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index d61a70e2193a..f497b79da5cc 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4589,7 +4589,8 @@  static int ext4_load_journal(struct super_block *sb,
 					"required on readonly filesystem");
 			if (really_read_only) {
 				ext4_msg(sb, KERN_ERR, "write access "
-					"unavailable, cannot proceed");
+					"unavailable, cannot proceed "
+					"(try mounting with noload)");
 				return -EROFS;
 			}
 			ext4_msg(sb, KERN_INFO, "write access will "