Re: [RFC] possible fix for broken floppy driver since 2.5.13

Christoph Hellwig (hch@infradead.org)
Tue, 21 May 2002 13:24:51 +0100


On Mon, May 20, 2002 at 07:01:52PM +0200, Mikael Pettersson wrote:
> Since 2.5.13 I've been unable to use drivers/block/floppy.c.
> There were two symptoms: /dev/fd0 was read-only until after
> the first read, and writes wrote currupt data to the media.
>
> The patch below against 2.5.16 fixes these problems for me:
>
> - The read-only problem was caused by a getblk() call in
> floppy_revalidate() which had been commented out (2.5.13
> did away with getblk() altogether.) This call is necessary,
> so the patch reintroduces a private getblk() in floppy.c.

Please don't use getblk(), but go directly through the bio interface.
In 2.5 the buffer_heads are just a legacy interface for filesystems and
are not supposed to be used by lowlevel drivers.

-
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/