RE: OT: why no file copy() libc/syscall ??

From: Hua Zhong
Date: Thu Nov 20 2003 - 17:00:15 EST


> Andreas Dilger wrote:
> > On Nov 20, 2003 15:44 -0500, Timothy Miller wrote:
> >
> >>This could be a problem if COW causes you to run out of space when
> >>writing to the file.
> >
> >
> > Not much different than running out of space copying a file.
>
> It is, though. If you run out of space copying a file, you
> know it when you're copying. Applications don't usually expect to get

> out-of-space errors while overwriting something in the middle of a
file.

It could for journaling filesystem already.

It's not in any spec that writing to the middle of a file would not
cause ENOSPC, is it?

> In effect, your free space and your used space add up to greater than
> the capacity of the disk. An application that checks for free space
> before doing something would be fooled into thinking there is
> more free space than there really is. How can an application find out

> in advance that a file that it's about to modify (without appending
> anything to the end) is going to need more disk space?

-
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/