[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20090119004646.6b8b4567@zonk.pl>
Date: Mon, 19 Jan 2009 01:46:46 +0100
From: Adam Osuchowski <adwol@...k.pl>
To: linux-kernel@...r.kernel.org
Subject: Strange leases behaviour
Kernel 2.6.28 and such a situation:
- process A obtains read lease on file via fcntl(fd, F_SETLEASE, F_RDLCK).
- while process A holds lease, process B tries to open this file for writing,
what, of course, leads to block process B on open().
- while process A holds lease and process B waits on open(), process C
tries to open the same file for reading.
Then, process C also blocks on open(), even though it calls open() only
for reading. Even if process B terminates before process A removes lease,
process C still can't open file for reading. But if process B doesn't try
to open file for writing, process C can open it for reading without any
trobule.
Why there is such a bahaviour? Is it not a bug?
Regards.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists