hw/9pfs: Add synthetic file system support using 9p
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Tue, 25 Oct 2011 06:40:40 +0000 (12:10 +0530)
committerAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Mon, 31 Oct 2011 07:04:18 +0000 (12:34 +0530)
commite2b51fac76a841b4781f68f476e76be59e16f614
treee07b64eb5813824d4840e5e3f5abd2d6017dc3c0
parent3843a4ccfb249a2aa684c60dd7618125c3870ddf
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>
Makefile.objs
fsdev/qemu-fsdev.c
fsdev/qemu-fsdev.h
hw/9pfs/virtio-9p-synth.c [new file with mode: 0644]
hw/9pfs/virtio-9p-synth.h [new file with mode: 0644]
hw/9pfs/virtio-9p.h
qemu-options.hx
vl.c