Skip to contentSkip to conversation

Direct access to IDE disk from kernel modules

DISCUSSION Enrico BRAVIN 2 participants 2 messages Apr 15, 2002

lore
Share & tools
lore
#0 lore raw

Hi,
Is there a way to directly dump a buffer on an IDE disk from inside a kernel module without goig trough user space? I have written a driver for a frame grabber and would like be able to dump the frames real time directly to a dedicated IDE disk. My frames are already in a DMAble buffer.

Please cc my directly

#1 lore raw
Quoted 5 lines

Is there a way to directly dump a buffer on an IDE disk from inside a kernel module without goig trough user space?
I have written a driver for a frame grabber and would like be able to dump the frames real time directly to a dedicated IDE disk. My frames are already in a DMAble buffer.

You can get the same effect going via user space just fine, and the performance of IDE is well below the point that should make a difference since PCI bandwidth is likely to be your bottleneck.

mmap the capture buffers into a user application (eg video4linux api), then write the files using the O_DIRECT option or a raw device (see rawctl and friends)