In child.c : For all commands such as "CreateX,..." check if the backend
[tridge/dbench.git] / dbench.h
index 0d68c628ce177bb24a8bb6fa09afa60d8d90ffbe..8a6f5e881b38107d81bc24fe3546a0d09529cd16 100644 (file)
--- a/dbench.h
+++ b/dbench.h
@@ -136,6 +136,21 @@ struct child_struct {
                struct op op_LockX;
                struct op op_UnlockX;
                struct op op_Flush;
+               struct op op_GETATTR3;
+               struct op op_MKDIR3;
+               struct op op_RMDIR3;
+               struct op op_LOOKUP3;
+               struct op op_CREATE3;
+               struct op op_WRITE3;
+               struct op op_COMMIT3;
+               struct op op_READ3;
+               struct op op_ACCESS3;
+               struct op op_FSSTAT3;
+               struct op op_FSINFO3;
+               struct op op_SYMLINK3;
+               struct op op_REMOVE3;
+               struct op op_READDIRPLUS3;
+               struct op op_LINK3;
        } op;
        void *private;
 };
@@ -161,8 +176,53 @@ struct options {
        int fake_io;
        int skip_cleanup;
        int per_client_results;
+       const char *export;
+       const char *protocol;
 };
 
+struct nb_operations {
+       void (*setup)(struct child_struct *);
+       void (*deltree)(struct child_struct *, const char *dname);
+       void (*cleanup)(struct child_struct *child);
+
+       /* CIFS operations */
+       void (*flush)(struct child_struct *, int handle, const char *status);
+       void (*close)(struct child_struct *, int handle, const char *status);
+       void (*lockx)(struct child_struct *, int handle, uint32_t offset, int size, const char *status);
+       void (*rmdir)(struct child_struct *, const char *fname, const char *status);
+       void (*mkdir)(struct child_struct *, const char *dname, const char *status);
+       void (*rename)(struct child_struct *, const char *old, const char *new, const char *status);
+       void (*readx)(struct child_struct *, int handle, int offset, int size, int ret_size, const char *status);
+       void (*writex)(struct child_struct *, int handle, int offset, int size, int ret_size, const char *status);
+       void (*unlink)(struct child_struct *, const char *fname, int attr, const char *status);
+       void (*unlockx)(struct child_struct *child,int handle, uint32_t offset, int size, const char *status);
+       void (*findfirst)(struct child_struct *child, const char *fname, int level, int maxcnt, int count, const char *status);
+       void (*sfileinfo)(struct child_struct *child, int handle, int level, const char *status);
+       void (*qfileinfo)(struct child_struct *child, int handle, int level, const char *status);
+       void (*qpathinfo)(struct child_struct *child, const char *fname, int level, const char *status);
+       void (*qfsinfo)(struct child_struct *child, int level, const char *status);
+       void (*createx)(struct child_struct *child, const char *fname, uint32_t create_options, uint32_t create_disposition, int fnum, const char *status);
+
+       /* NFSv3 operations */
+       void (*getattr3)(struct child_struct *child, const char *fname, const char *status);
+       void (*lookup3)(struct child_struct *child, const char *fname, const char *status);
+       void (*create3)(struct child_struct *child, const char *fname, const char *status);
+       void (*write3)(struct child_struct *child, const char *fname, int offset, int len, int stable, const char *status);
+       void (*commit3)(struct child_struct *child, const char *fname, const char *status);
+       void (*read3)(struct child_struct *child, const char *fname, int offset, int len, const char *status);
+       void (*access3)(struct child_struct *child, const char *fname, int desired, int granted, const char *status);
+       void (*mkdir3)(struct child_struct *child, const char *fname, const char *status);
+       void (*rmdir3)(struct child_struct *child, const char *fname, const char *status);
+       void (*fsstat3)(struct child_struct *child, const char *status);
+       void (*fsinfo3)(struct child_struct *child, const char *status);
+       void (*symlink3)(struct child_struct *child, const char *fname, const char *fname2, const char *status);
+       void (*remove3)(struct child_struct *child, const char *fname, const char *status);
+       void (*readdirplus3)(struct child_struct *child, const char *fname, const char *status);
+       void (*link3)(struct child_struct *child, const char *fname, const char *fname2, const char *status);
+       void (*rename3)(struct child_struct *child, const char *fname, const char *fname2, const char *status);
+};
+extern struct nb_operations nb_ops;
+
 /* CreateDisposition field. */
 #define FILE_SUPERSEDE 0
 #define FILE_OPEN 1