Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4257811ybl; Mon, 9 Dec 2019 07:57:26 -0800 (PST) X-Google-Smtp-Source: APXvYqythc21UtKwkp64a+C61VWLdyKQ/0tGZX4qvGdpdewEz6y46S/ktU+f9vmYMbhQLVYhJyMl X-Received: by 2002:aca:ed46:: with SMTP id l67mr24153440oih.53.1575907046636; Mon, 09 Dec 2019 07:57:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575907046; cv=none; d=google.com; s=arc-20160816; b=jWGMtnrSO+krMNrzsj/WMEwYttd9KQ6WFbZhMwVfkqJTBlREmnuREq6fjbs0qDR7L8 mxq9BkjaSaVhNNop6CzlqhA+5lRq1UqlDR/sqtLrC3sDiu9Kosd0ruLkQ2I9Hcemr7b4 8xDiJAFloRoqyyWOCtHGYKW/gAPLFGj0dxAFuFLNZahXBwVToNBVt7VXaZikrMBr6UcB KIHmxeHmyBydQ2OOZ7JpyNKgqfo68lhPUe8epTDLlUUJbD2B77IDstLp0abQmnVfK/DI TsqTyBtQujMiHVcp9I3BMksMWIokDC0sxJgmtaHtNVz007mpt1yEIFbpw3p4zQcP1fS0 CawA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=b4OGOImy+zW+rp8iuKHc1/Qt3mCg0wPou7dCrsAOrB4=; b=thLNOdsgvZceSdy0mb840DkGXlebh8xxOcpHVp7dk2HepTGr5pN12HK+9VZq+pgjKg HEyrFMwc3gSJbn6JfLm3MY0Sw28U8Q46ukskGdPYvs+JgdRut+Fw6cXtki0jh/ht3Xku CLL5V2JWhWWJWKLgxR4krtt2i4LX/Gk458UtaUiMyA7waVYQ849JQ35wg4woYRrGoLov nMVrM2XB1MCP1+BuMlm///GAoNky+Wlrf2el94zIlCCWkyXwGJl0AWtauTIWR49cLyPi Su8K+SjyUni2WjFrR7YPoppfLYRkflDU/W/HRlzAJnT9k6cLH00aNAOd0R4/FsTM4b/V iKEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UOpx1uZy; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r10si12102633otn.241.2019.12.09.07.57.04; Mon, 09 Dec 2019 07:57:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UOpx1uZy; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726290AbfLIP43 (ORCPT + 99 others); Mon, 9 Dec 2019 10:56:29 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:43283 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726080AbfLIP43 (ORCPT ); Mon, 9 Dec 2019 10:56:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575906988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=b4OGOImy+zW+rp8iuKHc1/Qt3mCg0wPou7dCrsAOrB4=; b=UOpx1uZyQ9ZIBpHyZbOE8DnmAmPE87bMXTbJqJrTFeWuqdisS8hgn0QvFOg4DQFg0Ob+8V V/fuZM5rKAyrUsS+unXDr4d3/Mfh9C271ZZ27ZX+BeBHYTspte5q5C4L0Utj6GF2bDui74 /OWl003nZBPVNB0HCnwrHE9JdNwMV8I= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-193--HPSAzWkPPGZiDSD6cbliQ-1; Mon, 09 Dec 2019 10:56:27 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F2E33107ACC7; Mon, 9 Dec 2019 15:56:25 +0000 (UTC) Received: from madhat.boston.devel.redhat.com (ovpn-117-120.phx2.redhat.com [10.3.117.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id 952111001B03; Mon, 9 Dec 2019 15:56:25 +0000 (UTC) Subject: Re: [PATCH] Disable statx if using glibc emulation To: Doug Nazar , linux-nfs@vger.kernel.org References: <20191205102736.24314-1-nazard@nazar.ca> From: Steve Dickson Message-ID: Date: Mon, 9 Dec 2019 10:56:25 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <20191205102736.24314-1-nazard@nazar.ca> Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: -HPSAzWkPPGZiDSD6cbliQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On 12/5/19 5:27 AM, Doug Nazar wrote: > On older kernels without statx, glibc with statx support will attempt > to emulate the call. However it doesn't support AT_STATX_DONT_SYNC and > will return EINVAL. This causes all xstat/xlstat calls to fail. > > Signed-off-by: Doug Nazar Committed... (tag: nfs-utils-2-4-3-rc3) steved. > --- > support/misc/xstat.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/support/misc/xstat.c b/support/misc/xstat.c > index 661e29e4..a438fbcc 100644 > --- a/support/misc/xstat.c > +++ b/support/misc/xstat.c > @@ -51,6 +51,9 @@ statx_do_stat(int fd, const char *pathname, struct stat *statbuf, int flags) > statx_copy(statbuf, &stxbuf); > return 0; > } > + /* glibc emulation doesn't support AT_STATX_DONT_SYNC */ > + if (errno == EINVAL) > + errno = ENOSYS; > if (errno == ENOSYS) > statx_supported = 0; > } else >