Re: [RFC] Heads up on sys_fallocate()
From: Ulrich Drepper
Date: Mon Mar 05 2007 - 10:21:34 EST
Theodore Tso wrote:
> Given that glibc already has to support this for older kernels, I
> would argue that there's no point putting in generic support for
> filesystem that can't support a more advanced way of doing things.
Well, I'm sure the kernel can do better than the code we have in libc
now. The kernel has access to the bitmasks which say which blocks have
already been allocated. The libc code does not and we have to be very
simple-minded and simply touch every block. And this means reading it
and then writing it back. The kernel would know when the reading part
is not necessary. Add to then the block granularity (we use f_bsize as
returned from fstatfs but that's not the best value in some cases) and
you have compelling data to have generic code in the kernel. Then libc
implementation can then go away completely which is a good thing.
--
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â
Attachment:
signature.asc
Description: OpenPGP digital signature