]> www.infradead.org Git - users/willy/xarray.git/commit
nfsd: Don't garbage collect files that might contain write errors
authorTrond Myklebust <trondmy@gmail.com>
Mon, 2 Sep 2019 17:02:57 +0000 (13:02 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 10 Sep 2019 13:23:41 +0000 (09:23 -0400)
commit055b24a8f23090043b2ce0c30f03e12c5f2c9e72
tree22beaa6baaf7537b40a9efebefcda119477f994a
parent27c438f53e79b81dc8805a81f6cd74824ba57290
nfsd: Don't garbage collect files that might contain write errors

If a file may contain unstable writes that can error out, then we want
to avoid garbage collecting the struct nfsd_file that may be
tracking those errors.
So in the garbage collector, we try to avoid collecting files that aren't
clean. Furthermore, we avoid immediately kicking off the garbage collector
in the case where the reference drops to zero for the case where there
is a write error that is being tracked.

If the file is unhashed while an error is pending, then declare a
reboot, to ensure the client resends any unstable writes.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/filecache.c