From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74C2CC433EF for ; Tue, 15 Mar 2022 22:06:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352144AbiCOWHv (ORCPT ); Tue, 15 Mar 2022 18:07:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344194AbiCOWHs (ORCPT ); Tue, 15 Mar 2022 18:07:48 -0400 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73130443FB; Tue, 15 Mar 2022 15:06:35 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id D83435C011B; Tue, 15 Mar 2022 18:06:34 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 15 Mar 2022 18:06:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bur.io; h=cc:cc :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; bh=kwP+Ne/UqsGXkqSu7O6W+6U8g+GJLANUtZZP4p x2F7Q=; b=Fdv4OezjF0230mYFRRO5AQ0zHD4F0/REu/CRzQedCtKHBOzN8sU+BS uTSmwCIvHXjpdk2t38CXKfEnutdn9pIyFWDKcik6r7yNn5MgbYVOjw/pDoosj6v4 uS7N1F/1mjgsei1bv2jf+/kLqAOhsJFHaI6FpuyTy5q2NuwYw4FGWxn1D0scZ5ch VTj0NDZdoJFso8Q2ccMNZOHkoNT9twKW2GEZ4+JviDInV0aUatmbJIHL/xRXPcfn /W3Ni+JQ0R79vokzWbwKSHy2WQxLG6upT5q7Fkqt1mmVzOzhRty+R4dJQSTdxdZC hQdvahCuWbSci8lMlnnbTkRCzKmy+SyQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=kwP+Ne/UqsGXkqSu7 O6W+6U8g+GJLANUtZZP4px2F7Q=; b=ESANhYI20UKSVcS0hrVThHFiIrC3O8Wfq a9ZNQSPLFCs0iDO23+fQ0MPFegBYkFZBdespBizxRjsmMZAsDpkpWduf3jo9Op0A 0c0Pd/G6rUe6wAI2EzvMxL1cQujDP+jAw9sl2O14RqS1jUqB5VgVaU+dDJajinZY LA7dypMF4FKiQUETIYQxepKMeFdodi40oglxNELePXCSzrMVRe2YB40dbs9ESsF+ 75oWnQmedMCHRK5uyhxqMgs+HINvUuN//ZQQQsI9V4ChwcjndHwU3QEJ7MJuH8JV HfQLMyMHRCE7PKG8MkUCMN1RDA8b82byL+7zB5HuahblMGR3uVYKg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeftddgudehiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomhepuehorhhi shcuuehurhhkohhvuceosghorhhishessghurhdrihhoqeenucggtffrrghtthgvrhhnpe ehudevleekieetleevieeuhfduhedtiefgheekfeefgeelvdeuveeggfduueevfeenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsohhrihhsse gsuhhrrdhioh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 15 Mar 2022 18:06:34 -0400 (EDT) Date: Tue, 15 Mar 2022 15:06:32 -0700 From: Boris Burkov To: Eric Biggers Cc: fstests@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-btrfs@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH v6 4/4] generic: test fs-verity EFBIG scenarios Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org On Tue, Mar 15, 2022 at 02:16:30AM +0000, Eric Biggers wrote: > On Mon, Feb 14, 2022 at 04:09:58PM -0800, Boris Burkov wrote: > > diff --git a/tests/generic/690 b/tests/generic/690 > > new file mode 100755 > > index 00000000..77906dd8 > > --- /dev/null > > +++ b/tests/generic/690 > > @@ -0,0 +1,66 @@ > > +#! /bin/bash > > +# SPDX-License-Identifier: GPL-2.0 > > +# Copyright (c) 2021 Facebook, Inc. All Rights Reserved. > > +# > > +# FS QA Test 690 > > +# > > +# fs-verity requires the filesystem to decide how it stores the Merkle tree, > > +# which can be quite large. > > +# It is convenient to treat the Merkle tree as past EOF, and ext4, f2fs, and > > +# btrfs do so in at least some fashion. This leads to an edge case where a > > +# large file can be under the file system file size limit, but trigger EFBIG > > +# on enabling fs-verity. Test enabling verity on some large files to exercise > > +# EFBIG logic for filesystems with fs-verity specific limits. > > +# > > +. ./common/preamble > > +_begin_fstest auto quick verity > > + > > + > > +# Import common functions. > > +. ./common/filter > > +. ./common/verity > > + > > +# real QA test starts here > > +_supported_fs generic > > +_require_test > > +_require_math > > +_require_scratch_verity > > +_require_fsverity_max_file_size_limit > > +_require_scratch_nocheck > > Why is _require_scratch_nocheck() needed? _require_scratch_verity() already > does _require_scratch(), and I don't see why skipping fsck would be needed. > > > +# have to go back by 4096 from max to not hit the fsverity MAX_LEVELS check. > > +truncate -s $max_sz $fsv_file > > The above comment should be removed. > Thanks for catching these oversights, will fix them. The nocheck thing was left over from mixing/copy-pasting with btrfs/290 during this test's evolution. Works fine without it on ext4 and btrfs. > - Eric