Re: [patch?] truncate and timestamps

viro@parcelfarce.linux.theplanet.co.uk
Fri, 23 May 2003 02:17:51 +0100


On Thu, May 22, 2003 at 05:30:33PM -0700, Linus Torvalds wrote:
>
> On Fri, 23 May 2003 Andries.Brouwer@cwi.nl wrote:
> >
> > On the other hand, my question was really a different one:
> > do we want to follow POSIX, also in the silly requirement
> > that truncate only sets mtime when the size changes, while
> > O_TRUNC and ftruncate always set mtime.
>
> Does POSIX really say that? What a crock. If so, we should probably add
> the ATTR_xxx mask as an argument to do_truncate() itself, and then make
> sure that may_open() sets the ATTR_MTIME bit.

"POSIX says" has value only if there is at least some consensus among
implementations. Otherwise it's worthless, simply because any program
that cares about portability can't rely on specified behaviour and
any program that doesn't couldn't care less anyway - it will rely on
actual behaviour on system it's supposed to run on.

Andries had shown that there is _no_ consensus. Ergo, POSIX can take
a hike and we should go with the behaviour convenient for us. It's that
simple...

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/