Skip to contentSkip to conversation

Which HDIO_ command(s) to flush all data to disk

DISCUSSION Alex Davis 1 participant 1 message Sep 10, 2002

lore
Share & tools
lore

Alex Davis

author
#0 lore raw

I'm trying to write a program that flushes all outstanding data to an IDE hard drive, including the write cache. Is it sufficient just to write:

unsigned char args[4] = {WIN_FLUSH_CACHE,0,0,0};
ioctl(fd, HDIO_DRIVE_CMD, &args)

or do I need to worry about the buffer cache as well(WIN_WRITE_BUFFER?)

Thanks in advance.

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com