[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH -V3 6/8] hw/9pfs: Add directory reclaim support
From: |
Aneesh Kumar K. V |
Subject: |
Re: [Qemu-devel] [PATCH -V3 6/8] hw/9pfs: Add directory reclaim support |
Date: |
Mon, 14 Mar 2011 00:32:40 +0530 |
User-agent: |
Notmuch/0.5-66-g70c5e2c (http://notmuchmail.org) Emacs/23.1.1 (i686-pc-linux-gnu) |
On Sun, 13 Mar 2011 16:42:56 +0000, Stefan Hajnoczi <address@hidden> wrote:
> On Sat, Mar 5, 2011 at 5:52 PM, Aneesh Kumar K.V
> <address@hidden> wrote:
> > Signed-off-by: Aneesh Kumar K.V <address@hidden>
> > ---
> > hw/9pfs/virtio-9p.c | 21 +++++++++++++++++++--
> > 1 files changed, 19 insertions(+), 2 deletions(-)
> >
> > diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
> > index 1fa7256..293a562 100644
> > --- a/hw/9pfs/virtio-9p.c
> > +++ b/hw/9pfs/virtio-9p.c
> > @@ -142,7 +142,12 @@ static int v9fs_do_open(V9fsState *s, V9fsString
> > *path, int flags)
> >
> > static DIR *v9fs_do_opendir(V9fsState *s, V9fsString *path)
> > {
> > - return s->ops->opendir(&s->ctx, path->data);
> > + DIR *dir;
> > + dir = s->ops->opendir(&s->ctx, path->data);
> > + if (dirfd(dir) > P9_FD_RECLAIM_THRES) {
> > + v9fs_reclaim_fd(s);
> > + }
>
> dirfd(NULL) will crash so we need to check !dir first:
>
Will add the check
-aneesh
- Re: [Qemu-devel] [PATCH -V3 2/8] hw/9pfs: Add file descriptor reclaim support, (continued)
[Qemu-devel] [PATCH -V3 4/8] hw/9pfs: Implement syncfs, Aneesh Kumar K.V, 2011/03/05
[Qemu-devel] [PATCH -V3 5/8] hw/9pfs: Add open flag to fid, Aneesh Kumar K.V, 2011/03/05
[Qemu-devel] [PATCH -V3 6/8] hw/9pfs: Add directory reclaim support, Aneesh Kumar K.V, 2011/03/05
[Qemu-devel] [PATCH -V3 8/8] hw/9pfs: Skip file system sync if we have specified cache=none option, Aneesh Kumar K.V, 2011/03/05
[Qemu-devel] [PATCH -V3 7/8] hw/9pfs: Add new virtfs option cache=none to skip host page cache, Aneesh Kumar K.V, 2011/03/05
- Re: [Qemu-devel] [PATCH -V3 7/8] hw/9pfs: Add new virtfs option cache=none to skip host page cache, Stefan Hajnoczi, 2011/03/13
- Re: [Qemu-devel] [PATCH -V3 7/8] hw/9pfs: Add new virtfs option cache=none to skip host page cache, Stefan Hajnoczi, 2011/03/14
- Re: [Qemu-devel] [PATCH -V3 7/8] hw/9pfs: Add new virtfs option cache=none to skip host page cache, Aneesh Kumar K. V, 2011/03/15
- Re: [Qemu-devel] [PATCH -V3 7/8] hw/9pfs: Add new virtfs option cache=none to skip host page cache, Stefan Hajnoczi, 2011/03/15
- Re: [Qemu-devel] [PATCH -V3 7/8] hw/9pfs: Add new virtfs option cache=none to skip host page cache, Aneesh Kumar K. V, 2011/03/15