Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
[pandora-kernel.git] / include / linux / nfsd / nfsd.h
index d0d4aae..4b7c4b5 100644 (file)
  * Callback function for readdir
  */
 struct readdir_cd {
-       int                     err;    /* 0, nfserr, or nfserr_eof */
+       __be32                  err;    /* 0, nfserr, or nfserr_eof */
 };
-typedef int            (*encode_dent_fn)(struct readdir_cd *, const char *,
-                                               int, loff_t, ino_t, unsigned int);
 typedef int (*nfsd_dirop_t)(struct inode *, struct dentry *, int, int);
 
 extern struct svc_program      nfsd_program;
@@ -64,7 +62,7 @@ extern struct svc_serv                *nfsd_serv;
  * Function prototypes.
  */
 int            nfsd_svc(unsigned short port, int nrservs);
-int            nfsd_dispatch(struct svc_rqst *rqstp, u32 *statp);
+int            nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp);
 
 /* nfsd/vfs.c */
 int            fh_lock_parent(struct svc_fh *, struct dentry *);
@@ -72,57 +70,57 @@ int         nfsd_racache_init(int);
 void           nfsd_racache_shutdown(void);
 int            nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp,
                                struct svc_export **expp);
-int            nfsd_lookup(struct svc_rqst *, struct svc_fh *,
+__be32         nfsd_lookup(struct svc_rqst *, struct svc_fh *,
                                const char *, int, struct svc_fh *);
-int            nfsd_setattr(struct svc_rqst *, struct svc_fh *,
+__be32         nfsd_setattr(struct svc_rqst *, struct svc_fh *,
                                struct iattr *, int, time_t);
 #ifdef CONFIG_NFSD_V4
-int             nfsd4_set_nfs4_acl(struct svc_rqst *, struct svc_fh *,
+__be32          nfsd4_set_nfs4_acl(struct svc_rqst *, struct svc_fh *,
                     struct nfs4_acl *);
 int             nfsd4_get_nfs4_acl(struct svc_rqst *, struct dentry *, struct nfs4_acl **);
 #endif /* CONFIG_NFSD_V4 */
-int            nfsd_create(struct svc_rqst *, struct svc_fh *,
+__be32         nfsd_create(struct svc_rqst *, struct svc_fh *,
                                char *name, int len, struct iattr *attrs,
                                int type, dev_t rdev, struct svc_fh *res);
 #ifdef CONFIG_NFSD_V3
-int            nfsd_access(struct svc_rqst *, struct svc_fh *, u32 *, u32 *);
-int            nfsd_create_v3(struct svc_rqst *, struct svc_fh *,
+__be32         nfsd_access(struct svc_rqst *, struct svc_fh *, u32 *, u32 *);
+__be32         nfsd_create_v3(struct svc_rqst *, struct svc_fh *,
                                char *name, int len, struct iattr *attrs,
                                struct svc_fh *res, int createmode,
-                               u32 *verifier, int *truncp);
-int            nfsd_commit(struct svc_rqst *, struct svc_fh *,
+                               u32 *verifier, int *truncp, int *created);
+__be32         nfsd_commit(struct svc_rqst *, struct svc_fh *,
                                loff_t, unsigned long);
 #endif /* CONFIG_NFSD_V3 */
-int            nfsd_open(struct svc_rqst *, struct svc_fh *, int,
+__be32         nfsd_open(struct svc_rqst *, struct svc_fh *, int,
                                int, struct file **);
 void           nfsd_close(struct file *);
-int            nfsd_read(struct svc_rqst *, struct svc_fh *, struct file *,
+__be32                 nfsd_read(struct svc_rqst *, struct svc_fh *, struct file *,
                                loff_t, struct kvec *, int, unsigned long *);
-int            nfsd_write(struct svc_rqst *, struct svc_fh *,struct file *,
+__be32                 nfsd_write(struct svc_rqst *, struct svc_fh *,struct file *,
                                loff_t, struct kvec *,int, unsigned long, int *);
-int            nfsd_readlink(struct svc_rqst *, struct svc_fh *,
+__be32         nfsd_readlink(struct svc_rqst *, struct svc_fh *,
                                char *, int *);
-int            nfsd_symlink(struct svc_rqst *, struct svc_fh *,
+__be32         nfsd_symlink(struct svc_rqst *, struct svc_fh *,
                                char *name, int len, char *path, int plen,
                                struct svc_fh *res, struct iattr *);
-int            nfsd_link(struct svc_rqst *, struct svc_fh *,
+__be32         nfsd_link(struct svc_rqst *, struct svc_fh *,
                                char *, int, struct svc_fh *);
-int            nfsd_rename(struct svc_rqst *,
+__be32         nfsd_rename(struct svc_rqst *,
                                struct svc_fh *, char *, int,
                                struct svc_fh *, char *, int);
-int            nfsd_remove(struct svc_rqst *,
+__be32         nfsd_remove(struct svc_rqst *,
                                struct svc_fh *, char *, int);
-int            nfsd_unlink(struct svc_rqst *, struct svc_fh *, int type,
+__be32         nfsd_unlink(struct svc_rqst *, struct svc_fh *, int type,
                                char *name, int len);
 int            nfsd_truncate(struct svc_rqst *, struct svc_fh *,
                                unsigned long size);
-int            nfsd_readdir(struct svc_rqst *, struct svc_fh *,
-                            loff_t *, struct readdir_cd *, encode_dent_fn);
-int            nfsd_statfs(struct svc_rqst *, struct svc_fh *,
+__be32         nfsd_readdir(struct svc_rqst *, struct svc_fh *,
+                            loff_t *, struct readdir_cd *, filldir_t);
+__be32         nfsd_statfs(struct svc_rqst *, struct svc_fh *,
                                struct kstatfs *);
 
 int            nfsd_notify_change(struct inode *, struct iattr *);
-int            nfsd_permission(struct svc_export *, struct dentry *, int);
+__be32         nfsd_permission(struct svc_export *, struct dentry *, int);
 int            nfsd_sync_dir(struct dentry *dp);
 
 #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL)
@@ -238,6 +236,7 @@ void                nfsd_lockd_shutdown(void);
 #define        nfserr_badname          __constant_htonl(NFSERR_BADNAME)
 #define        nfserr_cb_path_down     __constant_htonl(NFSERR_CB_PATH_DOWN)
 #define        nfserr_locked           __constant_htonl(NFSERR_LOCKED)
+#define        nfserr_replay_me        __constant_htonl(NFSERR_REPLAY_ME)
 
 /* error codes for internal use */
 /* if a request fails due to kmalloc failure, it gets dropped.
@@ -274,12 +273,12 @@ static inline int is_fsid(struct svc_fh *fh, struct knfsd_fh *reffh)
  * we might process an operation with side effects, and be unable to
  * tell the client that the operation succeeded.
  *
- * COMPOUND_SLACK_SPACE - this is the minimum amount of buffer space
+ * COMPOUND_SLACK_SPACE - this is the minimum bytes of buffer space
  * needed to encode an "ordinary" _successful_ operation.  (GETATTR,
  * READ, READDIR, and READLINK have their own buffer checks.)  if we
  * fall below this level, we fail the next operation with NFS4ERR_RESOURCE.
  *
- * COMPOUND_ERR_SLACK_SPACE - this is the minimum amount of buffer space
+ * COMPOUND_ERR_SLACK_SPACE - this is the minimum bytes of buffer space
  * needed to encode an operation which has failed with NFS4ERR_RESOURCE.
  * care is taken to ensure that we never fall below this level for any
  * reason.