Re: [RFC] sys_punchhole()

From: Andrea Arcangeli
Date: Wed Nov 16 2005 - 07:20:23 EST


On Wed, Nov 16, 2005 at 06:08:18AM -0600, Rob Landley wrote:
> You know, if you wanted to get really really gross and disgusting about this,
> you could always have write(fd, NULL, count) punch a hole in the file. (Then
> have libc's write() check for NULL and error out, and have a seprate punch()
> call that does the write with the null...)
>
> Just one way to avoid introducing a new syscall...

That would add an unnecessary branch in write(3). I don't think it worth
it, we'd rather go full speed and use the syscall table for it. Plus it
sounds safer in general to keep it separate (just in case someone isn't
using glibc but some other dietlibc or similar ;)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/