From: David Howells <dhowells@redhat.com>
To: NeilBrown <neilb@suse.com>
Cc: dhowells@redhat.com, linux-cachefs@redhat.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fscache: fix race between enablement and dropping of object
Date: Wed, 28 Nov 2018 15:12:30 +0000 [thread overview]
Message-ID: <10285.1543417950@warthog.procyon.org.uk> (raw)
In-Reply-To: <87r2gd44hu.fsf@notabene.neil.brown.name>
NeilBrown <neilb@suse.com> wrote:
> It was observed that a process blocked indefintely in
> __fscache_read_or_alloc_page(), waiting for FSCACHE_COOKIE_LOOKING_UP
> to be cleared via fscache_wait_for_deferred_lookup().
Was there a backtrace for that?
> This leaves a window where something else can set FSCACHE_COOKIE_LOOKING_UP
Attempting to enable the cookie again would have that effect.
> There is some uncertainty in this analysis, but it seems to be fit the
> observations. Adding the wake in this patch will be handled correctly
> by __fscache_read_or_alloc_page(), as it checks if ->backing_objects
> is empty again, after waiting.
That should work. The read op should just then fail with -ENOBUFS, causing
the netfs to issue the read over the network instead.
I think there's a more elegant solution to be had, but it'll take some thought
as to how to achieve it.
David
next prev parent reply other threads:[~2018-11-28 15:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-26 6:16 NeilBrown
2018-11-28 15:12 ` David Howells [this message]
2018-11-28 20:18 ` NeilBrown
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=10285.1543417950@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=linux-cachefs@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.com \
/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
all inboxes | Powered by JetHome®