Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp118179iob; Tue, 17 May 2022 20:50:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5z/rUjEfzUypmLapjjBYM9qtFisp583jGhibQiKI12wwkIypxsPeOz6r38Cbgby1xZYhw X-Received: by 2002:a63:df0f:0:b0:3db:2d4:ded9 with SMTP id u15-20020a63df0f000000b003db02d4ded9mr22014591pgg.267.1652845800042; Tue, 17 May 2022 20:50:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652845800; cv=none; d=google.com; s=arc-20160816; b=hyctOZ8pCZutRO0Asl8IvbBiAW3z6K+5Cv3ssCVL3kHcIyZ1blarnLE9UGPko04S0k IyvJbODwp5Nnpcl0uxm6zE7YWEnZbZ8aU39GqJUasnt7kRFiIYabgNIHNg/XEoy8G/Dd ZMi8l++A7yWVnF+aBb+Ia8rdxDWrGLEA5YzVl0sIVUOKJPagbP8XSGaq1X1Mp0gx+Jqc MPPsoiAqkXNuOIeLEnxxkF/DzZdfMU+sYWKzwUpsgS2LCdXzOwkKR0E6ROKso4xD6ov2 Op+kg7aqxcWda9Mm4MXDQpUE3kH57STYklIA03B/N5eD/ev0iQlfKbirOYe46ugwwoS1 s2yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=VbT9MivaGcVQLFLyZe58CMZOydl8bMnPHecbxMnGlAA=; b=WEVW6prYti6EtpMWbwPieKzwCcgZQvNjf0WATmDo2FF/kzsw1c0smS8WopX0uOJO01 Qd2xQrIEsz3PDjZDrk0dodmzdqFPp27zJt5aPkbhegqATi1uGKqn/UmEVurMLLqu6h+l YW3Lk3gQ4pBc5YtDUmWEppDjJFfApeggkghCK05GOepiaNp8B41gP0XtxONaD2K6od2f cvjR+/Ezbl29XY/eQvuIVbvBk2ZZNHs9wedyWqRLeG72dnMeAut3mzqJiPskD0tpf/11 I0aSbF9iGNfJxvsUqkeZvLZoQ7x1t0UTNHNws1EuhCFoNQPWOA1TSJUd/BoLTyUizrhv NbgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=K926Xyre; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id nn2-20020a17090b38c200b001dc1a41038fsi1343116pjb.88.2022.05.17.20.49.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 20:50:00 -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=@gmail.com header.s=20210112 header.b=K926Xyre; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8EA398AE4D; Tue, 17 May 2022 20:32:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241075AbiEQJRB (ORCPT + 99 others); Tue, 17 May 2022 05:17:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244904AbiEQJQ0 (ORCPT ); Tue, 17 May 2022 05:16:26 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0B4E1EC5E for ; Tue, 17 May 2022 02:16:24 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id c14so16369063pfn.2 for ; Tue, 17 May 2022 02:16:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VbT9MivaGcVQLFLyZe58CMZOydl8bMnPHecbxMnGlAA=; b=K926XyreguR/4XEGI2/XdLSg8xqkk79XZxpz2krQ3cDJULT8zIyem67TELbGWBtmTg b05B8JjUy+SFZn96XQv2wbJdy6P1+68y3XmUl2REMzKOsiCerWpY4gxfkPaXYimAbdMw aPDfZjT5rKLnZhvekRWx46Led/eHS37TdbpQ+k2rA3u5jcJAA1qE4EjEdY61h/y1aGDJ HwKKYCRVUMiHvXIhC9uLV+1DSufpqUQKWO7jZmK8YgLeFAdxBOwUCCjPXoideDBIZwgv +DFJROmmKg7yUnB015J5PHMAo6BmnjJV06lEU25NzkLOxPGGWKOdzM+q3EK1WrqC3yTM NXyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VbT9MivaGcVQLFLyZe58CMZOydl8bMnPHecbxMnGlAA=; b=1GTFNaH0ZipH19BdIL9v3fks7Z2JjS2B4gYdGeteVcdEbToYDHz4OS6cws+kTZu4Br UHOxTKkVR3WdTVN20UbEN1cmfjJFIamF50gzFB26D4l3OEXbL12fxzme2dOOAKXYz1YJ kIxO6tiIaNyUa4qC1a1wLoI7n7l63Y8iTdtUZxZtHd4TcvJ23AiApYifERCCHpKJoecH +Vw/vWaAV/kCmw7VDf+eGttRNtiSwWiNEqj11+pc1SK/2MG8Jxmizziz6jrEZuvLBEjq o+UgU/f56yuoD3lWlZrvt4JpgwEEmA2VWk7OUVSK7kOtLgkMkAaQEbA6gftySBHuppbX qXKA== X-Gm-Message-State: AOAM533HurWjR7r/KI69ck6EGe/gIoClfEcDSYiHTMet7CSpzW/ifPoJ XcQsuv2q7yKLk2PYwEp//hftQyQixuU12DOP39Q= X-Received: by 2002:a63:4d4:0:b0:3c1:f13f:a9a1 with SMTP id 203-20020a6304d4000000b003c1f13fa9a1mr18365793pge.398.1652778984401; Tue, 17 May 2022 02:16:24 -0700 (PDT) MIME-Version: 1.0 References: <20220517082650.2005840-1-hsinyi@chromium.org> <20220517082650.2005840-2-hsinyi@chromium.org> In-Reply-To: <20220517082650.2005840-2-hsinyi@chromium.org> From: Xiongwei Song Date: Tue, 17 May 2022 17:15:58 +0800 Message-ID: Subject: Re: [PATCH v2 1/3] Revert "squashfs: provide backing_dev_info in order to disable read-ahead" To: Hsin-Yi Wang Cc: Phillip Lougher , Matthew Wilcox , Xiongwei Song , Zheng Liang , Zhang Yi , Hou Tao , Miao Xie , Andrew Morton , "linux-mm @ kvack . org" , "squashfs-devel @ lists . sourceforge . net" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 On Tue, May 17, 2022 at 4:27 PM Hsin-Yi Wang wrote: > > This reverts commit 9eec1d897139e5de287af5d559a02b811b844d82. > > Revert closing the readahead to squashfs since the readahead callback > for squashfs is implemented. > > Suggested-by: Xiongwei Song I'd like to use "xiongwei.song@windriver.com" in my tag. > 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 > >