|
@@ -128,19 +128,13 @@ __clear_page_buffers(struct page *page)
|
|
page_cache_release(page);
|
|
page_cache_release(page);
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-static int quiet_error(struct buffer_head *bh)
|
|
|
|
-{
|
|
|
|
- if (!test_bit(BH_Quiet, &bh->b_state) && printk_ratelimit())
|
|
|
|
- return 0;
|
|
|
|
- return 1;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-
|
|
|
|
static void buffer_io_error(struct buffer_head *bh, char *msg)
|
|
static void buffer_io_error(struct buffer_head *bh, char *msg)
|
|
{
|
|
{
|
|
char b[BDEVNAME_SIZE];
|
|
char b[BDEVNAME_SIZE];
|
|
- printk(KERN_ERR "Buffer I/O error on dev %s, logical block %llu%s\n",
|
|
|
|
|
|
+
|
|
|
|
+ if (!test_bit(BH_Quiet, &bh->b_state))
|
|
|
|
+ printk_ratelimited(KERN_ERR
|
|
|
|
+ "Buffer I/O error on dev %s, logical block %llu%s\n",
|
|
bdevname(bh->b_bdev, b),
|
|
bdevname(bh->b_bdev, b),
|
|
(unsigned long long)bh->b_blocknr, msg);
|
|
(unsigned long long)bh->b_blocknr, msg);
|
|
}
|
|
}
|
|
@@ -180,8 +174,7 @@ void end_buffer_write_sync(struct buffer_head *bh, int uptodate)
|
|
if (uptodate) {
|
|
if (uptodate) {
|
|
set_buffer_uptodate(bh);
|
|
set_buffer_uptodate(bh);
|
|
} else {
|
|
} else {
|
|
- if (!quiet_error(bh))
|
|
|
|
- buffer_io_error(bh, ", lost sync page write");
|
|
|
|
|
|
+ buffer_io_error(bh, ", lost sync page write");
|
|
set_buffer_write_io_error(bh);
|
|
set_buffer_write_io_error(bh);
|
|
clear_buffer_uptodate(bh);
|
|
clear_buffer_uptodate(bh);
|
|
}
|
|
}
|
|
@@ -298,8 +291,7 @@ static void end_buffer_async_read(struct buffer_head *bh, int uptodate)
|
|
set_buffer_uptodate(bh);
|
|
set_buffer_uptodate(bh);
|
|
} else {
|
|
} else {
|
|
clear_buffer_uptodate(bh);
|
|
clear_buffer_uptodate(bh);
|
|
- if (!quiet_error(bh))
|
|
|
|
- buffer_io_error(bh, ", async page read");
|
|
|
|
|
|
+ buffer_io_error(bh, ", async page read");
|
|
SetPageError(page);
|
|
SetPageError(page);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -358,8 +350,7 @@ void end_buffer_async_write(struct buffer_head *bh, int uptodate)
|
|
if (uptodate) {
|
|
if (uptodate) {
|
|
set_buffer_uptodate(bh);
|
|
set_buffer_uptodate(bh);
|
|
} else {
|
|
} else {
|
|
- if (!quiet_error(bh))
|
|
|
|
- buffer_io_error(bh, ", lost async page write");
|
|
|
|
|
|
+ buffer_io_error(bh, ", lost async page write");
|
|
set_bit(AS_EIO, &page->mapping->flags);
|
|
set_bit(AS_EIO, &page->mapping->flags);
|
|
set_buffer_write_io_error(bh);
|
|
set_buffer_write_io_error(bh);
|
|
clear_buffer_uptodate(bh);
|
|
clear_buffer_uptodate(bh);
|