root/include/linux/nfs_fs.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _LINUX_NFS_FS_H
   2 #define _LINUX_NFS_FS_H
   3 
   4 /*
   5  *  linux/include/linux/nfs_fs.h
   6  *
   7  *  Copyright (C) 1992  Rick Sladkey
   8  *
   9  *  OS-specific nfs filesystem definitions and declarations
  10  */
  11 
  12 #include <linux/nfs.h>
  13 
  14 #include <linux/in.h>
  15 #include <linux/nfs_mount.h>
  16 
  17 /*
  18  * The readdir cache size controls how many directory entries are cached.
  19  * Its size is limited by the number of nfs_entry structures that can fit
  20  * in one 4096-byte page, currently 256.
  21  */
  22 
  23 #define NFS_READDIR_CACHE_SIZE          64
  24 
  25 /*
  26  * WARNING!  The I/O buffer size cannot be bigger than about 3900 for now.
  27  * It needs to fit inside a 4096-byte page and leave room for the RPC and
  28  * NFS headers.  But it ought to at least be a multiple of 512 and probably
  29  * should be a power of 2.  I don't think Linux TCP/IP can handle more than
  30  * about 1800 yet.
  31  */
  32 
  33 #define NFS_MAX_FILE_IO_BUFFER_SIZE     (7*512)
  34 #define NFS_DEF_FILE_IO_BUFFER_SIZE     1024
  35 
  36 /*
  37  * The upper limit on timeouts for the exponential backoff algorithm
  38  * in tenths of a second.
  39  */
  40 
  41 #define NFS_MAX_RPC_TIMEOUT             600
  42 
  43 /*
  44  * Size of the lookup cache in units of number of entries cached.
  45  * It is better not to make this too large although the optimimum
  46  * depends on a usage and environment.
  47  */
  48 
  49 #define NFS_LOOKUP_CACHE_SIZE           64
  50 
  51 #define NFS_SUPER_MAGIC                 0x6969
  52 
  53 #define NFS_SERVER(inode)               (&(inode)->i_sb->u.nfs_sb.s_server)
  54 #define NFS_FH(inode)                   (&(inode)->u.nfs_i.fhandle)
  55 
  56 /* linux/fs/nfs/proc.c */
  57 
  58 extern int nfs_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
  59                             struct nfs_fattr *fattr);
  60 extern int nfs_proc_setattr(struct nfs_server *server, struct nfs_fh *fhandle,
  61                             struct nfs_sattr *sattr, struct nfs_fattr *fattr);
  62 extern int nfs_proc_lookup(struct nfs_server *server, struct nfs_fh *dir,
  63                            const char *name, struct nfs_fh *fhandle,
  64                            struct nfs_fattr *fattr);
  65 extern int nfs_proc_readlink(struct nfs_server *server, struct nfs_fh *fhandle,
  66                              char *res);
  67 extern int nfs_proc_read(struct nfs_server *server, struct nfs_fh *fhandle,
  68                          int offset, int count, char *data,
  69                          struct nfs_fattr *fattr);
  70 extern int nfs_proc_write(struct nfs_server *server, struct nfs_fh *fhandle,
  71                           int offset, int count, char *data,
  72                           struct nfs_fattr *fattr);
  73 extern int nfs_proc_create(struct nfs_server *server, struct nfs_fh *dir,
  74                            const char *name, struct nfs_sattr *sattr,
  75                            struct nfs_fh *fhandle, struct nfs_fattr *fattr);
  76 extern int nfs_proc_remove(struct nfs_server *server, struct nfs_fh *dir,
  77                            const char *name);
  78 extern int nfs_proc_rename(struct nfs_server *server,
  79                            struct nfs_fh *old_dir, const char *old_name,
  80                            struct nfs_fh *new_dir, const char *new_name);
  81 extern int nfs_proc_link(struct nfs_server *server, struct nfs_fh *fhandle,
  82                          struct nfs_fh *dir, const char *name);
  83 extern int nfs_proc_symlink(struct nfs_server *server, struct nfs_fh *dir,
  84                             const char *name, const char *path, struct nfs_sattr *sattr);
  85 extern int nfs_proc_mkdir(struct nfs_server *server, struct nfs_fh *dir,
  86                           const char *name, struct nfs_sattr *sattr,
  87                           struct nfs_fh *fhandle, struct nfs_fattr *fattr);
  88 extern int nfs_proc_rmdir(struct nfs_server *server, struct nfs_fh *dir,
  89                           const char *name);
  90 extern int nfs_proc_readdir(struct nfs_server *server, struct nfs_fh *fhandle,
  91                             int cookie, int count, struct nfs_entry *entry);
  92 extern int nfs_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle,
  93                             struct nfs_fsinfo *res);
  94 
  95 /* linux/fs/nfs/sock.c */
  96 
  97 extern int nfs_rpc_call(struct nfs_server *server, int *start, int *end);
  98 
  99 /* linux/fs/nfs/inode.c */
 100 
 101 extern struct super_block *nfs_read_super(struct super_block *sb, 
 102                                           void *data,int);
 103 extern struct inode *nfs_fhget(struct super_block *sb, struct nfs_fh *fhandle,
 104                                struct nfs_fattr *fattr);
 105 extern void nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr);
 106 
 107 /* linux/fs/nfs/file.c */
 108 
 109 extern struct inode_operations nfs_file_inode_operations;
 110 
 111 /* linux/fs/nfs/dir.c */
 112 
 113 extern struct inode_operations nfs_dir_inode_operations;
 114 
 115 /* linux/fs/nfs/symlink.c */
 116 
 117 extern struct inode_operations nfs_symlink_inode_operations;
 118 
 119 /* linux/fs/nfs/mmap.c */
 120 
 121 extern int nfs_mmap(struct inode * inode, struct file * file,
 122                unsigned long addr, size_t len, int prot, unsigned long off);
 123 
 124 #endif

/* [previous][next][first][last][top][bottom][index][help] */