> -----Original Message-----
> From: Ian Jackson <ian.jack...@citrix.com>
> Sent: 25 June 2020 17:36
> To: Jason Andryuk <jandr...@gmail.com>
> Cc: Jan Beulich <jbeul...@suse.com>; Paul Durrant <p...@xen.org>; 
> xen-devel@lists.xenproject.org; Wei
> Liu <w...@xen.org>
> Subject: Re: [PATCH] scripts: don't rely on "stat -" support
> 
> Jason Andryuk writes ("Re: [PATCH] scripts: don't rely on "stat -" support"):
> > On Thu, Jun 25, 2020 at 11:47 AM Jan Beulich <jbeul...@suse.com> wrote:
> > >
> > > On 25.06.2020 17:45, Ian Jackson wrote:
> > > > Jan Beulich writes ("[PATCH] scripts: don't rely on "stat -" support"):
> > > >> While commit b72682c602b8 ("scripts: Use stat to check lock claim")
> > > >> validly indicates that stat has gained support for the special "-"
> > > >> command line option in 2009, we should still try to avoid breaking 
> > > >> being
> > > >> able to run on even older distros. As it has been determined, contary 
> > > >> to
> > > >> the comment in the script using /dev/stdin (/proc/self/fd/$_lockfd) is
> > > >> fine here, as Linux specially treats these /proc inodes.
> > > >>
> > > >> Suggested-by: Ian Jackson <ian.jack...@citrix.com>
> > > >> Signed-off-by: Jan Beulich <jbeul...@suse.com>
> > > >
> > > > Thanks.
> > > >
> > > > The only code change here is this:
> > > >
> > > >> --- a/tools/hotplug/Linux/locking.sh
> > > >> +++ b/tools/hotplug/Linux/locking.sh
> > > >> @@ -45,18 +45,14 @@ claim_lock()
> > > >> -        if stat=$( stat -L -c '%D.%i' - $_lockfile 0<&$_lockfd 
> > > >> 2>/dev/null )
> > > >> +        if stat=$( stat -L -c '%D.%i' /dev/stdin $_lockfile 
> > > >> 0<&$_lockfd 2>/dev/null )
> > > >
> > > > Reviewed-by: Ian Jackson <ian.jack...@eu.citrix.com>
> > > >
> > > > Has anyone executed this ?
> > >
> > > I have, of course, to confirm this fixes my issue. But I'm not sure
> > > that's what you've meant to ask - you may have wanted assurance
> > > that someone else has also tried it.
> >
> > Tested-by: Jason Andryuk <jandr...@gmail.com>
> > Reviewed-by: Jason Andryuk <jandr...@gmail.com>
> 
> :-).
> 

In which case...

Release-acked-by: Paul Durrant <p...@xen.org>

> Thanks,
> Ian.


Reply via email to