[Qemu-devel] [PATCH] virtio-9p: open should not return EBADF

2010-09-13 Thread Sripathi Kodi
call to close() on the fd in v9fs_post_lcreate() fails and sets errno to EBADF. We should preserve the errno that we got from open() and we should call close() only if we had a valid fd. Signed-off-by: Sripathi Kodi --- hw/virtio-9p.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions

[Qemu-devel] [PATCH] virtio-9p: Change handling of flags in open() path for 9P2000.L

2010-08-20 Thread Sripathi Kodi
ust mask this flag out. So in summary: Mask out: O_NOCTTY O_ASYNC O_CREAT Pass-through: O_NONBLOCK O_CLOEXEC Signed-off-by: Sripathi Kodi --- hw/virtio-9p.c | 14 +- 1 files changed, 1 insertions(+), 13 deletions(-) diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c index 29fc648..7f659

[Qemu-devel] [PATCH] virtio-9p: Allow O_NOCTTY flag in open().

2010-08-11 Thread Sripathi Kodi
off with a controlling terminal, so calling open with O_NOCTTY flag is not going to make any difference to QEMU. The following patch makes 9P server allow O_NOCTTY flag in open(). Signed-off-by: Sripathi Kodi --- hw/virtio-9p.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff

Re: [Qemu-devel] [PATCH 1/2] [virtio-9p] Cleanup legacy 'dotu' variable.

2010-07-20 Thread Sripathi Kodi
On Tue, 13 Jul 2010 16:24:41 +0530 Arun R Bharadwaj wrote: > Hi, > > This patch cleans up the legacy 'dotu' variable which is always set to > 1 by default, since qemu doesnt support legacy 9p clients. > > Signed-off-by: Arun R Bharadwaj Acked-by: Sripathi Kodi &

[Qemu-devel] [PATCH] virtio-9p: getattr server implementation for 9P2000.L protocol.

2010-07-12 Thread Sripathi Kodi
_btime_nsec, st_gen, st_data_version apart from the bitmask, st_result_mask. Signed-off-by: M. Mohan Kumar Signed-off-by: Sripathi Kodi --- hw/virtio-9p-debug.c | 32 ++ hw/virtio-9p.c | 112 ++ hw/virti

[Qemu-devel] Reg. trace infrastructure

2010-07-05 Thread Sripathi Kodi
Hi Stefan, Prerna, I pulled down QEMU tracing code from git://repo.or.cz/qemu/stefanha.git and tried to use it to trace something in virtio-9p code. I don't have any knowledge of how traces are implemented and I just went with the documentation. With help from Prerna, I was able to insert a trace

Re: [Qemu-devel] Re: [V9fs-developer] [PATCH] virtio-9p: getattr server implementation for 9P2000.L protocol.

2010-07-01 Thread Sripathi Kodi
On Thu, 01 Jul 2010 11:01:15 +0530 "Aneesh Kumar K. V" wrote: > On Fri, 28 May 2010 16:08:43 +0530, Sripathi Kodi > wrote: > > From: M. Mohan Kumar > > > > SYNOPSIS > > > > size[4] Tgetattr tag[2] fid[4] > > > >

[Qemu-devel] [PATCH] virtio-9p: Avoid SEGV when log file couldn't be opened

