nfsd: implement the NFSv4.2 CLONE operation

This is basically a remote version of the btrfs CLONE operation,
so the implementation is fairly trivial.  Made even more trivial
by stealing the XDR code and general framework Anna Schumaker's
COPY prototype.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Christoph Hellwig
2015-12-03 12:59:52 +01:00
committed by Al Viro
vanhempi aa0d6aed45
commit ffa0160a10
6 muutettua tiedostoa jossa 90 lisäystä ja 2 poistoa

Näytä tiedosto

@@ -491,6 +491,15 @@ struct nfsd4_fallocate {
u64 falloc_length;
};
struct nfsd4_clone {
/* request */
stateid_t cl_src_stateid;
stateid_t cl_dst_stateid;
u64 cl_src_pos;
u64 cl_dst_pos;
u64 cl_count;
};
struct nfsd4_seek {
/* request */
stateid_t seek_stateid;
@@ -555,6 +564,7 @@ struct nfsd4_op {
/* NFSv4.2 */
struct nfsd4_fallocate allocate;
struct nfsd4_fallocate deallocate;
struct nfsd4_clone clone;
struct nfsd4_seek seek;
} u;
struct nfs4_replay * replay;