From patchwork Tue Jul 18 08:27:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 9847245 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3260F60392 for ; Tue, 18 Jul 2017 08:28:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2379B28516 for ; Tue, 18 Jul 2017 08:28:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17CCB2853A; Tue, 18 Jul 2017 08:28:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C4AA28516 for ; Tue, 18 Jul 2017 08:28:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751387AbdGRI2K (ORCPT ); Tue, 18 Jul 2017 04:28:10 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:61009 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751354AbdGRI2J (ORCPT ); Tue, 18 Jul 2017 04:28:09 -0400 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="21441461" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 18 Jul 2017 16:28:03 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id 736FA46B5D21 for ; Tue, 18 Jul 2017 16:28:00 +0800 (CST) Received: from localhost.localdomain (10.167.220.81) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 18 Jul 2017 16:28:00 +0800 From: Xiao Yang To: CC: Xiao Yang Subject: [PATCH] generic/448: don't disable extent zeroing if extent_max_zeroout_kb isn't supported Date: Tue, 18 Jul 2017 16:27:50 +0800 Message-ID: <1500366470-10647-1-git-send-email-yangx.jy@cn.fujitsu.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.167.220.81] X-yoursite-MailScanner-ID: 736FA46B5D21.A7BFA X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: yangx.jy@cn.fujitsu.com Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On some old kernel(e.g. v3.5), this case fails because it can not create extent_max_zeroout_kb file, as below: Silence is golden +./tests/generic/448: line 54: /sys/fs/ext4/sda5/extent_max_zeroout_kb: No such file or directory seek sanity check failed! The extent_max_zeroout_kb file is introduced by: 67a5da564f97('ext4: make the zero-out chunk size tunable') We should only disable extent zeroing when extent_max_zeroout_kb is supported. Signed-off-by: Xiao Yang --- tests/generic/448 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/generic/448 b/tests/generic/448 index 87b99d7..3e92742 100755 --- a/tests/generic/448 +++ b/tests/generic/448 @@ -51,7 +51,8 @@ _require_test_program "seek_sanity_test" # Disable extent zeroing for ext4 as that change where holes are created if [ "$FSTYP" = "ext4" ]; then DEV=`_short_dev $TEST_DEV` - echo 0 >/sys/fs/ext4/$DEV/extent_max_zeroout_kb + [ -f /sys/fs/ext4/$DEV/extent_max_zeroout_kb ] \ + && echo 0 >/sys/fs/ext4/$DEV/extent_max_zeroout_kb fi $here/src/seek_sanity_test -s 18 -e 18 $BASE_TEST_FILE > $seqres.full 2>&1 ||