From patchwork Mon Jul 18 22:13:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Burkov X-Patchwork-Id: 12921819 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 91ABEC43334 for ; Mon, 18 Jul 2022 22:13:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233352AbiGRWNT (ORCPT ); Mon, 18 Jul 2022 18:13:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231687AbiGRWNR (ORCPT ); Mon, 18 Jul 2022 18:13:17 -0400 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54EEE313AD for ; Mon, 18 Jul 2022 15:13:16 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id E78425C016D; Mon, 18 Jul 2022 18:13:13 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 18 Jul 2022 18:13:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bur.io; h=cc :content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t=1658182393; x=1658268793; bh=wdWdwaEIhUyoRKste0G1+R61v VCK3WBL6md7MtZaBO0=; b=Wi+4RUJ7e3gucBuEaiFbfdEMLTVjpFxtoXN0GbpyJ /19nYql9fMTR9SNu4/7Fn7fTai7I03LskPicqJ8pN6PEQLnhOnXNr/0Iarxh1Kha ZKc/QKlFYI19k0iMe1TWTt+q3CTBQR4hQcNPz3HWaqV2s5j+UxVm4sv/3kyIOPXa AgqRvJLWGTff/p3UsZ5F9CNksl0w2Ck+E/ngHDp3ZNWMSJ2gKOXPaGUf+m3JhSNp tVVNpcttgqjuS/WVJpHTg0CRpc4WovDKieeHmBv/C5jQ2mM7A6vHuYoTjcK/QTsW /ygHqvZT3zcdNCeh6HQydJXUsGTZQrrrySvheOOJKUpwA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1658182393; x=1658268793; bh=wdWdwaEIhUyoRKste0G1+R61vVCK3WBL6md 7MtZaBO0=; b=tQc3B9rk+yc+RWXowFbforSfMYQfzY3KeOafZYWlgNodLw4H0Xn GwOBajXEeGhs5wkuSbNsgmbKc1J0R5cbYreOpStV+Zf8E7URQP+gM2SXSmR8PUph 8smMknCbRpHyZ1/tk8RSuUOPYmg1Lb7np2PHxvuPjBt4DOeQga7qwziTg/bwygMV pm34w6/lD4Mkbd8+hz6rrSi3U/VBnfVhbQOZgsJQTlA3IZlF07QfZWeO9mojc4lx Um5utahNRtKr0baT6hhlwk+WM4zihZ+kFljqztE+icDdZ1N4psFJ1mXidW+FCYp8 PVJLtbyJs9T/dhUyHt73NkNPmAYGjO5vwEw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudekledgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepuehorhhishcuuehurhhkohhvuceosghorhhishessghurhdrihho qeenucggtffrrghtthgvrhhnpeduiedtleeuieejfeelffevleeifefgjeejieegkeduud etfeekffeftefhvdejveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegsohhrihhssegsuhhrrdhioh X-ME-Proxy: Feedback-ID: i083147f8:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 18 Jul 2022 18:13:13 -0400 (EDT) From: Boris Burkov To: linux-btrfs@vger.kernel.org, kernel-team@fb.com Subject: [PATCH v3 0/4] btrfs-progs: support for fs-verity fstests Date: Mon, 18 Jul 2022 15:13:07 -0700 Message-Id: X-Mailer: git-send-email 2.37.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Adding fstests for fs-verity on btrfs needs some light support from btrfs-progs. Specifically, it needs additional device corruption features to test corruption detection, and it needs the RO COMPAT flag. The first patch defines (u64)-1 as "UNSET_U64" The second patch adds corrupting arbitrary regions of item data with -I. The third patch adds corrupting holes and prealloc in extent data. The fourth patch includes BTRFS_FEATURE_RO_COMPAT_VERITY to ctree.h Reviewed-by: Sweet Tea Dorminy Reviewed-by: Josef Bacik --- v3: add patch #defining (u64)-1 in btrfs-corrupt-block check item bounds in corruption function improve usage message for new corruption use case add patch with verity ro compat flag v2: minor cleanups from rebasing after a year Boris Burkov (4): btrfs-corrupt-block: define (u64)-1 as UNSET_U64 btrfs-progs: corrupt generic item data with btrfs-corrupt-block btrfs-progs: expand corrupt_file_extent in btrfs-corrupt-block btrfs-progs: add VERITY ro compat flag btrfs-corrupt-block.c | 128 ++++++++++++++++++++++++++++++++++-------- kernel-shared/ctree.h | 4 +- 2 files changed, 109 insertions(+), 23 deletions(-)