mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adam Osuchowski <adwol@zonk.pl>
To: linux-kernel@vger.kernel.org
Subject: Strange leases behaviour
Date: Mon, 19 Jan 2009 01:46:46 +0100	[thread overview]
Message-ID: <20090119004646.6b8b4567@zonk.pl> (raw)

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.

                 reply	other threads:[~2009-01-19  0:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090119004646.6b8b4567@zonk.pl \
    --to=adwol@zonk.pl \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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