From patchwork Sun Sep 3 15:51:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9936429 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 773FE6037D for ; Sun, 3 Sep 2017 15:51:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6883E28692 for ; Sun, 3 Sep 2017 15:51:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D337286A0; Sun, 3 Sep 2017 15:51:03 +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 D921B28692 for ; Sun, 3 Sep 2017 15:51:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753087AbdICPvC (ORCPT ); Sun, 3 Sep 2017 11:51:02 -0400 Received: from verein.lst.de ([213.95.11.211]:39697 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753023AbdICPvC (ORCPT ); Sun, 3 Sep 2017 11:51:02 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 0B3EE9EDA3; Sun, 3 Sep 2017 17:51:01 +0200 (CEST) Date: Sun, 3 Sep 2017 17:51:01 +0200 From: Christoph Hellwig To: fstests@vger.kernel.org Cc: "Darrick J. Wong" Subject: xfs/310: relax extent count check Message-ID: <20170903155101.GA30258@lst.de> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If we got over the bmbt length we'll always allocate two extents, its just that so far getbmap merged them. Also fix/update some comments. Reviewed-by: Darrick J. Wong Signed-off-by: Christoph Hellwig --- 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/xfs/310 b/tests/xfs/310 index c78f6f1..f33a15a 100755 --- a/tests/xfs/310 +++ b/tests/xfs/310 @@ -1,7 +1,7 @@ #! /bin/bash # FS QA Test No. 310 # -# Create a file with more than 2^21 extents (the max length of a bmbt record). +# Create a file with more than 2^21 blocks (the max length of a bmbt record). # #----------------------------------------------------------------------- # Copyright (c) 2016, Oracle and/or its affiliates. All Rights Reserved. @@ -75,8 +75,9 @@ mkdir $testdir blksz="$(_get_block_size $testdir)" $XFS_IO_PROG -f -c "falloc 0 $((nr_blks * blksz))" $testdir/file1 >> $seqres.full +# make sure the allocator didn't allocate more than the needed two extents echo "Check extent count" -xfs_bmap -l -p -v $testdir/file1 | grep '^[[:space:]]*1:' -q && xfs_bmap -l -p -v $testdir/file1 +xfs_bmap -l -p -v $testdir/file1 | grep '^[[:space:]]*2:' -q && xfs_bmap -l -p -v $testdir/file1 inum=$(stat -c '%i' $testdir/file1) umount $SCRATCH_MNT