From patchwork Thu Oct 26 06:02:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: robbieko X-Patchwork-Id: 10027499 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 A93C66022E for ; Thu, 26 Oct 2017 06:02:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9804328D1E for ; Thu, 26 Oct 2017 06:02:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CD2D28D24; Thu, 26 Oct 2017 06:02:43 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 4BD1A28D1E for ; Thu, 26 Oct 2017 06:02:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751189AbdJZGCl (ORCPT ); Thu, 26 Oct 2017 02:02:41 -0400 Received: from synology.com ([59.124.61.242]:52093 "EHLO synology.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750949AbdJZGCj (ORCPT ); Thu, 26 Oct 2017 02:02:39 -0400 Received: from localhost.localdomain (unknown [10.13.20.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by synology.com (Postfix) with ESMTPSA id DA5987EF3250; Thu, 26 Oct 2017 14:02:30 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synology.com; s=123; t=1508997751; bh=0nZ7JPiMy28s6ScwWnJ3IUk8FZrUIzdNFqM/Ri5yfr8=; h=From:To:Cc:Subject:Date; b=L+JgKEHnPoI5B298NH6KV6VE5XUU9gMy192wAcIvWQvrtkiPFXd2003nQdSyryV6P wrIBlCXhgj2cNnRFiXkrmaDHtNRPkshHdlCDqnCwQZM9LQkz6FNIeMCPtJJqEch4Yz JdjuqAXx5dKo9ASqu4bwCs2goUDhzzp5n7EO4NsI= From: robbieko To: fstests@vger.kernel.org Cc: linux-btrfs@vger.kernel.org, Robbie Ko Subject: [PATCH] btrfs: fix offset in test Btrfs delalloc accounting overflow Date: Thu, 26 Oct 2017 14:02:15 +0800 Message-Id: <1508997735-10630-1-git-send-email-robbieko@synology.com> X-Mailer: git-send-email 1.9.1 X-MailScanner-ID: DA5987EF3250.AB794 X-MailScanner: Found to be clean X-MailScanner-MCPCheck: MCP-Clean, MCP-Checker (score=0, required 80) X-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (not cached, score=-0.299, required 4.5, ALL_TRUSTED -1.00, BAYES_50 0.80, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10, URIBL_BLOCKED 0.00) X-MailScanner-From: robbieko@synology.com Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Robbie Ko Found it when test btrfs delalloc accounting overflow, Fix offset error. We will fill in the gaps between the created extents, then outstanding extents will all be merged into 1. Signed-off-by: Robbie Ko --- tests/btrfs/010 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/btrfs/010 b/tests/btrfs/010 index ea201ad..00cac67 100755 --- a/tests/btrfs/010 +++ b/tests/btrfs/010 @@ -58,7 +58,7 @@ done # Fill in the gaps between the created extents. The outstanding extents will # all be merged into 1, but there will still be 32k reserved. for ((i = 0; i < 32 * 1024; i++)); do - $XFS_IO_PROG -f -c "pwrite $((2 * 4096 * i + 1)) 4096" "$test_file" >>"$seqres.full" + $XFS_IO_PROG -f -c "pwrite $((2 * 4096 * i + 4096)) 4096" "$test_file" >>"$seqres.full" done # Flush the delayed allocations.