ocfs2: do not set filesystem readonly if link down
authorjiangyiwen <jiangyiwen@huawei.com>
Wed, 10 Dec 2014 23:42:02 +0000 (15:42 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Dec 2014 01:41:03 +0000 (17:41 -0800)
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: Yiwen Jiang <jiangyiwen@huawei.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/aops.c
fs/ocfs2/dir.c

index 1ef547e493731cdd55b0b919a8a45f3dc4faa596..d9f222987f24fe438f987b23ecba01c19d9b2c3c 100644 (file)
@@ -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,
                                          NULL);
        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",
                            (unsigned long long)OCFS2_I(inode)->ip_blkno,
                            (unsigned long long)v_blkno);
index 0717662b4aefb4ca4b240ea58daa040c2aaa39e8..e6dc0288dbb9b33bd17f7a8b440107bbdf8174d3 100644 (file)
@@ -744,7 +744,7 @@ restart:
                if (ocfs2_read_dir_block(dir, block, &bh, 0)) {
                        /* read error, skip block & hope for the best.
                         * 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",
                                    (unsigned long long)OCFS2_I(dir)->ip_blkno,
                                    block);