mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Strange leases behaviour
@ 2009-01-19  0:46 Adam Osuchowski
  0 siblings, 0 replies; only message in thread
From: Adam Osuchowski @ 2009-01-19  0:46 UTC (permalink / raw)
  To: linux-kernel

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-19  0:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-19  0:46 Strange leases behaviour Adam Osuchowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome