Re: How can I force a read?

From: Pavel Machek (pavel@suse.cz)
Date: Thu May 18 2000 - 15:13:54 EST


Hi!

> > How can I force a read from a block device after a
> > write? Basically, if I do a write to some partition
> > of a disk & perform a read of the same partition of
> > the same disk(to verify whether the data has been
> > written properly), a read is not actually performed
> > as the buffer cache's dirty bit is not set. Even if
> > I try to do a sync by calling the sync system call &
> > then doing a read also does'nt actually perform the
> > read, instead it takes from the buffer cache & gives
> > the data back. Is there a way to tell the fs
> > to force an actual read from the disk?
>
> These 2 ioctl()s against disk devices (e.g. sd and hd)
> look like they could be of interest:
>
> BLKFLSBUF [instructs disk subsystem to flush buffers]

It would be nice if some userland utility existed that would do
this... Or is there one?
                                                                Pavel

-- 
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents me at discuss@linmodems.org

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



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:18 EST