Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4109049rdb; Mon, 11 Dec 2023 09:04:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHthXQqilRdtC11bmobLdfdQvJJg8xZvCSKRKYUKA0UGoYkhzWQ+MtWXkRCqZkeeH2Z9LLM X-Received: by 2002:a17:90b:a14:b0:286:9464:1bcd with SMTP id gg20-20020a17090b0a1400b0028694641bcdmr2111718pjb.43.1702314262976; Mon, 11 Dec 2023 09:04:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702314262; cv=none; d=google.com; s=arc-20160816; b=loh/jzb9SLYrh0a45YTSpOPdv+9oknf8VnDje2/oZKej20Spj5XnCtgTe3ki8Ow1DJ rgyt1rIlIhS1JXnwLcrmPzdjYl97yJnsNbd+OwVALNZt9HCNroX+G9PeLg77+n59EFNZ oCnz+ltK8G12l0H/09d9Uxk/21/kYBJdZ0qKTAhirW9Wsff58C9dJRxcDa6k3fY/5WOn AOkRcZDldxI4dHDTqIU7jybeUESIV3kKSRPYzTOYaKJxeFG+tnQ6FEojbP+n8AiBEry+ 4Bd9a3kSyb0U+EWLq4UVhZ+OfTH083lTH/49x7u/COyHkXnYs9yhOTsSnVfyzruJt6WK msjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature:dkim-signature:dkim-signature; bh=CD7iaV6cc3gb69jV7WBGvgMN69Ui+vx3V8xrfnjKK80=; fh=MeUUOj2j+iy27Ff8NnB29oTRl/j/84R5JYZt8JRFf0g=; b=oTLcIrq0MGdgySxmSBFy/jaxY1r5KSlwTgpr+snn84SnS+f6t7OZtbEuf4pddDqyou Q7GoHsrvEHp123HekjxLWuHukwCci8VTskema96CZG3hhYqOZiGZWc+vGjJlM8F6PrZY Eeiw4VjHxi+1mwnk8wHFjepqEChBUBVtaAphtobb41vtsPY2IMGaj5IW0zvwf7KkUWQM jcViWooDWXLrcvB4+oyaPpUmb7EdaLn5pR2hsMNivonGQTx8U+lRIy+X6SNL+DQbb44U eVty2G6dKOVSLnxHWf8QjAbxjIAJyvNaycfcnEjYqxcEiQ5UX6twB2WYrbuY6v8lmvZN t6Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=QHrRQzZF; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b="L0Pt7Vp/"; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=QHrRQzZF; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b="L0Pt7Vp/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id y22-20020a17090aa41600b00286fb295e71si7546403pjp.21.2023.12.11.09.04.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 09:04:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=QHrRQzZF; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b="L0Pt7Vp/"; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=QHrRQzZF; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b="L0Pt7Vp/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 21134803BECD; Mon, 11 Dec 2023 09:04:13 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343918AbjLKREA (ORCPT + 99 others); Mon, 11 Dec 2023 12:04:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229618AbjLKRD7 (ORCPT ); Mon, 11 Dec 2023 12:03:59 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9874A8E; Mon, 11 Dec 2023 09:04:05 -0800 (PST) Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id F0256221F7; Mon, 11 Dec 2023 17:04:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1702314244; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CD7iaV6cc3gb69jV7WBGvgMN69Ui+vx3V8xrfnjKK80=; b=QHrRQzZFHyCixSljPWLi9c+a8RDuVkjSNmKyh5JEg4Ol5KuJFqz2DG3MONDYikzoAuxHT+ Nixxgu1ZhvM1mgEIxET6Zv8fO51VjH6Ng7bEadOtaVlTxUlICpc64StQ+cv2lvDUg0ZNn9 cxdy6tF4LjQOzYcYE4zUVsKnyld80o8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1702314244; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CD7iaV6cc3gb69jV7WBGvgMN69Ui+vx3V8xrfnjKK80=; b=L0Pt7Vp/szVN+ANcrxugX88Vb1aU+aWLGiA4jCuuIVtTB8I0bAGu3MfcVIy3ILQLdMK15b 9O6hLlKY6jyHGuCA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1702314244; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CD7iaV6cc3gb69jV7WBGvgMN69Ui+vx3V8xrfnjKK80=; b=QHrRQzZFHyCixSljPWLi9c+a8RDuVkjSNmKyh5JEg4Ol5KuJFqz2DG3MONDYikzoAuxHT+ Nixxgu1ZhvM1mgEIxET6Zv8fO51VjH6Ng7bEadOtaVlTxUlICpc64StQ+cv2lvDUg0ZNn9 cxdy6tF4LjQOzYcYE4zUVsKnyld80o8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1702314244; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CD7iaV6cc3gb69jV7WBGvgMN69Ui+vx3V8xrfnjKK80=; b=L0Pt7Vp/szVN+ANcrxugX88Vb1aU+aWLGiA4jCuuIVtTB8I0bAGu3MfcVIy3ILQLdMK15b 9O6hLlKY6jyHGuCA== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id DDDE7134B0; Mon, 11 Dec 2023 17:04:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id oQUlNgNBd2USGAAAn2gu4w (envelope-from ); Mon, 11 Dec 2023 17:04:03 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 8755AA07E3; Mon, 11 Dec 2023 18:04:03 +0100 (CET) Date: Mon, 11 Dec 2023 18:04:03 +0100 From: Jan Kara To: Yu Kuai Cc: axboe@kernel.dk, roger.pau@citrix.com, colyli@suse.de, kent.overstreet@gmail.com, joern@lazybastard.org, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, sth@linux.ibm.com, hoeppner@linux.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, jejb@linux.ibm.com, martin.petersen@oracle.com, clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, viro@zeniv.linux.org.uk, brauner@kernel.org, nico@fluxnic.net, xiang@kernel.org, chao@kernel.org, tytso@mit.edu, adilger.kernel@dilger.ca, agruenba@redhat.com, jack@suse.com, konishi.ryusuke@gmail.com, willy@infradead.org, akpm@linux-foundation.org, p.raghav@samsung.com, hare@suse.de, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, linux-bcache@vger.kernel.org, linux-mtd@lists.infradead.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, linux-bcachefs@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, gfs2@lists.linux.dev, linux-nilfs@vger.kernel.org, yukuai3@huawei.com, yi.zhang@huawei.com, yangerkun@huawei.com Subject: Re: [PATCH RFC v2 for-6.8/block 17/18] ext4: remove block_device_ejected() Message-ID: <20231211170403.biwgd7l7pud7s7ip@quack3> References: <20231211140552.973290-1-yukuai1@huaweicloud.com> <20231211140833.975935-1-yukuai1@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231211140833.975935-1-yukuai1@huaweicloud.com> X-Spam-Score: 15.90 X-Spamd-Result: default: False [18.87 / 50.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_SOFTFAIL(4.60)[~all]; R_RATELIMIT(0.00)[to_ip_from(RLa8hd5fybgmzcyr9mhbq8ey7y)]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[suse.cz:+]; MX_GOOD(-0.01)[]; RCPT_COUNT_GT_50(0.00)[50]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; BAYES_HAM(-0.00)[35.38%]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; SPAM_FLAG(5.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(1.20)[suse.cz]; NEURAL_SPAM_SHORT(2.88)[0.961]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_SPAM_LONG(3.50)[1.000]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email,huawei.com:email,suse.cz:dkim,suse.cz:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_CC(0.00)[kernel.dk,citrix.com,suse.de,gmail.com,lazybastard.org,bootlin.com,nod.at,ti.com,linux.ibm.com,oracle.com,fb.com,toxicpanda.com,suse.com,zeniv.linux.org.uk,kernel.org,fluxnic.net,mit.edu,dilger.ca,redhat.com,infradead.org,linux-foundation.org,samsung.com,vger.kernel.org,lists.xenproject.org,lists.infradead.org,lists.ozlabs.org,lists.linux.dev,huawei.com]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:98:from] X-Spamd-Bar: ++++++++++++++++++ X-Rspamd-Server: rspamd1 X-Rspamd-Queue-Id: F0256221F7 X-Spam-Score: 18.87 Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=QHrRQzZF; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b="L0Pt7Vp/"; spf=softfail (smtp-out1.suse.de: 2a07:de40:b281:104:10:150:64:98 is neither permitted nor denied by domain of jack@suse.cz) smtp.mailfrom=jack@suse.cz; dmarc=none X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,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 morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 11 Dec 2023 09:04:13 -0800 (PST) On Mon 11-12-23 22:08:33, Yu Kuai wrote: > From: Yu Kuai > > block_device_ejected() is added by commit bdfe0cbd746a ("Revert > "ext4: remove block_device_ejected"") in 2015. At that time 'bdi->wb' > is destroyed synchronized from del_gendisk(), hence if ext4 is still > mounted, and then mark_buffer_dirty() will reference destroyed 'wb'. > However, such problem doesn't exist anymore: > > - commit d03f6cdc1fc4 ("block: Dynamically allocate and refcount > backing_dev_info") switch bdi to use refcounting; > - commit 13eec2363ef0 ("fs: Get proper reference for s_bdi"), will grab > additional reference of bdi while mounting, so that 'bdi->wb' will not > be destroyed until generic_shutdown_super(). > > Hence remove this dead function block_device_ejected(). > > Signed-off-by: Yu Kuai Agreed, this should not be needed anymore. We'll see whether this is true also in practice :). Feel free to add: Reviewed-by: Jan Kara Honza -- Jan Kara SUSE Labs, CR