On Tue, 1 Mar 2011 12:08:49 +0530, "Aneesh Kumar K.V"
<[email protected]> wrote:
> diff --git a/hw/9pfs/virtio-9p.h b/hw/9pfs/virtio-9p.h
> index 2ae4ce7..2f49641 100644
> --- a/hw/9pfs/virtio-9p.h
> +++ b/hw/9pfs/virtio-9p.h
> @@ -101,7 +101,10 @@ enum p9_proto_version {
> #define P9_NOTAG (u16)(~0)
> #define P9_NOFID (u32)(~0)
> #define P9_MAXWELEM 16
> +#define P9_FD_RECLAIM_THRES 100
before merge we should change that to 1000. I have updated my local
tree. I kept it at 100 to make sure code path get tested when running
most of the test case.
>
> +#define FID_REFERENCED 0x1
> +#define FID_NON_RECLAIMABLE 0x2
> /*
> * ample room for Twrite/Rread header
> * size[4] Tread/Twrite tag[2] fid[4] offset[8] count[4]
> @@ -185,17 +188,22 @@ typedef struct V9fsXattr
> int flags;
> } V9fsXattr;
>
> +typedef struct V9fsfidmap {
> + union {
> + int fd;
> + DIR *dir;
> + V9fsXattr xattr;
> + } fs;
> + int fid_type;
> + V9fsString path;
> + int flags;
> +} V9fsFidMap;
> +
> struct V9fsFidState
> {
> - int fid_type;
> int32_t fid;
> - V9fsString path;
> - union {
> - int fd;
> - DIR *dir;
> - V9fsXattr xattr;
> - } fs;
> uid_t uid;
> + V9fsFidMap fsmap;
> V9fsFidState *next;
> };
>
-aneesh