diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2011-10-25 12:10:40 +0530 |
---|---|---|
committer | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2011-10-31 12:34:18 +0530 |
commit | 9db221ae73a18e0bd2b1ee6c7dc1904ed06fb464 (patch) | |
tree | e07b64eb5813824d4840e5e3f5abd2d6017dc3c0 /hw/9pfs/virtio-9p.h | |
parent | cc720ddb5435ceaa4cda397ca3e74b099752b763 (diff) | |
download | qemu-9db221ae73a18e0bd2b1ee6c7dc1904ed06fb464.zip qemu-9db221ae73a18e0bd2b1ee6c7dc1904ed06fb464.tar.gz qemu-9db221ae73a18e0bd2b1ee6c7dc1904ed06fb464.tar.bz2 |
hw/9pfs: Add synthetic file system support using 9p
This patch create a synthetic file system with mount tag
v_synth when -virtfs_synth command line option is specified
in qemu. The synthetic file system can be mounted in guest
using 9p using the below command line
mount -t 9p -oversion=9p2000.L,trans=virtio v_synth <mountpint>
Synthetic file system enabled different qemu subsystem to register
callbacks for read and write events from guest. The subsystem
can create directories and files in the synthetic file system as show
in ex below
qemu_v9fs_synth_mkdir(NULL, 0777, "test2", &node);
qemu_v9fs_synth_add_file(node, 0777, "testfile",
my_test_read, NULL, NULL);
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Diffstat (limited to 'hw/9pfs/virtio-9p.h')
-rw-r--r-- | hw/9pfs/virtio-9p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/9pfs/virtio-9p.h b/hw/9pfs/virtio-9p.h index 6273b85..7f88356 100644 --- a/hw/9pfs/virtio-9p.h +++ b/hw/9pfs/virtio-9p.h @@ -212,6 +212,12 @@ union V9fsFidOpenState { int fd; DIR *dir; V9fsXattr xattr; + /* + * private pointer for fs drivers, that + * have its own internal representation of + * open files. + */ + void *private; }; struct V9fsFidState |