From patchwork Tue Apr 17 05:20:35 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: 10344381 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 9255860542 for ; Tue, 17 Apr 2018 05:20:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 833CA28998 for ; Tue, 17 Apr 2018 05:20:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 775B5289A5; Tue, 17 Apr 2018 05:20: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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, LOTS_OF_MONEY,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID, 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 F006C28998 for ; Tue, 17 Apr 2018 05:20:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750831AbeDQFUj (ORCPT ); Tue, 17 Apr 2018 01:20:39 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:42464 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750821AbeDQFUj (ORCPT ); Tue, 17 Apr 2018 01:20:39 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w3H5GI4F030315; Tue, 17 Apr 2018 05:20:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2017-10-26; bh=22cJzfmYGwFuA3uB/ExAor7vWDAB3vjL82c3m9xNrJo=; b=QiftaLUaKapbmIiiw0VFnvEzKxcSLgRueA9od4QGFTaNvgavqmUU7Vo5JivSD63xlQMZ PszcIHqF/PCkHx6Yr1EDcfkTkp4diSd87AuJaQcdV2Z/7GOE5zi8013DTmaTNb5WWLlI Kt7UqAnPt+Spbbul1w1jx9oZnl92GpUZUNbC89RGfr/KFt+YQwxtV11PeT6JgL0icsLX RUdBCtliJtjRiVtShVl3wa8Wn89k6pU7DMH/UcU+x9MtE14q3Pr/iaX0ddlDvxqJPH4j XQeBpBVAtmlv38qZpvRumK8xQqVp3XPwd2I+XuKTHwGSnV/dXxke6Y82ikr5HZPTH+mi tA== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2130.oracle.com with ESMTP id 2hbamf00qk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Apr 2018 05:20:37 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w3H5Kbkk020592 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Apr 2018 05:20:37 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w3H5KaOo015960; Tue, 17 Apr 2018 05:20:36 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 16 Apr 2018 22:20:36 -0700 Date: Mon, 16 Apr 2018 22:20:35 -0700 From: "Darrick J. Wong" To: Eryu Guan Cc: fstests Subject: [PATCH] generic/304: only dedupe the last 64k of the single byte file Message-ID: <20180417052035.GC5201@magnolia> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8865 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=872 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804170048 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Commit 1ddae54555b62 ("common/rc: add missing 'local' keywords") exposed a long-hidden bug in generic/304 -- previously we'd set len to 8EiB, but _pwrite_byte reset it to 1 because the helper clumsily polluted the caller's variable namespace. Now that's fixed, but we send an 8EiB dedupe request to the kernel, which on XFS locks up the kernel while doing this. The point of this test is to demonstrate that one cannot dedupe the last byte of a (2^63-1) byte file (that's the way the interface has behaved historically), so start at 64k below that instead of offset zero. Signed-off-by: Darrick J. Wong --- tests/generic/304 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe fstests" 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/tests/generic/304 b/tests/generic/304 index 6c36a68..ff8ddf8 100755 --- a/tests/generic/304 +++ b/tests/generic/304 @@ -63,7 +63,7 @@ _pwrite_byte 0x61 $bigoff 1 $testdir/file3 >> $seqres.full _pwrite_byte 0x61 1048575 1 $testdir/file2 >> $seqres.full echo "Dedupe large single byte file" -_dedupe_range $testdir/file1 0 $testdir/file3 0 $len \ +_dedupe_range $testdir/file1 $bigoff_64k $testdir/file3 $bigoff_64k 65536 \ 2>&1 >> $seqres.full | _filter_dedupe_error echo "Dedupe large empty file"