Commit 61fb9ea4 authored by jiangyiwen's avatar jiangyiwen Committed by Linus Torvalds

ocfs2: do not set filesystem readonly if link down

Do not set the filesystem readonly if the storage link is down.  In this
case, metadata is not corrupted and only -EIO is returned.  And if it is
indeed corrupted metadata, it has already called ocfs2_error() in
ocfs2_validate_inode_block().
Signed-off-by: default avatarYiwen Jiang <jiangyiwen@huawei.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d1e78238
...@@ -1251,7 +1251,7 @@ static int ocfs2_write_cluster(struct address_space *mapping, ...@@ -1251,7 +1251,7 @@ static int ocfs2_write_cluster(struct address_space *mapping,
ret = ocfs2_extent_map_get_blocks(inode, v_blkno, &p_blkno, NULL, ret = ocfs2_extent_map_get_blocks(inode, v_blkno, &p_blkno, NULL,
NULL); NULL);
if (ret < 0) { if (ret < 0) {
ocfs2_error(inode->i_sb, "Corrupting extend for inode %llu, " mlog(ML_ERROR, "Get physical blkno failed for inode %llu, "
"at logical block %llu", "at logical block %llu",
(unsigned long long)OCFS2_I(inode)->ip_blkno, (unsigned long long)OCFS2_I(inode)->ip_blkno,
(unsigned long long)v_blkno); (unsigned long long)v_blkno);
......
...@@ -744,7 +744,7 @@ static struct buffer_head *ocfs2_find_entry_el(const char *name, int namelen, ...@@ -744,7 +744,7 @@ static struct buffer_head *ocfs2_find_entry_el(const char *name, int namelen,
if (ocfs2_read_dir_block(dir, block, &bh, 0)) { if (ocfs2_read_dir_block(dir, block, &bh, 0)) {
/* read error, skip block & hope for the best. /* read error, skip block & hope for the best.
* ocfs2_read_dir_block() has released the bh. */ * ocfs2_read_dir_block() has released the bh. */
ocfs2_error(dir->i_sb, "reading directory %llu, " mlog(ML_ERROR, "reading directory %llu, "
"offset %lu\n", "offset %lu\n",
(unsigned long long)OCFS2_I(dir)->ip_blkno, (unsigned long long)OCFS2_I(dir)->ip_blkno,
block); block);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment