From patchwork Mon Jun 6 15:03:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 12870502 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7009DCCA473 for ; Mon, 6 Jun 2022 15:03:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EAB4D8D0001; Mon, 6 Jun 2022 11:03:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E365B6B0074; Mon, 6 Jun 2022 11:03:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D1FC08D0001; Mon, 6 Jun 2022 11:03:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id C4A876B0073 for ; Mon, 6 Jun 2022 11:03:15 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 9B3D21207E5 for ; Mon, 6 Jun 2022 15:03:15 +0000 (UTC) X-FDA: 79548129150.10.3F6C2AD Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by imf26.hostedemail.com (Postfix) with ESMTP id 5324614005D for ; Mon, 6 Jun 2022 15:03:10 +0000 (UTC) Received: by mail-pj1-f52.google.com with SMTP id gd1so13044906pjb.2 for ; Mon, 06 Jun 2022 08:03:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wfh9GMNAtQ8X7OUdTqnBOAOW/iUKoStIjgn9vMh3x8A=; b=LaLT54OgNexxdzg/yLo+8HWrcnL5T3ORpjIOiHtIXU2JyIhOTdsGH+E15HjVrNeXQd /tSuP/hsZnGDYXMxqh3LOfmj2UIsf+95G6/X4WIBAAXMU4Oqy0mJzzinjNrg1YiDVsxp mJzADlX1yQqXsd9ypgmarYUEXLEkXxxB47+u0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wfh9GMNAtQ8X7OUdTqnBOAOW/iUKoStIjgn9vMh3x8A=; b=jBslK0ss3WIvH1OwlKJzxhwG0JovlfxQSMmSl8mBDAjS2jak9AT31Arz5tiyn92mnE SlWq0OfDsiKYZmJdlmQtULRH1wzeYOWTwAhdQkqjWzc0fXFIAUNg4+TJcwiYmKfWMVyu eBgjP9XBE1dkUnYtg8yKgHZeJ1JMvDcF7/+MFjYVzP27Ph/FW6BZe6pa6aWJ3GDmHILq JUNadSlLlI8zkhZ0Ewl7A8rqmH7NigpPTP+sUIIatDjRH0Qyk3LfTbtnqPRYFTPB97ks 5/OAC3iPMWnywDr4NnNF4rHATqoLV7YYDqSFn80/1jrCOivtl2NO3EhYLyuU5KUcN+vi OWNA== X-Gm-Message-State: AOAM531UAu8hDufvIL/5Vfj9ql2tS04tXghb10OUzFga2oOt/cw8QzLb JQ4xfN+yG/YVsT7DRdrJNr5ZFA== X-Google-Smtp-Source: ABdhPJxdTTxiaTKy/Feszuj1SsDP1FIjhPd7kiMqbWGTUZqv/v0u2v6oRGzVVWwnaSvf/uwM6Y6RRg== X-Received: by 2002:a17:902:cec8:b0:163:e4c1:b302 with SMTP id d8-20020a170902cec800b00163e4c1b302mr24732302plg.123.1654527794024; Mon, 06 Jun 2022 08:03:14 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:a0a:5e4:e24:c8c4]) by smtp.gmail.com with ESMTPSA id k13-20020aa7998d000000b0050dc76281ecsm7468864pfh.198.2022.06.06.08.03.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 08:03:13 -0700 (PDT) From: Hsin-Yi Wang To: Phillip Lougher , Matthew Wilcox , Xiongwei Song , Marek Szyprowski , Andrew Morton Cc: Zheng Liang , Zhang Yi , Hou Tao , Miao Xie , "linux-mm @ kvack . org" , "squashfs-devel @ lists . sourceforge . net" , linux-kernel@vger.kernel.org Subject: [PATCH v5 1/3] Revert "squashfs: provide backing_dev_info in order to disable read-ahead" Date: Mon, 6 Jun 2022 23:03:03 +0800 Message-Id: <20220606150305.1883410-2-hsinyi@chromium.org> X-Mailer: git-send-email 2.36.1.255.ge46751e96f-goog In-Reply-To: <20220606150305.1883410-1-hsinyi@chromium.org> References: <20220606150305.1883410-1-hsinyi@chromium.org> MIME-Version: 1.0 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 5324614005D Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=LaLT54Og; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf26.hostedemail.com: domain of hsinyi@chromium.org designates 209.85.216.52 as permitted sender) smtp.mailfrom=hsinyi@chromium.org X-Stat-Signature: 18qi9weh6xdxc9qtkj5b89i7apk67ta9 X-Rspam-User: X-HE-Tag: 1654527790-963394 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This reverts commit 9eec1d897139e5de287af5d559a02b811b844d82. Revert closing the readahead to squashfs since the readahead callback for squashfs is implemented. Suggested-by: Xiongwei Song Signed-off-by: Hsin-Yi Wang --- fs/squashfs/super.c | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/fs/squashfs/super.c b/fs/squashfs/super.c index 6d594ba2ed28..32565dafa7f3 100644 --- a/fs/squashfs/super.c +++ b/fs/squashfs/super.c @@ -29,7 +29,6 @@ #include #include #include -#include #include "squashfs_fs.h" #include "squashfs_fs_sb.h" @@ -113,24 +112,6 @@ static const struct squashfs_decompressor *supported_squashfs_filesystem( return decompressor; } -static int squashfs_bdi_init(struct super_block *sb) -{ - int err; - unsigned int major = MAJOR(sb->s_dev); - unsigned int minor = MINOR(sb->s_dev); - - bdi_put(sb->s_bdi); - sb->s_bdi = &noop_backing_dev_info; - - err = super_setup_bdi_name(sb, "squashfs_%u_%u", major, minor); - if (err) - return err; - - sb->s_bdi->ra_pages = 0; - sb->s_bdi->io_pages = 0; - - return 0; -} static int squashfs_fill_super(struct super_block *sb, struct fs_context *fc) { @@ -146,20 +127,6 @@ static int squashfs_fill_super(struct super_block *sb, struct fs_context *fc) TRACE("Entered squashfs_fill_superblock\n"); - /* - * squashfs provides 'backing_dev_info' in order to disable read-ahead. For - * squashfs, I/O is not deferred, it is done immediately in read_folio, - * which means the user would always have to wait their own I/O. So the effect - * of readahead is very weak for squashfs. squashfs_bdi_init will set - * sb->s_bdi->ra_pages and sb->s_bdi->io_pages to 0 and close readahead for - * squashfs. - */ - err = squashfs_bdi_init(sb); - if (err) { - errorf(fc, "squashfs init bdi failed"); - return err; - } - sb->s_fs_info = kzalloc(sizeof(*msblk), GFP_KERNEL); if (sb->s_fs_info == NULL) { ERROR("Failed to allocate squashfs_sb_info\n");