1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (c) 2014 Anna Schumaker <Anna.Schumaker@Netapp.com>
6 #ifndef __LINUX_FS_NFS_NFS4_2_H
7 #define __LINUX_FS_NFS_NFS4_2_H
10 * FIXME: four LAYOUTSTATS calls per compound at most! Do we need to support
11 * more? Need to consider not to pre-alloc too much for a compound.
13 #define PNFS_LAYOUTSTATS_MAXDEV (4)
16 #ifdef CONFIG_NFS_V4_2
17 int nfs42_proc_allocate(struct file *, loff_t, loff_t);
18 ssize_t nfs42_proc_copy(struct file *, loff_t, struct file *, loff_t, size_t);
19 int nfs42_proc_deallocate(struct file *, loff_t, loff_t);
20 loff_t nfs42_proc_llseek(struct file *, loff_t, int);
21 int nfs42_proc_layoutstats_generic(struct nfs_server *,
22 struct nfs42_layoutstat_data *);
23 int nfs42_proc_clone(struct file *, struct file *, loff_t, loff_t, loff_t);
24 int nfs42_proc_layouterror(struct pnfs_layout_segment *lseg,
25 const struct nfs42_layout_error *errors,
27 int nfs42_proc_copy_notify(struct file *, struct file *,
28 struct nfs42_copy_notify_res *);
29 static inline bool nfs42_files_from_same_server(struct file *in,
32 struct nfs_client *c_in = (NFS_SERVER(file_inode(in)))->nfs_client;
33 struct nfs_client *c_out = (NFS_SERVER(file_inode(out)))->nfs_client;
35 return nfs4_check_serverowner_major_id(c_in->cl_serverowner,
36 c_out->cl_serverowner);
38 #endif /* CONFIG_NFS_V4_2 */
39 #endif /* __LINUX_FS_NFS_NFS4_2_H */