From patchwork Tue May 30 01:45:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 13259069 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 8FE5AC7EE23 for ; Tue, 30 May 2023 01:45:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229897AbjE3Bpv (ORCPT ); Mon, 29 May 2023 21:45:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbjE3Bpu (ORCPT ); Mon, 29 May 2023 21:45:50 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E05BBDC for ; Mon, 29 May 2023 18:45:48 -0700 (PDT) Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 9E9AB1F37C for ; Tue, 30 May 2023 01:45:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1685411147; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=9EuihHQk/WhFyfwwcY1og0fUSftXSuvy04iJwYEEPYY=; b=kMYbEDfoFo1CNFZdnMMBpOZUeSkP6A89NHaKwGknjtzbflsjYXQ4X2daeuwQMaqlTAxxdJ n+LG93rx9s29mM6zVpzEMFZy0eI7754x4wHW/qJD38bHQO3At7zSxeq2xxGSwTi/z9bCLz Q8vz21JjNcpU/wo6x3Qin2m8I7ugSx4= Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 115BE132F3 for ; Tue, 30 May 2023 01:45:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id 1i7rNEpVdWSIJwAAGKfGzw (envelope-from ) for ; Tue, 30 May 2023 01:45:46 +0000 From: Qu Wenruo To: linux-btrfs@vger.kernel.org Subject: [PATCH v2 0/3] btrfs: small cleanups mostly for subpage cases Date: Tue, 30 May 2023 09:45:26 +0800 Message-Id: X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Changelog: v2: - Fix an offset-by-one bug in the 3rd patch Unlock extent range end is inclusive. During my hunt on the subpage uptodate desync bugs reported from Matt, I exposed several PageUptodate usage which results inefficiency for subpage cases. Those two are fixed in the first two patches. Furthermore I found processed_extent infrastructure is no longer needed especially after all the csum verification is moved to storage layer (or bio.c inside btrfs), we can easily unlock the full range without the need for the infrastructure. Thus the last patch would delete the processed_extent infrastructure completely. Qu Wenruo (3): btrfs: make alloc_extent_buffer() handle previously uptodate range more efficient for subpage btrfs: use the same @uptodate variable for end_bio_extent_readpage() btrfs: remove processed_extent infrastructure fs/btrfs/extent_io.c | 89 +++++--------------------------------------- 1 file changed, 10 insertions(+), 79 deletions(-)