diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2016-08-02 23:05:17 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-03 01:35:19 +0200 |
commit | 39a9dcca61a3d1375b9440676cbfc541804cd217 (patch) | |
tree | f70ccb6a9c342fb18d29d2dd7740eb89ac379463 /fs/nilfs2/btree.c | |
parent | nilfs2: replace nilfs_warning() with nilfs_msg() (diff) | |
download | linux-39a9dcca61a3d1375b9440676cbfc541804cd217.tar.xz linux-39a9dcca61a3d1375b9440676cbfc541804cd217.zip |
nilfs2: emit error message when I/O error is detected
When nilfs returned -EIO as an error code, it's not always clear if it
came from the underlying block device or not. This will mend the issue
by having low level I/O routines of nilfs output an error message when
they detected an I/O error.
Link: http://lkml.kernel.org/r/1464875891-5443-7-git-send-email-konishi.ryusuke@lab.ntt.co.jp
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nilfs2/btree.c')
-rw-r--r-- | fs/nilfs2/btree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c index 2c52693a69a4..2e315f9f2e51 100644 --- a/fs/nilfs2/btree.c +++ b/fs/nilfs2/btree.c @@ -517,6 +517,9 @@ static int __nilfs_btree_get_block(const struct nilfs_bmap *btree, __u64 ptr, out_no_wait: if (!buffer_uptodate(bh)) { + nilfs_msg(btree->b_inode->i_sb, KERN_ERR, + "I/O error reading b-tree node block (ino=%lu, blocknr=%llu)", + btree->b_inode->i_ino, (unsigned long long)ptr); brelse(bh); return -EIO; } |