hw/9pfs: Add support to use named socket for proxy FS
Add option to use named socket for communicating between proxy helperand qemu proxy FS. Access to socket can be given by using command lineoptions -u and -g.
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>...
hw/9pfs: man page for proxy helper
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: Proxy getversion
Add proxy getversion to get generation number
hw/9pfs: xattr interfaces in proxy filesystem driver
Add xattr support for proxy FS
hw/9pfs: File ownership and others
Add file ownership interfaces like chmod/chown, utime update, rename,remove and truncating files for proxy FS
hw/9pfs: Add stat/readlink/statfs for proxy FS
hw/9pfs: Create other filesystem objects
Add interfaces to create filesystem objects like directory,device nodes, symbolic links, links for proxy filesytem driver
hw/9pfs: Open and create files
Add interfaces to open and create files for proxy file system driver.
hw/9pfs: File system helper process for qemu 9p proxy FS
Provide root privilege access to QEMU 9p proxy filesystem using socketcommunication.
Proxy helper is started by root user as:~ # virtfs-proxy-helper -f|--fd <socket descriptor> -p|--path <path-to-share>...
hw/9pfs: Add new proxy filesystem driver
Add new proxy filesystem driver to add root privilege to qemu process.It needs a helper process to be started by root user.
Following command line can be used to utilize proxy filesystem driver-virtfs proxy,id=<id>,mount_tag=<tag>,socket_fd=<socket-fd>...
hw/9pfs: Add validation to {un}marshal code
hw/9pfs: Move opt validation to FsDriver callback
This remove all conditional code from common code path andmake opt validation a FSDriver callback.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
hw/9pfs: Move pdu_marshal/unmarshal code to a seperate file
Move p9 marshaling/unmarshaling code to a separate file so thatproxy filesytem driver can use these calls. Also made marshalingcode generic to accept "struct iovec" instead of V9fsPDU.
hw/9pfs: Use the correct signed type for different variables
hw/9pfs: Use the correct file descriptor in Fsdriver Callback
Fsdriver callback that operate on file descriptor need todifferentiate between directory fd and file fd.
Based on the original patch from Sassan Panahinejad <sassan@sassan.me.uk>
hw/9pfs: Improve portability to older systems
handle fs driver require a set of newly added syscalls. Don'tCompile handle FS driver if those syscalls are not available.Instead of adding #ifdef for all those syscalls we check foropen by handle syscall. If that is available then rest of the...
hw/9pfs: Add synthetic file system support using 9p
This patch create a synthetic file system with mount tagv_synth when -virtfs_synth command line option is specifiedin qemu. The synthetic file system can be mounted in guestusing 9p using the below command line...
hw/9pfs: Read-only support for 9p export
A new fsdev parameter "readonly" is introduced to control accessing 9p export."readonly" can be used to specify the access type. By default "rw" accessis given to 9p export.
hw/9pfs: Abstract open state of fid to V9fsFidOpenState
To implement synthetic file system in Qemu we may not reallyrequire file descriptor and Dir *. Make generic code useV9fsFidOpenState instead.
hw/9pfs: Add st_gen support in getattr reply
This patch use file system specific ioctl for getting i_generationvalue. Not all file system support the ioctl. So we add an exportspecific extended operation and assign right callback for thefile system that support i_generation ioctl...
hw/9pfs: Use export_flag for indicating whether fs driver use path names.
This allows us to remove another member from the struct
hw/9pfs: Rename fstype to fsdriver to make it consistent across VirtFS code
hw/9pfs: Use export flag for indicating security model
This helps to remove some of the structure members
hw/9pfs: Handle Security model parsing
Except local fs driver all other fs drivers (handle, synth) don't needsecurity model. Update fsdev parameter parsing accordingly.
hw/9pfs: Add new virtfs option writeout=immediate skip host page cache
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 driver
hw/9pfs: Move fid pathname tracking to seperate data type.
This enables us to add handles to track fids later. TheV9fsPath added is similar to V9fsString except that thesize include the NULL byte also.
hw/9pfs: Add init callback to fs driver
This call back can be used to do fs driver specific initialization.
hw/9pfs: Add fs driver specific details to fscontext
Add a new context flag PATHNAME_FSCONTEXT and indicate whetherthe fs driver track fid using path names. Also add a privatepointer that help us to track fs driver specific values in there
use readdir_r instead of readdir for reentrancy
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 functions
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 fsdev
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 safe
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 enabled
If virtio is not enabled then we should not pull invirtfs 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 around
Now that we start adding more files related to 9pfsit 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 functions
'extern' qualifier is useless for function declarations. Deletethem.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
[virtio-9p] Qemu 9p commandline options validity checks
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.
virtio-9p: Introduces an option to specify the security model.
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...
virtio-9p: Create a commandline option -fsdev
This patch creates a new command line option named -fsdev to hold any filesystem specific information.
The option will currently hold the following attributes:-fsdev fstype id=id,path=path_to_sharewherefstype: Type of the file system....
virtio-9p: Add a virtio 9p device to qemu
This patch doesn't implement the 9p protocol handlingcode. 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]...