From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42292 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PysIK-00032d-2V for qemu-devel@nongnu.org; Sun, 13 Mar 2011 16:53:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PysII-00045e-KS for qemu-devel@nongnu.org; Sun, 13 Mar 2011 16:53:43 -0400 Received: from mail-gw0-f45.google.com ([74.125.83.45]:37191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PysII-00045W-Hn for qemu-devel@nongnu.org; Sun, 13 Mar 2011 16:53:42 -0400 Received: by gwb19 with SMTP id 19so1970504gwb.4 for ; Sun, 13 Mar 2011 13:53:41 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <87vczmq1qm.fsf@linux.vnet.ibm.com> References: <1299347533-17047-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <87vczmq1qm.fsf@linux.vnet.ibm.com> Date: Sun, 13 Mar 2011 20:53:41 +0000 Message-ID: Subject: Re: [Qemu-devel] [PATCH -V3 1/8] hw/9pfs: Add V9fsfidmap in preparation for adding fd reclaim From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Aneesh Kumar K. V" Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org On Sun, Mar 13, 2011 at 7:06 PM, Aneesh Kumar K. V wrote: > On Sun, 13 Mar 2011 15:46:29 +0000, Stefan Hajnoczi = wrote: >> On Sat, Mar 5, 2011 at 5:52 PM, Aneesh Kumar K.V >> wrote: >> > @@ -185,17 +188,22 @@ typedef struct V9fsXattr >> > =A0 =A0 int flags; >> > =A0} V9fsXattr; >> > >> > +typedef struct V9fsfidmap { >> >> V9fsFidMap (naming convention) >> >> > + =A0 =A0union { >> > + =A0 =A0 =A0 =A0int fd; >> > + =A0 =A0 =A0 =A0DIR *dir; >> > + =A0 =A0 =A0 =A0V9fsXattr xattr; >> > + =A0 =A0} fs; >> >> The name "fs" is not meaningful. >> >> > + =A0 =A0int fid_type; >> > + =A0 =A0V9fsString path; >> > + =A0 =A0int flags; >> > +} V9fsFidMap; >> > + >> > =A0struct V9fsFidState >> > =A0{ >> > - =A0 =A0int fid_type; >> > =A0 =A0 int32_t fid; >> > - =A0 =A0V9fsString path; >> > - =A0 =A0union { >> > - =A0 =A0 =A0 int fd; >> > - =A0 =A0 =A0 DIR *dir; >> > - =A0 =A0 =A0 V9fsXattr xattr; >> > - =A0 =A0} fs; >> > =A0 =A0 uid_t uid; >> > + =A0 =A0V9fsFidMap fsmap; >> >> This name is confusing. =A0A "map" is usually a container that stores >> key/value pairs. =A0V9fsFidMapEntry would be clearer. =A0But then I >> thought that is what V9fsFidState is? > > I am bad at naming. I wanted to indicate something that can be shared > across multiple fids and also indicate the local file system > "mapping"/data. I will take any suggestion. Where does sharing happen, I didn't notice any code that shares fds between fids? Stefan