Re: Partital Fix: Media-Change after generic-scsi-read

Matthias Urlichs (smurf@smurf.noris.de)
Wed, 1 May 1996 08:23:05 +0100


In linux.dev.kernel, article <Dqn1Cn.nE@roestock.demon.co.uk>,
Peter Fox <fox@roestock.demon.co.uk> writes:
>=20
> I think all removable media should do this. It is a pain to have to e=
ject
> the floppy and reinsert it to make sure that a tar df /dev/fd0 verifi=
es the
> data on the floppy, not what's in the cache.
>=20
A program which flushes the block cache of a device is _simple_.

#include <linux/fs.h>
#include <fcntl.h>
main(int argc,char **argv) { return ioctl(open(argv[1],O_RDWR),BLKFLSBU=
F,0); }

--=20
There is a great discovery still to be made in Literature:
that of paying literary men by the quantity they do NOT write.
--=20
Matthias Urlichs \ Noris Network GmbH i.Gr/ Xlink-POP N=FCrnberg=
=20
Schleiermacherstra=DFe 12 \ Linux+Internet / EMail: urlichs@nor=
is.de
90491 N=FCrnberg (Germany) \ Consulting+Programming+Networking+etc'i=
ng
PGP: 1B 89 E2 1C 43 EA 80 44 15 D2 29 CF C6 C7 E0 DE=20
Click <A HREF=3D"http://info.noris.de/~smurf/finger">here</A>. =
42