Statistics
| Branch: | Revision:

root / hw / virtio-9p.c @ 74bc02b2

History | View | Annotate | Download (66 kB)

# Date Author Comment
be940c87 09/08/2010 08:26 pm M. Mohan Kumar

qemu: virtio-9p: Implement statfs support in server

Implement statfs support in qemu server based on Sripathi's
initial statfs patch.

Signed-off-by: M. Mohan Kumar <>
Signed-off-by: Sripathi Kodi <>
Signed-off-by: Venkateswararao Jujjuri <>

926487b7 09/08/2010 08:26 pm Sripathi Kodi

virtio-9p: Return correct error from v9fs_remove

Signed-off-by: Sripathi Kodi <>

In v9fs_remove_post_remove() we currently ignore the error returned by
the previous call to remove() and return an error only if freeing the
fid fails. However, the client expects to see the error from remove()....

c18e2f94 09/08/2010 08:26 pm Sripathi Kodi

[V4] virtio-9p: readdir implementation for 9p2000.L

This patch implements the server part of readdir() implementation for
9p2000.L

SYNOPSIS
size[4] Treaddir tag[2] fid[4] offset[8] count[4]
size[4] Rreaddir tag[2] count[4] data[count]
DESCRIPTION...
5e94c103 09/08/2010 08:26 pm M. Mohan Kumar

virtio-9p: Compute iounit based on host filesystem block size

Compute iounit based on the host filesystem block size and pass it to
client with open/create response. Also return iounit as statfs's f_bsize
for optimal block size transfers.

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

00ede4c2 09/08/2010 08:26 pm Sripathi Kodi

virtio-9p: getattr server implementation for 9P2000.L protocol.

SYNOPSIS
size[4] Tgetattr tag[2] fid[4] request_mask[8]
size[4] Rgetattr tag[2] lstat[n]
DESCRIPTION
The getattr transaction inquires about the file identified by fid....
74bc02b2 09/08/2010 08:26 pm M. Mohan Kumar

virtio-9p: Do not reset atime

Current code resets file's atime to 0 when there is a change in mtime.
This results in resetting the atime to "1970-01-01 05:30:00". For
example, truncate -s 0 filename results in changing the mtime to the
truncate time, but resets the atime to "1970-01-01 05:30:00". utime...
84151514 09/08/2010 08:26 pm M. Mohan Kumar

qemu: virtio-9p: Recognize 9P2000.L protocol

Make 9P server recognize 9P2000.L protocol version

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

cc597832 08/21/2010 12:04 am Blue Swirl

Replace qemu_malloc + memset with qemu_mallocz

Replace a qemu_malloc call, followed by a memset, with qemu_mallocz.

Found with this Coccinelle semantic patch, adapted from
Coccinelle test package rule 94:
@
type T;
expression x;
expression E;
@

- x = (T)qemu_malloc(E)...

00ec5c37 06/22/2010 11:15 pm Venkateswararao Jujjuri (JV)

virtio-9p: Security model for mkdir

Signed-off-by: Venkateswararao Jujjuri <>
Signed-off-by: Anthony Liguori <>

879c2813 06/22/2010 11:15 pm Venkateswararao Jujjuri (JV)

virtio-9p: Security model for symlink and readlink

Mapped mode stores extended attributes in the user space of the extended
attributes. Given that the user space extended attributes are available
to regular files only, special files are created as regular files on the...

1c293312 06/22/2010 11:15 pm Venkateswararao Jujjuri (JV)

virtio-9p: Implement Security model for mknod

Mapped mode stores extended attributes in the user space of the extended
attributes. Given that the user space extended attributes are available
to regular files only, special files are created as regular files on the...

63729c36 06/22/2010 11:15 pm Venkateswararao Jujjuri (JV)

virtio-9p: Implement Security model for mksock using mknod.

This patch uses mknod to create socket.

On Host/Fileserver:
rw------. 1 virfsuid virtfsgid 0 2010-05-11 09:57 asocket1

On Guest/Client:
srwxr-xr-x 1 guestuser guestuser 0 2010-05-11 12:57 asocket1...

758e8e38 06/22/2010 11:15 pm Venkateswararao Jujjuri (JV)

virtio-9p: Make infrastructure for the new security model.

This patch adds required infrastructure for the new security model.

- A new configure option for attr/xattr.
- if CONFIG_VIRTFS will be defined if both CONFIG_LINUX and CONFIG_ATTR defined.
- Defines routines related to both security models....

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

virtio-9p: Security model for chmod

Signed-off-by: Venkateswararao Jujjuri <>
Signed-off-by: Anthony Liguori <>

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

virtio-9p: Security model for chown

mapped model changes the owner in the extended attributes.
passthrough model does the change through lchown() as the
server don't need to follow the link and client will send the
actual filesystem object.

Signed-off-by: Venkateswararao Jujjuri <>...

4750a96f 06/22/2010 11:15 pm Venkateswararao Jujjuri (JV)

virtio-9p: Security model for create/open2

In the mapped security model, VirtFS server intercepts and maps
the file object create and get/set attribute requests. Files on the fileserver
will be created with VirtFS servers (QEMU) user credentials and the
client-users credentials are stored in extended attributes. On the request...

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

virtio-9p: Rearrange fileop structures

This patch rearranges the fileop structures by moving the structure definitions
from virtio-9p.c to virtio-9p.h file. No functional changes.

Signed-off-by: Venkateswararao Jujjuri <>
Signed-off-by: Anthony Liguori <>

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

a6568fe2 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TOPEN support.

Implement P9_TOPEN support.

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

a9231555 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TREAD support

Implement P9_TREAD support.

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

bbd5697b 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TCLUNK support

Implement P9_TCLUNK support.
This patch gets `ls -al` to work.

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

8449360c 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TWRITE support

Implement P9_TWRITE support.
This gets write to file to work

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

c494dd6f 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TCREATE support

Implement P9_TCREATE support.
[: strdup to qemu_strdup conversion]

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

8cf89e00 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TWSTAT support

Implement P9_TWSTAT support.
This gets file and directory creation to work.

[: strdup to qemu_strdup conversion]
[: v9fs_fix_path]

Signed-off-by: Anthony Liguori <>...

5bae1900 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TREMOVE support.

Implement P9_TREMOVE support.
This gets file deletion to work.

[: Fix truncate to use the relative path]

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

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

virtio-9p: Add P9_TFLUSH support

Don't do anything special for flush.

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

a03f7874 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add string manipulation support.

Add helpers to do string manipulation.

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

131dcb25 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add minimal set of FileOperations

Add minimal set of FileOperations and the corresponding implementations for
local fstype. These will be required for the FID management patches later on.

[: rpath fix ]
Signed-off-by: Anthony Liguori <>...

286d5652 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add fid and qid management support.

Helper APIs for FID and QID management.

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

bb9e3216 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add stat and mode related helper functions.

Add helpers to obtain file stat and mode details.

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

1f5a89bf 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add sg helper functions

Add scatter-gather helper functions.

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

92c1ad03 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TVERSION support

Implement P9_TVERSION support.

[: Handle unknown 9P versions as per the standards]

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

955efc47 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TATTACH support.

Implement P9_TATTACH support.

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

4da7d3fa 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TSTAT support

Implement P9_TSTAT support. This get the mount to work on the guest.

[: malloc to qemu_malloc conversion]

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

ff5e54c9 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TWALK support

Implement P9_TWALK support.

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

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

405a549a 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: pdu processing support.

Add helpers to process the PDUs.

[: malloc to qemu_malloc coversion]

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