History | View | Annotate | Download (89.6 kB)
virtio-9p: Use GCC_FMT_ATTR and fix a format warning
With the new gcc format warnings, gcc detected this:
/qemu/hw/virtio-9p.c:1040: error: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘__nlink_t’
Cc: Blue Swirl <blauwirbel@gmail.com>...
[virtio-9p] Remove all instances of unnecessary dotu variable.
Signed-off-by: Arun R Bharadwaj <arun@linux.vnet.ibm.com>Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
[virtio-9p] This patch implements TLERROR/RLERROR on the qemu 9P server.
virtio-9p: Change handling of flags in open() path for 9P2000.L
This patch applies on top of 9P2000.L patches that we have on the list.I took a look at how 9P server is handling open() flags in 9P2000.L path.I think we can do away with the valid_flags() function and simplify the...
virtio-9p: Add SM_NONE security model
This is equivalent to SM_PASSTHROUGH security model.The only exception is, failure of privilige operation like chownare ignored. This makes a passthrough like security model usablefor people who runs kvm as non root...
virtio-9p: Fix the memset usage
The arguments are wrong. Use qemu_mallocz directly
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
virtio-9p: Add support for removing xattr
rename - change name of file or directory
size4 Trename tag2 fid4 newdirfid4 name[s]size4 Rrename tag2
Implement the 2000.L rename operation. A new functionv9fs_complete_rename is introduced that acts as a common entry pointfor 2000.L rename operation and 2000.U rename opearation (via wstat)....
[virtio-9p] qemu: virtio-9p: Implement LOPEN
Implement 9p2000.L version of open(LOPEN) interface in qemu 9p server.
For LOPEN, no need to convert the flags to and from 9p mode to VFS mode.
Synopsis:
size[4] Tlopen tag[2] fid[4] mode[4]
size[4] Rlopen tag[2] qid[13] iounit[4]...
virtio-9p: Add fidtype so that we can do type specific operation
We want to add type specific operation during read/write
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 beused to get read the xattr value. If name is NULL the fid returned...
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...
[virtio-9p] Make v9fs_do_utimensat accept timespec structures instead of v9stat.
Currently v9fs_do_utimensat takes a V9fsStat argument and buildstimespec structures. It sets tv_nsec values to 0 by default. Insteadof this it should take struct timespec2 and pass it down to the...
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...
[virtio-9p] Implement TLINK for 9P2000.L
Create a Hardlink.
size4 Tlink tag2 dfid4 oldfid4 newpath[s]
size4 Rlink tag2
Create a link 'newpath' in directory pointed by dfid linking to oldfid path.
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
[virtio-9p] Define and implement TSYMLINK for 9P2000.L
This patch implements creating a symlink for TSYMLINK requestand responds with RSYMLINK. In the case of error, we return RERROR.
size[4] Tsymlink tag[2] fid[4] name[s] symtgt[s] gid[4]...
[virtio-9p] This patch implements TLCREATE for 9p2000.L protocol.
size[4] Tlcreate tag[2] fid[4] name[s] flags[4] mode[4] gid[4]
size[4] Rlcreate tag[2] qid[13] iounit[4]
The Tlreate request asks the file server to create a new regular file with the...
qemu: virtio-9p: Implement TMKNOD
Implement TMKNOD as part of 2000.L Work
Synopsis
size[4] Tmknod tag[2] fid[4] name[s] mode[4] major[4] minor[4] gid[4]
size[4] Rmknod tag[2] qid[13]
Description
mknod asks the file server to create a device node with given device...
qemu: virtio-9p: Implement TMKDIR
size[4] Tmkdir tag[2] fid[4] name[s] mode[4] gid[4]
size[4] Rmkdir tag[2] qid[13]
mkdir asks the file server to create a directory with given name, mode and gid. The qid for the new directory is returned with...
qemu: virtio-9p: Implement statfs support in server
Implement statfs support in qemu server based on Sripathi'sinitial statfs patch.
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
virtio-9p: Return correct error from v9fs_remove
Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
In v9fs_remove_post_remove() we currently ignore the error returned bythe previous call to remove() and return an error only if freeing thefid fails. However, the client expects to see the error from remove()....
[V4] virtio-9p: readdir implementation for 9p2000.L
This patch implements the server part of readdir() implementation for9p2000.L
size[4] Treaddir tag[2] fid[4] offset[8] count[4] size[4] Rreaddir tag[2] count[4] data[count]
DESCRIPTION...
virtio-9p: Compute iounit based on host filesystem block size
Compute iounit based on the host filesystem block size and pass it toclient with open/create response. Also return iounit as statfs's f_bsizefor optimal block size transfers.
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>...
virtio-9p: getattr server implementation for 9P2000.L protocol.
size[4] Tgetattr tag[2] fid[4] request_mask[8]
size[4] Rgetattr tag[2] lstat[n]
The getattr transaction inquires about the file identified by fid....
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...
qemu: virtio-9p: Recognize 9P2000.L protocol
Make 9P server recognize 9P2000.L protocol version
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
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 fromCoccinelle test package rule 94:@type T;expression x;expression E;@
@type T;expression x;expression E;
- x = (T)qemu_malloc(E)...
virtio-9p: Security model for mkdir
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-9p: Security model for symlink and readlink
Mapped mode stores extended attributes in the user space of the extendedattributes. Given that the user space extended attributes are availableto regular files only, special files are created as regular files on the...
virtio-9p: Implement Security model for mknod
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...
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....
virtio-9p: Security model for chmod
virtio-9p: Security model for chown
mapped model changes the owner in the extended attributes.passthrough model does the change through lchown() as theserver don't need to follow the link and client will send theactual filesystem object.
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>...
virtio-9p: Security model for create/open2
In the mapped security model, VirtFS server intercepts and mapsthe file object create and get/set attribute requests. Files on the fileserverwill be created with VirtFS servers (QEMU) user credentials and theclient-users credentials are stored in extended attributes. On the request...
virtio-9p: Rearrange fileop structures
This patch rearranges the fileop structures by moving the structure definitionsfrom virtio-9p.c to virtio-9p.h file. No functional changes.
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: Add P9_TOPEN support.
Implement P9_TOPEN support.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-9p: Add P9_TREAD support
Implement P9_TREAD support.
virtio-9p: Add P9_TCLUNK support
Implement P9_TCLUNK support.This patch gets `ls -al` to work.
virtio-9p: Add P9_TWRITE support
Implement P9_TWRITE support.This gets write to file to work
virtio-9p: Add P9_TCREATE support
Implement P9_TCREATE support.[jvrao@linux.vnet.ibm.com: strdup to qemu_strdup conversion]
virtio-9p: Add P9_TWSTAT support
Implement P9_TWSTAT support.This gets file and directory creation to work.
[jvrao@linux.vnet.ibm.com: strdup to qemu_strdup conversion][aneesh.kumar@linux.vnet.ibm.com: v9fs_fix_path]
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
virtio-9p: Add P9_TREMOVE support.
Implement P9_TREMOVE support.This gets file deletion to work.
[mohan@in.ibm.com: Fix truncate to use the relative path]
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>...
virtio-9p: Add P9_TFLUSH support
Don't do anything special for flush.
virtio-9p: Add string manipulation support.
Add helpers to do string manipulation.
virtio-9p: Add minimal set of FileOperations
Add minimal set of FileOperations and the corresponding implementations forlocal fstype. These will be required for the FID management patches later on.
[aneesh.kumar@linux.vnet.ibm.com: rpath fix ]Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
virtio-9p: Add fid and qid management support.
Helper APIs for FID and QID management.
virtio-9p: Add stat and mode related helper functions.
Add helpers to obtain file stat and mode details.
virtio-9p: Add sg helper functions
Add scatter-gather helper functions.
virtio-9p: Add P9_TVERSION support
Implement P9_TVERSION support.
[sripathik@in.ibm.com: Handle unknown 9P versions as per the standards]
virtio-9p: Add P9_TATTACH support.
Implement P9_TATTACH support.
virtio-9p: Add P9_TSTAT support
Implement P9_TSTAT support. This get the mount to work on the guest.
[kiran@linux.vnet.ibm.com: malloc to qemu_malloc conversion]
virtio-9p: Add P9_TWALK support
Implement P9_TWALK support.
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]...
virtio-9p: pdu processing support.
Add helpers to process the PDUs.
[kiran@linux.vnet.ibm.com: malloc to qemu_malloc coversion]