Statistics
| Branch: | Revision:

root / fsdev @ feature-archipelago

# Date Author Comment
b58c86e1 07/09/2013 09:38 pm Stefan Weil

fsdev: Fix potential memory leak

This leak was reported by cppcheck.

Signed-off-by: Stefan Weil <>
Reviewed-by: M. Mohan Kumar <>
Message-id:
Signed-off-by: Anthony Liguori <>

c7e775e4 05/12/2013 12:25 pm Dong Xu Wang

remove double semicolons

Signed-off-by: Dong Xu Wang <>
Signed-off-by: Michael Tokarev <>

606017de 01/30/2013 12:14 pm Markus Armbruster

virtfs-proxy-helper: Fix unchecked strdup() by conv. to g_strdup()

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Signed-off-by: Stefan Hajnoczi <>

82cb6b04 01/26/2013 03:15 pm Paolo Bonzini

build: remove extra-obj-y

extra-obj-y is somewhat complicated to understand. Replace it with a
special CONFIG_ALL symbol that is defined only at toplevel.
This limits the case of directories defining more than one
*-obj-y target.

Signed-off-by: Paolo Bonzini <>...

4d454574 01/12/2013 06:17 pm Paolo Bonzini

qemu-option: move standard option definitions out of qemu-config.c

Signed-off-by: Paolo Bonzini <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

9fd2ecdc 12/05/2012 06:25 pm Paolo Bonzini

virtfs-proxy-helper: use setresuid and setresgid

The setfsuid and setfsgid system calls are obscure and they complicate
the error checking (that glibc's warn_unused_result "feature" forces
us to do). Switch to the standard setresuid and setresgid functions....

017cf5b1 11/15/2012 03:21 am Eduardo Habkost

qemu-fsdev-dummy.c: Include module.h

module.h is where machine_init() is defined, but qemu-fsdev-dummy.c
doesn't include it.

The header is probably being included by accident because some other
headers are including qemu-common.h, but those headers should eventually...

ee20477d 06/07/2012 10:21 am Paolo Bonzini

build: move fsdev/ objects to nested Makefile.objs

Signed-off-by: Paolo Bonzini <>

071c9394 04/07/2012 04:58 pm Stefan Weil

Replace Qemu by QEMU in user visible documentation

The official spelling is QEMU.

Signed-off-by: Stefan Weil <>
Reviewed-by: Andreas Färber <>
Signed-off-by: Blue Swirl <>

5fc6dbae 01/30/2012 07:24 am M. Mohan Kumar

fsdev: Fix parameter parsing for proxy helper

This fixes a crash when using sockfd with proxy FsDriver

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

2c30dd74 01/19/2012 08:51 am Aneesh Kumar K.V

hw/9pfs: Add new security model mapped-file.

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...

822b635d 01/13/2012 12:37 pm Stefan Weil

virtfs-proxy-helper: Fix compilation on newer systems

Include file attr/xattr.h is not available on "newer" systems
(for example Fedora 12 or Debian Squeeze).

See comments in qemu-xattr.h for more information.
This file handles the system dependencies automatically....

e7e4a6cc 01/13/2012 12:37 pm Stefan Weil

virtfs-proxy-helper: Clean include files

The common standard include files are already included via qemu-common.h,
and for the socket related include files there is qemu_socket.h, so the
code can be reduced by some lines.

Signed-off-by: Stefan Weil <>...

c5c7d3f0 01/13/2012 12:37 pm Stefan Weil

virtfs-proxy-helper: Add missing printf format attribute

Every function with printf like arguments must have it
(see file HACKING), so add it.

Signed-off-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

84a87cc4 01/04/2012 05:53 pm M. Mohan Kumar

hw/9pfs: Add support to use named socket for proxy FS

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 <>...

a2d8f1be 01/04/2012 05:53 pm M. Mohan Kumar

hw/9pfs: man page for proxy helper

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

d090e452 01/04/2012 04:50 pm M. Mohan Kumar

hw/9pfs: Proxy getversion

Add proxy getversion to get generation number

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

d52b09e4 01/04/2012 04:50 pm M. Mohan Kumar

hw/9pfs: xattr interfaces in proxy filesystem driver

Add xattr support for proxy FS

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

ea75fc4e 01/04/2012 04:49 pm M. Mohan Kumar

hw/9pfs: File ownership and others

Add file ownership interfaces like chmod/chown, utime update, rename,
remove and truncating files for proxy FS

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

b178adc3 01/04/2012 04:49 pm M. Mohan Kumar

hw/9pfs: Add stat/readlink/statfs for proxy FS

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

39f8c32c 01/04/2012 04:48 pm M. Mohan Kumar

hw/9pfs: Create other filesystem objects

Add interfaces to create filesystem objects like directory,
device nodes, symbolic links, links for proxy filesytem driver

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

daf0b9ac 01/04/2012 04:44 pm M. Mohan Kumar

hw/9pfs: Open and create files

Add interfaces to open and create files for proxy file system driver.

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

17bff52b 01/04/2012 04:44 pm M. Mohan Kumar

hw/9pfs: File system helper process for qemu 9p proxy FS

Provide root privilege access to QEMU 9p proxy filesystem using socket
communication.

Proxy helper is started by root user as:
~ # virtfs-proxy-helper -f|--fd <socket descriptor> -p|--path <path-to-share>...

4c793dda 01/04/2012 04:43 pm M. Mohan Kumar

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>...

ddca7f86 01/04/2012 04:23 pm M. Mohan Kumar

hw/9pfs: Add validation to {un}marshal code

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Aneesh Kumar K.V <>

99519f0a 01/04/2012 04:21 pm Aneesh Kumar K.V

