Re: parallel writes to the same file, 2.3.7

Linus Torvalds (torvalds@transmeta.com)
22 Jun 1999 16:44:47 GMT


In article <Pine.LNX.3.96.990622182153.13031Q-100000@chiara.csoma.elte.hu>,
Ingo Molnar <mingo@chiara.csoma.elte.hu> wrote:
>
>check out block_*_write(), we get the inode semaphore when we allocate new
>blocks. So most races should be taken care of.

Nope. I removed the semaphore, because it protected the wrong thing.

The semaphore either has to protect _everything_ like it did in 2.2.x,
or it has to protect the file length changes wrt buffer allocation.
Protecting writes a page at a time is incorrect, and makes the semaphore
useless (we do a much better job with the per-page lock bit for that
kind of protection).

So I decided to just get rid of the semaphore on the write side. There
are possibly cases we still have to check, but we'll do that with some
other mechanism. With the semaphore gone, we can do swapping better
anyway, no need for kpiod.

Linus

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