From: Steven Smith Subject: Re: [Patch 4/7] pvSCSI driver Date: Wed, 27 Feb 2008 14:02:14 +0000 Message-ID: <20080227140214.GA27558@weybridge.uk.xensource.com> References: <20080218190631.E755.EB2C8575@jp.fujitsu.com> <20080227111642.GC26424@weybridge.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1026985743==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: James Harper Cc: Steven Smith , Jun Kamada , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1026985743== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ReaqsoxgOBHFXBhH" Content-Disposition: inline --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > > > +int do_comfront_cmd_done(struct comfront_info *); > > > + > > > +static inline int GET_ID_FROM_FREELIST(struct comfront_info *info) > > Why is this all-caps? It's not a macro. > That would just have been cut&pasted from the linux sources... I did the > same in the windows PV drivers :) Ah, okay. Poking around a little, it looks like the blkfront in upstream Linux uses lower-case get_id_from_freelist(). I'm not sure whether it's better to be consistent with that or consistent with the other drivers in our tree. I'd probably go with upstream, but either's pretty valid. > > > + for (i = info->ring.rsp_cons; i != rp; i++) { > > > + > > > + ring_res = RING_GET_RESPONSE(&info->ring, i); > > > + > > > + if (info->shadow[ring_res->rqid].cmd == > VSCSIIF_CMND_SCSI) { > > > + if (scsifront_cmd_done(info, ring_res)) { > > > + BUG(); > > > + } > > > + } else { > > > + __sync_cmd_done(info, ring_res); > > Can this ever happen? > Well... a rogue frontend could pass all manner of crap to the backend. > Best to check for these things. This *is* the frontend, unless I'm very, very confused. > The other option for VSCSIIF_CMND_SCSI is a reset, but there is some > debate as to whether a frontend using a single device on a physical > scsi bus should be allowed to initiate a bus reset... Yeah, an LU reset might be a better idea, if the underlying device can handle it. Speaking of which, would it be a good idea to expose the tagged command queueing stuff? I'd guess probably not, but I don't really understand SCSI well enough to be sure. Steven. --ReaqsoxgOBHFXBhH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHxW1mSSW8CTLdF2kRAn2OAJ0TqSneHnTuAhdUPvrrK/DofOS9zACdF9KQ U3fm02AKV9NLZ80tK4fcKOU= =o3Ko -----END PGP SIGNATURE----- --ReaqsoxgOBHFXBhH-- --===============1026985743== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1026985743==--