From patchwork Mon Mar 4 21:19:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10838615 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 007451823 for ; Mon, 4 Mar 2019 21:19:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDFCE2AA53 for ; Mon, 4 Mar 2019 21:19:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D27142AB47; Mon, 4 Mar 2019 21:19:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F0F72AA53 for ; Mon, 4 Mar 2019 21:19:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726054AbfCDVTU (ORCPT ); Mon, 4 Mar 2019 16:19:20 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:41952 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbfCDVTU (ORCPT ); Mon, 4 Mar 2019 16:19:20 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x24LJDVD015310; Mon, 4 Mar 2019 21:19:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=tVNF0jlkf3ojvjpcraueMzkW/3XSffcC6DRLGO5kYM8=; b=HkPf5bOqb2rgzYjf0+9/JoZmY53y7pCONw8sOO48rgKL9QNp/dOqYuG2VLf4o8fsZMoO yjRd1Ewdj4XCdi8Z6Nb/vR7pfVJuQLRY2O1vX0AshtcZtb1iudS1a3+eYHl5w5sVKcYq hTI+7LqN30cY34RLH0oN7AK/JQuv+PAo77fIreK3CR1ipBQXf6N9FRW3GJ2L0RkOUPLI G5QJqFK1f1XbyyL8Ah5lVaygU+Mxj6BkGwVplVNX2T2wHVJg33agNcaPBfk+IoVZMNCp goj4FPZCcAScZeLX/Vv0DjDKAyxRaoZwydl4iY/2Vz7fj9pUJF1Dpr4ugdZtrtQTDW/K eA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2qyfbe1m1g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 Mar 2019 21:19:18 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x24LJH4H006244 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 4 Mar 2019 21:19:17 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x24LJHpE030628; Mon, 4 Mar 2019 21:19:17 GMT Received: from localhost (/10.159.248.244) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 04 Mar 2019 13:19:17 -0800 Subject: [PATCH 1/5] common/rc: fix get_max_lfs_filesize From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 04 Mar 2019 13:19:08 -0800 Message-ID: <155173434839.767.14812800687954592485.stgit@magnolia> In-Reply-To: <155173434205.767.15128498725168844621.stgit@magnolia> References: <155173434205.767.15128498725168844621.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9185 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=982 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903040150 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Helper functions are supposed to have a leading underscore ('_') in the function name, but this one doesn't have it. Unfortunately, the calling test cases (generic/349-351) /do/ have the leading underscore, so now they're broken. Signed-off-by: Darrick J. Wong --- common/rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/rc b/common/rc index 8b40aabe..1c42515f 100644 --- a/common/rc +++ b/common/rc @@ -3834,7 +3834,7 @@ _get_max_file_size() } # get MAX_LFS_FILESIZE -get_max_lfs_filesize() +_get_max_lfs_filesize() { case "$(getconf LONG_BIT)" in "32") From patchwork Mon Mar 4 21:19:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10838617 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 A87E41823 for ; Mon, 4 Mar 2019 21:19:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 913A72B2C5 for ; Mon, 4 Mar 2019 21:19:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84CBD2B2D9; Mon, 4 Mar 2019 21:19: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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C9412B2C5 for ; Mon, 4 Mar 2019 21:19:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726080AbfCDVT0 (ORCPT ); Mon, 4 Mar 2019 16:19:26 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:37714 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbfCDVT0 (ORCPT ); Mon, 4 Mar 2019 16:19:26 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x24LJKxH015620; Mon, 4 Mar 2019 21:19:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=hm5jynurP1Be5rdPtdFIsbWphzkEtaCWbx6CIdL+Tz8=; b=3E7dItlK31OUTLFW5mm65GF1ttNJoqUs3nb3iys2xSVAMHqCrflNbScSBMiF/6CYMeCz kGwGNANovf8/igQkp4BguwqMcSJQNzfjttMXYKWzuAHI78gwnhj9UWtPs6e38hTOtPZ3 kcys0q6EEnvQdTTQElGveU3VdF10Nwm9R40uUFUTNVkZ4P3O1MOEFdVtmjfsCzV5kLnr 9bbbBMpLt1iLncoQ+2OvRQemYe2AHe7NjANMXeY2uKMbRQOljxyhggSer7V//PLhKyQO vk8C36zan5MqUo3+hJATHVEjKH8WtqjhKLI2QSVZwrHvWcn2q+bciFsmZl29jJ/u2PJA QQ== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2qyh8u1bxx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 Mar 2019 21:19:24 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x24LJOeE003080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 4 Mar 2019 21:19:24 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x24LJOdC005169; Mon, 4 Mar 2019 21:19:24 GMT Received: from localhost (/10.159.248.244) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 04 Mar 2019 13:19:23 -0800 Subject: [PATCH 2/5] xfs/010: use correct type for finobt corrupting From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 04 Mar 2019 13:19:22 -0800 Message-ID: <155173436278.767.10161710001222466116.stgit@magnolia> In-Reply-To: <155173434205.767.15128498725168844621.stgit@magnolia> References: <155173434205.767.15128498725168844621.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9185 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=935 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903040150 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Use 'type finobt' for corrupting the finobt. Signed-off-by: Darrick J. Wong --- tests/xfs/010 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/xfs/010 b/tests/xfs/010 index ee1595c8..e220a651 100755 --- a/tests/xfs/010 +++ b/tests/xfs/010 @@ -63,14 +63,14 @@ _corrupt_finobt_records() _filter_dbval` # Corrupt a freecount value. This should never exceed 64. - $XFS_DB_PROG -x -c "fsb $free_root" -c "type inobt" \ + $XFS_DB_PROG -x -c "fsb $free_root" -c "type finobt" \ -c "write recs[1].freecount 70" $dev # Create a corrupted non-free record, which should never appear in the # finobt. - $XFS_DB_PROG -x -c "fsb $free_root" -c "type inobt" \ + $XFS_DB_PROG -x -c "fsb $free_root" -c "type finobt" \ -c "write recs[2].freecount 0" $dev - $XFS_DB_PROG -x -c "fsb $free_root" -c "type inobt" \ + $XFS_DB_PROG -x -c "fsb $free_root" -c "type finobt" \ -c "write recs[2].free 0" $dev } From patchwork Mon Mar 4 21:19:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10838621 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 7D16F1575 for ; Mon, 4 Mar 2019 21:19:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62D4D2A953 for ; Mon, 4 Mar 2019 21:19:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 553892B2D8; Mon, 4 Mar 2019 21:19: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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2D812A953 for ; Mon, 4 Mar 2019 21:19:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726038AbfCDVTi (ORCPT ); Mon, 4 Mar 2019 16:19:38 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:37872 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726054AbfCDVTi (ORCPT ); Mon, 4 Mar 2019 16:19:38 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x24LJDiv015426; Mon, 4 Mar 2019 21:19:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=Znln34Pj3/uod10Pd37gaaPMUOeHbJ/ceh0wqD2W7hg=; b=40G2iT0+i/hTin5Ss0e47zkirLx/gDYofaSEyf6/OxPp1sYvzYUIzJ0o5tNHnpP5P0IN L3S41lLC5u+OCxnQklTjKvxFYqeUfSQwzK0y/9ME/cADooeYzFosjeOEygra+gFxazS7 qCegjAf2LRfGzk1HvSY5LDj5WxIhlAM2M5XEWsrFDA0ULOe9dEbxM7nRavPJ1YBFQJ56 0E10M/tZfnhF56X4x8NkkZZllb3SOc1xhnEItcq5+CcIh8a86zFRBSZGyfXiWVljADId /FLS0cIVr8/dN9y9D1lYL2vU4nWc4AxmJYQXhropFNCQ3UI/uCaxsuKZziRri6bY5Xuu Rg== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2qyh8u1byf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 Mar 2019 21:19:36 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x24LJUYv008731 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 4 Mar 2019 21:19:30 GMT Received: from abhmp0022.oracle.com (abhmp0022.oracle.com [141.146.116.28]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x24LJUMe005194; Mon, 4 Mar 2019 21:19:30 GMT Received: from localhost (/10.159.248.244) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 04 Mar 2019 13:19:30 -0800 Subject: [PATCH 3/5] shared/298: unmount filesystem before examining underlying storage From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, enwlinux@gmail.com Date: Mon, 04 Mar 2019 13:19:29 -0800 Message-ID: <155173436903.767.2030031690929754940.stgit@magnolia> In-Reply-To: <155173434205.767.15128498725168844621.stgit@magnolia> References: <155173434205.767.15128498725168844621.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9185 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=839 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903040150 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong This test does some weird things with live filesystems -- it seems to be validating the behavior of fstrim by comparing the filesystem's free space map to holes in the file image that backs the filesystem. However, this doesn't account for the fact that some filesystems maintain in-core preallocations and/or can perturb the free space data during unmount. This causes sporadic test failures when the two become out of sync. Therefore, make sure we unmount the filesystem before we start running tools against the filesystem image file to eliminate the possibility of changes to the free space map. This was found by running shared/298 on xfs with a 1k block size. cc: enwlinux@gmail.com Signed-off-by: Darrick J. Wong --- tests/shared/298 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/shared/298 b/tests/shared/298 index aafdc25f..5d6c6ccf 100755 --- a/tests/shared/298 +++ b/tests/shared/298 @@ -46,13 +46,21 @@ _cleanup() get_holes() { + # It's not a good idea to be running tools against the image file + # backing a live filesystem because the filesystem could be maintaining + # in-core state that will perturb the free space map on umount. Stick + # to established convention which requires the filesystem to be + # unmounted while we probe the underlying file. + $UMOUNT_PROG $loop_mnt $XFS_IO_PROG -F -c fiemap $1 | grep hole | $SED_PROG 's/.*\[\(.*\)\.\.\(.*\)\].*/\1 \2/' + _mount $loop_dev $loop_mnt } get_free_sectors() { case $FSTYP in ext4) + $UMOUNT_PROG $loop_mnt $DUMPE2FS_PROG $img_file 2>&1 | grep " Free blocks" | cut -d ":" -f2- | \ tr ',' '\n' | $SED_PROG 's/^ //' | \ $AWK_PROG -v spb=$sectors_per_block 'BEGIN{FS="-"}; @@ -195,6 +203,16 @@ while read line; do END { if(found) exit 0; else exit 1}' $merged_sectors then echo "Sectors $from-$to are not marked as free!" + + # Dump the state to make it easier to debug this... + echo free_sectors >> $seqres.full + sort -g < $free_sectors >> $seqres.full + echo fiemap_ref >> $seqres.full + sort -g < $fiemap_ref >> $seqres.full + echo merged_sectors >> $seqres.full + sort -g < $merged_sectors >> $seqres.full + echo fiemap_after >> $seqres.full + sort -g < $fiemap_after >> $seqres.full exit fi done < $fiemap_after From patchwork Mon Mar 4 21:19:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10838625 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 663441823 for ; Mon, 4 Mar 2019 21:19:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4F1D12A953 for ; Mon, 4 Mar 2019 21:19:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4363F2B2D9; Mon, 4 Mar 2019 21:19:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 192B82A953 for ; Mon, 4 Mar 2019 21:19:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726143AbfCDVTk (ORCPT ); Mon, 4 Mar 2019 16:19:40 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:42206 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726054AbfCDVTk (ORCPT ); Mon, 4 Mar 2019 16:19:40 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x24LJKvd015472; Mon, 4 Mar 2019 21:19:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=tCjovMYSKrfU5lJEum3PnuyNzQrkQDrPn0tWuwee76I=; b=LOoSmaj1Xu8U2zViZkMvaPSdpbs9jW9vj4PHvubxgS6XNpzHAyczVazfRBUQMYIlpA+p p5dtYhI4gzdxA2XlqULYzc+qKJw+Qly4w9ptITHMXe7dcIGqsCNZVzvSIsp+ZSJgPjYW O5eAQVpB5HnM/4nORrlwRM+NMyApJ3eW5gbJYbHdxZOV6IPwhMr8xaj9rzuo1d0FNMHd Cwk/LR7hXR5Hi+xkgnAWWPOu39e8QrZHGieuoJ/EwPU9At8nCedBjQR1s7OISqOopWcs L5P56EgxfRoFUnbnTfDW7l1iKw9zofKunZVCEFqaBLZTnDt8YwnEyMw6eE59rBDEKZq5 lw== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2130.oracle.com with ESMTP id 2qyfbe1m2m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 Mar 2019 21:19:38 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x24LJb1Y024935 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 4 Mar 2019 21:19:37 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x24LJa29023954; Mon, 4 Mar 2019 21:19:36 GMT Received: from localhost (/10.159.248.244) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 04 Mar 2019 13:19:36 -0800 Subject: [PATCH 4/5] generic: test statx attribute_mask setting From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 04 Mar 2019 13:19:35 -0800 Message-ID: <155173437536.767.4083133841860983852.stgit@magnolia> In-Reply-To: <155173434205.767.15128498725168844621.stgit@magnolia> References: <155173434205.767.15128498725168844621.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9185 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 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-1810050000 definitions=main-1903040150 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Make sure the filesystem reports attribute_mask for the attributes it supports. Signed-off-by: Darrick J. Wong --- tests/generic/713 | 67 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/generic/713.out | 1 + tests/generic/group | 1 + 3 files changed, 69 insertions(+) create mode 100755 tests/generic/713 create mode 100644 tests/generic/713.out diff --git a/tests/generic/713 b/tests/generic/713 new file mode 100755 index 00000000..cd128d9c --- /dev/null +++ b/tests/generic/713 @@ -0,0 +1,67 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (c) 2019 Oracle, Inc. All Rights Reserved. +# +# FS QA Test No. 713 +# +# Regression test for a bug where XFS fails to set statx attributes_mask but +# sets attribute flags anyway. +# +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* $testfile +} + +# get standard environment, filters and checks +. ./common/rc + +# real QA test starts here +_supported_fs generic +_supported_os Linux +_require_test + +get_attributes() { + $XFS_IO_PROG -r -c "statx -r" $1 | grep 'stat.attributes =' | cut -d ' ' -f 3 +} + +get_attributes_mask() { + $XFS_IO_PROG -r -c "statx -r" $1 | grep 'stat.attributes_mask =' | cut -d ' ' -f 3 +} + +check_statx_attributes() +{ + attrs=$(get_attributes $testfile) + mask=$(get_attributes_mask $testfile) + + echo "MASK:$mask:ATTRS:$attrs:" >> $seqres.full + + test -z "$mask" && _notrun "xfs_io statx command does not support attributes_mask" + test $(( mask )) -eq 0 && echo "attributes mask is zero" + test $(( attrs & ~(mask) )) -ne 0 && echo "attributes $attrs do not appear in mask $mask" +} + +# Create file, check for incorrect mask +testfile=$TEST_DIR/$$.test +touch $testfile +check_statx_attributes + +# Do it again, but this time try to turn on one of the attributes. +if chattr +i $testfile > /dev/null 2>&1; then + check_statx_attributes + chattr -i $testfile +fi +if chattr +a $testfile > /dev/null 2>&1; then + check_statx_attributes + chattr -a $testfile +fi + +status=0 +exit diff --git a/tests/generic/713.out b/tests/generic/713.out new file mode 100644 index 00000000..066598d3 --- /dev/null +++ b/tests/generic/713.out @@ -0,0 +1 @@ +QA output created by 713 diff --git a/tests/generic/group b/tests/generic/group index 15227b67..d04bf39f 100644 --- a/tests/generic/group +++ b/tests/generic/group @@ -534,3 +534,4 @@ 529 auto quick attr 530 auto quick unlink 531 auto quick unlink +713 auto quick From patchwork Mon Mar 4 21:19:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10838631 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 190C21869 for ; Mon, 4 Mar 2019 21:19:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F32CA2A953 for ; Mon, 4 Mar 2019 21:19:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7D522B2C5; Mon, 4 Mar 2019 21:19:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 967082B2D3 for ; Mon, 4 Mar 2019 21:19:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726088AbfCDVTq (ORCPT ); Mon, 4 Mar 2019 16:19:46 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:37998 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbfCDVTq (ORCPT ); Mon, 4 Mar 2019 16:19:46 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x24LJDIr015418; Mon, 4 Mar 2019 21:19:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=Ui6xlkZYL/Z57dTP0lyOKzzP0jm0VVf33eC7Hxee/SI=; b=u5aGj/mFAjMFdx5XCuJWan6H87UGCipfmcRNlkJvxRmPoXHkQvB+H0rb+Urp8xN67C78 lOYmPUL7NVmtrDQewgMTDy9vUKgw4JB7RVFPpENvjLafPzObTKYWk8XinepG0FIICFSv YmgVK/80nQgVRYqJfEy9elsYhsZ1XOfG5j3mmbRSSY9IwHukG4Jj0jkfM/+CMXYfQSH7 39mQz5RBgkADO1FX6q1hHkke5LT8irxltcJYeozO20/7jSAdG9mHP9mMRZX1rtx5YgWA YcNooDpXEiQpDnxqCYhm+zUKjd5uhBg1krTIK1cZR8Vr0Y0HEzFquXS4ey9gCimm2xoc xg== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2qyh8u1c04-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 Mar 2019 21:19:44 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x24LJhph003571 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 4 Mar 2019 21:19:43 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x24LJhSf030822; Mon, 4 Mar 2019 21:19:43 GMT Received: from localhost (/10.159.248.244) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 04 Mar 2019 13:19:42 -0800 Subject: [PATCH 5/5] populate: force large finobt creation on xfs From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Mon, 04 Mar 2019 13:19:41 -0800 Message-ID: <155173438168.767.3984211596797515595.stgit@magnolia> In-Reply-To: <155173434205.767.15128498725168844621.stgit@magnolia> References: <155173434205.767.15128498725168844621.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9185 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 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-1810050000 definitions=main-1903040150 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Teach the populate routines to create enough inodes that we end up with multi-level inode btrees. Signed-off-by: Darrick J. Wong --- common/populate | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/common/populate b/common/populate index d49fbc29..95953476 100644 --- a/common/populate +++ b/common/populate @@ -260,6 +260,21 @@ _scratch_xfs_populate() { $XFS_IO_PROG -f -c "pwrite -S 0x62 0 $((blksz * nr))" "${SCRATCH_MNT}/BNOBT" ./src/punch-alternating "${SCRATCH_MNT}/BNOBT" + # Inode btree + echo "+ inobt btree" + local ino_per_rec=64 + local rec_per_btblock=16 + local nr="$(( 2 * (blksz / rec_per_btblock) * ino_per_rec ))" + local dir="${SCRATCH_MNT}/INOBT" + mkdir -p "${dir}" + seq 0 "${nr}" | while read f; do + touch "${dir}/${f}" + done + + seq 0 "$((ino_per_rec + 1))" "${nr}" | while read f; do + rm -f "${dir}/${f}" + done + # Reverse-mapping btree is_rmapbt="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep -c 'rmapbt=1')" if [ $is_rmapbt -gt 0 ]; then @@ -562,6 +577,8 @@ _scratch_xfs_populate_check() { __populate_check_xfs_aformat "${btree_attr}" "btree" __populate_check_xfs_agbtree_height "bno" __populate_check_xfs_agbtree_height "cnt" + __populate_check_xfs_agbtree_height "ino" + test $is_finobt -ne 0 && __populate_check_xfs_agbtree_height "fino" test $is_rmapbt -ne 0 && __populate_check_xfs_agbtree_height "rmap" test $is_reflink -ne 0 && __populate_check_xfs_agbtree_height "refcnt" } From patchwork Tue Mar 5 19:42:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10840077 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 5474B922 for ; Tue, 5 Mar 2019 19:42:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C09D2C5EB for ; Tue, 5 Mar 2019 19:42:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3023D2C671; Tue, 5 Mar 2019 19:42:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C22E42C5EB for ; Tue, 5 Mar 2019 19:42:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726470AbfCETmq (ORCPT ); Tue, 5 Mar 2019 14:42:46 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:43384 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726221AbfCETmq (ORCPT ); Tue, 5 Mar 2019 14:42:46 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x25JTH2S118881; Tue, 5 Mar 2019 19:42:44 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=8xeeXxoxQJDZZ05FydM4O5whfLCwqqrfzZ+vJEEfRNA=; b=f1CcBW8cojn84ekDkqLZoo5ULF9TNBcUNIZAaC/LY2vYWyRdS5pf9VMe13kaLCpDfXUi mcBSXmVwnmldLf4kze7RSn62mI8yhh+8jCmTfECu+FTmKZbs1lBriFvphJkt0x5oL+/B HPugg19KRgfl8Ic/6xrHLaqsnHEF3fSo6x2lxx/IkWbhGbsdibcH6mTza6eeC65PjiEw GyUG0siWwcyYOH5rrJejxS57dSSSiQhEoce+eYtDvN0doMi+AAADFg7ou10rAG6KVy86 63nZt48RZ0R1WfTfDkUakK8c1pepwU/D9jeatB9ZyyOBK8/p04q7cHgYSiJKCNFm/+4K RA== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2qyjfrfg3h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 05 Mar 2019 19:42:44 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x25JggVh026301 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 5 Mar 2019 19:42:43 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x25JggPJ020749; Tue, 5 Mar 2019 19:42:42 GMT Received: from localhost (/10.159.243.250) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 05 Mar 2019 11:42:42 -0800 Date: Tue, 5 Mar 2019 11:42:42 -0800 From: "Darrick J. Wong" To: guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, linux-ext4 Subject: [PATCH 6/5] ext4/032: SCRATCH_DIR -> SCRATCH_MNT Message-ID: <20190305194241.GA4660@magnolia> References: <155173434205.767.15128498725168844621.stgit@magnolia> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <155173434205.767.15128498725168844621.stgit@magnolia> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9186 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=765 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903050127 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Use SCRATCH_MNT, not SCRATCH_DIR. Signed-off-by: Darrick J. Wong --- tests/ext4/032 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ext4/032 b/tests/ext4/032 index 8534ddd6..277ddef0 100755 --- a/tests/ext4/032 +++ b/tests/ext4/032 @@ -19,8 +19,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 BLK_SIZ=4096 CLUSTER_SIZ=4096 -IMG_FILE=$SCRATCH_DIR/$seq.fs -IMG_MNT=$SCRATCH_DIR/$seq.mnt +IMG_FILE=$SCRATCH_MNT/$seq.fs +IMG_MNT=$SCRATCH_MNT/$seq.mnt ## Num clusters to blocks. c2b()