| 1 | /* |
|---|
| 2 | * linux/include/linux/nfs_fs.h |
|---|
| 3 | * |
|---|
| 4 | * Copyright (C) 1992 Rick Sladkey |
|---|
| 5 | * |
|---|
| 6 | * OS-specific nfs filesystem definitions and declarations |
|---|
| 7 | */ |
|---|
| 8 | |
|---|
| 9 | #ifndef _LINUX_NFS_FS_H |
|---|
| 10 | #define _LINUX_NFS_FS_H |
|---|
| 11 | |
|---|
| 12 | #include <linux/in.h> |
|---|
| 13 | #include <linux/wait.h> |
|---|
| 14 | #include <linux/uio.h> |
|---|
| 15 | |
|---|
| 16 | #include <linux/nfs_fs_sb.h> |
|---|
| 17 | |
|---|
| 18 | #include <linux/sunrpc/debug.h> |
|---|
| 19 | #include <linux/sunrpc/clnt.h> |
|---|
| 20 | |
|---|
| 21 | #include <linux/nfs.h> |
|---|
| 22 | #include <linux/nfs2.h> |
|---|
| 23 | #include <linux/nfs3.h> |
|---|
| 24 | #include <linux/nfs4.h> |
|---|
| 25 | #include <linux/nfs_xdr.h> |
|---|
| 26 | |
|---|
| 27 | /* |
|---|
| 28 | * Enable debugging support for nfs client. |
|---|
| 29 | * Requires RPC_DEBUG. |
|---|
| 30 | */ |
|---|
| 31 | #ifdef RPC_DEBUG |
|---|
| 32 | # define NFS_DEBUG |
|---|
| 33 | #endif |
|---|
| 34 | |
|---|
| 35 | #define NFS_MAX_FILE_IO_BUFFER_SIZE 32768 |
|---|
| 36 | #define NFS_DEF_FILE_IO_BUFFER_SIZE 4096 |
|---|
| 37 | |
|---|
| 38 | /* |
|---|
| 39 | * The upper limit on timeouts for the exponential backoff algorithm. |
|---|
| 40 | */ |
|---|
| 41 | #define NFS_WRITEBACK_DELAY (5*HZ) |
|---|
| 42 | #define NFS_WRITEBACK_LOCKDELAY (60*HZ) |
|---|
| 43 | #define NFS_COMMIT_DELAY (5*HZ) |
|---|
| 44 | |
|---|
| 45 | /* |
|---|
| 46 | * superblock magic number for NFS |
|---|
| 47 | */ |
|---|
| 48 | #define NFS_SUPER_MAGIC 0x6969 |
|---|
| 49 | |
|---|
| 50 | /* |
|---|
| 51 | * These are the default flags for swap requests |
|---|
| 52 | */ |
|---|
| 53 | #define NFS_RPC_SWAPFLAGS (RPC_TASK_SWAPPER|RPC_TASK_ROOTCREDS) |
|---|
| 54 | |
|---|
| 55 | #define NFS_RW_SYNC 0x0001 /* O_SYNC handling */ |
|---|
| 56 | #define NFS_RW_SWAP 0x0002 /* This is a swap request */ |
|---|
| 57 | |
|---|
| 58 | /* |
|---|
| 59 | * When flushing a cluster of dirty pages, there can be different |
|---|
| 60 | * strategies: |
|---|
| 61 | */ |
|---|
| 62 | #define FLUSH_AGING 0 /* only flush old buffers */ |
|---|
| 63 | #define FLUSH_SYNC 1 /* file being synced, or contention */ |
|---|
| 64 | #define FLUSH_WAIT 2 /* wait for completion */ |
|---|
| 65 | #define FLUSH_STABLE 4 /* commit to stable storage */ |
|---|
| 66 | #define FLUSH_LOWPRI 8 /* low priority background flush */ |
|---|
| 67 | #define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | /* |
|---|
| 71 | * NFS debug flags |
|---|
| 72 | */ |
|---|
| 73 | #define NFSDBG_VFS 0x0001 |
|---|
| 74 | #define NFSDBG_DIRCACHE 0x0002 |
|---|
| 75 | #define NFSDBG_LOOKUPCACHE 0x0004 |
|---|
| 76 | #define NFSDBG_PAGECACHE 0x0008 |
|---|
| 77 | #define NFSDBG_PROC 0x0010 |
|---|
| 78 | #define NFSDBG_XDR 0x0020 |
|---|
| 79 | #define NFSDBG_FILE 0x0040 |
|---|
| 80 | #define NFSDBG_ROOT 0x0080 |
|---|
| 81 | #define NFSDBG_CALLBACK 0x0100 |
|---|
| 82 | #define NFSDBG_ALL 0xFFFF |
|---|
| 83 | |
|---|
| 84 | #endif |
|---|