From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHDcy-0007sO-K1 for qemu-devel@nongnu.org; Thu, 07 Jan 2016 11:41:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHDcv-0005qS-8x for qemu-devel@nongnu.org; Thu, 07 Jan 2016 11:41:32 -0500 Received: from e28smtp08.in.ibm.com ([125.16.236.8]:32923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHDcu-0005nE-IQ for qemu-devel@nongnu.org; Thu, 07 Jan 2016 11:41:29 -0500 Received: from localhost by e28smtp08.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 7 Jan 2016 22:11:24 +0530 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id B937C1258062 for ; Thu, 7 Jan 2016 22:12:04 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay05.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u07GfJoG1966546 for ; Thu, 7 Jan 2016 22:11:19 +0530 Received: from d28av01.in.ibm.com (localhost [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u07GfHt3020602 for ; Thu, 7 Jan 2016 22:11:19 +0530 From: "Aneesh Kumar K.V" In-Reply-To: <1452020761-24457-10-git-send-email-wei.liu2@citrix.com> References: <1452020761-24457-1-git-send-email-wei.liu2@citrix.com> <1452020761-24457-10-git-send-email-wei.liu2@citrix.com> Date: Thu, 07 Jan 2016 22:11:11 +0530 Message-ID: <87mvshqr4o.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 09/22] 9pfs: remove dead code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wei Liu , qemu-devel@nongnu.org Cc: Greg Kurz , "Michael S. Tsirkin" Wei Liu 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 > --- > 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