lkml.org 
[lkml]   [2005]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] add I/O error uevent for block devices
Kay Sievers <kay.sievers@vrfy.org> wrote:
>
> For HAL we want to get notified about I/O errors of block devices.
> This is especially useful for devices we are unable to poll and
> therefore can't know if something goes wrong here.
>
> Signed-off-by: David Zeuthen <david@fubar.dk>
> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
>
> ===== fs/buffer.c 1.270 vs edited =====
> --- 1.270/fs/buffer.c 2005-01-21 06:02:13 +01:00
> +++ edited/fs/buffer.c 2005-02-17 22:56:05 +01:00
> @@ -105,6 +105,7 @@ static void buffer_io_error(struct buffe
> printk(KERN_ERR "Buffer I/O error on device %s, logical block %Lu\n",
> bdevname(bh->b_bdev, b),
> (unsigned long long)bh->b_blocknr);
> + kobject_uevent(&bh->b_bdev->bd_disk->kobj, KOBJ_IO_ERROR, NULL);
> }

- buffer_io_error() is called from interrupt context, and
kobject_uevent() does multiple GFP_KERNEL allocations. You'll need to
use kobject_uevent_atomic().

- the prink_ratelimit() fix in end_buffer_async_read() should be a
separate patch, really. I'll fix that up.

- there are numerous other places where an I/O error can be detected:
grep the tree for b_end_io and bio_end_io.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.041 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site