]> git.proxmox.com Git - mirror_qemu.git/blobdiff - fsdev/file-op-9p.h
9pfs: fix XattrOperations typedef
[mirror_qemu.git] / fsdev / file-op-9p.h
index b1338ba06c953855777bdecb85c007af959e8b04..05b3ef35746238d982df49ebba181e63640f9b4d 100644 (file)
  * the COPYING file in the top-level directory.
  *
  */
-#ifndef _FILEOP_H
-#define _FILEOP_H
+
+#ifndef FILE_OP_9P_H
+#define FILE_OP_9P_H
+
 #include <dirent.h>
 #include <utime.h>
 #include <sys/vfs.h>
+#include "qemu-fsdev-throttle.h"
 
 #define SM_LOCAL_MODE_BITS    0600
 #define SM_LOCAL_DIR_MODE_BITS    0700
@@ -27,7 +30,6 @@ typedef struct FsCred
     dev_t   fc_rdev;
 } FsCred;
 
-struct xattr_operations;
 struct FsContext;
 struct V9fsPath;
 
@@ -64,6 +66,8 @@ typedef struct extended_ops {
 
 
 typedef struct FileOperations FileOperations;
+typedef struct XattrOperations XattrOperations;
+
 /*
  * Structure to store the various fsdev's passed through command line.
  */
@@ -72,6 +76,9 @@ typedef struct FsDriverEntry {
     char *path;
     int export_flags;
     FileOperations *ops;
+    FsThrottle fst;
+    mode_t fmode;
+    mode_t dmode;
 } FsDriverEntry;
 
 typedef struct FsContext
@@ -79,10 +86,13 @@ typedef struct FsContext
     uid_t uid;
     char *fs_root;
     int export_flags;
-    struct xattr_operations **xops;
+    XattrOperations **xops;
     struct extended_ops exops;
+    FsThrottle *fst;
     /* fs driver specific data */
     void *private;
+    mode_t fmode;
+    mode_t dmode;
 } FsContext;
 
 typedef struct V9fsPath {
@@ -98,6 +108,7 @@ struct FileOperations
 {
     int (*parse_opts)(QemuOpts *, struct FsDriverEntry *);
     int (*init)(struct FsContext *);
+    void (*cleanup)(struct FsContext *);
     int (*lstat)(FsContext *, V9fsPath *, struct stat *);
     ssize_t (*readlink)(FsContext *, V9fsPath *, char *, size_t);
     int (*chmod)(FsContext *, V9fsPath *, FsCred *);