Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp702146iob; Wed, 18 May 2022 11:00:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4pL57EzCcd90I/sAAeKM7wca593aRFfaEAH8Gik1R2UKZQafsH0moUmmjs5xYjySNTqAW X-Received: by 2002:a17:90b:4a4a:b0:1df:a250:e583 with SMTP id lb10-20020a17090b4a4a00b001dfa250e583mr621184pjb.172.1652896804684; Wed, 18 May 2022 11:00:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652896804; cv=none; d=google.com; s=arc-20160816; b=pyzZu3XkB6bbv4a4Viq4jmBtf3uKHrLHWIjAWWvdx7ZED+TDVtx53RNnzHOHDb5Gwh ZFzrSaHCga6MaIZ33vQW6uyxcElF42lx+TukKk+Spb5ODpxfXpFQJWpqAQj/g623mJ43 X7TOY9ra2Gre7M7+R+rg6Foq5HVRZ0/izqXCmupJw8q3MQFkVaqpZHYWY/O++vwJXT89 pyrZ0W5zN/7LSV4K0JAxus2CBTYX/4cphbPPOz8ogAYSp8QclZNqS+KFIWLYZ2TAT5GC Xyz7Dgq1x/g7mo7J4c8drAE1EJimccKsPPRJA8Tj/JNUMq+JLzMmbCIqoiMTPSH1wM8m kyGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=UVJXAKA7VBhK+EcjKRR7FWyndn69CCDS4Mjg0hgrlVc=; b=gp9W4WV3rjodJNqzUQcoj7oMFwQnyFxuaJ4F9IYZQ9vGPh5EU2GoWHlfT0aicH7+ji wtDRPsJLIJCRSFvJMzl1i2yE+tDzFkngYT0QA+dYxO6Tcf9rSxtGKbwDbW6b5kHCsifE vc+BAJAQ8MuXi3/Qu/aZJPutY0JsMxGWabVIXtIPUle8meAKyBeDrrCDCd0EMAhCl4/r 413rGWU+5fz5m/3BYB4B+Y0+Rlt759uXtPOQI0tL7zVWymNuhAVSyAzIyjSYd0MLPTMm uu0CyqifL5mb5zidTSmGGfBTxz+uMsfozw8he+Cajn9n0WRv7jvGJdz0vaTUsmDwnh2q oo7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZqmcwOBn; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id w2-20020a056a0014c200b0050ad51e0abbsi4193696pfu.70.2022.05.18.11.00.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 11:00:03 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZqmcwOBn; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E3B952DD48; Wed, 18 May 2022 10:56:11 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241196AbiERRzx (ORCPT + 99 others); Wed, 18 May 2022 13:55:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241173AbiERRzv (ORCPT ); Wed, 18 May 2022 13:55:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABB79B16 for ; Wed, 18 May 2022 10:55:50 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 324A66181A for ; Wed, 18 May 2022 17:55:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8AB88C385A5; Wed, 18 May 2022 17:55:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652896549; bh=HBYXEZNCYGiDeETVCOvO+Gk69oq/4MZUE9rOXOS97fk=; h=From:To:Cc:Subject:Date:From; b=ZqmcwOBnYweBt/zdVLG+N3QXD/Fj4An0JfumB8lIO7aj4FlQyywbVfZrAngMtHLsH 4nI50PPFXnxPGqmcKBYOJ7aM9nUuYSmAh4Arq3cq+JzNOJ0qxf7oJWKS9v6d7fcRm3 WzB/Pqy6AmNOKUUMigcWrh5wGehwNKzF7o3+XD+jGswLhWbOcJXby/HIGybirIHdtQ 5Bvu+QsFWqCZuuHXmOab137O1yJwXLY+PhJCwrsUXeoQ0WlXjwewdNYesXbfLnuEVN yKn8/969Md7M3Ew45hAfKvZXkgiod+9DofJ9ANyHVPjhpjoJmrtTjkb3zhuffxfVZr qq3ywZcGNKHoQ== From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim Subject: [PATCH] f2fs: decompress data without workqueue Date: Wed, 18 May 2022 10:55:47 -0700 Message-Id: <20220518175547.3284875-1-jaegeuk@kernel.org> X-Mailer: git-send-email 2.36.1.124.g0e6072fb45-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Let's decompress data under the same context to avoid workqueue delay. Signed-off-by: Jaegeuk Kim --- fs/f2fs/data.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 54a7a8ad994d..37aa7ac5d463 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -285,10 +285,12 @@ static void f2fs_read_end_io(struct bio *bio) return; } - if (ctx && (ctx->enabled_steps & (STEP_DECRYPT | STEP_DECOMPRESS))) { + if (ctx && (ctx->enabled_steps & STEP_DECRYPT)) { INIT_WORK(&ctx->work, f2fs_post_read_work); queue_work(ctx->sbi->post_read_wq, &ctx->work); } else { + if (ctx && (ctx->enabled_steps & STEP_DECOMPRESS)) + f2fs_handle_step_decompress(ctx); f2fs_verify_and_finish_bio(bio); } } -- 2.36.1.124.g0e6072fb45-goog