Re: 2.3.7: generic_write_page(): O_APPEND & inode->i_size not SMP

Manfred Spraul (masp0008@stud.uni-sb.de)
Tue, 22 Jun 1999 11:08:29 +0200 (CST)


>
> On Mon, 21 Jun 1999, Manfred Spraul wrote:
>
> >1) if 2 threads write to an O_APPEND file, then they could write to the same
> >address:
>
> They can't write over the same page at the same time though. Anyway I am
> not sure if this is correct or not.
I don't have the time to test this, but I think that we would
loose data: think about a log file with O_APPEND: even if
the page access itself is serialized, both log entries are written
to the same address.

>
> I seen also another problem of this kind. We may have a reader that will
> read data in copy_to_user, while a writer is in the middle of the
> copy_from_user.
This is why I asked about atomicity guarantees from the POSIX standard.
Do you have a copy? I could ask my brother, but he is usually very busy.

--
	Manfred

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