Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp107110iob; Tue, 17 May 2022 20:24:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxp8MylOjmWbBVbcnsg9QCD4k3buazS+iniS8A4i2TKD46XcL9BY+PBWcAB685Nc7qIx5YK X-Received: by 2002:a17:90a:b001:b0:1dd:30b9:1a45 with SMTP id x1-20020a17090ab00100b001dd30b91a45mr40116339pjq.132.1652844285053; Tue, 17 May 2022 20:24:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652844285; cv=none; d=google.com; s=arc-20160816; b=lon5grVfE/XbhQfTPmCuUOWLl553Pdk6HhWCcVaP5FZ13+kK24QBqeisAOut7Ny3AP P1RKtc2OsJnAwe15nAae/t8byyqCSonHlI/Phuh1eT7JvXfiNG4urF8XJJOiEp4SN3x1 TuVlDJw1oyG5Z7v9O3/Gh070TYfWiNlC4hCNvK6AId6ccwUA3oUtIOFLqVK3U3ytrIHK 8hSOTyl7zDB/bE4LoUMDOvLOOLhmZ49zZH6qKmsfM1t4Hr3DZh78pJ/EmMPRlLBIBISm F79T2ahEhJCNNlw0LS970niP1FwU86sKpjZruG4ZJaFC9RHUHb9CrriMSHGkRYKZdv1f sBbQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5RbQ3j9RMbZ/D6MAR7ISAUvOQDvpOlhf1s/Zk6REvQs=; b=OrbNGw5Bhn2ofCazfutlWYZJqjbUOY4bhGjz7NmUFFBA5tefzh0NAWqYwxhlVaL1ZL U3L4G6PqnBIlPzsRL4+ttL867GCnsrRJt1QuTEMiysLewK8BzPE2cSrwfqGWs3CKfnx7 ewRmoKQWqxIkjvmCy2OKg/JFBtfo3rQu69WYNbgXqehot92pB6EBRx5hb/Cuw1riqNmJ pZ0kmDluXXpD4wQyU7dn7VbqyBIGXjvPTBfM31CH+3SE1nAhBbxAD0VJLJnIQL20mvIu rtX0tYAOWBLlmqq7l8M9WDm6wYOK/bkZ0NMEj3Brbv9EzVETxjJgWsyHlVkMpkdnDMoq WtpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cERWjiKZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id oo14-20020a17090b1c8e00b001df7c16087asi1335943pjb.111.2022.05.17.20.24.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 20:24:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cERWjiKZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C6380205DD; Tue, 17 May 2022 20:21:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243503AbiEQI2d (ORCPT + 99 others); Tue, 17 May 2022 04:28:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243051AbiEQI2B (ORCPT ); Tue, 17 May 2022 04:28:01 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE0E634659 for ; Tue, 17 May 2022 01:27:44 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id x143so172377pfc.11 for ; Tue, 17 May 2022 01:27:44 -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=5RbQ3j9RMbZ/D6MAR7ISAUvOQDvpOlhf1s/Zk6REvQs=; b=cERWjiKZfw6WI/Su4knl08OFpy0v1f15tlBLnsXgpC5PzSp8bOebBCMkUcd5OCB9UD lIxv/+8BEnS2GfuwK7MqUOVhkyw9+22ami2fNlkkuviZhGeIVFudl94jcGgPWlxFoBv4 HyTm/0jPE9VJ4tQ9d/oDOTxiG0k05DenlMHTA= 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=5RbQ3j9RMbZ/D6MAR7ISAUvOQDvpOlhf1s/Zk6REvQs=; b=uRqNRAaw+8XMu5nA/f5rX+Tmh725IpHGH4lmF6VUEMEYgB/CPJqZwQziwQlrYjehN3 Rvm//L+r5v+1SWU7DScN+/iRAP+LnA2KiFanQLhllG3YuyWU2MxxLa62SleX3x2+WcAD y8+b5y5Kt5BmBX3jIP8v4e9Pgxl1nVyuG3ShRdoritv17AxSYk7TTwHbG9r3tlPr9ztb +qt5TnLZXhiqIN3i/ojn73HugwF1BSjbHSltst9k/N1YCHevIEM5DmXmrHcJqpCURsiU 0IC7OA16oLMNk+H4ovyBa9wbe6OKQbuLnXCmjHOLwU/ROuDIBGq99BjdZfAS4sy/IUe1 AuKg== X-Gm-Message-State: AOAM530ETrvz7dB/6cWbdpsvHAuTfsT2NKi/SCyipAOXYST2KmaqIkHw gDYaaHQ9ODCvy77Ep28YvOEHeg== X-Received: by 2002:a05:6a00:164c:b0:50a:472a:6b0a with SMTP id m12-20020a056a00164c00b0050a472a6b0amr21308254pfc.77.1652776064207; Tue, 17 May 2022 01:27:44 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:beb2:ec58:2159:9a33]) by smtp.gmail.com with ESMTPSA id k9-20020a628409000000b0050dc76281d3sm8615083pfd.173.2022.05.17.01.27.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 01:27:43 -0700 (PDT) From: Hsin-Yi Wang To: Phillip Lougher , Matthew Wilcox , Xiongwei Song Cc: Zheng Liang , Zhang Yi , Hou Tao , Miao Xie , Andrew Morton , "linux-mm @ kvack . org" , "squashfs-devel @ lists . sourceforge . net" , linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] Revert "squashfs: provide backing_dev_info in order to disable read-ahead" Date: Tue, 17 May 2022 16:26:50 +0800 Message-Id: <20220517082650.2005840-2-hsinyi@chromium.org> X-Mailer: git-send-email 2.36.0.550.gb090851708-goog In-Reply-To: <20220517082650.2005840-1-hsinyi@chromium.org> References: <20220517082650.2005840-1-hsinyi@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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"); -- 2.36.0.550.gb090851708-goog