From patchwork Thu Oct 4 22:27:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10626947 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 6646613BB for ; Thu, 4 Oct 2018 22:27:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 579F42943E for ; Thu, 4 Oct 2018 22:27:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B79529451; Thu, 4 Oct 2018 22:27: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=-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 EE07A2943E for ; Thu, 4 Oct 2018 22:27:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726286AbeJEFXJ (ORCPT ); Fri, 5 Oct 2018 01:23:09 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:43924 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725997AbeJEFXJ (ORCPT ); Fri, 5 Oct 2018 01:23:09 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w94MO1fD124447; Thu, 4 Oct 2018 22:27:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=S4QbCzQTVddg54sP2t9Ip5r8l7Sp1HSTcr02KiEvRuQ=; b=ZOMKM4wF//wOZ3x29EhkncdB8RhxTVe2QULWG1ib+1fhHIwq7JI3tAwY0G8ZXmev+H8B B+fBWN1EtkGfwF6pTDQ1ifOkswGA85FE4eq8Q5po7SI4SE9Wpr+2c2UaqjLHmqBNIitG +p4T5FdUBs0utQ3pRyocxZwUe6NwNLP1mskwiKI+GbCITUjkhsVM1BuiULy+1MFeVUwK ii3f56ZKVlH9kvpdhlxjiIojT6FnhmrWhlOEaYjSofZJ9t7JDY0FAsgG55GhE2G6Frtb os/gosd1s4fEdYkl2qxdTY7/GZrQNzJwnamwYPPvr5uAo4bzv7fJGsR5cL8S65OB0ZD1 uA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2mt0tu795p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 04 Oct 2018 22:27:36 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w94MRa19009551 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 4 Oct 2018 22:27:36 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w94MRaSl024871; Thu, 4 Oct 2018 22:27:36 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 04 Oct 2018 22:27:34 +0000 Date: Thu, 4 Oct 2018 15:27:33 -0700 From: "Darrick J. Wong" To: sandeen@redhat.com Cc: linux-xfs@vger.kernel.org Subject: [PATCH 9/8] xfs_io: dedupe command should only complain if we don't dedupe anything Message-ID: <20181004222733.GM19324@magnolia> References: <153841345236.27952.5050172703525712660.stgit@magnolia> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <153841345236.27952.5050172703525712660.stgit@magnolia> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9036 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810040201 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 The dedupe command should only complain about non-matching extents if the kernel hasn't managed to dedupe /any/ of the input range. Signed-off-by: Darrick J. Wong --- io/reflink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/io/reflink.c b/io/reflink.c index 26eb2e32..72dfe32d 100644 --- a/io/reflink.c +++ b/io/reflink.c @@ -70,7 +70,8 @@ dedupe_ioctl( _(strerror(-info->status))); goto done; } - if (info->status == XFS_EXTENT_DATA_DIFFERS) { + if (deduped == 0 && + info->status == XFS_EXTENT_DATA_DIFFERS) { fprintf(stderr, "XFS_IOC_FILE_EXTENT_SAME: %s\n", _("Extents did not match.")); goto done;