Linuxolator patches: stat and lseek SEEK_END for disk devices

Juergen Lock nox at
Tue Feb 23 22:00:04 UTC 2010


 Before this gets buried on -hackers in another thead... :)

 I now have disks appear as block devices for Linux processes (there
already was commented out code for that in linux_stats.c, I hope my
version is now `correct enough' to be usable [1]), and I made a simple
patch to make lseek SEEK_END (L_XTND in the source) dtrt on disk
devices too by simply invoking the DIOCGMEDIASIZE ioctl there; [2]
both of these things are what (some) Linux processes expect.

 Patches are here: (made on stable/8, if they don't apply on head
I'll have to make extra versions for that...) [1] [2]

 And yes, with these patches the Linux bsdtar mentioned on -hackers
in the `"tar tfv /dev/cd0" speedup patch' thread now also runs fast
on FreeBSD. :)


More information about the freebsd-hackers mailing list