* 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
dev_t fc_rdev;
} FsCred;
-struct xattr_operations;
struct FsContext;
struct V9fsPath;
typedef struct FileOperations FileOperations;
+typedef struct XattrOperations XattrOperations;
+
/*
* Structure to store the various fsdev's passed through command line.
*/
char *path;
int export_flags;
FileOperations *ops;
+ FsThrottle fst;
+ mode_t fmode;
+ mode_t dmode;
} FsDriverEntry;
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 {
{
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 *);