[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH -V2 05/13] virtio-9p: Use 9P specific Lock constants
From: |
Aneesh Kumar K.V |
Subject: |
[Qemu-devel] [PATCH -V2 05/13] virtio-9p: Use 9P specific Lock constants |
Date: |
Tue, 11 Oct 2011 16:11:37 +0530 |
From: "M. Mohan Kumar" <address@hidden>
Use 9P specific lock constants instead of arch specific lock constants.
Signed-off-by: M. Mohan Kumar <address@hidden>
Signed-off-by: Aneesh Kumar K.V <address@hidden>
---
hw/9pfs/virtio-9p.c | 2 +-
hw/9pfs/virtio-9p.h | 5 +++++
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index 3958788..d476485 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -2930,7 +2930,7 @@ static void v9fs_getlock(void *opaque)
if (err < 0) {
goto out;
}
- glock->type = F_UNLCK;
+ glock->type = P9_LOCK_TYPE_UNLCK;
offset += pdu_marshal(pdu, offset, "bqqds", glock->type,
glock->start, glock->length, glock->proc_id,
&glock->client_id);
diff --git a/hw/9pfs/virtio-9p.h b/hw/9pfs/virtio-9p.h
index 60b8a56..e5cf78c 100644
--- a/hw/9pfs/virtio-9p.h
+++ b/hw/9pfs/virtio-9p.h
@@ -352,6 +352,11 @@ typedef struct V9fsMkState {
V9fsString fullname;
} V9fsMkState;
+/* 9P2000.L lock type */
+#define P9_LOCK_TYPE_RDLCK 0
+#define P9_LOCK_TYPE_WRLCK 1
+#define P9_LOCK_TYPE_UNLCK 2
+
#define P9_LOCK_SUCCESS 0
#define P9_LOCK_BLOCKED 1
#define P9_LOCK_ERROR 2
--
1.7.5.4
- [Qemu-devel] [PATCH V2 00/13] VirtFS update, Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 01/13] hw/9pfs: Use ioeventfd for 9p, Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 08/13] hw/9pfs: Add st_gen support in getattr reply, Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 04/13] hw/9pfs: Fix build error on platform that don't support futimens, Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 07/13] hw/9pfs: Add open flag mapping, Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 12/13] scripts: Simpletrace log analysis script for pretty-printing 9p log., Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 09/13] hw/9pfs: Add st_gen support for handle based fs driver, Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 02/13] hw/9pfs: Add new virtfs option cache=writethrough to skip host page cache, Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 13/13] hw/9pfs: Use fs driver specific lstat, Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 11/13] hw/9pfs: Remove virtio-9p-debug.* infra to be replaced by Qemu Tracing., Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 05/13] virtio-9p: Use 9P specific Lock constants,
Aneesh Kumar K.V <=
- [Qemu-devel] [PATCH -V2 06/13] hw/9pfs: Ensure an error is reported to user if 9pfs mount tag is too long, Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 03/13] qemu-options.hx: Update virtfs command documentation, Aneesh Kumar K.V, 2011/10/11
- [Qemu-devel] [PATCH -V2 10/13] hw/9pfs: Introduce tracing for 9p pdu handlers, Aneesh Kumar K.V, 2011/10/11