]> git.baikalelectronics.ru Git - kernel.git/commit
fscache: Maintain a catalogue of allocated cookies
authorDavid Howells <dhowells@redhat.com>
Wed, 4 Apr 2018 12:41:28 +0000 (13:41 +0100)
committerDavid Howells <dhowells@redhat.com>
Fri, 6 Apr 2018 13:05:14 +0000 (14:05 +0100)
commitaac5768a95258001a485211551a602d5e65fa6f1
tree0ff7cf689f4259baa44a5de789f72cdc015a1e30
parent7690ced4e97ff43645289158439a3e3ad17c9cc6
fscache: Maintain a catalogue of allocated cookies

Maintain a catalogue of allocated cookies so that cookie collisions can be
handled properly.  For the moment, this just involves printing a warning
and returning a NULL cookie to the caller of fscache_acquire_cookie(), but
in future it might make sense to wait for the old cookie to finish being
cleaned up.

This requires the cookie key to be stored attached to the cookie so that we
still have the key available if the netfs relinquishes the cookie.  This is
done by an earlier patch.

The catalogue also renders redundant fscache_netfs_list (used for checking
for duplicates), so that can be removed.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Anna Schumaker <anna.schumaker@netapp.com>
Tested-by: Steve Dickson <steved@redhat.com>
fs/fscache/cookie.c
fs/fscache/internal.h
fs/fscache/netfs.c
include/linux/fscache.h
include/trace/events/fscache.h