From: David Howells <dhowells@redhat.com>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] AFS: Implement shared-writable mmap [try #2]
Date: Wed, 16 May 2007 19:45:23 +0100 [thread overview]
Message-ID: <31162.1179341123@redhat.com> (raw)
In-Reply-To: <464B3F2D.9030603@yahoo.com.au>
Nick Piggin <nickpiggin@yahoo.com.au> wrote:
> You can drop the lock, do the invalidation,
Hmmm... There's a danger of incurring a race by doing that. Consider two
processes both trying to write to a dirty page for which writeback will be
rejected:
(1) The first process gets EKEYREJECTED from the server, drops its lock and
is then preempted.
(2) The second process gets EKEYREJECTED from the server, drops its lock,
truncates the page, reloads the page and modifies it.
(3) The first process resumes and truncates the page, thereby splatting the
second process's write.
Or:
(1) The first process gets EKEYREJECTED from the server, clears the writeback
information from the page, drops its lock and is then preempted.
(2) The second process attaches its own writeback information to the page and
modifies it.
(3) The first process resumes and truncates the page, thereby splatting the
second process's write.
Really, what I want to do is pass the page lock to truncate to deal with.
Better still, I want truncate to be selective, based on whether or not a page
is still associated with the rejected writeback. I wonder if I should call
truncate_complete_page() or invalidate_complete_page() directly.
What might help is that PG_writeback is set on all pages in the rejected run,
even those that are unlocked.
Network filesystems are such fun:-)
David
next prev parent reply other threads:[~2007-05-16 18:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-16 10:02 [PATCH] AFS: Implement shared-writable mmap [try #2] David Howells
2007-05-16 12:07 ` Nick Piggin
2007-05-16 13:16 ` David Howells
2007-05-16 13:32 ` Nick Piggin
2007-05-16 16:12 ` David Howells
2007-05-16 16:32 ` Nick Piggin
2007-05-16 16:56 ` David Howells
2007-05-16 17:28 ` Nick Piggin
2007-05-16 17:46 ` David Howells
2007-05-16 17:59 ` Nick Piggin
2007-05-16 18:45 ` David Howells [this message]
2007-05-17 6:39 ` Nick Piggin
2007-05-17 12:30 ` David Howells
2007-05-17 17:46 ` David Howells
2007-05-18 2:29 ` Nick Piggin
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=31162.1179341123@redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.com.au \
/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