Re: [PATCH 2/3] ls: use statx for loop detection if it's available

2019-09-13 Thread Jeff Layton
On Fri, 2019-09-13 at 17:31 +0100, Pádraig Brady wrote: > On 13/09/19 11:08, Jeff Layton wrote: > > On Thu, 2019-09-12 at 11:58 -0600, Andreas Dilger wrote: > > > Should this have a runtime fallback to stat() if statx() is not > > > implemented > > > on the running kernel, or is that already

Re: [PATCH 2/3] ls: use statx for loop detection if it's available

2019-09-13 Thread Pádraig Brady
On 13/09/19 11:08, Jeff Layton wrote: > On Thu, 2019-09-12 at 11:58 -0600, Andreas Dilger wrote: >> Should this have a runtime fallback to stat() if statx() is not implemented >> on the running kernel, or is that already handled at another level? >> > > glibc already does this fallback. Note we

Re: [PATCH 2/3] ls: use statx for loop detection if it's available

2019-09-13 Thread Jeff Layton
On Thu, 2019-09-12 at 11:58 -0600, Andreas Dilger wrote: > > On Sep 11, 2019, at 7:51 AM, Jeff Layton wrote: > > > > * move loop detection routine into separate function > > * add a statx-enabled variant that is used when it's available. No need > > for a full stat since all we care about is

Re: [PATCH 2/3] ls: use statx for loop detection if it's available

2019-09-12 Thread Andreas Dilger
> On Sep 11, 2019, at 7:51 AM, Jeff Layton wrote: > > * move loop detection routine into separate function > * add a statx-enabled variant that is used when it's available. No need > for a full stat since all we care about is the dev/ino. > * Since dev/ino should never change, set