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

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



> -----Original Message-----
> From: Owen Smith <owen.smith@xxxxxxxxxx>
> Sent: 11 January 2021 08:56
> To: paul@xxxxxxx; 'Marek Marczykowski-Górecki' 
> <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
> Cc: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: RE: [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

Oh, I clearly misread. As you say, that in itself disambiguates. Looking at 
users of XENBUS_STORE(Directory, ...) I think the patch is ok as it stands 
anyway.

  Paul

> 
> 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®.