hw/9pfs: Move opt validation to FsDriver callback

This remove all conditional code from common code path and
make opt validation a FSDriver callback.

Signed-off-by: Aneesh Kumar K.V <>

10925bf0 01/04/2012 04:21 pm M. Mohan Kumar

hw/9pfs: Move pdu_marshal/unmarshal code to a seperate file

Move p9 marshaling/unmarshaling code to a separate file so that
proxy filesytem driver can use these calls. Also made marshaling
code generic to accept "struct iovec" instead of V9fsPDU.

Signed-off-by: M. Mohan Kumar <>...

2f008a8c 12/21/2011 09:07 am Aneesh Kumar K.V

hw/9pfs: Use the correct signed type for different variables

Signed-off-by: Aneesh Kumar K.V <>

8b888272 12/04/2011 07:05 pm Aneesh Kumar K.V

hw/9pfs: Use the correct file descriptor in Fsdriver Callback

Fsdriver callback that operate on file descriptor need to
differentiate between directory fd and file fd.

Based on the original patch from Sassan Panahinejad <>

Signed-off-by: Aneesh Kumar K.V <>

77eec1b3 12/04/2011 07:05 pm Aneesh Kumar K.V

hw/9pfs: Improve portability to older systems

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...

9db221ae 10/31/2011 09:04 am Aneesh Kumar K.V

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...

2c74c2cb 10/31/2011 09:04 am M. Mohan Kumar

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" access
is given to 9p export.

Signed-off-by: M. Mohan Kumar <>...

cc720ddb 10/31/2011 09:04 am Aneesh Kumar K.V

hw/9pfs: Abstract open state of fid to V9fsFidOpenState

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 <>

e06a765e 10/15/2011 01:00 pm Harsh Prateek Bora

hw/9pfs: Add st_gen support in getattr reply

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...

c98f1d4a 10/15/2011 01:00 pm Aneesh Kumar K.V

hw/9pfs: Use export_flag for indicating whether fs driver use path names.

This allows us to remove another member from the struct

Signed-off-by: Aneesh Kumar K.V <>

fbcbf101 10/15/2011 01:00 pm Aneesh Kumar K.V

hw/9pfs: Rename fstype to fsdriver to make it consistent across VirtFS code

Signed-off-by: Aneesh Kumar K.V <>

b97400ca 10/15/2011 01:00 pm Aneesh Kumar K.V

hw/9pfs: Use export flag for indicating security model

This helps to remove some of the structure members

Signed-off-by: Aneesh Kumar K.V <>

d9b36a6e 10/15/2011 01:00 pm M. Mohan Kumar

hw/9pfs: Handle Security model parsing

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 <>
Signed-off-by: Aneesh Kumar K.V <>

d3ab98e6 10/12/2011 04:41 pm Aneesh Kumar K.V

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 <>
Signed-off-by: Aneesh Kumar K.V <>

5f542225 09/22/2011 07:08 pm Aneesh Kumar K.V

hw/9pfs: Add handle based fs driver

Signed-off-by: Aneesh Kumar K.V <>

2289be19 09/22/2011 07:08 pm Aneesh Kumar K.V

hw/9pfs: Move fid pathname tracking to seperate data type.

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 <>

0174fe73 09/22/2011 07:08 pm Aneesh Kumar K.V

hw/9pfs: Add init callback to fs driver

This call back can be used to do fs driver specific initialization.

Signed-off-by: Aneesh Kumar K.V <>

532decb7 09/22/2011 07:08 pm Aneesh Kumar K.V

hw/9pfs: Add fs driver specific details to fscontext

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 <>

5f524c1e 08/22/2011 07:14 am Harsh Prateek Bora

use readdir_r instead of readdir for reentrancy

Signed-off-by: Harsh Prateek Bora <>
Signed-off-by: Aneesh Kumar K.V <>

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

1c532d92 06/10/2011 04:29 pm Edgar E. Iglesias

fsdev: Fix archs that dont use fsdev

Fix provided by: "Aneesh Kumar K.V" <>

Signed-off-by: Edgar E. Iglesias <>

faa44e3d 06/01/2011 08:25 pm Venkateswararao Jujjuri (JV)

[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 "<>

1c88c715 06/01/2011 08:23 pm Aneesh Kumar K.V

virtio-9p: Don't link to 9p if virtio is not enabled

If virtio is not enabled then we should not pull in
virtfs files

Signed-off-by: Aneesh Kumar K.V <>
Signed-off-by: Venkateswararao Jujjuri (JV) <>

353ac78d 04/27/2011 06:24 pm Aneesh Kumar K.V

virtio-9p: move 9p files around

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 <>
Signed-off-by: Venkateswararao Jujjuri <>

64b85a8f 01/23/2011 06:21 pm Blue Swirl

Delete useless 'extern' qualifiers for functions

'extern' qualifier is useless for function declarations. Delete
them.

Signed-off-by: Blue Swirl <>

9f506893 10/20/2010 08:10 pm Harsh Prateek Bora

[virtio-9p] Qemu 9p commandline options validity checks

Signed-off-by: Harsh Prateek Bora <>
Signed-off-by: Venkateswararao Jujjuri <>

526c5237 09/21/2010 07:35 pm Gerd Hoffmann

Use machine_init() to register virtfs config options.

9ce56db6 06/22/2010 11:15 pm Venkateswararao Jujjuri (JV)

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...

74db920c 05/03/2010 08:17 pm Gautham R Shenoy

virtio-9p: Create a commandline option -fsdev

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....

9f107513 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add a virtio 9p device to qemu

This patch doesn't implement the 9p protocol handling
code. It adds a simple device which dump the protocol data.

[: Little-Endian to host format conversion]
[: Multiple-mounts support]...