Re: [PATCH] fscache: fix race between enablement and dropping of object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



NeilBrown <neilb@xxxxxxxx> 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

--
Linux-cachefs mailing list
Linux-cachefs@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cachefs



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]
  Powered by Linux