]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: implement pNFS layout recalls
authorChristoph Hellwig <hch@lst.de>
Tue, 23 Sep 2014 10:38:48 +0000 (12:38 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 2 Feb 2015 17:09:43 +0000 (18:09 +0100)
commit2569111c6b8c3de3d8c52875f0839ef909cb5e61
tree358247cff990d703ef8860e1e46e201d3974bf0b
parent2c0f14e2843ac80bf806e7c104cae59b60796ee3
nfsd: implement pNFS layout recalls

Add support to issue layout recalls to clients.  For now we only support
full-file recalls to get a simple and stable implementation.  This allows
to embedd a nfsd4_callback structure in the layout_state and thus avoid
any memory allocations under spinlocks during a recall.  For normal
use cases that do not intent to share a single file between multiple
clients this implementation is fully sufficient.

To ensure layouts are recalled on local filesystem access each layout
state registers a new FL_LAYOUT lease with the kernel file locking code,
which filesystems that support pNFS exports that require recalls need
to break on conflicting access patterns.

The XDR code is based on the old pNFS server implementation by
Andy Adamson, Benny Halevy, Boaz Harrosh, Dean Hildebrand, Fred Isaman,
Marc Eshel, Mike Sager and Ricardo Labiaga.

Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/nfsd/nfs4callback.c
fs/nfsd/nfs4layouts.c
fs/nfsd/nfs4proc.c
fs/nfsd/nfs4state.c
fs/nfsd/state.h
fs/nfsd/xdr4cb.h