Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76067
b: refs/heads/master
c: 7bc5c41
h: refs/heads/master
i:
  76065: 426c657
  76063: cc6e726
v: v3
  • Loading branch information
Abhijith Das authored and Steven Whitehouse committed Jan 25, 2008
1 parent 7ba7aa0 commit a1995df
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1b8177ec1e779bcc3ed89419ff7c80dbc3dcc489
refs/heads/master: 7bc5c414fe6627ec518c82d154c796f0981f5b02
16 changes: 12 additions & 4 deletions trunk/fs/gfs2/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,13 +504,21 @@ int gfs2_recover_journal(struct gfs2_jdesc *jd)
if (!test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags))
ro = 1;
} else {
if (sdp->sd_vfs->s_flags & MS_RDONLY)
ro = 1;
if (sdp->sd_vfs->s_flags & MS_RDONLY) {
/* check if device itself is read-only */
ro = bdev_read_only(sdp->sd_vfs->s_bdev);
if (!ro) {
fs_info(sdp, "recovery required on "
"read-only filesystem.\n");
fs_info(sdp, "write access will be "
"enabled during recovery.\n");
}
}
}

if (ro) {
fs_warn(sdp, "jid=%u: Can't replay: read-only FS\n",
jd->jd_jid);
fs_warn(sdp, "jid=%u: Can't replay: read-only block "
"device\n", jd->jd_jid);
error = -EROFS;
goto fail_gunlock_tr;
}
Expand Down

0 comments on commit a1995df

Please sign in to comment.