Received: by 10.213.65.68 with SMTP id h4csp595617imn; Tue, 13 Mar 2018 14:20:22 -0700 (PDT) X-Google-Smtp-Source: AG47ELvcOqswCfixILV6zaCvSgID3v/EohMcseYkI3ZqVAAfTqy4VwIlz0LThB/2wZ6TK5TzhXNx X-Received: by 10.99.38.135 with SMTP id m129mr1648705pgm.2.1520976022189; Tue, 13 Mar 2018 14:20:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520976022; cv=none; d=google.com; s=arc-20160816; b=JmlZRp61uNofIeCrBgB1PvvXGD5ta2c0F4BSfykEeNEV3XAwdLdHZgsjhJ0rQJ8DgI TMvYBV8EcVZj2JrLRcTE/n9o/OO4X2N15V1BPgNoHpxXtrClbSnJICdLvQ0xbuQ3nsNH wDMXK/2y2HfcAoTnbqTbxC694iBAmSRW9fm5SayJZb0HHGgGqFCdk3wiOqWjfAno1pwn +EmFfcuukwLQUhHint7V9GP0xjjobZiepkdcr0RencoS/T06Pafiodu3TSNJmSLULUTQ Uf6HisiJM3o2aQwYqB3vHt+28tbBsO9plwY+PElN9JWpNJRUx5rjhY5BOE0JlEAbgOca grgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date :arc-authentication-results; bh=sniOYtxZWZQYnsK+8iH84ZlkwCrufxgketfVZEUORd0=; b=Kr35xVPxwhvVnYc9bVks9mAcdhEmRxqXKaf75wSWKll2sxUe5aW5Fs4Uw1qvsw++Z8 nqcBVBtZW61YoL8macQB4zJtiH6pz8WHbCEgxK5dlLuPSahhcp/2LtYpn1JegL+IIk7o FR3llN54jZYUwCBhLG6tvHm4Wug2AXEtX+uyJ0t4lYa5AI6LQC7Pqmw/AOxFXgEchOrX OuXiXv1dUt8/eJIRV4+Bk7F715dgyqF4zkxFezlzzMT3MoItTWVKzac9mJtcrASq8O8J gFmJ+khLt5EgxTKoXa62u7/vK5q8bNYwRUzQ44q9hbKX8WezFbQexJjz+g1c2BCFFeEs t1Mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j25si655457pgn.592.2018.03.13.14.20.07; Tue, 13 Mar 2018 14:20:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752833AbeCMVSq (ORCPT + 99 others); Tue, 13 Mar 2018 17:18:46 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:49780 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751903AbeCMVSp (ORCPT ); Tue, 13 Mar 2018 17:18:45 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2DLEcsn078396 for ; Tue, 13 Mar 2018 17:18:44 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gpmb5vte5-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Tue, 13 Mar 2018 17:18:44 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 13 Mar 2018 17:18:43 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 13 Mar 2018 17:18:39 -0400 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2DLIdlp41746588; Tue, 13 Mar 2018 21:18:39 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CB44F124035; Tue, 13 Mar 2018 18:20:50 -0400 (EDT) Received: from suka-w540.localdomain (unknown [9.70.94.25]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP id 9D40D124037; Tue, 13 Mar 2018 18:20:50 -0400 (EDT) Received: by suka-w540.localdomain (Postfix, from userid 1000) id B9C6122928B; Tue, 13 Mar 2018 14:18:37 -0700 (PDT) Date: Tue, 13 Mar 2018 14:18:37 -0700 From: Sukadev Bhattiprolu To: John Garry Cc: Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, Michael Ellerman , Jiri Olsa Subject: Re: perf-core build fails on powerpc References: <20180313191742.GA29120@us.ibm.com> <152d2ba4-fe57-beab-87d5-554a0fede9ae@huawei.com> <20180313201003.GB29120@us.ibm.com> <543acf58-520d-e3e2-211e-17068d713a4f@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <543acf58-520d-e3e2-211e-17068d713a4f@huawei.com> X-Operating-System: Linux 2.0.32 on an i486 User-Agent: Mutt/1.7.1 (2016-10-04) X-TM-AS-GCONF: 00 x-cbid: 18031321-0048-0000-0000-0000024A1270 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008668; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.01002608; UDB=6.00510174; IPR=6.00781938; MB=3.00020014; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-13 21:18:42 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18031321-0049-0000-0000-0000446D607B Message-Id: <20180313211837.GC29120@us.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-13_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803130236 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks, Sukadev