Merge tag 'mips_5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
[linux-2.6-block.git] / fs / nfs / nfs42.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
1c6dcbe5
AS
2/*
3 * Copyright (c) 2014 Anna Schumaker <Anna.Schumaker@Netapp.com>
4 */
5
6#ifndef __LINUX_FS_NFS_NFS4_2_H
7#define __LINUX_FS_NFS_NFS4_2_H
8
be3a5d23
TM
9/*
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.
12 */
13#define PNFS_LAYOUTSTATS_MAXDEV (4)
14
1c6dcbe5 15/* nfs4.2proc.c */
0491567b 16#ifdef CONFIG_NFS_V4_2
f4ac1674 17int nfs42_proc_allocate(struct file *, loff_t, loff_t);
1d38f3f0 18ssize_t nfs42_proc_copy(struct file *, loff_t, struct file *, loff_t, size_t,
12751010 19 struct nl4_server *, nfs4_stateid *, bool);
624bd5b7 20int nfs42_proc_deallocate(struct file *, loff_t, loff_t);
1c6dcbe5 21loff_t nfs42_proc_llseek(struct file *, loff_t, int);
be3a5d23
TM
22int nfs42_proc_layoutstats_generic(struct nfs_server *,
23 struct nfs42_layoutstat_data *);
e5341f3a 24int nfs42_proc_clone(struct file *, struct file *, loff_t, loff_t, loff_t);
3eb86093
TM
25int nfs42_proc_layouterror(struct pnfs_layout_segment *lseg,
26 const struct nfs42_layout_error *errors,
27 size_t n);
0491567b
OK
28int nfs42_proc_copy_notify(struct file *, struct file *,
29 struct nfs42_copy_notify_res *);
30static inline bool nfs42_files_from_same_server(struct file *in,
31 struct file *out)
32{
33 struct nfs_client *c_in = (NFS_SERVER(file_inode(in)))->nfs_client;
34 struct nfs_client *c_out = (NFS_SERVER(file_inode(out)))->nfs_client;
1c6dcbe5 35
0491567b
OK
36 return nfs4_check_serverowner_major_id(c_in->cl_serverowner,
37 c_out->cl_serverowner);
38}
39#endif /* CONFIG_NFS_V4_2 */
1c6dcbe5 40#endif /* __LINUX_FS_NFS_NFS4_2_H */