From patchwork Wed Sep 12 06:26:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596767 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 529E115E2 for ; Wed, 12 Sep 2018 06:24:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43A4F2984C for ; Wed, 12 Sep 2018 06:24:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37C0729852; Wed, 12 Sep 2018 06:24:21 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable 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 A8E6F2985F for ; Wed, 12 Sep 2018 06:24:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726502AbeILL1T (ORCPT ); Wed, 12 Sep 2018 07:27:19 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:37644 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725910AbeILL1T (ORCPT ); Wed, 12 Sep 2018 07:27:19 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6JgQJ093078 for ; Wed, 12 Sep 2018 02:24:18 -0400 Received: from e13.ny.us.ibm.com (e13.ny.us.ibm.com [129.33.205.203]) by mx0b-001b2d01.pphosted.com with ESMTP id 2meusq3keg-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:18 -0400 Received: from localhost by e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:17 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e13.ny.us.ibm.com (146.89.104.200) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:14 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6ODuE25952418 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:13 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EEE802805A; Wed, 12 Sep 2018 02:22:17 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8BCD72805E; Wed, 12 Sep 2018 02:22:16 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:16 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 01/19] Fix xfs/009 to work with 64k block size Date: Wed, 12 Sep 2018 11:56:08 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-0064-0000-0000-0000034BCACC X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867116; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:16 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-0065-0000-0000-00003A9D4C42 Message-Id: <20180912062626.14349-2-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120068 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP xfs_alloc_file_space() rounds up allocation requests by the filesystem block size. Hence this commit changes the test to work with block size units rather than with a multiple of 4096 bytes. Signed-off-by: Chandan Rajendra --- tests/xfs/009 | 92 ++++++++++++++++++++++++++++++++++++++++++++++--------- tests/xfs/009.out | 66 +++++++++++++++++++-------------------- 2 files changed, 110 insertions(+), 48 deletions(-) diff --git a/tests/xfs/009 b/tests/xfs/009 index 68f6379..70717eb 100755 --- a/tests/xfs/009 +++ b/tests/xfs/009 @@ -14,9 +14,6 @@ here=`pwd` tmp=/tmp/$$ status=1 # failure is the default! trap "_cleanup; exit \$status" 0 1 2 3 15 -# This isn't really related to fs block size, it's just what -# alloc uses for the "block" unit in it's input parameters... -bsize=4096 _cleanup() { @@ -24,13 +21,6 @@ _cleanup() _scratch_unmount } -_block_filter() -{ - sed \ - -e 's/[0-9][0-9]*\.\.[0-9][0-9]*/BLOCKRANGE/g' \ - -e "s/blocksize $bsize/blocksize BSIZE/g" -} - _init() { echo "*** mkfs" @@ -49,11 +39,6 @@ _init() fi } -_filesize() -{ - ls -l $1 | $AWK_PROG '{print "filesize = " $5}' -} - # get standard environment, filters and checks . ./common/rc . ./common/filter @@ -64,9 +49,86 @@ _supported_os Linux _require_scratch +_filesize() +{ + ls -l $1 | $AWK_PROG -v bsize="$bsize" '{print "filesize = " $5 / bsize}' +} + +_block_filter() +{ + $AWK_PROG -v bsize="$bsize" ' + /blocksize/ { + printf(" blocksize BSIZE\n") + + next + } + + /CMD/ { + split($3, off, "=") + offset = strtonum(off[2]) + if (offset != -1) + offset = offset / bsize + + split($4, len, "=") + nr_blocks = strtonum(len[2]) + if (nr_blocks != -1) + nr_blocks = nr_blocks / bsize + + printf(" %s %s off=%s, len=%d\n", $1, $2, offset, nr_blocks) + + next + } + + /MAP/ { + split($2, off, "=") + offset = strtonum(off[2]) + if (offset != -1) + offset = offset / bsize + + split($3, len, "=") + + nr_blocks = strtonum(len[2]) + + if (nr_blocks != -1) + nr_blocks = nr_blocks / bsize + + printf(" %s off=%s, len=%d %s\n", $1, offset, nr_blocks, $4) + + next + } + + /TRUNCATE/ { + split($2, off, "=") + offset = strtonum(off[2]) / bsize + + printf(" %s off=%s\n", $1, offset) + + next + } + + /\[[0-9]+,[0-9]+\]:/ { + printf(" %s BLOCKRANGE\n", $1) + + next + } + + { + print + + next + } + ' +} + _init out=$SCRATCH_MNT/$$.tmp +# This isn't really related to fs block size, it's just what +# alloc uses for the "block" unit in it's input parameters... +# However, xfs_alloc_file_space() rounds up allocation +# request by the filesystem's block size. +bsize=$(_get_block_size $SCRATCH_MNT) + # since we're using a clean FS here, we make some assumptions # about availability of contiguous blocks diff --git a/tests/xfs/009.out b/tests/xfs/009.out index 7132aca..02b5d82 100644 --- a/tests/xfs/009.out +++ b/tests/xfs/009.out @@ -3,8 +3,8 @@ QA output created by 009 *** mount *** test 1 - reservations cleared on O_TRUNC blocksize BSIZE - CMD resvsp, off=0, len=4096000 - MAP off=0, len=4096000 [0,1000] + CMD resvsp, off=0, len=1000 + MAP off=0, len=1000 [0,1000] [ofs,count]: start..end [0,1000]: BLOCKRANGE MAP off=0, len=-1 [0-] @@ -17,53 +17,53 @@ filesize = 0 filesize = 0 *** test 2 - reserve & filesize blocksize BSIZE - CMD resvsp, off=0, len=4096000 - MAP off=0, len=4096000 [0,1000] + CMD resvsp, off=0, len=1000 + MAP off=0, len=1000 [0,1000] [ofs,count]: start..end [0,1000]: BLOCKRANGE filesize = 0 *** test 3 - alloc & filesize blocksize BSIZE - CMD allocsp, off=4096000, len=-1 - MAP off=4096000, len=-1 [1000-] + CMD allocsp, off=1000, len=-1 + MAP off=1000, len=-1 [1000-] [ofs,count]: start..end -filesize = 4096000 +filesize = 1000 *** test 4 - allocations cleared on O_TRUNC blocksize BSIZE - CMD allocsp, off=4096000, len=-1 - MAP off=4096000, len=-1 [1000-] + CMD allocsp, off=1000, len=-1 + MAP off=1000, len=-1 [1000-] [ofs,count]: start..end -filesize = 4096000 +filesize = 1000 blocksize BSIZE MAP off=0, len=-1 [0-] [ofs,count]: start..end filesize = 0 *** test 5 - reserve / unreserve blocksize BSIZE - CMD resvsp, off=0, len=409600 - MAP off=0, len=409600 [0,100] + CMD resvsp, off=0, len=100 + MAP off=0, len=100 [0,100] [ofs,count]: start..end [0,100]: BLOCKRANGE - CMD unresvsp, off=409600, len=2048000 - MAP off=409600, len=2048000 [100,500] + CMD unresvsp, off=100, len=500 + MAP off=100, len=500 [100,500] [ofs,count]: start..end MAP off=0, len=-1 [0-] [ofs,count]: start..end [0,100]: BLOCKRANGE - CMD unresvsp, off=3686400, len=819200 - MAP off=3686400, len=819200 [900,200] + CMD unresvsp, off=900, len=200 + MAP off=900, len=200 [900,200] [ofs,count]: start..end MAP off=0, len=-1 [0-] [ofs,count]: start..end [0,100]: BLOCKRANGE *** test 6 - reserve adjacent blocksize BSIZE - CMD resvsp, off=0, len=409600 - MAP off=0, len=409600 [0,100] + CMD resvsp, off=0, len=100 + MAP off=0, len=100 [0,100] [ofs,count]: start..end [0,100]: BLOCKRANGE - CMD resvsp, off=409600, len=409600 - MAP off=409600, len=409600 [100,100] + CMD resvsp, off=100, len=100 + MAP off=100, len=100 [100,100] [ofs,count]: start..end [100,100]: BLOCKRANGE MAP off=0, len=-1 [0-] @@ -71,44 +71,44 @@ filesize = 0 [0,200]: BLOCKRANGE *** test 7 - alloc blocksize BSIZE - CMD allocsp, off=4096000, len=-1 - MAP off=4096000, len=-1 [1000-] + CMD allocsp, off=1000, len=-1 + MAP off=1000, len=-1 [1000-] [ofs,count]: start..end MAP off=0, len=-1 [0-] [ofs,count]: start..end [0,1000]: BLOCKRANGE - CMD allocsp, off=8192000, len=-1 - MAP off=8192000, len=-1 [2000-] + CMD allocsp, off=2000, len=-1 + MAP off=2000, len=-1 [2000-] [ofs,count]: start..end MAP off=0, len=-1 [0-] [ofs,count]: start..end [0,2000]: BLOCKRANGE -filesize = 8192000 +filesize = 2000 *** test 8 - alloc & truncate blocksize BSIZE - CMD allocsp, off=4096000, len=-1 - MAP off=4096000, len=-1 [1000-] + CMD allocsp, off=1000, len=-1 + MAP off=1000, len=-1 [1000-] [ofs,count]: start..end MAP off=0, len=-1 [0-] [ofs,count]: start..end [0,1000]: BLOCKRANGE - TRUNCATE off=2048000 + TRUNCATE off=500 MAP off=0, len=-1 [0-] [ofs,count]: start..end [0,500]: BLOCKRANGE -filesize = 2048000 +filesize = 500 *** test 9 - reserve & truncate blocksize BSIZE - CMD resvsp, off=0, len=4096000 - MAP off=0, len=4096000 [0,1000] + CMD resvsp, off=0, len=1000 + MAP off=0, len=1000 [0,1000] [ofs,count]: start..end [0,1000]: BLOCKRANGE MAP off=0, len=-1 [0-] [ofs,count]: start..end [0,1000]: BLOCKRANGE - TRUNCATE off=2048000 + TRUNCATE off=500 MAP off=0, len=-1 [0-] [ofs,count]: start..end [0,1000]: BLOCKRANGE -filesize = 2048000 +filesize = 500 *** unmount From patchwork Wed Sep 12 06:26:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596771 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 E3AD915E2 for ; Wed, 12 Sep 2018 06:24:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4E712984C for ; Wed, 12 Sep 2018 06:24:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C2A2129867; Wed, 12 Sep 2018 06:24:23 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable 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 430EB29852 for ; Wed, 12 Sep 2018 06:24:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727004AbeILL1V (ORCPT ); Wed, 12 Sep 2018 07:27:21 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:48676 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725910AbeILL1V (ORCPT ); Wed, 12 Sep 2018 07:27:21 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6JbqW017290 for ; Wed, 12 Sep 2018 02:24:21 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 2metq5wf2d-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:21 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:20 -0400 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:16 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6OFR926607632 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:15 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BFC7C28059; Wed, 12 Sep 2018 02:22:19 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6868A28058; Wed, 12 Sep 2018 02:22:18 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:18 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 02/19] xfs/050: Fix "Push past soft inode limit" case Date: Wed, 12 Sep 2018 11:56:09 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-0040-0000-0000-0000046E376D X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867116; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:19 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-0041-0000-0000-0000087563B8 Message-Id: <20180912062626.14349-3-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120068 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The test sets an inode soft limit of four but only three files are created. This commit creates two more files in order to really push past the soft inode limit. Signed-off-by: Chandan Rajendra --- tests/xfs/050 | 2 ++ tests/xfs/050.out | 36 ++++++++++++++++++------------------ 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/tests/xfs/050 b/tests/xfs/050 index dd77971..8569c2c 100755 --- a/tests/xfs/050 +++ b/tests/xfs/050 @@ -143,6 +143,8 @@ _exercise() echo "*** push past the soft inode limit" | tee -a $seqres.full _file_as_id $SCRATCH_MNT/softie1 $id $type 1024 0 _file_as_id $SCRATCH_MNT/softie2 $id $type 1024 0 + _file_as_id $SCRATCH_MNT/softie3 $id $type 1024 0 + _file_as_id $SCRATCH_MNT/softie4 $id $type 1024 0 _qmount xfs_quota -D $tmp.projects -P $tmp.projid -x \ -c "repquota -birnN -$type" $SCRATCH_DEV | diff --git a/tests/xfs/050.out b/tests/xfs/050.out index 5cb4a10..ff9eb1c 100644 --- a/tests/xfs/050.out +++ b/tests/xfs/050.out @@ -16,11 +16,11 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** push past the soft inode limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 3 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 100 500 00 [--------] 5 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the soft block limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [7 days] 4 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 140 100 500 00 [7 days] 6 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the hard inode limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] @@ -48,11 +48,11 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** push past the soft inode limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 3 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 100 500 00 [--------] 5 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the soft block limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [7 days] 4 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 140 100 500 00 [7 days] 6 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the hard inode limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] @@ -80,19 +80,19 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** push past the soft inode limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 3 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 100 500 00 [--------] 5 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft block limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [--------] 4 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 140 100 500 00 [--------] 6 4 10 00 [--------] 0 0 0 00 [--------] *** push past the hard inode limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [--------] 16 4 10 00 [--none--] 0 0 0 00 [--------] +[NAME] 140 100 500 00 [--------] 18 4 10 00 [--none--] 0 0 0 00 [--------] *** push past the hard block limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 540 100 500 00 [--none--] 16 4 10 00 [--none--] 0 0 0 00 [--------] +[NAME] 540 100 500 00 [--none--] 18 4 10 00 [--none--] 0 0 0 00 [--------] *** unmount *** gqnoenforce @@ -112,19 +112,19 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** push past the soft inode limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 3 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 100 500 00 [--------] 5 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft block limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [--------] 4 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 140 100 500 00 [--------] 6 4 10 00 [--------] 0 0 0 00 [--------] *** push past the hard inode limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [--------] 16 4 10 00 [--none--] 0 0 0 00 [--------] +[NAME] 140 100 500 00 [--------] 18 4 10 00 [--none--] 0 0 0 00 [--------] *** push past the hard block limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 540 100 500 00 [--none--] 16 4 10 00 [--none--] 0 0 0 00 [--------] +[NAME] 540 100 500 00 [--none--] 18 4 10 00 [--none--] 0 0 0 00 [--------] *** unmount *** pquota @@ -144,11 +144,11 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** push past the soft inode limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 3 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 100 500 00 [--------] 5 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the soft block limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [7 days] 4 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 140 100 500 00 [7 days] 6 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the hard inode limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] @@ -176,18 +176,18 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** push past the soft inode limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 3 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 100 500 00 [--------] 5 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft block limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [--------] 4 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 140 100 500 00 [--------] 6 4 10 00 [--------] 0 0 0 00 [--------] *** push past the hard inode limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [--------] 16 4 10 00 [--none--] 0 0 0 00 [--------] +[NAME] 140 100 500 00 [--------] 18 4 10 00 [--none--] 0 0 0 00 [--------] *** push past the hard block limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 540 100 500 00 [--none--] 16 4 10 00 [--none--] 0 0 0 00 [--------] +[NAME] 540 100 500 00 [--none--] 18 4 10 00 [--none--] 0 0 0 00 [--------] *** unmount From patchwork Wed Sep 12 06:26:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596773 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 5122914DB for ; Wed, 12 Sep 2018 06:24:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41C2529852 for ; Wed, 12 Sep 2018 06:24:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 363EA29865; Wed, 12 Sep 2018 06:24:25 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 1376529852 for ; Wed, 12 Sep 2018 06:24:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725910AbeILL1W (ORCPT ); Wed, 12 Sep 2018 07:27:22 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:48730 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726555AbeILL1W (ORCPT ); Wed, 12 Sep 2018 07:27:22 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6JcDC017351 for ; Wed, 12 Sep 2018 02:24:22 -0400 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0a-001b2d01.pphosted.com with ESMTP id 2metq5wf2w-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:22 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:21 -0400 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:18 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6OH4Q42270776 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:17 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 999F72805A; Wed, 12 Sep 2018 02:22:21 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 390362805E; Wed, 12 Sep 2018 02:22:20 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:19 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 03/19] Fix xfs/050 to work with 64k block size Date: Wed, 12 Sep 2018 11:56:10 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-2213-0000-0000-000002ED135C X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867116; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:20 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-2214-0000-0000-00005B86BBBC Message-Id: <20180912062626.14349-4-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120068 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This commit changes the test to calculate quota limits based on the block size of the underlying filesystem. Also, the sizes of the test files are now made to be a multiple of the filesystem block size. Signed-off-by: Chandan Rajendra --- tests/xfs/050 | 24 ++++++++++++++-------- tests/xfs/050.out | 60 +++++++++++++++++++++++++++---------------------------- 2 files changed, 46 insertions(+), 38 deletions(-) diff --git a/tests/xfs/050 b/tests/xfs/050 index 8569c2c..01d82cc 100755 --- a/tests/xfs/050 +++ b/tests/xfs/050 @@ -38,8 +38,13 @@ chmod a+rwx $seqres.full # arbitrary users will write here _require_scratch _require_xfs_quota -bsoft=100 -bhard=500 +_scratch_mkfs >/dev/null 2>&1 +_scratch_mount +bsize=$(_get_block_size $SCRATCH_MNT) +_scratch_unmount + +bsoft=$(( 25 * $bsize )) +bhard=$(( 125 * $bsize )) isoft=4 ihard=10 @@ -55,7 +60,9 @@ _filter_report() if ($ENV{'LARGE_SCRATCH_DEV'}) { $val = $ENV{'NUM_SPACE_FILES'}; } - s/(^\[ROOT\] \S+ \S+ \S+ \S+ \[--------\] )(\S+)/$1@{[$2 - $val]}/g' + s/(^\[ROOT\] \S+ \S+ \S+ \S+ \[--------\] )(\S+)/$1@{[$2 - $val]}/g' | + perl -npe ' + s|^(.*?) (\d+) (\d+) (\d+)|$1 @{[$2 * 1024 /'$bsize']} @{[$3 * 1024 /'$bsize']} @{[$4 * 1024 /'$bsize']}|' } # The actual point at which limit enforcement takes place for the @@ -70,9 +77,10 @@ _filter_and_check_blks() if (/^\#'$id'\s+(\d+)/ && '$enforce') { $maximum = '$bhard'; $minimum = '$bhard' * 85/100; - if (($1 < $minimum || $1 > $maximum) && '$noextsz') { + $used = $1 * 1024; + if (($used < $minimum || $used > $maximum) && '$noextsz') { printf(" URK %d: %d is out of range! [%d,%d]\n", - '$id', $1, $minimum, $maximum); + '$id', $used, $minimum, $maximum); } s/^(\#'$id'\s+)(\d+)/\1 =OK=/g; } @@ -132,7 +140,7 @@ _exercise() echo "ls -l $SCRATCH_MNT" >>$seqres.full ls -l $SCRATCH_MNT >>$seqres.full xfs_quota -D $tmp.projects -P $temp.projid -x \ - -c "limit -$type bsoft=${bsoft}k bhard=${bhard}k $id" \ + -c "limit -$type bsoft=${bsoft} bhard=${bhard} $id" \ -c "limit -$type isoft=$isoft ihard=$ihard $id" \ $SCRATCH_DEV xfs_quota -D $tmp.projects -P $tmp.projid -x \ @@ -152,7 +160,7 @@ _exercise() echo echo "*** push past the soft block limit" | tee -a $seqres.full - _file_as_id $SCRATCH_MNT/softie $id $type 1024 140 + _file_as_id $SCRATCH_MNT/softie $id $type $bsize 35 _qmount xfs_quota -D $tmp.projects -P $tmp.projid -x \ -c "repquota -birnN -$type" $SCRATCH_DEV | @@ -173,7 +181,7 @@ _exercise() echo # Note: for quota accounting (not enforcement), EDQUOT is not expected echo "*** push past the hard block limit (expect EDQUOT)" | tee -a $seqres.full - _file_as_id $SCRATCH_MNT/softie $id $type 1024 540 + _file_as_id $SCRATCH_MNT/softie $id $type $bsize 135 echo "ls -l $SCRATCH_MNT" >>$seqres.full ls -l $SCRATCH_MNT >>$seqres.full _qmount diff --git a/tests/xfs/050.out b/tests/xfs/050.out index ff9eb1c..53907a2 100644 --- a/tests/xfs/050.out +++ b/tests/xfs/050.out @@ -12,23 +12,23 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** report initial settings [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft inode limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 5 4 10 00 [7 days] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 5 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the soft block limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [7 days] 6 4 10 00 [7 days] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [7 days] 6 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the hard inode limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the hard block limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] =OK= 100 500 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------] +[NAME] =OK= 25 125 0 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------] *** unmount *** group @@ -44,23 +44,23 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** report initial settings [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft inode limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 5 4 10 00 [7 days] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 5 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the soft block limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [7 days] 6 4 10 00 [7 days] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [7 days] 6 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the hard inode limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the hard block limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] =OK= 100 500 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------] +[NAME] =OK= 25 125 0 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------] *** unmount *** uqnoenforce @@ -76,23 +76,23 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** report initial settings [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft inode limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 5 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 5 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft block limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [--------] 6 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [--------] 6 4 10 00 [--------] 0 0 0 00 [--------] *** push past the hard inode limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [--------] 18 4 10 00 [--none--] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [--------] 18 4 10 00 [--none--] 0 0 0 00 [--------] *** push past the hard block limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 540 100 500 00 [--none--] 18 4 10 00 [--none--] 0 0 0 00 [--------] +[NAME] 135 25 125 00 [--none--] 18 4 10 00 [--none--] 0 0 0 00 [--------] *** unmount *** gqnoenforce @@ -108,23 +108,23 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** report initial settings [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft inode limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 5 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 5 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft block limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [--------] 6 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [--------] 6 4 10 00 [--------] 0 0 0 00 [--------] *** push past the hard inode limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [--------] 18 4 10 00 [--none--] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [--------] 18 4 10 00 [--none--] 0 0 0 00 [--------] *** push past the hard block limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 540 100 500 00 [--none--] 18 4 10 00 [--none--] 0 0 0 00 [--------] +[NAME] 135 25 125 00 [--none--] 18 4 10 00 [--none--] 0 0 0 00 [--------] *** unmount *** pquota @@ -140,23 +140,23 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** report initial settings [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft inode limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 5 4 10 00 [7 days] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 5 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the soft block limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [7 days] 6 4 10 00 [7 days] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [7 days] 6 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the hard inode limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [7 days] 9 4 10 00 [7 days] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [7 days] 9 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the hard block limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] =OK= 100 500 00 [7 days] 9 4 10 00 [7 days] 0 0 0 00 [--------] +[NAME] =OK= 25 125 0 [7 days] 9 4 10 00 [7 days] 0 0 0 00 [--------] *** unmount *** pqnoenforce @@ -172,22 +172,22 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** report initial settings [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft inode limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 5 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 5 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft block limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [--------] 6 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [--------] 6 4 10 00 [--------] 0 0 0 00 [--------] *** push past the hard inode limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [--------] 18 4 10 00 [--none--] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [--------] 18 4 10 00 [--none--] 0 0 0 00 [--------] *** push past the hard block limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 540 100 500 00 [--none--] 18 4 10 00 [--none--] 0 0 0 00 [--------] +[NAME] 135 25 125 00 [--none--] 18 4 10 00 [--none--] 0 0 0 00 [--------] *** unmount From patchwork Wed Sep 12 06:26:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596779 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 59B7C14DB for ; Wed, 12 Sep 2018 06:24:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 493792984C for ; Wed, 12 Sep 2018 06:24:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3DBE12985F; Wed, 12 Sep 2018 06:24:27 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable 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 E541B2984C for ; Wed, 12 Sep 2018 06:24:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727384AbeILL1Z (ORCPT ); Wed, 12 Sep 2018 07:27:25 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:35664 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbeILL1Z (ORCPT ); Wed, 12 Sep 2018 07:27:25 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6Jg5b143587 for ; Wed, 12 Sep 2018 02:24:25 -0400 Received: from e13.ny.us.ibm.com (e13.ny.us.ibm.com [129.33.205.203]) by mx0a-001b2d01.pphosted.com with ESMTP id 2meqxvba2h-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:25 -0400 Received: from localhost by e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:22 -0400 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e13.ny.us.ibm.com (146.89.104.200) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:20 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6OJWK43843718 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:19 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 676C62805A; Wed, 12 Sep 2018 02:22:23 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 114FA28060; Wed, 12 Sep 2018 02:22:22 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:21 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 04/19] Fix xfs/074 to work with 64k block size Date: Wed, 12 Sep 2018 11:56:11 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-0064-0000-0000-0000034BCACE X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867116; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:22 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-0065-0000-0000-00003A9D4C50 Message-Id: <20180912062626.14349-5-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120068 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This commit makes file and extent size calculations to be a function of the filesystem's block size. It also adds a brief description of the bug that is being tested. Signed-off-by: Chandan Rajendra --- tests/xfs/074 | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/tests/xfs/074 b/tests/xfs/074 index e5888d5..1e1e16e 100755 --- a/tests/xfs/074 +++ b/tests/xfs/074 @@ -7,6 +7,18 @@ # Check some extent size hint boundary conditions that can result in # MAXEXTLEN overflows. # +# In xfs_bmap_extsize_align(), we had, +# if ((temp = (align_alen % extsz))) { +# align_alen += extsz - temp; +# } +# align_alen had the value of 2097151 (i.e. MAXEXTLEN) blocks. extsz had +# the value of 4096 blocks. +# +# align_alen % extsz will be 4095. so align_alen will end up having +# 2097151 + (4096 - 4095) = 2097152 i.e. (MAXEXTLEN + 1). Thus the length +# of the new extent will be larger than MAXEXTLEN. This will later cause +# the bmbt leaf to have an entry whose length is set to zero block count. +# seq=`basename $0` seqres=$RESULT_DIR/$seq echo "QA output created by $seq" @@ -46,19 +58,22 @@ mkdir -p $LOOP_MNT $XFS_IO_PROG -ft -c "truncate 1t" $LOOP_FILE >> $seqres.full LOOP_DEV=`_create_loop_device $LOOP_FILE` -_mkfs_dev -d size=156452m,agcount=4 -l size=32m $LOOP_DEV +_mkfs_dev -d size=260g,agcount=2 $LOOP_DEV _mount $LOOP_DEV $LOOP_MNT +BLOCK_SIZE=$(_get_block_size $LOOP_MNT) + # Corrupt the BMBT by creating extents larger than MAXEXTLEN +# For 4k blocksize, MAXEXTLEN * 4k = 2097151 * 4k = 8589930496 = ~8GiB $XFS_IO_PROG -ft \ - -c "extsize 16m" \ - -c "falloc 0 30g" \ + -c "extsize $(($BLOCK_SIZE * 4096))" \ + -c "falloc 0 $(($BLOCK_SIZE * 2097152))" \ $LOOP_MNT/foo >> $seqres.full umount $LOOP_MNT _check_xfs_filesystem $LOOP_DEV none none -_mkfs_dev -f -l size=32m $LOOP_DEV +_mkfs_dev -f $LOOP_DEV _mount $LOOP_DEV $LOOP_MNT # check we trim both ends of the extent approproiately; this will fail From patchwork Wed Sep 12 06:26:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596781 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 B168F14F9 for ; Wed, 12 Sep 2018 06:24:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1C202984C for ; Wed, 12 Sep 2018 06:24:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 963CD29852; Wed, 12 Sep 2018 06:24:27 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 3D7112985B for ; Wed, 12 Sep 2018 06:24:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726642AbeILL1Z (ORCPT ); Wed, 12 Sep 2018 07:27:25 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:38568 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727006AbeILL1Z (ORCPT ); Wed, 12 Sep 2018 07:27:25 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6Jdh8092826 for ; Wed, 12 Sep 2018 02:24:25 -0400 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0b-001b2d01.pphosted.com with ESMTP id 2meusq3kp6-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:25 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:25 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:23 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6OLv841091266 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:21 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 34CF82805A; Wed, 12 Sep 2018 02:22:25 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D2CC028058; Wed, 12 Sep 2018 02:22:23 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:23 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 05/19] Fix xfs/127 to work with 64k block size Date: Wed, 12 Sep 2018 11:56:12 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-2213-0000-0000-000002ED135D X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867116; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:25 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-2214-0000-0000-00005B86BBBF Message-Id: <20180912062626.14349-6-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120068 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With reflink feature enabled, we require atleast 500MiB of disk space to create a filesystem with 64k block size. Hence this commit sets the size of the scratch filesystem to 512MiB. Signed-off-by: Chandan Rajendra --- tests/xfs/127 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/xfs/127 b/tests/xfs/127 index 41dacd7..6a95026 100755 --- a/tests/xfs/127 +++ b/tests/xfs/127 @@ -34,7 +34,7 @@ _require_no_large_scratch_dev _require_cp_reflink echo "Format and mount" -_scratch_mkfs_sized $((2 * 4096 * 4096)) > $seqres.full 2>&1 +_scratch_mkfs_sized $((512 * 1024 * 1024)) > $seqres.full 2>&1 _scratch_mount >> $seqres.full 2>&1 testdir=$SCRATCH_MNT/test-$seq From patchwork Wed Sep 12 06:26:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596813 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 D336014DB for ; Wed, 12 Sep 2018 06:24:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C355C2984C for ; Wed, 12 Sep 2018 06:24:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B79802985B; Wed, 12 Sep 2018 06:24: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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 5F8BC2984C for ; Wed, 12 Sep 2018 06:24:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726970AbeILL1k (ORCPT ); Wed, 12 Sep 2018 07:27:40 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:56732 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726913AbeILL1j (ORCPT ); Wed, 12 Sep 2018 07:27:39 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6KhRW045796 for ; Wed, 12 Sep 2018 02:24:39 -0400 Received: from e15.ny.us.ibm.com (e15.ny.us.ibm.com [129.33.205.205]) by mx0a-001b2d01.pphosted.com with ESMTP id 2meshgyy2f-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:39 -0400 Received: from localhost by e15.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:36 -0400 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e15.ny.us.ibm.com (146.89.104.202) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:23 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6OMX325886854 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:22 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 033C02805C; Wed, 12 Sep 2018 02:22:27 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A090628059; Wed, 12 Sep 2018 02:22:25 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:25 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 06/19] Fix xfs/139 to work with 64k block size Date: Wed, 12 Sep 2018 11:56:13 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-0068-0000-0000-00000339904C X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867116; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:35 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-0069-0000-0000-000045B47932 Message-Id: <20180912062626.14349-7-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120068 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For 64k block size, the agsize provided in the test causes mkfs.xfs to fail due to insufficient log space. Hence this commit computes agsize based on block size of the filesystem. Signed-off-by: Chandan Rajendra --- tests/xfs/139 | 15 +++++++++------ tests/xfs/139.out | 8 ++++++-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/tests/xfs/139 b/tests/xfs/139 index 2a26635..9ab74c8 100755 --- a/tests/xfs/139 +++ b/tests/xfs/139 @@ -34,17 +34,20 @@ _require_cp_reflink rm -f $seqres.full +_scratch_mkfs >/dev/null 2>&1 +_scratch_mount +blksz=$(_get_block_size $SCRATCH_MNT) +_scratch_unmount + echo "Format and mount" -_scratch_mkfs -d agsize=$((32 * 1048576)) > $seqres.full 2>&1 +_scratch_mkfs -d agsize=$((4400 * $blksz)) > $seqres.full 2>&1 _scratch_mount >> $seqres.full 2>&1 testdir=$SCRATCH_MNT/test-$seq mkdir $testdir -blksz="$(_get_block_size $testdir)" echo "Create the original files" -sz=$((48 * 1048576)) -nr=$((sz / blksz)) +sz=$((4800 * $blksz)) _pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full _scratch_cycle_mount @@ -54,8 +57,8 @@ _pwrite_byte 0x62 0 $sz $testdir/file1 >> $seqres.full _scratch_cycle_mount echo "Compare files" -md5sum $testdir/file1 | _filter_scratch -md5sum $testdir/file2 | _filter_scratch +od -t x1 $testdir/file1 | _filter_od +od -t x1 $testdir/file2 | _filter_od #filefrag -v $testdir/file1 $testdir/file2 # success, all done diff --git a/tests/xfs/139.out b/tests/xfs/139.out index dc6a31e..55e03d6 100644 --- a/tests/xfs/139.out +++ b/tests/xfs/139.out @@ -3,5 +3,9 @@ Format and mount Create the original files CoW every other block Compare files -673c759fb131ccf3336c4f8c549a497e SCRATCH_MNT/test-139/file1 -dc802351f6717547cbf4c951b294f952 SCRATCH_MNT/test-139/file2 +0 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 +* +11300 +0 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 +* +11300 From patchwork Wed Sep 12 06:26:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596787 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 0F9A014F9 for ; Wed, 12 Sep 2018 06:24:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00F642984C for ; Wed, 12 Sep 2018 06:24:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E91D229852; Wed, 12 Sep 2018 06:24:30 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable 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 A4A762985F for ; Wed, 12 Sep 2018 06:24:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727006AbeILL13 (ORCPT ); Wed, 12 Sep 2018 07:27:29 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58648 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726442AbeILL13 (ORCPT ); Wed, 12 Sep 2018 07:27:29 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6JfP6022659 for ; Wed, 12 Sep 2018 02:24:28 -0400 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0b-001b2d01.pphosted.com with ESMTP id 2meqxfk4nj-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:28 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:27 -0400 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:25 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6OO1726935464 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:24 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C3DCC28058; Wed, 12 Sep 2018 02:22:28 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6E07628059; Wed, 12 Sep 2018 02:22:27 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:27 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 07/19] Fix xfs/140 to work with 64k block size Date: Wed, 12 Sep 2018 11:56:14 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-0052-0000-0000-0000032F3D6A X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867116; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:27 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-0053-0000-0000-00005E0B0E13 Message-Id: <20180912062626.14349-8-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120068 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For 64k block size, the agsize provided in the test causes mkfs.xfs to fail due to insufficient log space. Hence this commit computes agsize based on block size of the filesystem. Signed-off-by: Chandan Rajendra --- tests/xfs/140 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/xfs/140 b/tests/xfs/140 index 6e89fe3..c13ed65 100755 --- a/tests/xfs/140 +++ b/tests/xfs/140 @@ -34,17 +34,21 @@ _require_cp_reflink rm -f $seqres.full +_scratch_mkfs >/dev/null 2>&1 +_scratch_mount +blksz=$(_get_block_size $SCRATCH_MNT) +_scratch_unmount + echo "Format and mount" -_scratch_mkfs -d agsize=$((32 * 1048576)) > $seqres.full 2>&1 +_scratch_mkfs -d agsize=$((4400 * $blksz)) > $seqres.full 2>&1 _scratch_mount >> $seqres.full 2>&1 testdir=$SCRATCH_MNT/test-$seq mkdir $testdir -blksz=$(_get_block_size $testdir) echo "Create the original files" -sz=$((48 * 1048576)) -nr=$((sz / blksz)) +nr=4800 +sz=$(($nr * $blksz)) _pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full _pwrite_byte 0x61 0 $sz $testdir/file2.chk >> $seqres.full From patchwork Wed Sep 12 06:26:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596789 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 3201F14F9 for ; Wed, 12 Sep 2018 06:24:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2151A2984C for ; Wed, 12 Sep 2018 06:24:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15F742985B; Wed, 12 Sep 2018 06:24:33 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 B1C6B2984C for ; Wed, 12 Sep 2018 06:24:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727391AbeILL1b (ORCPT ); Wed, 12 Sep 2018 07:27:31 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:34372 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726442AbeILL1b (ORCPT ); Wed, 12 Sep 2018 07:27:31 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6JdKX071046 for ; Wed, 12 Sep 2018 02:24:31 -0400 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0b-001b2d01.pphosted.com with ESMTP id 2meuqfkmkh-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:30 -0400 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:30 -0400 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:27 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6OQ1t3867134 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:26 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 90D9128059; Wed, 12 Sep 2018 02:22:30 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3B14128060; Wed, 12 Sep 2018 02:22:29 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:28 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 08/19] Fix xfs/190 to work with 64k block size Date: Wed, 12 Sep 2018 11:56:15 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-0072-0000-0000-000003A146F6 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867116; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:29 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-0073-0000-0000-000049645B99 Message-Id: <20180912062626.14349-9-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120068 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This commit describes "file hole" ranges in multiples of block sizes rather than using constants. Signed-off-by: Chandan Rajendra --- tests/xfs/190 | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/tests/xfs/190 b/tests/xfs/190 index 3275e29..53dad06 100755 --- a/tests/xfs/190 +++ b/tests/xfs/190 @@ -10,13 +10,6 @@ # # PV 985792 # -#This is the list of holes to punch in the file limited to $filesize -#NOTE holes cannot overlap or this script will fail. -holes="4096:4096 303104:4096 1048576:512 1051648:8192 1065984:8192 1085440:7168" -#filesize in MB -filesize=10 -#Name of file to perform the test on -filename=test-190 seq=`basename $0` seqres=$RESULT_DIR/$seq @@ -38,9 +31,24 @@ _supported_os Linux _require_scratch _scratch_mkfs_xfs >/dev/null 2>&1 _scratch_mount -fsblocksize=`$XFS_INFO_PROG $SCRATCH_MNT|sed 's/=/ /g'|awk '/^data / { print $3 }'` -dd if=/dev/zero of=$SCRATCH_MNT/$filename bs=1024k count=10 >> $seqres.full 2>&1 +fsblocksize=$(_get_block_size $SCRATCH_MNT) + +#This is the list of holes to punch in the file limited to $filesize +#NOTE holes cannot overlap or this script will fail. +holes="$fsblocksize:$fsblocksize \ +$(($fsblocksize * 74)):$fsblocksize \ +$(($fsblocksize * 256)):$(($fsblocksize / 8)) \ +$(echo scale=0\;$fsblocksize \* 256 \+ $fsblocksize \* 3 \/ 4 | bc):$(($fsblocksize * 2)) \ +$(echo scale=0\;$fsblocksize \* 260 \+ $fsblocksize \* 1 \/ 4 | bc):$(($fsblocksize * 2)) \ +$(($fsblocksize * 265)):$(echo scale=0\;$fsblocksize \+ $fsblocksize \* 3 \/ 4 | bc)" + +#filesize +filesize=$(($fsblocksize * 2560)) +#Name of file to perform the test on +filename=test-190 + +$XFS_IO_PROG -f -c "pwrite 0 $(($fsblocksize * 2560))" $SCRATCH_MNT/$filename >> $seqres.full 2>&1 # run DMAPI test using verbose output echo Punching holes in file From patchwork Wed Sep 12 06:26:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596799 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 1917015E2 for ; Wed, 12 Sep 2018 06:24:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09BFC2984C for ; Wed, 12 Sep 2018 06:24:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F24D02985B; Wed, 12 Sep 2018 06:24:37 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable 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 21A8829852 for ; Wed, 12 Sep 2018 06:24:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726642AbeILL1f (ORCPT ); Wed, 12 Sep 2018 07:27:35 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39022 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726502AbeILL1f (ORCPT ); Wed, 12 Sep 2018 07:27:35 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6JeCs143206 for ; Wed, 12 Sep 2018 02:24:34 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 2meu63cw7k-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:33 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:32 -0400 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:30 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6OSRP39649396 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:28 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6940E28058; Wed, 12 Sep 2018 02:22:32 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0788E28059; Wed, 12 Sep 2018 02:22:31 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:30 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 09/19] Fix xfs/299 to work with 64k block size Date: Wed, 12 Sep 2018 11:56:16 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-0040-0000-0000-0000046E3773 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867116; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:32 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-0041-0000-0000-0000087563BE Message-Id: <20180912062626.14349-10-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120068 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This commit changes the test to calculate quota limits based on the block size of the underlying filesystem. Also, the sizes of the test files are now made to be a multiple of the filesystem block size. Signed-off-by: Chandan Rajendra --- tests/xfs/299 | 29 +++++++++++++++++---------- tests/xfs/299.out | 60 +++++++++++++++++++++++++++---------------------------- 2 files changed, 48 insertions(+), 41 deletions(-) diff --git a/tests/xfs/299 b/tests/xfs/299 index f0012ff..5a0e693 100755 --- a/tests/xfs/299 +++ b/tests/xfs/299 @@ -41,11 +41,6 @@ _require_xfs_quota _require_xfs_mkfs_crc _require_xfs_crc -bsoft=100 -bhard=500 -isoft=4 -ihard=10 - _filter_report() { tr -s '[:space:]' | \ @@ -58,7 +53,9 @@ _filter_report() if ($ENV{'LARGE_SCRATCH_DEV'}) { $val = $ENV{'NUM_SPACE_FILES'}; } - s/(^\[ROOT\] \S+ \S+ \S+ \S+ \[--------\] )(\S+)/$1@{[$2 - $val]}/g' + s/(^\[ROOT\] \S+ \S+ \S+ \S+ \[--------\] )(\S+)/$1@{[$2 - $val]}/g' | + perl -npe ' + s|^(.*?) (\d+) (\d+) (\d+)|$1 @{[$2 * 1024 /'$bsize']} @{[$3 * 1024 /'$bsize']} @{[$4 * 1024 /'$bsize']}|' } # The actual point at which limit enforcement takes place for the @@ -73,9 +70,10 @@ _filter_and_check_blks() if (/^\#'$id'\s+(\d+)/ && '$enforce') { $maximum = '$bhard'; $minimum = '$bhard' * 85/100; - if (($1 < $minimum || $1 > $maximum) && '$noextsz') { + $used = $1 * 1024; + if (($used < $minimum || $used > $maximum) && '$noextsz') { printf(" URK %d: %d is out of range! [%d,%d]\n", - '$id', $1, $minimum, $maximum); + '$id', $used, $minimum, $maximum); } s/^(\#'$id'\s+)(\d+)/\1 =OK=/g; } @@ -128,7 +126,7 @@ _exercise() echo "ls -l $SCRATCH_MNT" >>$seqres.full ls -l $SCRATCH_MNT >>$seqres.full xfs_quota -D $tmp.projects -P $tmp.projid -x \ - -c "limit -$type bsoft=${bsoft}k bhard=${bhard}k $id" \ + -c "limit -$type bsoft=${bsoft} bhard=${bhard} $id" \ -c "limit -$type isoft=$isoft ihard=$ihard $id" \ $SCRATCH_DEV xfs_quota -D $tmp.projects -P $tmp.projid -x \ @@ -139,6 +137,8 @@ _exercise() echo "*** push past the soft inode limit" | tee -a $seqres.full _file_as_id $SCRATCH_MNT/softie1 $id $type 1024 0 _file_as_id $SCRATCH_MNT/softie2 $id $type 1024 0 + _file_as_id $SCRATCH_MNT/softie3 $id $type 1024 0 + _file_as_id $SCRATCH_MNT/softie4 $id $type 1024 0 _qmount xfs_quota -D $tmp.projects -P $tmp.projid -x \ -c "repquota -birnN -$type" $SCRATCH_DEV | @@ -146,7 +146,7 @@ _exercise() echo echo "*** push past the soft block limit" | tee -a $seqres.full - _file_as_id $SCRATCH_MNT/softie $id $type 1024 140 + _file_as_id $SCRATCH_MNT/softie $id $type $bsize 35 _qmount xfs_quota -D $tmp.projects -P $tmp.projid -x \ -c "repquota -birnN -$type" $SCRATCH_DEV | @@ -167,7 +167,7 @@ _exercise() echo # Note: for quota accounting (not enforcement), EDQUOT is not expected echo "*** push past the hard block limit (expect EDQUOT)" | tee -a $seqres.full - _file_as_id $SCRATCH_MNT/softie $id $type 1024 540 + _file_as_id $SCRATCH_MNT/softie $id $type $bsize 135 echo "ls -l $SCRATCH_MNT" >>$seqres.full ls -l $SCRATCH_MNT >>$seqres.full _qmount @@ -202,6 +202,13 @@ echo "*** user, group, and project" _qmount_option "uquota,gquota,pquota" _qmount +bsize=$(_get_block_size $SCRATCH_MNT) + +bsoft=$(( 25 * $bsize )) +bhard=$(( 125 * $bsize )) +isoft=4 +ihard=10 + # non-root users need to be able to write to this filesystem chmod 777 $SCRATCH_MNT diff --git a/tests/xfs/299.out b/tests/xfs/299.out index d13c7da..93e89a9 100644 --- a/tests/xfs/299.out +++ b/tests/xfs/299.out @@ -12,23 +12,23 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** report initial settings [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft inode limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 3 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 5 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the soft block limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [7 days] 4 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [7 days] 6 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the hard inode limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [7 days] 9 4 10 00 [7 days] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [7 days] 9 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the hard block limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] =OK= 100 500 00 [7 days] 9 4 10 00 [7 days] 0 0 0 00 [--------] +[NAME] =OK= 25 125 0 [7 days] 9 4 10 00 [7 days] 0 0 0 00 [--------] *** report no quota settings @@ -36,23 +36,23 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** report initial settings [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft inode limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 3 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 5 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the soft block limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [7 days] 4 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [7 days] 6 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the hard inode limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the hard block limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] =OK= 100 500 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------] +[NAME] =OK= 25 125 0 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------] *** report no quota settings @@ -60,23 +60,23 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** report initial settings [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft inode limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 3 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 5 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the soft block limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [7 days] 4 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [7 days] 6 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the hard inode limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------] *** push past the hard block limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] =OK= 100 500 00 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------] +[NAME] =OK= 25 125 0 [7 days] 10 4 10 00 [7 days] 0 0 0 00 [--------] *** unmount meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks @@ -92,23 +92,23 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** report initial settings [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft inode limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 3 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 5 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft block limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [--------] 4 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [--------] 6 4 10 00 [--------] 0 0 0 00 [--------] *** push past the hard inode limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [--------] 16 4 10 00 [--none--] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [--------] 18 4 10 00 [--none--] 0 0 0 00 [--------] *** push past the hard block limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 540 100 500 00 [--none--] 16 4 10 00 [--none--] 0 0 0 00 [--------] +[NAME] 135 25 125 00 [--none--] 18 4 10 00 [--none--] 0 0 0 00 [--------] *** report no quota settings @@ -116,23 +116,23 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** report initial settings [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft inode limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 3 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 5 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft block limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [--------] 4 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [--------] 6 4 10 00 [--------] 0 0 0 00 [--------] *** push past the hard inode limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [--------] 16 4 10 00 [--none--] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [--------] 18 4 10 00 [--none--] 0 0 0 00 [--------] *** push past the hard block limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 540 100 500 00 [--none--] 16 4 10 00 [--none--] 0 0 0 00 [--------] +[NAME] 135 25 125 00 [--none--] 18 4 10 00 [--none--] 0 0 0 00 [--------] *** report no quota settings @@ -140,22 +140,22 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX *** report initial settings [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 1 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft inode limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 0 100 500 00 [--------] 3 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 0 25 125 00 [--------] 5 4 10 00 [--------] 0 0 0 00 [--------] *** push past the soft block limit [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [--------] 4 4 10 00 [--------] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [--------] 6 4 10 00 [--------] 0 0 0 00 [--------] *** push past the hard inode limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 140 100 500 00 [--------] 16 4 10 00 [--none--] 0 0 0 00 [--------] +[NAME] 35 25 125 00 [--------] 18 4 10 00 [--none--] 0 0 0 00 [--------] *** push past the hard block limit (expect EDQUOT) [ROOT] 0 0 0 00 [--------] 3 0 0 00 [--------] 0 0 0 00 [--------] -[NAME] 540 100 500 00 [--none--] 16 4 10 00 [--none--] 0 0 0 00 [--------] +[NAME] 135 25 125 00 [--none--] 18 4 10 00 [--none--] 0 0 0 00 [--------] *** unmount From patchwork Wed Sep 12 06:26:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596793 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 3B2D614DB for ; Wed, 12 Sep 2018 06:24:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2AA1F2984C for ; Wed, 12 Sep 2018 06:24:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F1AB2985F; Wed, 12 Sep 2018 06:24:36 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 B42FF2984C for ; Wed, 12 Sep 2018 06:24:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727403AbeILL1e (ORCPT ); Wed, 12 Sep 2018 07:27:34 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:39260 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725910AbeILL1e (ORCPT ); Wed, 12 Sep 2018 07:27:34 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6JdGa092870 for ; Wed, 12 Sep 2018 02:24:33 -0400 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0b-001b2d01.pphosted.com with ESMTP id 2meusq3ktx-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:33 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:32 -0400 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:30 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6OUSg24707088 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:30 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3602D2805C; Wed, 12 Sep 2018 02:22:34 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D4AC428059; Wed, 12 Sep 2018 02:22:32 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:32 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 10/19] xfs/325: Inject free_extent error after CoW operation Date: Wed, 12 Sep 2018 11:56:17 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-0052-0000-0000-0000032F3D6C X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867116; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:32 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-0053-0000-0000-00005E0B0E1C Message-Id: <20180912062626.14349-11-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120068 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On a 64k blocksized filesystem, when the test CoWs the file2's offset range [10 * 64k, 19 * 64k], the call to xfs_bmapi_reserve_delalloc() allocates 32 64k blocks. This is because XFS_DEFAULT_COWEXTSZ_HINT has the value of 32 and xfs_get_cowextsz_hint() uses this to compute the extent alignment. This leads to xfs_bmapi_reserve_delalloc() to reserve space corresponding to the file range [0, 32 * 64k] in the inode's cow fork area. On completion of write I/O corresponding to file2's range [10 * 64k, 19 * 64k], xfs_end_io() moves 10 out of the originally allocated 32 64k blocks to the data fork area. The remaining 22 64k blocks linger on in cow fork area of the inode. Later, when servicing the exit() syscall for the xfs_io process, xfs_free_eofblocks() ends up invoking xfs_reflink_cancel_cow_blocks() since i_delayed_blks has the value 22. xfs_reflink_cancel_cow_blocks() indirectly invokes __xfs_free_extent() which returns EIO since XFS_ERRTAG_FREE_EXTENT has been set. This leads to the filesystem to be shutdown. The "rm" command invoked later ends up returning an error and hence the test fails. The test actually requires that the filesystem gets shutdown when executing the "rm" command. To fix the problem, this commit injects the free_extent error after we CoW file2's [10 * 64k, 19 * 64k] range. Signed-off-by: Chandan Rajendra --- tests/xfs/325 | 5 +++-- tests/xfs/325.out | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/xfs/325 b/tests/xfs/325 index b156de9..6795901 100755 --- a/tests/xfs/325 +++ b/tests/xfs/325 @@ -54,11 +54,12 @@ echo "Check files" md5sum $SCRATCH_MNT/file1 | _filter_scratch md5sum $SCRATCH_MNT/file2 | _filter_scratch +echo "CoW a few blocks" +$XFS_IO_PROG -c "pwrite -W -S 0x67 $((10 * blksz)) $((10 * blksz))" $SCRATCH_MNT/file2 >> $seqres.full + echo "Inject error" _scratch_inject_error "free_extent" -echo "CoW a few blocks" -$XFS_IO_PROG -c "pwrite -W -S 0x67 $((10 * blksz)) $((10 * blksz))" $SCRATCH_MNT/file2 >> $seqres.full rm $SCRATCH_MNT/file1 sync diff --git a/tests/xfs/325.out b/tests/xfs/325.out index 4e25d2b..92027cd 100644 --- a/tests/xfs/325.out +++ b/tests/xfs/325.out @@ -4,8 +4,8 @@ Create files Check files d5a0ed0305c8df4180cb2bf975ecffe8 SCRATCH_MNT/file1 d5a0ed0305c8df4180cb2bf975ecffe8 SCRATCH_MNT/file2 -Inject error CoW a few blocks +Inject error FS should be shut down, touch will fail touch: cannot touch 'SCRATCH_MNT/badfs': Input/output error Remount to replay log From patchwork Wed Sep 12 06:26:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596803 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 1A61515E2 for ; Wed, 12 Sep 2018 06:24:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0AA672984C for ; Wed, 12 Sep 2018 06:24:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F31E02986A; Wed, 12 Sep 2018 06:24:39 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable 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 9927129852 for ; Wed, 12 Sep 2018 06:24:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726919AbeILL1i (ORCPT ); Wed, 12 Sep 2018 07:27:38 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:57814 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726502AbeILL1i (ORCPT ); Wed, 12 Sep 2018 07:27:38 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6JeUv121928 for ; Wed, 12 Sep 2018 02:24:38 -0400 Received: from e13.ny.us.ibm.com (e13.ny.us.ibm.com [129.33.205.203]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mescu87cj-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:37 -0400 Received: from localhost by e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:36 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e13.ny.us.ibm.com (146.89.104.200) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:32 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6OVnM33292366 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:31 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 03B2428059; Wed, 12 Sep 2018 02:22:36 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A136728058; Wed, 12 Sep 2018 02:22:34 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:34 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 11/19] Fix generic/102 to work with 64k block size Date: Wed, 12 Sep 2018 11:56:18 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-0064-0000-0000-0000034BCAD0 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867117; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:34 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-0065-0000-0000-00003A9D4C70 Message-Id: <20180912062626.14349-12-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120068 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With 64k block size, mkfs.xfs fails with the following message when the filesystem size is 512MiB in size, "log size 2037 blocks too small, minimum size is 2473 blocks" Hence this commit increases the test filesystem size to 1GiB. Also, the size of the test file is increased to 800MiB which is ~80% of the test filesystem size. This is in proportion to the 400MiB test file used with the original 512MiB test filesystem. Signed-off-by: Chandan Rajendra --- tests/generic/102 | 4 ++-- tests/generic/102.out | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/generic/102 b/tests/generic/102 index faf940a..29abd89 100755 --- a/tests/generic/102 +++ b/tests/generic/102 @@ -31,14 +31,14 @@ _require_scratch rm -f $seqres.full -dev_size=$((512 * 1024 * 1024)) # 512MB filesystem +dev_size=$((1024 * 1024 * 1024)) # 1GB filesystem _scratch_mkfs_sized $dev_size >>$seqres.full 2>&1 _scratch_mount for ((i = 0; i < 10; i++)); do echo "loop $i" >>$seqres.full - $XFS_IO_PROG -f -c "pwrite -b 1m 0 400m" "$SCRATCH_MNT"/file | \ + $XFS_IO_PROG -f -c "pwrite -b 1m 0 800m" "$SCRATCH_MNT"/file | \ _filter_xfs_io | _filter_scratch rm -f "$SCRATCH_MNT"/file diff --git a/tests/generic/102.out b/tests/generic/102.out index fc9275d..b58aa5c 100644 --- a/tests/generic/102.out +++ b/tests/generic/102.out @@ -1,21 +1,21 @@ QA output created by 102 -wrote 419430400/419430400 bytes at offset 0 +wrote 838860800/838860800 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -wrote 419430400/419430400 bytes at offset 0 +wrote 838860800/838860800 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -wrote 419430400/419430400 bytes at offset 0 +wrote 838860800/838860800 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -wrote 419430400/419430400 bytes at offset 0 +wrote 838860800/838860800 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -wrote 419430400/419430400 bytes at offset 0 +wrote 838860800/838860800 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -wrote 419430400/419430400 bytes at offset 0 +wrote 838860800/838860800 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -wrote 419430400/419430400 bytes at offset 0 +wrote 838860800/838860800 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -wrote 419430400/419430400 bytes at offset 0 +wrote 838860800/838860800 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -wrote 419430400/419430400 bytes at offset 0 +wrote 838860800/838860800 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -wrote 419430400/419430400 bytes at offset 0 +wrote 838860800/838860800 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) From patchwork Wed Sep 12 06:26:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596805 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 505C014DB for ; Wed, 12 Sep 2018 06:24:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F23629852 for ; Wed, 12 Sep 2018 06:24:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3413B2985F; Wed, 12 Sep 2018 06:24: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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 D8DF32985B for ; Wed, 12 Sep 2018 06:24:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727417AbeILL1i (ORCPT ); Wed, 12 Sep 2018 07:27:38 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39686 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727391AbeILL1i (ORCPT ); Wed, 12 Sep 2018 07:27:38 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6Jh2V043111 for ; Wed, 12 Sep 2018 02:24:38 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0a-001b2d01.pphosted.com with ESMTP id 2meqxw2wp3-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:38 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:36 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:34 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6OXXs27263122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:33 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C4D8A2805A; Wed, 12 Sep 2018 02:22:37 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6F43428058; Wed, 12 Sep 2018 02:22:36 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:36 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 12/19] Fix generic/172 to work with 64k block size Date: Wed, 12 Sep 2018 11:56:19 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-0060-0000-0000-000002ADDD97 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867116; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:36 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-0061-0000-0000-0000467B36C8 Message-Id: <20180912062626.14349-13-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120068 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For 64k block size, With 256MiB as the XFS filesystem size and 168 MiB as the size of the clone source file, we end up hitting ENOSPC when cloning the source file. This happens due to lack of space for housing the corresponding metadata. This scenario also occurs when using a 512MiB XFS filesystem and 300MiB clone source file. Hence this commit increases the size of the test filesystem to 1 GiB and the size of the clone source file to 768MiB. Signed-off-by: Chandan Rajendra --- tests/generic/172 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/generic/172 b/tests/generic/172 index 5d6f295..08d2789 100755 --- a/tests/generic/172 +++ b/tests/generic/172 @@ -47,8 +47,8 @@ echo "Reformat with appropriate size" blksz="$(_get_block_size $testdir)" umount $SCRATCH_MNT -file_size=$((168 * 1024 * 1024)) -fs_size=$((256 * 1024 * 1024)) +file_size=$((768 * 1024 * 1024)) +fs_size=$((1024 * 1024 * 1024)) _scratch_mkfs_sized $fs_size >> $seqres.full 2>&1 _scratch_mount >> $seqres.full 2>&1 rm -rf $testdir From patchwork Wed Sep 12 06:26:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596811 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 349C615E2 for ; Wed, 12 Sep 2018 06:24:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 268D92984C for ; Wed, 12 Sep 2018 06:24:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B6A029867; Wed, 12 Sep 2018 06:24: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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable 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 C95A729852 for ; Wed, 12 Sep 2018 06:24:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727391AbeILL1j (ORCPT ); Wed, 12 Sep 2018 07:27:39 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:42706 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726502AbeILL1j (ORCPT ); Wed, 12 Sep 2018 07:27:39 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6JeTE022164 for ; Wed, 12 Sep 2018 02:24:39 -0400 Received: from e15.ny.us.ibm.com (e15.ny.us.ibm.com [129.33.205.205]) by mx0a-001b2d01.pphosted.com with ESMTP id 2met8xeb5f-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:39 -0400 Received: from localhost by e15.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:38 -0400 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) by e15.ny.us.ibm.com (146.89.104.202) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:36 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6OZxx28246072 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:35 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 92C462805C; Wed, 12 Sep 2018 02:22:39 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3C5C028059; Wed, 12 Sep 2018 02:22:38 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:37 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 13/19] Filter fiemap output by FS block size Date: Wed, 12 Sep 2018 11:56:20 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-0068-0000-0000-00000339904D X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867116; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:37 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-0069-0000-0000-000045B4794F Message-Id: <20180912062626.14349-14-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120068 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When testing FS instances of block size other than 4k, the output of fiemap command will not match those in *.out files. This commit adds an optional "block size" argument to _filter_fiemap() which prints fiemap output in units of block size. Signed-off-by: Chandan Rajendra --- common/punch | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/common/punch b/common/punch index 8088b01..0fc7729 100644 --- a/common/punch +++ b/common/punch @@ -165,7 +165,11 @@ _test_punch() { _coalesce_extents() { - awk -F: ' + block_size=$1 + + [[ -z $block_size ]] && block_size=512 + + awk -v block_size="$block_size" -F: ' { range = $2; type = $3; @@ -176,19 +180,24 @@ _coalesce_extents() if (type != prev_type) { if (prev_type != "") - printf("%u]:%s\n", low - 1, prev_type); - printf("%u: [%u..", out_count++, low); + printf("%u]:%s\n", (low * 512 / block_size) - 1, + prev_type); + printf("%u: [%u..", out_count++, + (low * 512) / block_size); prev_type = type; } } END { if (prev_type != "") - printf("%u]:%s\n", high, prev_type); + printf("%u]:%s\n", ((high + 1) * 512 / block_size) - 1, + prev_type); }' } _filter_fiemap() { + block_size=$1 + $AWK_PROG ' $3 ~ /hole/ { print $1, $2, $3; @@ -201,7 +210,7 @@ _filter_fiemap() $5 ~ /0x[[:xdigit:]]+/ { print $1, $2, "data"; }' | - _coalesce_extents + _coalesce_extents $block_size } _filter_fiemap_flags() From patchwork Wed Sep 12 06:26:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596839 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 27FDB14F9 for ; Wed, 12 Sep 2018 06:25:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1920E2984C for ; Wed, 12 Sep 2018 06:25:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C6092985B; Wed, 12 Sep 2018 06:25:01 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable 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 A17652984C for ; Wed, 12 Sep 2018 06:25:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727006AbeILL17 (ORCPT ); Wed, 12 Sep 2018 07:27:59 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:38512 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbeILL17 (ORCPT ); Wed, 12 Sep 2018 07:27:59 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6Owv6011803 for ; Wed, 12 Sep 2018 02:24:59 -0400 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0a-001b2d01.pphosted.com with ESMTP id 2meqxvbafn-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:59 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:45 -0400 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:38 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6ObsP66977938 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:37 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6036E2805C; Wed, 12 Sep 2018 02:22:41 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0A4B328059; Wed, 12 Sep 2018 02:22:40 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:39 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 14/19] Fix generic/177 to work with 64k block size Date: Wed, 12 Sep 2018 11:56:21 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-0052-0000-0000-0000032F3D70 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867116; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:44 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-0053-0000-0000-00005E0B0E27 Message-Id: <20180912062626.14349-15-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120069 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This commit changes the test to work on file offsets that are aligned with the block size of the underlying filesystem. Signed-off-by: Chandan Rajendra --- tests/generic/177 | 20 +++++++++++--------- tests/generic/177.out | 23 +++++++++++++++-------- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/tests/generic/177 b/tests/generic/177 index 36577b1..069bb81 100755 --- a/tests/generic/177 +++ b/tests/generic/177 @@ -45,44 +45,46 @@ _require_metadata_journaling $SCRATCH_DEV _init_flakey _mount_flakey +BLOCK_SIZE=$(_get_block_size $SCRATCH_MNT) + # Create out test file with some data and then fsync it. # We do the fsync only to make sure the last fsync we do in this test triggers # the fast code path of btrfs' fsync implementation, a condition necessary to # trigger the bug btrfs had. -$XFS_IO_PROG -f -c "pwrite -S 0xaa 0K 128K" \ +$XFS_IO_PROG -f -c "pwrite -S 0xaa 0K $(($BLOCK_SIZE * 32))" \ -c "fsync" \ - $SCRATCH_MNT/foobar | _filter_xfs_io + $SCRATCH_MNT/foobar | _filter_xfs_io_blocks_modified # Now punch a hole against the range [96K, 128K[. -$XFS_IO_PROG -c "fpunch 96K 32K" $SCRATCH_MNT/foobar +$XFS_IO_PROG -c "fpunch $(($BLOCK_SIZE * 24)) $(($BLOCK_SIZE * 8))" $SCRATCH_MNT/foobar # Punch another hole against a range that overlaps the previous range and ends # beyond eof. -$XFS_IO_PROG -c "fpunch 64K 128K" $SCRATCH_MNT/foobar +$XFS_IO_PROG -c "fpunch $(($BLOCK_SIZE * 16)) $(($BLOCK_SIZE * 32))" $SCRATCH_MNT/foobar # Punch another hole against a range that overlaps the first range ([96K, 128K[) # and ends at eof. -$XFS_IO_PROG -c "fpunch 32K 96K" $SCRATCH_MNT/foobar +$XFS_IO_PROG -c "fpunch $(($BLOCK_SIZE * 8)) $(($BLOCK_SIZE * 24))" $SCRATCH_MNT/foobar # Fsync our file. We want to verify that, after a power failure and mounting the # filesystem again, the file content reflects all the hole punch operations. $XFS_IO_PROG -c "fsync" $SCRATCH_MNT/foobar echo "File digest before power failure:" -md5sum $SCRATCH_MNT/foobar | _filter_scratch +od -t x1 $SCRATCH_MNT/foobar | _filter_od echo "Fiemap before power failure:" -$XFS_IO_PROG -c "fiemap -v" $SCRATCH_MNT/foobar | _filter_fiemap +$XFS_IO_PROG -c "fiemap -v" $SCRATCH_MNT/foobar | _filter_fiemap $BLOCK_SIZE _flakey_drop_and_remount echo "File digest after log replay:" # Must match the same digest we got before the power failure. -md5sum $SCRATCH_MNT/foobar | _filter_scratch +od -t x1 $SCRATCH_MNT/foobar | _filter_od echo "Fiemap after log replay:" # Must match the same extent listing we got before the power failure. -$XFS_IO_PROG -c "fiemap -v" $SCRATCH_MNT/foobar | _filter_fiemap +$XFS_IO_PROG -c "fiemap -v" $SCRATCH_MNT/foobar | _filter_fiemap $BLOCK_SIZE _unmount_flakey diff --git a/tests/generic/177.out b/tests/generic/177.out index cc10768..b47e136 100644 --- a/tests/generic/177.out +++ b/tests/generic/177.out @@ -1,13 +1,20 @@ QA output created by 177 -wrote 131072/131072 bytes at offset 0 -XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +Blocks modified: [0 - 31] File digest before power failure: -d26bbb9a8396a9c0dd76423471b72b15 SCRATCH_MNT/foobar +0 aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa +* +10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +40 Fiemap before power failure: -0: [0..63]: data -1: [64..255]: hole +0: [0..7]: data +1: [8..31]: hole File digest after log replay: -d26bbb9a8396a9c0dd76423471b72b15 SCRATCH_MNT/foobar +0 aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa +* +10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +* +40 Fiemap after log replay: -0: [0..63]: data -1: [64..255]: hole +0: [0..7]: data +1: [8..31]: hole From patchwork Wed Sep 12 06:26:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596817 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 48A6814F9 for ; Wed, 12 Sep 2018 06:24:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 38A882984C for ; Wed, 12 Sep 2018 06:24:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CDD32985B; Wed, 12 Sep 2018 06:24:44 +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.9 required=2.0 tests=BAYES_00,LOTS_OF_MONEY, MAILING_LIST_MULTI,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 B4B772984C for ; Wed, 12 Sep 2018 06:24:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727409AbeILL1m (ORCPT ); Wed, 12 Sep 2018 07:27:42 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:35122 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726502AbeILL1m (ORCPT ); Wed, 12 Sep 2018 07:27:42 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6JcoM071008 for ; Wed, 12 Sep 2018 02:24:42 -0400 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0b-001b2d01.pphosted.com with ESMTP id 2meuqfkms1-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:42 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:41 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:39 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6OcCe28180672 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:39 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2E71028058; Wed, 12 Sep 2018 02:22:43 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CB8BD28059; Wed, 12 Sep 2018 02:22:41 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:41 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 15/19] Fix generic/230 to work with 64k block size Date: Wed, 12 Sep 2018 11:56:22 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-0052-0000-0000-0000032F3D6E X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867116; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:41 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-0053-0000-0000-00005E0B0E2E Message-Id: <20180912062626.14349-16-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120068 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This commit changes the test to work on file offsets that are aligned with the block size of the underlying filesystem. Signed-off-by: Chandan Rajendra --- tests/generic/230 | 23 +++++++++++++---------- tests/generic/230.out | 16 ++++++++-------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/tests/generic/230 b/tests/generic/230 index bc8c1ad..fc09391 100755 --- a/tests/generic/230 +++ b/tests/generic/230 @@ -42,27 +42,27 @@ test_enforcement() echo "### some buffered IO (type=$type)" echo "--- initiating IO..." >>$seqres.full # Firstly fit below block soft limit - echo "Write 900k..." - su $qa_user -c "$XFS_IO_PROG -c 'pwrite 0 900k' -c fsync \ + echo "Write 225 blocks..." + su $qa_user -c "$XFS_IO_PROG -c 'pwrite 0 $((225 * $BLOCK_SIZE))' -c fsync \ $SCRATCH_MNT/file1" 2>&1 >>$seqres.full | \ _filter_xfs_io_error | tee -a $seqres.full repquota -$type $SCRATCH_MNT | grep -v "^root" >>$seqres.full 2>&1 # Secondly overcome block soft limit - echo "Rewrite 1001k..." - su $qa_user -c "$XFS_IO_PROG -c 'pwrite 0 1001k' -c fsync \ + echo "Rewrite 250 blocks plus 1 byte..." + su $qa_user -c "$XFS_IO_PROG -c 'pwrite 0 $((250 * $BLOCK_SIZE + 1))' -c fsync \ $SCRATCH_MNT/file1" 2>&1 >>$seqres.full | \ _filter_xfs_io_error | tee -a $seqres.full repquota -$type $SCRATCH_MNT | grep -v "^root" >>$seqres.full 2>&1 # Now try to overcome block hardlimit - echo "Write 1000k..." - su $qa_user -c "$XFS_IO_PROG -c 'pwrite 0 1000k' -c fsync \ + echo "Write 250 blocks..." + su $qa_user -c "$XFS_IO_PROG -c 'pwrite 0 $((250 * $BLOCK_SIZE))' -c fsync \ $SCRATCH_MNT/file2" 2>&1 >>$seqres.full | \ _filter_xfs_io_error | tee -a $seqres.full repquota -$type $SCRATCH_MNT | grep -v "^root" >>$seqres.full 2>&1 # Now sleep for grace time and check that softlimit got enforced sleep $((grace+1)) - echo "Write 4096..." - su $qa_user -c "$XFS_IO_PROG -c 'truncate 0' -c 'pwrite 0 4096' \ + echo "Write 1 block..." + su $qa_user -c "$XFS_IO_PROG -c 'truncate 0' -c 'pwrite 0 $BLOCK_SIZE' \ $SCRATCH_MNT/file2" 2>&1 >>$seqres.full | \ _filter_xfs_io_error | tee -a $seqres.full repquota -$type $SCRATCH_MNT | grep -v "^root" >>$seqres.full 2>&1 @@ -101,11 +101,14 @@ grace=2 _scratch_mkfs >> $seqres.full 2>&1 _scratch_mount "-o usrquota,grpquota" +BLOCK_SIZE=$(_get_block_size $SCRATCH_MNT) quotacheck -u -g $SCRATCH_MNT 2>/dev/null quotaon $SCRATCH_MNT 2>/dev/null -setquota -u $qa_user 1000 2000 3 5 $SCRATCH_MNT +setquota -u $qa_user $((250 * $BLOCK_SIZE / 1024)) \ + $((500 * $BLOCK_SIZE / 1024)) 3 5 $SCRATCH_MNT setquota -u -t $grace $grace $SCRATCH_MNT -setquota -g $qa_user 1000 2000 3 5 $SCRATCH_MNT +setquota -g $qa_user $((250 * $BLOCK_SIZE / 1024)) \ + $((500 * $BLOCK_SIZE / 1024)) 3 5 $SCRATCH_MNT setquota -g -t $grace $grace $SCRATCH_MNT _scratch_unmount diff --git a/tests/generic/230.out b/tests/generic/230.out index fcbacf2..9e89a47 100644 --- a/tests/generic/230.out +++ b/tests/generic/230.out @@ -4,11 +4,11 @@ QA output created by 230 ### create files, setting up ownership (type=u) ### some buffered IO (type=u) -Write 900k... -Rewrite 1001k... -Write 1000k... +Write 225 blocks... +Rewrite 250 blocks plus 1 byte... +Write 250 blocks... pwrite: Disk quota exceeded -Write 4096... +Write 1 block... pwrite: Disk quota exceeded Touch 3+4 Touch 5+6 @@ -20,11 +20,11 @@ touch: cannot touch 'SCRATCH_MNT/file5': Disk quota exceeded ### create files, setting up ownership (type=g) ### some buffered IO (type=g) -Write 900k... -Rewrite 1001k... -Write 1000k... +Write 225 blocks... +Rewrite 250 blocks plus 1 byte... +Write 250 blocks... pwrite: Disk quota exceeded -Write 4096... +Write 1 block... pwrite: Disk quota exceeded Touch 3+4 Touch 5+6 From patchwork Wed Sep 12 06:26:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596821 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 B4B4D14DB for ; Wed, 12 Sep 2018 06:24:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1E172984C for ; Wed, 12 Sep 2018 06:24:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9445B2985B; Wed, 12 Sep 2018 06:24:51 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 419692984C for ; Wed, 12 Sep 2018 06:24:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726642AbeILL1u (ORCPT ); Wed, 12 Sep 2018 07:27:50 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:40378 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726502AbeILL1t (ORCPT ); Wed, 12 Sep 2018 07:27:49 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6OnoN108328 for ; Wed, 12 Sep 2018 02:24:49 -0400 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0b-001b2d01.pphosted.com with ESMTP id 2meusq3m1y-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:49 -0400 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:44 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:41 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6OeWI45809676 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:40 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EE82B28059; Wed, 12 Sep 2018 02:22:44 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9919628058; Wed, 12 Sep 2018 02:22:43 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:43 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 16/19] Fix generic/235 to work with 64k block size Date: Wed, 12 Sep 2018 11:56:23 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-0072-0000-0000-000003A146FA X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867116; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:43 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-0073-0000-0000-000049645BB9 Message-Id: <20180912062626.14349-17-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120069 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With 64k blocksized filesystem, this test fails since a single 8k write will actually end up consuming 64k. Hence this commit writes 64k data into the test file. Signed-off-by: Chandan Rajendra --- tests/generic/235 | 2 +- tests/generic/235.out | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/generic/235 b/tests/generic/235 index 902e9ad..6adc803 100755 --- a/tests/generic/235 +++ b/tests/generic/235 @@ -55,7 +55,7 @@ _try_scratch_mount "-o remount,ro" 2>&1 | tee -a $seqres.full | _filter_scratch touch $SCRATCH_MNT/failed 2>&1 | tee -a $seqres.full | _filter_scratch _try_scratch_mount "-o remount,rw" 2>&1 | tee -a $seqres.full | _filter_scratch -$XFS_IO_PROG -c 'pwrite 0 8k' -c 'fsync' \ +$XFS_IO_PROG -c 'pwrite 0 64k' -c 'fsync' \ $SCRATCH_MNT/testfile >>$seqres.full 2>&1 do_repquota diff --git a/tests/generic/235.out b/tests/generic/235.out index 601fa2f..abcb47a 100644 --- a/tests/generic/235.out +++ b/tests/generic/235.out @@ -17,10 +17,10 @@ Block grace time: 7days; Inode grace time: 7days Block limits File limits User used soft hard grace used soft hard grace ---------------------------------------------------------------------- -fsgqa -- 8 0 0 1 0 0 +fsgqa -- 64 0 0 1 0 0 *** Report for group quotas on device SCRATCH_DEV Block grace time: 7days; Inode grace time: 7days Block limits File limits Group used soft hard grace used soft hard grace ---------------------------------------------------------------------- -fsgqa -- 8 0 0 1 0 0 +fsgqa -- 64 0 0 1 0 0 From patchwork Wed Sep 12 06:26:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596829 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 550FB14F9 for ; Wed, 12 Sep 2018 06:24:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 451922984C for ; Wed, 12 Sep 2018 06:24:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39AE72985B; Wed, 12 Sep 2018 06:24:57 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 D64F92984C for ; Wed, 12 Sep 2018 06:24:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727300AbeILL1z (ORCPT ); Wed, 12 Sep 2018 07:27:55 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:34796 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726502AbeILL1z (ORCPT ); Wed, 12 Sep 2018 07:27:55 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6Os1H005000 for ; Wed, 12 Sep 2018 02:24:55 -0400 Received: from e15.ny.us.ibm.com (e15.ny.us.ibm.com [129.33.205.205]) by mx0b-001b2d01.pphosted.com with ESMTP id 2mesagg90q-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:54 -0400 Received: from localhost by e15.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:46 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e15.ny.us.ibm.com (146.89.104.202) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:43 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6Ogrh37748884 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:42 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BBB6828059; Wed, 12 Sep 2018 02:22:46 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6526428058; Wed, 12 Sep 2018 02:22:45 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:45 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 17/19] Fix generic/459 to work with 64k block size Date: Wed, 12 Sep 2018 11:56:24 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-0068-0000-0000-00000339904F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867116; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:44 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-0069-0000-0000-000045B47962 Message-Id: <20180912062626.14349-18-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120069 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With 64k block size, 200MiB disk space is not sufficient to create an XFS filesystem. Hence this commit increases the size of the overprovisioned dm-thin device to 300MiB. The commit also increases the other associated disk sizes (original physical size and new physical size) appropriately. Signed-off-by: Chandan Rajendra --- tests/generic/459 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/generic/459 b/tests/generic/459 index aee71a0..c430952 100755 --- a/tests/generic/459 +++ b/tests/generic/459 @@ -59,14 +59,14 @@ vgname=vg_$seq lvname=lv_$seq poolname=pool_$seq snapname=snap_$seq -origpsize=100 -virtsize=200 -newpsize=200 +origpsize=200 +virtsize=300 +newpsize=300 # Ensure we have enough disk space -_scratch_mkfs_sized $((250 * 1024 * 1024)) >>$seqres.full 2>&1 +_scratch_mkfs_sized $((350 * 1024 * 1024)) >>$seqres.full 2>&1 -# Create a 100MB dm-thin POOL +# Create a 200MB dm-thin POOL $LVM_PROG pvcreate -f $SCRATCH_DEV >>$seqres.full 2>&1 $LVM_PROG vgcreate -f $vgname $SCRATCH_DEV >>$seqres.full 2>&1 @@ -74,7 +74,7 @@ $LVM_PROG lvcreate --thinpool $poolname --errorwhenfull y \ --zero n -L $origpsize \ --poolmetadatasize 4M $vgname >>$seqres.full 2>&1 -# Create a overprovisioned 200MB dm-thin virt. device +# Create a overprovisioned 300MB dm-thin virt. device $LVM_PROG lvcreate --virtualsize $virtsize \ -T $vgname/$poolname \ -n $lvname >>$seqres.full 2>&1 @@ -92,7 +92,7 @@ _mount /dev/mapper/$vgname-$snapname $SCRATCH_MNT # Consume all space available in the volume and freeze to ensure everything # required to make the fs consistent is flushed to disk. -$XFS_IO_PROG -f -d -c 'pwrite -b 1m 0 120m' $SCRATCH_MNT/f1 >>$seqres.full 2>&1 +$XFS_IO_PROG -f -d -c 'pwrite -b 1m 0 220m' $SCRATCH_MNT/f1 >>$seqres.full 2>&1 # In XFS, this freeze will never complete until the dm-thin POOL device is # extended. It is expected, and is only used so xfsaild is triggered to From patchwork Wed Sep 12 06:26:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596825 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 33A6214F9 for ; Wed, 12 Sep 2018 06:24:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2423D2984C for ; Wed, 12 Sep 2018 06:24:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18A7F2985F; Wed, 12 Sep 2018 06:24:55 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 C50A22984C for ; Wed, 12 Sep 2018 06:24:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727277AbeILL1x (ORCPT ); Wed, 12 Sep 2018 07:27:53 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52374 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726502AbeILL1x (ORCPT ); Wed, 12 Sep 2018 07:27:53 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6Ooq6044261 for ; Wed, 12 Sep 2018 02:24:53 -0400 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mes578r06-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:53 -0400 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:48 -0400 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:45 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6OiwH21889240 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:44 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 874502805A; Wed, 12 Sep 2018 02:22:48 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3214728058; Wed, 12 Sep 2018 02:22:47 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:46 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 18/19] Fix generic/018 to work with 64k block size Date: Wed, 12 Sep 2018 11:56:25 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-0072-0000-0000-000003A146FB X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867116; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:47 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-0073-0000-0000-000049645BBE Message-Id: <20180912062626.14349-19-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=823 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120069 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This commit replaces the hard coded bsize variable with the block size obtained from the underlying filesystem. Signed-off-by: Chandan Rajendra --- tests/generic/018 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/generic/018 b/tests/generic/018 index 43610ef..2a56c38 100755 --- a/tests/generic/018 +++ b/tests/generic/018 @@ -42,7 +42,7 @@ fragfile=$SCRATCH_MNT/fragfile.$$ rm -f $fragfile # Craft some fragmented files, defrag them, check the result. -bsize=4096 +bsize=$(_get_block_size $SCRATCH_MNT) echo "zero-length file:" | tee -a $seqres.full touch $fragfile From patchwork Wed Sep 12 06:26:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 10596823 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 BFA6C14F9 for ; Wed, 12 Sep 2018 06:24:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF4C12984C for ; Wed, 12 Sep 2018 06:24:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A35B02985B; Wed, 12 Sep 2018 06:24:53 +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.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 936682984C for ; Wed, 12 Sep 2018 06:24:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727391AbeILL1v (ORCPT ); Wed, 12 Sep 2018 07:27:51 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58640 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726502AbeILL1v (ORCPT ); Wed, 12 Sep 2018 07:27:51 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8C6OolR135546 for ; Wed, 12 Sep 2018 02:24:51 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mescu87ku-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 12 Sep 2018 02:24:50 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 12 Sep 2018 02:24:49 -0400 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 12 Sep 2018 02:24:47 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8C6Ok7h3866940 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Sep 2018 06:24:46 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5307928059; Wed, 12 Sep 2018 02:22:50 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F22EE28058; Wed, 12 Sep 2018 02:22:48 -0400 (EDT) Received: from localhost.in.ibm.com (unknown [9.124.35.206]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 12 Sep 2018 02:22:48 -0400 (EDT) From: Chandan Rajendra To: fstests@vger.kernel.org Cc: Chandan Rajendra , guaneryu@gmail.com, darrick.wong@oracle.com, linux-xfs@vger.kernel.org Subject: [PATCH V3 19/19] Fix generic/108 to work with 64k block size Date: Wed, 12 Sep 2018 11:56:26 +0530 X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> References: <20180912062626.14349-1-chandan@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18091206-0040-0000-0000-0000046E3777 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009706; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01087104; UDB=6.00561328; IPR=6.00867116; MB=3.00023245; MTD=3.00000008; XFM=3.00000015; UTC=2018-09-12 06:24:48 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18091206-0041-0000-0000-0000087563C2 Message-Id: <20180912062626.14349-20-chandan@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-12_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809120069 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This commit increases the size of the scsi debug device to 300MiB to accommodate a 275MiB sized XFS filesystem with 64k block size. mkfs.xfs fails to create a 64k block sized filesystem on devices with capacity less than 275MiB. Signed-off-by: Chandan Rajendra --- tests/generic/108 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/generic/108 b/tests/generic/108 index e464335..9b4fe60 100755 --- a/tests/generic/108 +++ b/tests/generic/108 @@ -48,7 +48,7 @@ vgname=vg_$seq rm -f $seqres.full # _get_scsi_debug_dev returns a scsi debug device with 128M in size by default -SCSI_DEBUG_DEV=`_get_scsi_debug_dev` +SCSI_DEBUG_DEV=`_get_scsi_debug_dev 512 512 0 300` if [ "$SCSI_DEBUG_DEV" == "/dev/" ]; then _fail "Failed to initialize scsi debug device" fi @@ -59,7 +59,7 @@ $LVM_PROG pvcreate -f $SCSI_DEBUG_DEV $SCRATCH_DEV >>$seqres.full 2>&1 $LVM_PROG vgcreate -f $vgname $SCSI_DEBUG_DEV $SCRATCH_DEV >>$seqres.full 2>&1 # We use yes pipe instead of 'lvcreate --yes' because old version of lvm # (like 2.02.95 in RHEL6) don't support --yes option -yes | $LVM_PROG lvcreate -i 2 -I 4m -L 100m -n $lvname $vgname \ +yes | $LVM_PROG lvcreate -i 2 -I 4m -L 275m -n $lvname $vgname \ >>$seqres.full 2>&1 # wait for lv creation to fully complete $UDEV_SETTLE_PROG >>$seqres.full 2>&1