summaryrefslogtreecommitdiffstats
path: root/fsdev
Commit message (Collapse)AuthorAgeFilesLines
* hw/9pfs: Use the correct file descriptor in Fsdriver CallbackAneesh Kumar K.V2011-12-041-2/+2
| | | | | | | | | Fsdriver callback that operate on file descriptor need to differentiate between directory fd and file fd. Based on the original patch from Sassan Panahinejad <sassan@sassan.me.uk> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Improve portability to older systemsAneesh Kumar K.V2011-12-041-0/+2
| | | | | | | | | | handle fs driver require a set of newly added syscalls. Don't Compile handle FS driver if those syscalls are not available. Instead of adding #ifdef for all those syscalls we check for open by handle syscall. If that is available then rest of the syscalls used by the driver should be available. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Add synthetic file system support using 9pAneesh Kumar K.V2011-10-312-0/+2
| | | | | | | | | | | | | | | | | | | | 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>
* hw/9pfs: Abstract open state of fid to V9fsFidOpenStateAneesh Kumar K.V2011-10-311-13/+19
| | | | | | | | To implement synthetic file system in Qemu we may not really require file descriptor and Dir *. Make generic code use V9fsFidOpenState instead. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Read-only support for 9p exportM. Mohan Kumar2011-10-312-2/+9
| | | | | | | | | A new fsdev parameter "readonly" is introduced to control accessing 9p export. "readonly" can be used to specify the access type. By default "rw" access is given to 9p export. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Handle Security model parsingM. Mohan Kumar2011-10-151-9/+17
| | | | | | | | Except local fs driver all other fs drivers (handle, synth) don't need security model. Update fsdev parameter parsing accordingly. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Use export flag for indicating security modelAneesh Kumar K.V2011-10-153-22/+34
| | | | | | This helps to remove some of the structure members Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Rename fstype to fsdriver to make it consistent across VirtFS codeAneesh Kumar K.V2011-10-152-25/+25
| | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Use export_flag for indicating whether fs driver use path names.Aneesh Kumar K.V2011-10-151-5/+2
| | | | | | This allows us to remove another member from the struct Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Add st_gen support in getattr replyHarsh Prateek Bora2011-10-151-0/+8
| | | | | | | | | | | | | This patch use file system specific ioctl for getting i_generation value. Not all file system support the ioctl. So we add an export specific extended operation and assign right callback for the file system that support i_generation ioctl ["M. Mohan Kumar" <mohan@in.ibm.com> we can do ioctl only for regular files and directories on the server] Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Add new virtfs option writeout=immediate skip host page cacheAneesh Kumar K.V2011-10-123-2/+13
| | | | | | | writeout=immediate implies the after pwritev we do a sync_file_range. Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Add handle based fs driverAneesh Kumar K.V2011-09-222-0/+2
| | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Add fs driver specific details to fscontextAneesh Kumar K.V2011-09-221-0/+6
| | | | | | | | Add a new context flag PATHNAME_FSCONTEXT and indicate whether the fs driver track fid using path names. Also add a private pointer that help us to track fs driver specific values in there Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Add init callback to fs driverAneesh Kumar K.V2011-09-221-0/+2
| | | | | | This call back can be used to do fs driver specific initialization. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* hw/9pfs: Move fid pathname tracking to seperate data type.Aneesh Kumar K.V2011-09-221-18/+28
| | | | | | | This enables us to add handles to track fids later. The V9fsPath added is similar to V9fsString except that the size include the NULL byte also. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* use readdir_r instead of readdir for reentrancyHarsh Prateek Bora2011-08-221-1/+1
| | | | | Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* Use glib memory allocation and free functionsAnthony Liguori2011-08-201-4/+4
| | | | | | qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* fsdev: Fix archs that dont use fsdevEdgar E. Iglesias2011-06-101-0/+8
| | | | | | Fix provided by: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* [virtio-9p] Make rpath thread safeVenkateswararao Jujjuri (JV)2011-06-011-7/+0
| | | | | | | | Current rpath inline function is heavily used in all system calls. This function has a static buffer making it a non-thread safe function. This patch introduces new thread-safe routine and makes use of it. Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com>
* virtio-9p: Don't link to 9p if virtio is not enabledAneesh Kumar K.V2011-06-011-0/+20
| | | | | | | | If virtio is not enabled then we should not pull in virtfs files Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
* virtio-9p: move 9p files aroundAneesh Kumar K.V2011-04-272-1/+108
| | | | | | | | Now that we start adding more files related to 9pfs it make sense to move them to a separate directory Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
* Delete useless 'extern' qualifiers for functionsBlue Swirl2011-01-231-2/+2
| | | | | | | 'extern' qualifier is useless for function declarations. Delete them. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* [virtio-9p] Qemu 9p commandline options validity checksHarsh Prateek Bora2010-10-201-17/+31
| | | | | Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
* Use machine_init() to register virtfs config options.Gerd Hoffmann2010-09-211-0/+9
|
* virtio-9p: Introduces an option to specify the security model.Venkateswararao Jujjuri (JV)2010-06-222-1/+9
| | | | | | | | | | | | | | | The new option is: -fsdev fstype,id=myid,path=/share_path/,security_model=[mapped|passthrough] -virtfs fstype,path=/share_path/,security_model=[mapped|passthrough],mnt_tag=tag In the case of mapped security model, files are created with QEMU user credentials and the client-user's credentials are saved in extended attributes. Whereas in the case of passthrough security model, files on the filesystem are directly created with client-user's credentials. Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-9p: Add a virtio 9p device to qemuAnthony Liguori2010-05-032-1/+2
| | | | | | | | | | | | This patch doesn't implement the 9p protocol handling code. It adds a simple device which dump the protocol data. [jvrao@linux.vnet.ibm.com: Little-Endian to host format conversion] [aneesh.kumar@linux.vnet.ibm.com: Multiple-mounts support] Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-9p: Create a commandline option -fsdevGautham R Shenoy2010-05-032-0/+123
This patch creates a new command line option named -fsdev to hold any file system specific information. The option will currently hold the following attributes: -fsdev fstype id=id,path=path_to_share where fstype: Type of the file system. id: Identifier used to refer to this fsdev path: The path on the host that is identified by this fsdev. [aneesh.kumar@linux.vnet.ibm.com: Abstraction using FsContext] Signed-off-by: Gautham R Shenoy <ego@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
OpenPOWER on IntegriCloud