summaryrefslogtreecommitdiff
path: root/fsdev/file-op-9p.h
AgeCommit message (Collapse)AuthorFilesLines
2017-06-299pfs: local: Add support for custom fmode/dmode in 9ps mapped security modesTobias Schramm1-0/+4
In mapped security modes, files are created with very restrictive permissions (600 for files and 700 for directories). This makes file sharing between virtual machines and users on the host rather complicated. Imagine eg. a group of users that need to access data produced by processes on a virtual machine. Giving those users access to the data will be difficult since the group access mode is always 0. This patch makes the default mode for both files and directories configurable. Existing setups that don't know about the new parameters keep using the current secure behavior. Signed-off-by: Tobias Schramm <tobleminer@gmail.com> Signed-off-by: Greg Kurz <groug@kaod.org>
2017-02-28fsdev: add IO throttle support to fsdev devicesPradeep Jagadeesh1-0/+3
This patchset adds the throttle support for the 9p-local driver. For now this functionality can be enabled only through qemu cli options. QMP interface and support to other drivers need further extensions. To make it simple for other 9p drivers, the throttle code has been put in separate files. Signed-off-by: Pradeep Jagadeesh <pradeep.jagadeesh@huawei.com> Reviewed-by: Alberto Garcia <berto@igalia.com> (pass extra NULL CoMutex * argument to qemu_co_queue_wait(), added options to qemu-options.hx, Greg Kurz) Signed-off-by: Greg Kurz <groug@kaod.org>
2016-11-239pfs: add cleanup operation in FileOperationsLi Qiang1-0/+1
Currently, the backend of VirtFS doesn't have a cleanup function. This will lead resource leak issues if the backed driver allocates resources. This patch addresses this issue. Signed-off-by: Li Qiang <liq3ea@gmail.com> Reviewed-by: Greg Kurz <groug@kaod.org> Signed-off-by: Greg Kurz <groug@kaod.org>
2016-07-12Clean up header guards that don't match their file nameMarkus Armbruster1-2/+4
Header guard symbols should match their file name to make guard collisions less likely. Offenders found with scripts/clean-header-guards.pl -vn. Cleaned up with scripts/clean-header-guards.pl, followed by some renaming of new guard symbols picked by the script to better ones. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
2016-07-019p: don't include <sys/uio.h>Greg Kurz1-1/+0
The <sys/uio.h> system header doesn't exist on all host platforms. Code should include "qemu/osdep.h" instead to avoid build breaks on plafforms that don't define CONFIG_IOVEC (like win32, if it is to support 9p one day). Acked-by: Cédric Le Goater <clg@kaod.org> Acked-by: Michael Fritscher <michael@fritscher.net> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
2016-06-069p: switch back to readdir()Greg Kurz1-2/+1
This patch changes the 9p code to use readdir() again instead of readdir_r(), which is deprecated in glibc 2.24. All the locking was put in place by a previous patch. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
2016-06-069p/fsdev: remove obsolete references to virtioGreg Kurz1-1/+1
Most of the 9p code is now virtio agnostic. This patch does a final cleanup: - drop references to Virtio from the header comments - fix includes Also drop a couple of leading empty lines while here. Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
2016-02-23all: Clean up includesPeter Maydell1-3/+0
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com>
2012-01-19hw/9pfs: Add new security model mapped-file.Aneesh Kumar K.V1-4/+8
This enable us to do passthrough equivalent security model on NFS directory. NFS server mostly do root squashing and don't support xattr. Hence we cannot use 'passthrough' or 'mapped' security model Also added "mapped-xattr" security to indicate earlier "mapped" security model Older name is still supported. POSIX rules regarding ctime update on chmod are not followed by this security model. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: Add support to use named socket for proxy FSM. Mohan Kumar1-0/+2
Add option to use named socket for communicating between proxy helper and qemu proxy FS. Access to socket can be given by using command line options -u and -g. Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2012-01-04hw/9pfs: Move opt validation to FsDriver callbackAneesh Kumar K.V1-2/+13
This remove all conditional code from common code path and make opt validation a FSDriver callback. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-12-21hw/9pfs: Use the correct signed type for different variablesAneesh Kumar K.V1-1/+1
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-12-04hw/9pfs: Use the correct file descriptor in Fsdriver CallbackAneesh Kumar K.V1-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>
2011-10-31hw/9pfs: Abstract open state of fid to V9fsFidOpenStateAneesh Kumar K.V1-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>
2011-10-31hw/9pfs: Read-only support for 9p exportM. Mohan Kumar1-1/+3
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>
2011-10-15hw/9pfs: Use export flag for indicating security modelAneesh Kumar K.V1-19/+17
This helps to remove some of the structure members Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-10-15hw/9pfs: Use export_flag for indicating whether fs driver use path names.Aneesh Kumar K.V1-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>
2011-10-15hw/9pfs: Add st_gen support in getattr replyHarsh Prateek Bora1-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>
2011-10-12hw/9pfs: Add new virtfs option writeout=immediate skip host page cacheAneesh Kumar K.V1-0/+4
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>
2011-09-22hw/9pfs: Add fs driver specific details to fscontextAneesh Kumar K.V1-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>
2011-09-22hw/9pfs: Add init callback to fs driverAneesh Kumar K.V1-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>
2011-09-22hw/9pfs: Move fid pathname tracking to seperate data type.Aneesh Kumar K.V1-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>
2011-08-22use readdir_r instead of readdir for reentrancyHarsh Prateek Bora1-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>
2011-06-01[virtio-9p] Make rpath thread safeVenkateswararao Jujjuri (JV)1-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>
2011-04-27virtio-9p: move 9p files aroundAneesh Kumar K.V1-0/+107
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>