[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RFC: Block device driver API change
- Date: Wed, 23 Sep 2009 10:04:19 +1000
- From: chrisj at rtems.org (Chris Johns)
- Subject: RFC: Block device driver API change
Sebastian Huber wrote:
>
> This would eliminate the need to lookup the driver data via the device number.
> How do you think about this?
>
I see the need for this and welcome the change. Do you have a patch ready to
go ? I only ask because I have some cache bug fixes to go in. The bugs only
relate to dynamic block size changes on a device.
While in the general area I am wondering if the bdbuf interfaces should be
changed from the device number to an rtems_disk_device*. This means the layer
above the cache obtains and holds a handle to the disk device rather than the
obtain/release dance that currently happens. If a file system has mounted a
disk I think it should obtain and hold the disk until unmounted. This leads to
some issues about disks that go away while mounted but fixes the issues of
unwritten data in the cache with no one holding the disk.
Regards
Chris