2010-06-30 Thread Sripathi Kodi
error. With this patch we get an abort message like the following, which makes it easier to analyze: f12-kvm login: qemu: /data/sripathi/code/qemu/new/qemu-next-upstream/hw/virtio-9p-debug.c:353: pprint_pdu: Assertion `!(!llogfile)' failed. Signed-off-by: Sripathi Kodi --- hw/virtio-9p-de

Re: [Qemu-devel] [PATCH] virtio-9p: Fix the memset usage

2010-06-29 Thread Sripathi Kodi
On Wed, 30 Jun 2010 10:15:29 +0530 "Aneesh Kumar K.V" wrote: > The arguments are wrong. Use qemu_mallocz directly > > Signed-off-by: Aneesh Kumar K.V Reviewed-by: Sripathi Kodi > --- > hw/virtio-9p.c |3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-)

Re: [V9fs-developer] [Qemu-devel] Re: [PATCH] virtio-9p: getattr server implementation for 9P2000.L protocol.

2010-06-07 Thread Sripathi Kodi
On Mon, 7 Jun 2010 16:04:17 +0530 Sripathi Kodi wrote: There was one mistake in my patch. See below. > On Sat, 05 Jun 2010 19:11:53 +0530 > "Aneesh Kumar K. V" wrote: > > > On Fri, 04 Jun 2010 07:59:42 -0700, "Venkateswararao Jujjuri (JV)" > &

Re: [Qemu-devel] Re: [V9fs-developer] [PATCH] virtio-9p: getattr server implementation for 9P2000.L protocol.

2010-06-07 Thread Sripathi Kodi
On Sat, 05 Jun 2010 19:11:53 +0530 "Aneesh Kumar K. V" wrote: > On Fri, 04 Jun 2010 07:59:42 -0700, "Venkateswararao Jujjuri (JV)" > wrote: > > Aneesh Kumar K. V wrote: > > > On Thu, 3 Jun 2010 18:29:02 +0530, Sripathi Kodi > > >

[Qemu-devel] [PATCH] [V4] 9p: readdir implementation for 9p2000.L

2010-06-04 Thread Sripathi Kodi
readdir() on large directories. For example, doing 'ls >/dev/null' on a directory with 1 files on my laptop takes 1.088 seconds with the existing code, but only takes 0.339 seconds with the new readdir. Signed-off-by: Sripathi Kodi Reviewed-by: Aneesh Kuma

[Qemu-devel] [PATCH] [V4] 9p: readdir implementation for 9p2000.L

2010-06-04 Thread Sripathi Kodi
readdir() on large directories. For example, doing 'ls >/dev/null' on a directory with 1 files on my laptop takes 1.088 seconds with the existing code, but only takes 0.339 seconds with the new readdir. Signed-off-by: Sripathi Kodi Reviewed-by: Aneesh Kuma

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

2010-06-04 Thread Sripathi Kodi
unique identification for the file offset[8] offset into the next dirent. type[1] type of this directory entry. name[256] name of this directory entry. Signed-off-by: Sripathi Kodi Reviewed-by: M. Mohan Kumar

[Qemu-devel] [PATCH] [V4] 9p: readdir implementation for 9p2000.L

2010-06-04 Thread Sripathi Kodi
readdir() on large directories. For example, doing 'ls >/dev/null' on a directory with 1 files on my laptop takes 1.088 seconds with the existing code, but only takes 0.339 seconds with the new readdir. Signed-off-by: Sripathi Kodi Reviewed-by: Aneesh Kuma

Re: [Qemu-devel] 9p: [RFC] [PATCH 02/02] Make use of iounit for read/write

2010-06-04 Thread Sripathi Kodi
On Tue, 1 Jun 2010 19:47:49 +0530 "M. Mohan Kumar" wrote: > Change the v9fs_file_readn function to limit the maximum transfer size > based on the iounit instead of msize. > > Also remove the redundant check for limiting the transfer size in > v9fs_file_write. This check is done by p9_client_wri

Re: [Qemu-devel] qemu:virtio-9p: [RFC] [PATCH 01/02] Send iounit to client for read/write operations

2010-06-03 Thread Sripathi Kodi
On Tue, 1 Jun 2010 19:47:14 +0530 "M. Mohan Kumar" wrote: > 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 > --- > hw/virtio-

[Qemu-devel] [PATCH] virtio-9p: Return correct error from v9fs_remove

2010-06-03 Thread Sripathi Kodi
remove(). Currently the client falsely thinks that the remove call has always succeeded. For example, doing rmdir on a non-empty directory does not return ENOTEMPTY. With this patch we ignore the error from free_fid(). The client cannot use this error value anyway. Signed-off-by: Sripathi Kodi

[Qemu-devel] [PATCH] In v9fs_remove_post_remove() we currently ignore the error returned by

2010-06-03 Thread Sripathi Kodi
. With this patch we ignore the error from free_fid(). The client cannot use this error value anyway. Signed-off-by: Sripathi Kodi --- hw/virtio-9p.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c index e5d0112..999c0d5 100644

[Qemu-devel] [PATCH 2/2] virtio-9p: Implement server side of setattr for 9P2000.L protocol.

2010-06-03 Thread Sripathi Kodi
fails, none were." I have not implemented this as I think this is not needed. Signed-off-by: Sripathi Kodi --- hw/virtio-9p.c | 137 hw/virtio-9p.h | 23 + 2 files changed, 160 insertions(+), 0 deletions(-) diff --

[Qemu-devel] [PATCH 1/2] Make v9fs_do_utimensat accept timespec structures instead of v9stat.

2010-06-03 Thread Sripathi Kodi
should take struct timespec[2] and pass it down to the system directly. This will make it more generic and useful elsewhere. Signed-off-by: Sripathi Kodi --- hw/virtio-9p.c | 37 ++--- 1 files changed, 18 insertions(+), 19 deletions(-) diff --git a/hw/virtio-9p.c

[Qemu-devel] [PATCH 0/2] virtio-9p: Setattr for 9P2000.L

2010-06-03 Thread Sripathi Kodi
The following series implements setattr support for 9P2000.L protocol. --- Sripathi Kodi (2): virtio-9p: Implement server side of setattr for 9P2000.L protocol. Make v9fs_do_utimensat accept timespec structures instead of v9stat. hw/virtio-9p.c | 174

[Qemu-devel] Re: [V9fs-developer] [PATCH] virtio-9p: getattr server implementation for 9P2000.L protocol.

2010-06-03 Thread Sripathi Kodi
On Wed, 02 Jun 2010 19:49:24 +0530 "Aneesh Kumar K. V" wrote: > On Fri, 28 May 2010 16:08:43 +0530, Sripathi Kodi > wrote: > > From: M. Mohan Kumar > > > > SYNOPSIS > > > > size[4] Tgetattr tag[2] fid[4] > > > >

[Qemu-devel] [PATCH] virtio-9p: getattr server implementation for 9P2000.L protocol.

2010-05-28 Thread Sripathi Kodi
hitectures have used 64 bit variables and glibc exposes 64 bit variables to user space on some architectures. Hence to be on the safer side we have made these 64 bit in the protocol. Refer to the comments in include/asm-generic/stat.h Signed-off-by: M. Mohan Kumar Signed-off-by: Sripathi Kodi ---

[Qemu-devel] [PATCH] virtio-9p: readdir implementation for 9p2000.L

2010-05-27 Thread Sripathi Kodi
pe of this directory entry. name[256] name of this directory entry. Signed-off-by: Sripathi Kodi Reviewed-by: M. Mohan Kumar Reviewed-by: Venkateswararao Jujjuri --- hw/virtio-9p-debug.c | 13 ++ hw/virtio-9p.c | 110 ++

Re: [Qemu-devel] [PATCH -V3 2/7] virtio-9p: Rearrange fileop structures

2010-05-25 Thread Sripathi Kodi
On Fri, 21 May 2010 14:26:05 -0700 "Venkateswararao Jujjuri (JV)" wrote: Hi JV, While I agree that this patch is nice to have, why is this part of the security model patchset? Is it required to implement the models? Thanks, Sripathi. > Signed-off-by: Venkateswararao Jujjuri > --- > hw/virtio