[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 09/22] 9pfs: remove dead code
From: |
Aneesh Kumar K.V |
Subject: |
Re: [Qemu-devel] [PATCH 09/22] 9pfs: remove dead code |
Date: |
Thu, 07 Jan 2016 22:11:11 +0530 |
User-agent: |
Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) |
Wei Liu <address@hidden> writes:
> Some structures virtio-9p.h have been unused since 2011 when relevant
> functions switched to use coroutines.
>
> The declaration of pdu_packunpack and function do_pdu_unpack are
> useless.
>
> The function virtio_9p_set_fd_limit is unused.
>
> Signed-off-by: Wei Liu <address@hidden>
> ---
> hw/9pfs/virtio-9p.c | 11 ---------
> hw/9pfs/virtio-9p.h | 68
> -----------------------------------------------------
> 2 files changed, 79 deletions(-)
>
> diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
> index 30ff828..084fa6a 100644
> --- a/hw/9pfs/virtio-9p.c
> +++ b/hw/9pfs/virtio-9p.c
> @@ -3287,14 +3287,3 @@ void handle_9p_output(VirtIODevice *vdev, VirtQueue
> *vq)
> }
> free_pdu(s, pdu);
> }
> -
> -static void __attribute__((__constructor__)) virtio_9p_set_fd_limit(void)
> -{
> - struct rlimit rlim;
> - if (getrlimit(RLIMIT_NOFILE, &rlim) < 0) {
> - fprintf(stderr, "Failed to get the resource limit\n");
> - exit(1);
> - }
> - open_fd_hw = rlim.rlim_cur - MIN(400, rlim.rlim_cur/3);
> - open_fd_rc = rlim.rlim_cur/2;
> -}
I am looking at when we stopped using that. We still do file descriptor
reclaim. If we do that we need to set the open_fd_hw/rc.
> diff --git a/hw/9pfs/virtio-9p.h b/hw/9pfs/virtio-9p.h
> index ac4cb00..3c78d3c 100644
> --- a/hw/9pfs/virtio-9p.h
> +++ b/hw/9pfs/virtio-9p.h
> @@ -227,65 +227,6 @@ typedef struct V9fsState
> V9fsConf fsconf;
>2.1.4
-aneesh
- [Qemu-devel] [PATCH 00/22] 9pfs: disentangling virtio and generic code, Wei Liu, 2016/01/05
- [Qemu-devel] [PATCH 03/22] 9pfs: rename virtio-9p-handle.c to 9p-handle.c, Wei Liu, 2016/01/05
- [Qemu-devel] [PATCH 08/22] 9pfs: merge hw/virtio/virtio-9p.h into hw/9pfs/virtio-9p.h, Wei Liu, 2016/01/05
- [Qemu-devel] [PATCH 02/22] 9pfs: rename virtio-9p-handle.c to 9p-handle.c, Wei Liu, 2016/01/05
- [Qemu-devel] [PATCH 09/22] 9pfs: remove dead code, Wei Liu, 2016/01/05
- Re: [Qemu-devel] [PATCH 09/22] 9pfs: remove dead code,
Aneesh Kumar K.V <=
- [Qemu-devel] [PATCH 06/22] 9pfs: rename virtio-9p-synth.{c, h} to 9p-synth.{c, h}, Wei Liu, 2016/01/05
- [Qemu-devel] [PATCH 04/22] 9pfs: rename virtio-9p-posix-acl.c to 9p-posix-acl.c, Wei Liu, 2016/01/05
- [Qemu-devel] [PATCH 07/22] 9pfs: rename virtio-9p-xattr{, -user}.{c, h} to 9p-xattr{, -user}.{c, h}, Wei Liu, 2016/01/05
- [Qemu-devel] [PATCH 01/22] 9pfs: rename virtio-9p-coth.{c, h} to coth.{c, h}, Wei Liu, 2016/01/05
- [Qemu-devel] [PATCH 05/22] 9pfs: rename virtio-9p-proxy.{c, h} to 9p-proxy.{c, h}, Wei Liu, 2016/01/05
- [Qemu-devel] [PATCH 11/22] fsdev: 9p-marshal: introduce V9fsBlob, Wei Liu, 2016/01/05
- [Qemu-devel] [PATCH 10/22] fsdev: break out 9p-marshal.{c, h} from virtio-9p-marshal.{c, h}, Wei Liu, 2016/01/05