From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47228) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rdxpc-0002ft-VX for qemu-devel@nongnu.org; Fri, 23 Dec 2011 00:38:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rdxpb-0003b2-MY for qemu-devel@nongnu.org; Fri, 23 Dec 2011 00:38:12 -0500 Received: from e8.ny.us.ibm.com ([32.97.182.138]:43464) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rdxpb-0003aq-IC for qemu-devel@nongnu.org; Fri, 23 Dec 2011 00:38:11 -0500 Received: from /spool/local by e8.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 23 Dec 2011 00:37:55 -0500 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pBN5bp7s3285056 for ; Fri, 23 Dec 2011 00:37:51 -0500 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pBN5bpRH014455 for ; Fri, 23 Dec 2011 00:37:51 -0500 From: "Aneesh Kumar K.V" In-Reply-To: References: <1324302643-21868-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Date: Fri, 23 Dec 2011 11:07:41 +0530 Message-ID: <87ty4rx2ze.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] hw/9pfs: Add new security model mapped-file. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Bradbury Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org On Thu, 22 Dec 2011 21:45:51 +0000, Alex Bradbury wrot= e: > On 19 December 2011 13:50, Aneesh Kumar K.V > wrote: > > From: "Aneesh Kumar K.V" > > > > This enable us to do passthrough equivalent security model on NFS direc= tory. > > NFS server mostly do root squashing and don't support xattr. Hence we c= annot > > use 'passthrough' or 'mapped' security model > > > > Also added "mapped-xattr" security to indicate earlier "mapped" securit= y model > > Older name is still supported. >=20 > Out of interest, did you do any performance comparison with mapped-xattr? >=20 No, I was mostly looking at making virtFS usable on an NFS setup >=20 > > @@ -404,6 +578,10 @@ static int local_fstat(FsContext *fs_ctx, int fid_= type, > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 &tmp_dev, sizeof(dev_t)) > 0) { > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 stbuf->st_rdev = =3D tmp_dev; > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 } > > +#if 0 > > + =C2=A0 =C2=A0} else if (fs_ctx->export_flags & V9FS_SM_MAPPED_FILE) { > > + =C2=A0 =C2=A0 =C2=A0 =C2=A0/* FIXME!! how to implement that for MAPPE= D_FILE */ > > +#endif >=20 > Lacking an implementation of fstat seems like a pretty major omission > that isn't mentioned in the commit message. >=20 If you look at where local_fstat get used currently, We do it only for lock call, that too to check whether the file is present. We are not using the stat value returned. So the patchset should be usable as it is. What i am contemplating is should i add additional code in server that fallback to path based stat if fs driver callback returned EOPNOTSUPP error. May be i should do that in the next version. -aneesh