ACK/Cmnt: [SRU T/X/A/B][PATCH 1/1] fscache: Fix hanging wait on page discarded by writeback
Daniel Axtens
daniel.axtens at canonical.com
Tue Jun 19 06:22:17 UTC 2018
> I would classify a hang as high severity and therefore applicable to Artful
> still. Daniel, please update the importance of the bug tasks accordingly if you
> concur.
Done!
Regards,
Daniel
>
> Thanks,
> Stefan
>
>> fs/fscache/page.c | 13 +++++++++----
>> 1 file changed, 9 insertions(+), 4 deletions(-)
>>
>> diff --git a/fs/fscache/page.c b/fs/fscache/page.c
>> index 961029e04027..da2fb58f2ecb 100644
>> --- a/fs/fscache/page.c
>> +++ b/fs/fscache/page.c
>> @@ -776,6 +776,7 @@ static void fscache_write_op(struct fscache_operation *_op)
>>
>> _enter("{OP%x,%d}", op->op.debug_id, atomic_read(&op->op.usage));
>>
>> +again:
>> spin_lock(&object->lock);
>> cookie = object->cookie;
>>
>> @@ -816,10 +817,6 @@ static void fscache_write_op(struct fscache_operation *_op)
>> goto superseded;
>> page = results[0];
>> _debug("gang %d [%lx]", n, page->index);
>> - if (page->index >= op->store_limit) {
>> - fscache_stat(&fscache_n_store_pages_over_limit);
>> - goto superseded;
>> - }
>>
>> radix_tree_tag_set(&cookie->stores, page->index,
>> FSCACHE_COOKIE_STORING_TAG);
>> @@ -829,6 +826,9 @@ static void fscache_write_op(struct fscache_operation *_op)
>> spin_unlock(&cookie->stores_lock);
>> spin_unlock(&object->lock);
>>
>> + if (page->index >= op->store_limit)
>> + goto discard_page;
>> +
>> fscache_stat(&fscache_n_store_pages);
>> fscache_stat(&fscache_n_cop_write_page);
>> ret = object->cache->ops->write_page(op, page);
>> @@ -844,6 +844,11 @@ static void fscache_write_op(struct fscache_operation *_op)
>> _leave("");
>> return;
>>
>> +discard_page:
>> + fscache_stat(&fscache_n_store_pages_over_limit);
>> + fscache_end_page_write(object, page);
>> + goto again;
>> +
>> superseded:
>> /* this writer is going away and there aren't any more things to
>> * write */
>>
>
>
More information about the kernel-team
mailing list