Skip to content

FS-Cache: Fix a number of bugs that occur when the cache runs out of space

David Howells linux-fsdevel linux-nfs lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13FS-Cache: Count culled objects and objects rejected due to lack of spaceDocumentation/filesystems/caching/backend-api.txt Documentation/filesystems/caching/fscache.txt fs/cachefiles/internal.h +5 more+122 -130 replies
2/13FS-Cache: Move fscache_report_unexpected_submission() to make it more availablefs/fscache/operation.c+37 -370 replies
3/13FS-Cache: When submitting an op, cancel it if the target object is dyingfs/fscache/operation.c include/linux/fscache-cache.h+37 -190 replies
4/13FS-Cache: Handle a new operation submitted against a killed objectfs/fscache/object.c fs/fscache/operation.c+8 -00 replies
5/13FS-Cache: Synchronise object death state change vs operation submissionfs/fscache/object.c+14 -30 replies
6/13FS-Cache: fscache_object_is_dead() has wrong logic, kill itfs/fscache/cookie.c fs/fscache/page.c include/linux/fscache-cache.h+6 -90 replies
7/13FS-Cache: Permit fscache_cancel_op() to cancel in-progress operations toofs/fscache/internal.h fs/fscache/operation.c fs/fscache/page.c+21 -60 replies
8/13FS-Cache: Out of line fscache_operation_init()fs/fscache/operation.c include/linux/fscache-cache.h+25 -210 replies
9/13FS-Cache: Count the number of initialised operationsDocumentation/filesystems/caching/fscache.txt fs/fscache/internal.h fs/fscache/operation.c +1 more+7 -20 replies
10/13FS-Cache: Fix cancellation of in-progress operationfs/fscache/operation.c+7 -00 replies
11/13FS-Cache: Put an aborted initialised op so that it is accounted correctlyfs/fscache/operation.c fs/fscache/page.c+35 -330 replies
12/13FS-Cache: The operation cancellation method needs calling in more placesfs/fscache/cookie.c fs/fscache/internal.h fs/fscache/object.c +3 more+57 -400 replies
13/13FS-Cache: Retain the netfs context in the retrieval op earlierfs/fscache/operation.c fs/fscache/page.c include/linux/fscache-cache.h+12 -110 replies

Reviews trailers per patch

None of the 13 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJeff Layton
SeriesA-b
1/13
2/13
3/13
4/13
5/13
6/13
7/13
8/13
9/13
10/13
11/13
12/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/13] FS-Cache: Fix a number of bugs that occur when the cache runs out of space

Attached are a bunch of patches that progressively fix bugs that can occur when the cache hits the hard "must maintain X free space" limit and starts rejecting requests.

The commit ensubjected "FS-Cache: Synchronise object death state change vs operation submission" is the main bug I was looking for. Some of the other patches fix other bugs I found along the way and the remaining patches are changes pulled out of the bugfixes to make the bugfix commits more narrowly targeted.

Note that I added some new stats:

	Ops    : ini=836360 dfr=19 rel=836360 gc=19

The ini=N field here indicates the number of fscache_operation structs that were initialised and should match the rel=M value.

	CacheEv: nsp=3425 stl=0 rtr=0 cul=0

Indicates counts of certain cache backend events: nsp=N shows how many objects were rejected due to lack of space in the cache, stl=N shows how many objects were found to be stale upon reuse and thus discarded, rtr=N how many objects were retired and cul=N shows how many inactive objects were culled.

These can also be found here:

http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=fscache-fixes

tagged with:

	fscache-fixes-20150226

David
---
David Howells (13):
FS-Cache: Count culled objects and objects rejected due to lack of space
FS-Cache: Move fscache_report_unexpected_submission() to make it more available
FS-Cache: When submitting an op, cancel it if the target object is dying
FS-Cache: Handle a new operation submitted against a killed object
FS-Cache: Synchronise object death state change vs operation submission
FS-Cache: fscache_object_is_dead() has wrong logic, kill it
FS-Cache: Permit fscache_cancel_op() to cancel in-progress operations too
FS-Cache: Out of line fscache_operation_init()
FS-Cache: Count the number of initialised operations
FS-Cache: Fix cancellation of in-progress operation
FS-Cache: Put an aborted initialised op so that it is accounted correctly
FS-Cache: The operation cancellation method needs calling in more places
FS-Cache: Retain the netfs context in the retrieval op earlier

 Documentation/filesystems/caching/backend-api.txt |   23 ++
 Documentation/filesystems/caching/fscache.txt     |    7 -
 fs/cachefiles/internal.h                          |    1 
 fs/cachefiles/namei.c                             |   33 ++-
 fs/fscache/cookie.c                               |    8 -
 fs/fscache/internal.h                             |   12 +
 fs/fscache/object.c                               |   69 +++++-
 fs/fscache/operation.c                            |  254 ++++++++++++++-------
 fs/fscache/page.c                                 |   86 ++++---
 fs/fscache/stats.c                                |   14 +
 include/linux/fscache-cache.h                     |   55 ++---
 11 files changed, 378 insertions(+), 184 deletions(-)