]> 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)
commit12f01c0db14ebeec78dc24e748ab255398536d49
tree0ff7cf689f4259baa44a5de789f72cdc015a1e30
parent47c18e5887641c1e0a9092d6956b53c10c773bd1
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