OSDN Git Service

fscache, cachefiles: Store the volume coherency data
authorDavid Howells <dhowells@redhat.com>
Tue, 14 Dec 2021 09:51:43 +0000 (09:51 +0000)
committerDavid Howells <dhowells@redhat.com>
Fri, 7 Jan 2022 13:43:03 +0000 (13:43 +0000)
commit32e150037dce368d129996ffe5f98217b1974d9e
treee9772d127f0b309116bf5009b3eb7a8089b934a5
parent047487c947e8b96b94579c3a33207bd4e266b4c6
fscache, cachefiles: Store the volume coherency data

Store the volume coherency data in an xattr and check it when we rebind the
volume.  If it doesn't match the cache volume is moved to the graveyard and
rebuilt anew.

Changes
=======
ver #4:
 - Remove a couple of debugging prints.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Link: https://lore.kernel.org/r/163967164397.1823006.2950539849831291830.stgit@warthog.procyon.org.uk/
Link: https://lore.kernel.org/r/164021563138.640689.15851092065380543119.stgit@warthog.procyon.org.uk/
fs/cachefiles/internal.h
fs/cachefiles/volume.c
fs/cachefiles/xattr.c
fs/fscache/volume.c
include/linux/fscache.h
include/trace/events/cachefiles.h