From patchwork Fri Dec 1 21:00:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Burkov X-Patchwork-Id: 13476390 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bur.io header.i=@bur.io header.b="oNor3wCw"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="mzQG8Tly" Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4066212A for ; Fri, 1 Dec 2023 12:58:58 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id AA5C85C014F; Fri, 1 Dec 2023 15:58:57 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 01 Dec 2023 15:58:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bur.io; h=cc :content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm2; t=1701464337; x=1701550737; bh=Ol7Y2AeorX abVlkh7Vu8uIt/Zle7CnLBXc+hvj4ChMA=; b=oNor3wCwXYYnDFOmMHLn5/bqXh 8vZiw880HK518KO780BM3adUmBCF6AFTyQT5rFJoNPdZYT1+cjZj3rNK9F9Ao0dI +eZC5mCmu8w1CK8NYr4HxDY3Z7qIJ2XDC5mpDy4HAt+99jXJpyy/wnAiksQx3inH 23jhrp8FTAIVklsEXCqAcFVecHATnOL6+2d+H1Uu5fJrasSLI85tCHANWNoJhog3 LdRHBjck08XF0wsWkQ+wMwlgyg+HUG6Dt1MpBlOMUQ2fUGss4va2GKF8CmVTjGoc JfoaE0tsf5Efy/QLokoJQ7yH+onYbLs4IWHYRr6dwsPTmEbt3VAHrf+E9qDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :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= fm1; t=1701464337; x=1701550737; bh=Ol7Y2AeorXabVlkh7Vu8uIt/Zle7 CnLBXc+hvj4ChMA=; b=mzQG8Tly8XCf///7O2P7XCi66WdcLq1T4ZvfVGJ0kl0z iMl/5KyI3bEtAeeFH/y/6Q+NX9RZOK6hkxy2Q1vCSPa5jv8pCvrvsfQckGw2Km6R TXwiHznZyh105HwHnBWQVcoRxjE57qofC2r6chsOzxq81N3QAwdo1naKm731Uyvz 5VBKQrRwzcYIYVf7wR5baMuW31aIw9G4NIztp1dgUgx3/QC6zetfc6Bgsd3OnXMP p+edPPu1BnymO6ymkLmLF4KnyOdC8bAGFw8E2FgzNsh4B91eSQVzMQaJwtmgTYZl rBy24187LPKcQKnoiFRQ84iDCy0ivEgm63GVUc9+tg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeiledgudeggecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpeeuohhrihhsuceuuhhrkhhovhcuoegsohhrihhssegsuhhrrdhi oheqnecuggftrfgrthhtvghrnhepudeitdelueeijeefleffveelieefgfejjeeigeekud duteefkefffeethfdvjeevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomhepsghorhhishessghurhdrihho X-ME-Proxy: Feedback-ID: i083147f8:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 1 Dec 2023 15:58:57 -0500 (EST) From: Boris Burkov To: linux-btrfs@vger.kernel.org, kernel-team@fb.com Subject: [PATCH 0/5] btrfs: qgroups rsv fixes Date: Fri, 1 Dec 2023 13:00:08 -0800 Message-ID: X-Mailer: git-send-email 2.42.0 Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This series contains a number of related but relatively orthogonal fixes for various bugs in qgroup/squota reservation accounting. Most of these manifest as either rsv underflow WARNINGs (in qgroup_rsv_release) or as WARNINGs at umount for unreleased space. With these fixes, I am able to get a fully clean '-g auto' fstests run on my setup and with -O squota in MKFS_OPTIONS. Boris Burkov (5): btrfs: free qgroup rsv on ioerr ordered_extent btrfs: fix qgroup_free_reserved_data int overflow btrfs: free qgroup pertrans rsv on trans abort btrfs: dont clear qgroup rsv bit in release_folio btrfs: ensure releasing squota rsv on head refs fs/btrfs/delalloc-space.c | 2 +- fs/btrfs/disk-io.c | 28 +++++++++++++++++++++++ fs/btrfs/extent-tree.c | 47 +++++++++++++++++++++++++++------------ fs/btrfs/extent_io.c | 3 ++- fs/btrfs/file.c | 2 +- fs/btrfs/inode.c | 16 ++++++------- fs/btrfs/ordered-data.c | 10 +++++---- fs/btrfs/qgroup.c | 46 +++++++++++++++++++++++++------------- fs/btrfs/qgroup.h | 8 +++---- 9 files changed, 114 insertions(+), 48 deletions(-)