Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2053521lqo; Mon, 13 May 2024 06:44:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXS4fOfZF9wrrEhhl+JnRHUn3GxJEdU8llAFJWZJ4HN1DIGC3cY25wV+CCoTGhr8Lb1U/QzghY83boFYC4Li9f750113V3/4EyMCUHJ1g== X-Google-Smtp-Source: AGHT+IHb5UjKS9TfRUj3XTLJdv7ITSf0/2nYVh/QUNMbdPAK+He6yoelgbTTdLptaNf777Mx3l+x X-Received: by 2002:a17:906:30c7:b0:a59:a431:a8ce with SMTP id a640c23a62f3a-a5a2d55a7c3mr693622966b.2.1715607881861; Mon, 13 May 2024 06:44:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715607881; cv=pass; d=google.com; s=arc-20160816; b=o0+4lSwYv7aEBjgjerkd1Lnj4kI6xaVXrKrH44cF/EsQHwU1m2+aXdBE3/xd6/5cBi sCk563Rei8osqBBJeNUB7eAlWv3Z4BVi/+PxC6fII7+H+L1dIn3asUyknaXmnAdtrtJV Jx0+rsFi7s9OmCRkO9F7BfWMDH55+6Gcu9Q9o/2ARPfMlGZqVsXnkIdpqA0uiTWTgiT0 XEYIj6MXV8iD0wKr93RvupLmqm8V9yP1kKymz3BQXFrLWJz9jFIkeaQLrUCTWweud3nd 0fgzi/VcDjTIM+QtXdxFlAJcqv/TENnTlJ0wAtQ5LfPp6zQuiBi3J3VfMjNtxWqxtH7l ohxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=ZTbT2D0BxWrI6ugnXsYApYO0mCuLz8/GBZsyHz5AITg=; fh=Yf8KxdvJj8sY/Bpxw4ThLi2J4FGkot3tSZ5JKsahmyk=; b=uW3TXjOGtmMAfvL7jaf6iEL++Hu+RFr5JyLEQ2azzFcLqej9490jWF5zAjDcSWF3AK DYfY5vLJMeix3dniVlcLmLGFtau2Zht/iEHsbW0YN9DMIanV8D3T5aw8uXpY4jOnmZxQ 64WV4X3WlRqXER5sEOQhh+fgh9OQ90rUQ+UChq/rukG4HOV3jQ9Mf1BnAdBkxNF7+m0p 9PwG51qN0uF9lX19mHfPJVg/McwmhTjVT9Y+W/dOSQnb1t9+WaZ7aURjOvWtWrGiZ56l KdaRAzU8rA0vZjvFOm/0amzxDgbAacPyicIlZg+34dbSEBdWi4/pE043r5IO0jUWizut aodQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=LywpPHr8; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=LywpPHr8; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-177643-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177643-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17be8ac0si499205766b.805.2024.05.13.06.44.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 06:44:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177643-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=LywpPHr8; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=LywpPHr8; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-177643-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177643-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 63E031F215C9 for ; Mon, 13 May 2024 13:44:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 85865156668; Mon, 13 May 2024 13:41:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="LywpPHr8"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="fQu2vBiS"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="LywpPHr8"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="fQu2vBiS" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 54D06153BFB; Mon, 13 May 2024 13:41:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715607701; cv=none; b=X5LO8LLI47ZNrSA2mQop7IhqKdt99ddPbi/S64K6GPIlEQGIpi8cXlMdBzhc0ULehYCCo344E4i/Tag3MIXQdJVScrY4DLsNg5LVoqK6OxpigHVBzT6/C/eEIL1yUuKANBCKDo9TY8F8Xk6fDNQ75JydUJMbvpcmECkQE8JW1Wg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715607701; c=relaxed/simple; bh=i2MZywAms1251QhXPG9roroqj1uofnRXMJPm9D0qYJE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CuoQ2jzOgzxOsKIgMDt+R97994I17yOsuwBKKAQp5nJoTnSW8vfQPWstRoZ5T/CgmAPNOCUFQ18jbsWRFaP/AE2IetLQfVA6jhD7e6vcwUuZb9jsnZyfRW3kFGRMrfXBfGsoUDCWIH5OLo2gGzUDkdrPbCGfQ3xDxhQYVpM+F7o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=LywpPHr8; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=fQu2vBiS; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=LywpPHr8; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=fQu2vBiS; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (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 30F0B34A56; Mon, 13 May 2024 13:41:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1715607697; 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=ZTbT2D0BxWrI6ugnXsYApYO0mCuLz8/GBZsyHz5AITg=; b=LywpPHr8MVZhU4t3Ayr5PDKQI435hHFCtQzwUwTrKk8AIzXsSpGo08Y6LP/axk8o8cLmpu jBpWM0wZBaIo96htK5cC6Etr6ed0BNCMoaE3GUs3UEqT7gatT+qRdUkgZG4hLKZM/GU1h4 1P6DqhflqHO99HGluMiqx8eyxMTYyRA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1715607697; 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=ZTbT2D0BxWrI6ugnXsYApYO0mCuLz8/GBZsyHz5AITg=; b=fQu2vBiSErwfn3bav/a1iPyp7s2eqa4ycdnLCBRJDGP/AU3Mwtn+GIUbHVecLb670nr3z4 bX0RK6/qv8lZ+bDw== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=LywpPHr8; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=fQu2vBiS DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1715607697; 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=ZTbT2D0BxWrI6ugnXsYApYO0mCuLz8/GBZsyHz5AITg=; b=LywpPHr8MVZhU4t3Ayr5PDKQI435hHFCtQzwUwTrKk8AIzXsSpGo08Y6LP/axk8o8cLmpu jBpWM0wZBaIo96htK5cC6Etr6ed0BNCMoaE3GUs3UEqT7gatT+qRdUkgZG4hLKZM/GU1h4 1P6DqhflqHO99HGluMiqx8eyxMTYyRA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1715607697; 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=ZTbT2D0BxWrI6ugnXsYApYO0mCuLz8/GBZsyHz5AITg=; b=fQu2vBiSErwfn3bav/a1iPyp7s2eqa4ycdnLCBRJDGP/AU3Mwtn+GIUbHVecLb670nr3z4 bX0RK6/qv8lZ+bDw== Received: from imap1.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 imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 02B6113A5F; Mon, 13 May 2024 13:41:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id uEKkAJEYQmaRDwAAD6G6ig (envelope-from ); Mon, 13 May 2024 13:41:37 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id F3660A08E6; Sun, 12 May 2024 13:24:27 +0200 (CEST) Date: Sun, 12 May 2024 13:24:27 +0200 From: Jan Kara To: Kemeng Shi Cc: tytso@mit.edu, jack@suse.com, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 8/9] jbd2: remove dead check of JBD2_UNMOUNT in kjournald2 Message-ID: <20240512112427.zo5jmjxovts5ekdu@quack3> References: <20240506141801.1165315-1-shikemeng@huaweicloud.com> <20240506141801.1165315-9-shikemeng@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240506141801.1165315-9-shikemeng@huaweicloud.com> X-Spam-Flag: NO X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Rspamd-Queue-Id: 30F0B34A56 X-Spam-Level: X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; DATE_IN_PAST(1.00)[26]; MID_RHS_NOT_FQDN(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; MISSING_XM_UA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_COUNT_THREE(0.00)[3]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.cz:dkim,suse.cz:email,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.com:email]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.cz:+] On Mon 06-05-24 22:18:00, Kemeng Shi wrote: > We always set JBD2_UNMOUNT with j_state_lock held in journal_kill_thread. > In kjournald2, we check JBD2_UNMOUNT flag two times under the same > j_state_lock. Then the second check is unnecessary. > Also see comment in struct journal_s about lock rule of j_flags. > > Signed-off-by: Kemeng Shi Looks good. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/jbd2/journal.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c > index e8f592fbd6e1..ce9004f40ffb 100644 > --- a/fs/jbd2/journal.c > +++ b/fs/jbd2/journal.c > @@ -228,8 +228,6 @@ static int kjournald2(void *arg) > if (transaction && time_after_eq(jiffies, > transaction->t_expires)) > should_sleep = 0; > - if (journal->j_flags & JBD2_UNMOUNT) > - should_sleep = 0; > if (should_sleep) { > write_unlock(&journal->j_state_lock); > schedule(); > -- > 2.30.0 > -- Jan Kara SUSE Labs, CR