RE: removable media support on 2.6.x

From: Jinu M.
Date: Sat Jun 05 2004 - 00:13:26 EST


>
> afaik we don't really support hot unplug like this.
>
> Changes were made a few months ago (make the VFS use file->f_mapping
> rather
> than file->f_dentry->d_inode->i_mapping) which set some of the
> pieces in
> place but I think there's a way to go yet.
>
> umm, the general idea is that when the disk vanishes your driver
> should
> then return -EIO for all future I/O requests. The block_device, the
> queue,
> the inode and all that stuff remains in-core.

What we do with our 2.4 version of the driver is something on this
lines. When the media is removed we invalidate the buffers and then
set the card absent bit. Now on when read/write requests arrive we
return error status to the file system since card is absent. This worked
for 2.4.x.

Is there some existing driver which addresses removable media on 2.6.x
Kernel? I would like to see how it addresses this.. then I will have
a better idea to address it with the kernel support we have now.

-Jinu
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/