>>>>> "Jan" == Jan Hudec <bulb@ucw.cz> writes: Jan> It's better to have special interface than to change the semantics so Jan> that if (horribly complicated condition), it does something. Agreed. The situation is not that bad, actually, as this condition is not horribly complicated to check and if true the benefits are enormous. People actually do this (i.e. ensure proper alignment of buffers and offsets). See for details the implementation of fseek(3) in NetBSD. Here is the relevant comment take from there: /* * The place we want to get to is not within the current buffer, * but we can still be kind to the kernel copyout mechanism. * By aligning the file offset to a block boundary, we can let * the kernel use the VM hardware to map pages instead of * copying bytes laboriously. Using a block boundary also * ensures that we only read one block, rather than two. */ ~velco -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/