From patchwork Fri Feb 22 16:47:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10826647 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8EEE917E9 for ; Fri, 22 Feb 2019 16:47:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76B22329D8 for ; Fri, 22 Feb 2019 16:47:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 691B832A03; Fri, 22 Feb 2019 16:47:41 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 22B9E329D8 for ; Fri, 22 Feb 2019 16:47:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726229AbfBVQrk (ORCPT ); Fri, 22 Feb 2019 11:47:40 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:39420 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725892AbfBVQrk (ORCPT ); Fri, 22 Feb 2019 11:47:40 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x1MGiBN8154826 for ; Fri, 22 Feb 2019 16:47:39 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=Eclkxvyhiv2hmxqNY5tiBag+ZRA0s3xXR/W5HJg0In8=; b=wR4/tzb24WAPMPbsrDWNCfDztVfsqIqM2OyLqji7G502/X3q6ieeeh392d9OuG8roi4W fBRfozEiGRXvbizzKeEi+yuGWA9PAg1USsIx4G2erp9RTVw5SjV2+LCMKAdLzLhpCzzx K1m0IxsxhQUaTg9Xml/pdcs2AR62KClHm9bAYfdk287JxdLwrUkLct9v9ILU6i9YT9SF R05vrHZ/i+V1gXeTQLDwU5o1c2zbNmOwhzvkDHJ+Bgk27VGTxJgonYviDRMLSwplrkNx opmMEtv0VoI3JvryJ/Zc9plZjSRNrvwG/uqjpp+EJtbDZGqR0bROmWU1D5MPcaRIEldr jw== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2qp9xugauv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 22 Feb 2019 16:47:38 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x1MGlcaw010924 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 22 Feb 2019 16:47:38 GMT Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x1MGlcTv025192 for ; Fri, 22 Feb 2019 16:47:38 GMT Received: from localhost (/10.159.254.125) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 22 Feb 2019 08:47:38 -0800 Subject: [PATCH 3/4] xfs_restore: fix unsupported ioctl detection From: "Darrick J. Wong" To: darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Fri, 22 Feb 2019 08:47:37 -0800 Message-ID: <155085405698.5141.702624754882653044.stgit@magnolia> In-Reply-To: <155085403848.5141.1866278990901950186.stgit@magnolia> References: <155085403848.5141.1866278990901950186.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9175 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=872 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902220118 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 From: Darrick J. Wong Linux ioctls can return ENOTTY or EOPNOTSUPP, so filter both of them when logging reservation failure. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Collins --- restore/dirattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/restore/dirattr.c b/restore/dirattr.c index 4257a1b..3fa8fb6 100644 --- a/restore/dirattr.c +++ b/restore/dirattr.c @@ -76,7 +76,7 @@ create_filled_file( return fd; ret = ioctl(fd, XFS_IOC_RESVSP64, &fl); - if (ret && errno != ENOTTY) + if (ret && (errno != EOPNOTSUPP && errno != ENOTTY)) mlog(MLOG_VERBOSE | MLOG_NOTE, _("attempt to reserve %lld bytes for %s using %s failed: %s (%d)\n"), size, pathname, "XFS_IOC_RESVSP64",