xref: /linux/include/uapi/linux/nfs_fs.h (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2607ca46eSDavid Howells /*
3607ca46eSDavid Howells  *  linux/include/linux/nfs_fs.h
4607ca46eSDavid Howells  *
5607ca46eSDavid Howells  *  Copyright (C) 1992  Rick Sladkey
6607ca46eSDavid Howells  *
7607ca46eSDavid Howells  *  OS-specific nfs filesystem definitions and declarations
8607ca46eSDavid Howells  */
9607ca46eSDavid Howells 
10607ca46eSDavid Howells #ifndef _UAPI_LINUX_NFS_FS_H
11607ca46eSDavid Howells #define _UAPI_LINUX_NFS_FS_H
12607ca46eSDavid Howells 
13607ca46eSDavid Howells #include <linux/magic.h>
14607ca46eSDavid Howells 
15607ca46eSDavid Howells /* Default timeout values */
16607ca46eSDavid Howells #define NFS_DEF_UDP_TIMEO	(11)
17607ca46eSDavid Howells #define NFS_DEF_UDP_RETRANS	(3)
18607ca46eSDavid Howells #define NFS_DEF_TCP_TIMEO	(600)
19607ca46eSDavid Howells #define NFS_DEF_TCP_RETRANS	(2)
20607ca46eSDavid Howells 
21607ca46eSDavid Howells #define NFS_MAX_UDP_TIMEOUT	(60*HZ)
22607ca46eSDavid Howells #define NFS_MAX_TCP_TIMEOUT	(600*HZ)
23607ca46eSDavid Howells 
24607ca46eSDavid Howells #define NFS_DEF_ACREGMIN	(3)
25607ca46eSDavid Howells #define NFS_DEF_ACREGMAX	(60)
26607ca46eSDavid Howells #define NFS_DEF_ACDIRMIN	(30)
27607ca46eSDavid Howells #define NFS_DEF_ACDIRMAX	(60)
28607ca46eSDavid Howells 
29607ca46eSDavid Howells /*
30607ca46eSDavid Howells  * When flushing a cluster of dirty pages, there can be different
31607ca46eSDavid Howells  * strategies:
32607ca46eSDavid Howells  */
33607ca46eSDavid Howells #define FLUSH_SYNC		1	/* file being synced, or contention */
34607ca46eSDavid Howells #define FLUSH_STABLE		4	/* commit to stable storage */
35607ca46eSDavid Howells #define FLUSH_LOWPRI		8	/* low priority background flush */
36607ca46eSDavid Howells #define FLUSH_HIGHPRI		16	/* high priority memory reclaim flush */
37607ca46eSDavid Howells #define FLUSH_COND_STABLE	32	/* conditional stable write - only stable
38607ca46eSDavid Howells 					 * if everything fits in one RPC */
39607ca46eSDavid Howells 
40607ca46eSDavid Howells 
41607ca46eSDavid Howells /*
42607ca46eSDavid Howells  * NFS debug flags
43607ca46eSDavid Howells  */
44607ca46eSDavid Howells #define NFSDBG_VFS		0x0001
45607ca46eSDavid Howells #define NFSDBG_DIRCACHE		0x0002
46607ca46eSDavid Howells #define NFSDBG_LOOKUPCACHE	0x0004
47607ca46eSDavid Howells #define NFSDBG_PAGECACHE	0x0008
48607ca46eSDavid Howells #define NFSDBG_PROC		0x0010
49607ca46eSDavid Howells #define NFSDBG_XDR		0x0020
50607ca46eSDavid Howells #define NFSDBG_FILE		0x0040
51607ca46eSDavid Howells #define NFSDBG_ROOT		0x0080
52607ca46eSDavid Howells #define NFSDBG_CALLBACK		0x0100
53607ca46eSDavid Howells #define NFSDBG_CLIENT		0x0200
54607ca46eSDavid Howells #define NFSDBG_MOUNT		0x0400
55*b5fdf66fSDave Wysochanski #define NFSDBG_FSCACHE		0x0800 /* unused */
56607ca46eSDavid Howells #define NFSDBG_PNFS		0x1000
57607ca46eSDavid Howells #define NFSDBG_PNFS_LD		0x2000
58607ca46eSDavid Howells #define NFSDBG_STATE		0x4000
5995ad37f9SFrank van der Linden #define NFSDBG_XATTRCACHE	0x8000
60607ca46eSDavid Howells #define NFSDBG_ALL		0xFFFF
61607ca46eSDavid Howells 
62607ca46eSDavid Howells 
63607ca46eSDavid Howells #endif /* _UAPI_LINUX_NFS_FS_H */
64