From patchwork Wed Apr 26 22:32:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 9702167 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 71270603F6 for ; Wed, 26 Apr 2017 22:32:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60C7528484 for ; Wed, 26 Apr 2017 22:32:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 54747285E7; Wed, 26 Apr 2017 22:32:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3B0328484 for ; Wed, 26 Apr 2017 22:32:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031675AbdDZWcj (ORCPT ); Wed, 26 Apr 2017 18:32:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33706 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031615AbdDZWci (ORCPT ); Wed, 26 Apr 2017 18:32:38 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A419D155E4 for ; Wed, 26 Apr 2017 22:32:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A419D155E4 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=sandeen@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A419D155E4 Received: from [IPv6:::1] (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6F1AF7A25D; Wed, 26 Apr 2017 22:32:37 +0000 (UTC) To: linux-xfs , David Howells From: Eric Sandeen Subject: [PATCH] xfs_io: fix statx call for changed UAPI Message-ID: Date: Wed, 26 Apr 2017 17:32:36 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 26 Apr 2017 22:32:37 +0000 (UTC) Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Due to a late-breaking change in the statx UAPI in kernel commit 1e2f82d1 statx: Kill fd-with-NULL-path support in favour of AT_EMPTY_PATH we'll need to fix the way we call the syscall in xfs_io. Signed-off-by: Eric Sandeen Reviewed-by: David Howells Reviewed-by: Carlos Maiolino --- -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/io/stat.c b/io/stat.c index c5b3075..783eb2e 100644 --- a/io/stat.c +++ b/io/stat.c @@ -351,7 +351,7 @@ statx_f( return command_usage(&statx_cmd); memset(&stx, 0xbf, sizeof(stx)); - if (_statx(file->fd, NULL, atflag, mask, &stx) < 0) { + if (_statx(file->fd, "", atflag | AT_EMPTY_PATH, mask, &stx) < 0) { perror("statx"); return 0; } diff --git a/io/statx.h b/io/statx.h index ff08e27..3b5978d 100644 --- a/io/statx.h +++ b/io/statx.h @@ -4,6 +4,10 @@ #include #include +#ifndef AT_EMPTY_PATH +#define AT_EMPTY_PATH 0x1000 +#endif + #ifndef AT_STATX_SYNC_TYPE #define AT_STATX_SYNC_TYPE 0x6000 /* Type of synchronisation required from statx() */ #define AT_STATX_SYNC_AS_STAT 0x0000 /* - Do whatever stat() does */