mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	"Jiri Olsa" <jolsa@redhat.com>
Subject: Re: perf-core build fails on powerpc
Date: Wed, 14 Mar 2018 07:10:53 +0000	[thread overview]
Message-ID: <603efe46-6b79-3066-751e-696502eaef3f@huawei.com> (raw)
In-Reply-To: <20180313211837.GC29120@us.ibm.com>

On 13/03/2018 21:18, Sukadev Bhattiprolu wrote:
> John Garry [john.garry@huawei.com] wrote:
>> On 13/03/2018 20:10, Sukadev Bhattiprolu wrote:
>>
>>> Hi John,
>>>
>>> I have an xfs file system which seems to have d_type == DT_UNKNOWN for all
>>> entries in 'tools/perf/pmu-events/arch/power8'! readdir(3) says ->d_type
>>> may not be supported by all file systems.
>>>
>>> Not relying on ->d_type seems to fix it:
>>>
>>
>> Hi Sukadev,
>>
>> Thanks for debugging this. Jiri Olsa (cc'ed) warned me on this, so I did add
>> the check for d_type == DT_UNKNOWN.
>>
>> But, if all files have d_type == DT_UNKNOWN, you're code would from visual
>> observation look to be same as mine (apart from check for '.' or '..'
>> filename, which I would say is already covered by stat() and S_ISDIR()). Or
>> is d_type value just unreliable?
>
> In the current code and with DT_UNKNOWN, is_leaf_dir() returns false when
> it sees the "." or ".." entries right? In the new code, we skip those and
> return false only if we find some other directory.
>

OK, that's the real issue, being the "." and ".." entries.

@Arnaldo, I'll try to send a fix for this today. I just need to make an 
xfs to test. Sorry for the hassle.

John

> Thanks,
>
> Sukadev
>
>
>

  reply	other threads:[~2018-03-14  7:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-13 19:17 Sukadev Bhattiprolu
2018-03-13 19:29 ` John Garry
2018-03-13 20:10   ` Sukadev Bhattiprolu
2018-03-13 20:53     ` John Garry
2018-03-13 21:18       ` Sukadev Bhattiprolu
2018-03-14  7:10         ` John Garry [this message]
2018-03-14  9:23           ` John Garry
2018-03-14  1:52 ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=603efe46-6b79-3066-751e-696502eaef3f@huawei.com \
    --to=john.garry@huawei.com \
    --cc=acme@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=sukadev@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome