lkml.org 
[lkml]   [2018]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] fscache: fix race between enablement and dropping of object
Date
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

\
 
 \ /
  Last update: 2018-11-28 16:13    [W:0.119 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site