[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH] Fail XS_DIRECTORY for paths with no children


  • To: "paul@xxxxxxx" <paul@xxxxxxx>, 'Marek Marczykowski-Górecki' <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Owen Smith <owen.smith@xxxxxxxxxx>
  • Date: Mon, 11 Jan 2021 08:56:01 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K7wg2zxNE4TYtq0M6z/6fDPIhJhG0Jqq97hDPwT3hCc=; b=AVMp0tRvRXe/stu6i8EYX+4HFD5HIqV54mhlDS/+VXgt6NSTSexqR2BUuAYLy8JluqmsLrgkBQltlz0Zzl9yjYuEaIOL3RcflPcdw7VsoSSI9XFE6+vWqjwP9c9o8azzU2kPEmLyvQEPUhiBNe00gfHikKEH2BP2cIRn8NuiXgWvxGFfpwfMlcXzJnElu+KudI/OmjK7o71RRt6uTkxh/mVCtnlC7K+cGP3B220K2TVoCREvMQ2i16c1TWTh5JdaJK2dKs5BdgxC6/L4CCHY4VzWiW+EbmXCxfF6Dui2dbBmKbj58/bYHQ9ZfRSh/t3bFfYRVraoungnUSfK0dvjUQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UIWw9OVQbzisuZQ52IOR/xvmDcQ/3XFSs/UY43bCgoPhFYpE6fU9KDC5bLhLTk0wu4gDfz5cnkmjXWNxxAIW1IBzMIp93a1ONRVwMB8fpzdH5xEeiy2cq4fliPAnf5zF8Sl7esGdG+Ket0/5Kyc7lAs0nxEZ3Gnv9i+ioTg33tneE8tEvt//pbYPqIgzVjYqDsd0/+OIxKkmXEgmRPEQ8nHWQsqx9JNwuBPKwMBVf27z9feXsY7WYi7cAycDtbEhTO9uO9kcYhEp7N8Yqu5B5G9tkeG+rMiq4jTqaI0+HFEoH8s6Q3e/KUnwMc7RaUH/9oqi3Ci+GK7EFLsRGwfHJg==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 11 Jan 2021 08:56:13 +0000
  • Ironport-sdr: MIL1AgtszxFQLTmUZLaUq2SeBZBlvQ1CuH7iEKZi10L/EIOYfXNHamWqqaiijw1uxxGV7nsoJX 5+bwVtGBd2tynmpM6D/oWUukNFXPjAvHuzSRtGUXNHURZIS3RBGBr4Rkx6dql3o6eT4tftXs50 y6deHA6J4/+p8ZJb9kwfxVFTX3EuEKV/0BbDl0GZCZnKXzlC/lFrcfSpLrM54IvgIkkSAEVXMD mpU5eDHTLf/3B0Ym8jYL04Jef9Dzdeq6pRBkDH6g+DP8kqB6eWcrX4LYW2xpqlh9V0sqttwjEa ovU=
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
  • Thread-index: AQHW5EeZMWnoaMuwK0+VJEmHAf4GZKog0Y2AgAFJB4CAAAsDkA==
  • Thread-topic: [PATCH] Fail XS_DIRECTORY for paths with no children


> -----Original Message-----
> From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of
> Paul Durrant
> Sent: 11 January 2021 08:13
> To: 'Marek Marczykowski-Górecki' <marmarek@xxxxxxxxxxxxxxxxxxxxxx>; Owen
> Smith <owen.smith@xxxxxxxxxx>
> Cc: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: RE: [PATCH] Fail XS_DIRECTORY for paths with no children
> 
> [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments
> unless you have verified the sender and know the content is safe.
> 
> > -----Original Message-----
> > From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On
> > Behalf Of Marek Marczykowski-Górecki
> > Sent: 10 January 2021 12:35
> > To: Owen Smith <owen.smith@xxxxxxxxxx>
> > Cc: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> > Subject: Re: [PATCH] Fail XS_DIRECTORY for paths with no children
> >
> > On Wed, Jan 06, 2021 at 04:17:50PM +0000, Owen Smith wrote:
> > > When a xenstore path has no children, a response is generated which
> > > contians only the double null terminator. Detect a 0-length response
> > > payload and return STATUS_OBJECT_PATH_NOT_FOUND to indicate that
> > > this path does not have any children
> >
> > Is it really the right thing to do? I think it may confuse empty
> > directory with non-existing directory. But I may be missing some
> > context here.
> 
> For Directory I think ENOENT (aka STATUS_OBJECT_PATH_NOT_FOUND) is the
> most useful thing to hand back in both the empty and non-existent cases. If it
> becomes necessary to distinguish between the two then a Read can be issued
> which would succeed in the former case but fail in the latter.
> 
>   Paul

STATUS_OBJECT_PATH_NOT_FOUND and STATUS_OBJECT_NAME_NOT_FOUND could be used to 
disambiguate between "path doesn’t exist" and "path has no children".

ENOENT is mapped to STATUS_OBJECT_NAME_NOT_FOUND

Owen

> 
> >
> > --
> > Best Regards,
> > Marek Marczykowski-Górecki
> > Invisible Things Lab
> > A: Because it messes up the order in which people normally read text.
> > Q: Why is top-posting such a bad thing?
> 


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.