Messages in this thread | | | Date | Mon, 8 Nov 1999 02:15:31 +0100 | From | Stefan Traby <> | Subject | Re: FIBMAP ioctl restrictions: why? |
| |
Hi Martin !
On Sun, Nov 07, 1999 at 10:44:43PM +0100, Martin Mares wrote: > Hello, world!\n > > I'm currently writting my own database library (a much faster alternative > to GDBM) and I want to sort file accesses before feeding them to the kernel, > so that they will be executed in linear sector order and seek time will be > minimized. Unfortunately, this plan breaks on the FIBMAP ioctl requiring > CAP_SYS_RAWIO capability. To be honest, I don't see why -- can the kernel > gurus advise me what deep reasons are behind this restriction?
Hmpf, I played with the idea to keep track of the seek pointer in userland by writing a wrapper-library between an app and glibc. The library replaces "lseek/write" combinations by pwrite and the same for writev(,,1). It's a totally different idea but great to reduce the number of syscalls. http://homepage.sime.com/stefan/software/libcacheglibcwrapper.c It is part of a full autoconf/automake/libtool distribution for that but it would need a cleanup (at least one person here knows why...). Contact me to force a cleanup, it's hard to get it up without config.h ;-} but you should see the (cool ?) idea behind it. It keeps the linux-specific optimizing stuff out of your source.
--
ciao - Stefan
"you have moved your mouse, please reboot to make this change take effect"
Stefan Traby phone: +43-3133-6107-2 Mitterlasznitzstr. 13 fax: +43-3133-6107-9 8302 Nestelbach mailto://stefan@sime.com Austria http://homepage.sime.com/stefan
- 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/
| |