Statistics
| Branch: | Revision:

root / hw / virtio-9p-local.c @ 89c473fd

History | View | Annotate | Download (14.4 kB)

# Date Author Comment
38671423 12/03/2010 02:08 am Hidetoshi Seto

virtio-9p: fix build on !CONFIG_UTIMENSAT

This patch introduce a fallback mechanism for old systems that do not
support utimensat(). This fix build failure with following warnings:

hw/virtio-9p-local.c: In function 'local_utimensat':
hw/virtio-9p-local.c:479: warning: implicit declaration of function 'utimensat'...

49594973 12/03/2010 02:06 am Venkateswararao Jujjuri (JV)

[virtio-9p] Add datasync to server side TFSYNC/RFSYNC for dotl

SYNOPSIS
size4 Tfsync tag2 fid4 datasync4

size[4] Rfsync tag[2]

DESCRIPTION

The Tfsync transaction transfers ("flushes") all modified in-core data of
file identified by fid to the disk device (or other permanent storage...
56d15a53 10/20/2010 08:10 pm Sanchit Garg

[virtio-9p] Use preadv/pwritev instead of readv/writev

readv & writev, read & write respectively from the current offset
of the file & hence their use has to be preceeded by a call to lseek.
preadv/writev can be used instead, as they take the offset as an argument....

fc22118d 10/20/2010 08:10 pm Aneesh Kumar K.V

virtio-9p: Use layered xattr approach

We would need this to make sure we handle the mapped
security model correctly for different xattr names.

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

61b6c499 09/08/2010 08:26 pm Aneesh Kumar K.V

virtio-9p: Hide user.virtfs xattr in case of mapped security.

With mapped security mode we use "user.virtfs" namespace is used
to store the virtFs related attributes. So hide it from user.

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

12848bfc 09/08/2010 08:26 pm Aneesh Kumar K.V

virtio-9p: Add SM_NONE security model

This is equivalent to SM_PASSTHROUGH security model.
The only exception is, failure of privilige operation like chown
are ignored. This makes a passthrough like security model usable
for people who runs kvm as non root...

5c0f255d 09/08/2010 08:26 pm Aneesh Kumar K.V

virtio-9p: Use lchown which won't follow symlink

We should always use functions which don't follow
symlink on the server

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

9ed3ef26 09/08/2010 08:26 pm Aneesh Kumar K.V

virtio-9p: Add support for removing xattr

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

fa32ef88 09/08/2010 08:26 pm Aneesh Kumar K.V

virtio-9p: Implement TXATTRWALK

TXATTRWALK: Descend a ATTR namespace

size[4] TXATTRWALK tag[2] fid[4] newfid[4] name[s]
size[4] RXATTRWALK tag[2] size[8]

txattrwalk gets a fid pointing to xattr. This fid can later be
used to get read the xattr value. If name is NULL the fid returned...

10b468bd 09/08/2010 08:26 pm Aneesh Kumar K.V

virtio-9p: Implement TXATTRCREATE

TXATTRCREATE: Prepare a fid for setting xattr value on a file system object.

size[4] TXATTRCREATE tag[2] fid[4] name[s] attr_size[8] flags[4]
size[4] RXATTRWALK tag[2]

txattrcreate gets a fid pointing to xattr. This fid can later be...

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

virtio-9p: Implement server side of setattr for 9P2000.L protocol.

SYNOPSIS

size[4] Tsetattr tag[2] attr[n]
size[4] Rsetattr tag[2]
DESCRIPTION
The setattr command changes some of the file status information.
attr resembles the iattr structure used in Linux kernel. It...
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 <>

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...
f143efa6 08/19/2010 11:24 pm Blue Swirl

Remove useless NULL check for qemu_strdup return value

Found with this Coccinelle semantic patch:
@
expression E;
identifier ptr;
identifier fn ~= "qemu_strn?dup";
@

ptr = fn(E);
-if (ptr == NULL) { ... }

+ptr = fn(E);

Signed-off-by: Blue Swirl <>

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

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

virtio-9p: Implemented Security model for lstat and fstat

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

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

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

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

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

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