Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1199291rdb; Fri, 20 Oct 2023 11:06:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHPyWeULirZRjgKSHyFKXq1o6aZlLcySviU9Bvn4GohoYls2E/qR5bHU8sjqcg3BXImOuij X-Received: by 2002:a05:6a00:812:b0:6b5:6c95:4671 with SMTP id m18-20020a056a00081200b006b56c954671mr2766549pfk.34.1697825202616; Fri, 20 Oct 2023 11:06:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697825202; cv=none; d=google.com; s=arc-20160816; b=uksgIK33iQ0GgsiaBUuZ8hTBK8lelNLi+p5JEHm48Sn228CQDQFPlJYQBlCsuy0Rnt gO9TQBF6Q5dFnumzavCZxZ8XHXHbrAU/QOCMXvF19GiAic5oJq2kZC2btagEdFhXCsDF FY5lYPO24sQF/2gCiKEbt2eA4TIw2Dwpb+y3wpFReSF5yXDlRBfUTDRwLdq4vPjORoQi nGt5/WgKGUxsCGDeAtokmFYm1EGhKz1yBs9BHr1gtD7UHDVsnsWNFgBlxPh82aCCXTCq y2n0SVxiWJQd9q+usx1EX14B0Kv7CstG/1or9ogYUVmC1YU8Qh03KJreveMi2Ib67E+8 MfCQ== 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; bh=aowhsEu2l584lFcY1TW9THGxlynzZUr74z2MacAQwjM=; fh=T98ayw5Klvt6P+SpjNxw+X9qnHLkB9rLJT2T4+Bpcuc=; b=awow253u2TmDG6WBIHVnpRD5Hdm6iqtZa6Jj3TuXjlFOz9uagd5QkD4xqxGvIW7AoV 2aK0n+2E3439bmWVEjBE4n0if9YizsSmfg2Z+tpCFqvcNcXJcKof6o9EFEypcPRhTgax SNha7RxBijATAMVXLaLoKHCzfKfohaJaI8rESMtYjU2avH4kluR793DMfbZe957H31+T ovUrhxwT4ssbwVIFzD3JlzYIs86mcrQ2TPJOg9l0CerLIN+swaUVt5asD3x6oY6VdeeF IyWFm8pyedJsl1auTBZyojNok5l7Qtqe5aPOFR6ytG26RrNbBxVnmQ37xsnhUgmdDbbu o4SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=QcpjL6D1; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=ACaw4kwd; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id w3-20020aa79a03000000b006b0cfed2c77si2354852pfj.135.2023.10.20.11.06.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 11:06:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=QcpjL6D1; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=ACaw4kwd; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-ext4-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 CDF58803C5EC; Fri, 20 Oct 2023 11:05:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230087AbjJTSFy (ORCPT + 99 others); Fri, 20 Oct 2023 14:05:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230139AbjJTSFx (ORCPT ); Fri, 20 Oct 2023 14:05:53 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05528D51; Fri, 20 Oct 2023 11:05:49 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 440DB21921; Fri, 20 Oct 2023 18:05:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1697825148; 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=aowhsEu2l584lFcY1TW9THGxlynzZUr74z2MacAQwjM=; b=QcpjL6D1riTeqXlsFHcdC60bLjZhe9gK+MVRIE4AWIQ5PdAMEXoL5ISqHQafMO2m6RbdQn FVUSBCUrCnoWWApjdUAL6/FGXasDX0sXlauiUApPoTLM+QCijlEnmRYxlE+b+io9xR1WVV 0P1kzvUgq0JbfslYL5KPPBZJklPOMg8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1697825148; 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=aowhsEu2l584lFcY1TW9THGxlynzZUr74z2MacAQwjM=; b=ACaw4kwdxoaqPPI4QMMIXt4yqiBE0OubIfH6azzFQpZXOB1HtA5cxw5i8Qe6zq9oX2gxUO V0Gv4B4v1tMwqHDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 30D2B13584; Fri, 20 Oct 2023 18:05:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 9MrbC3zBMmUGMgAAMHmgww (envelope-from ); Fri, 20 Oct 2023 18:05:48 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 9E345A06E3; Fri, 20 Oct 2023 20:05:47 +0200 (CEST) Date: Fri, 20 Oct 2023 20:05:47 +0200 From: Jan Kara To: Andy Shevchenko Cc: Linus Torvalds , Josh Poimboeuf , Jan Kara , Nathan Chancellor , Nick Desaulniers , Kees Cook , Ferry Toth , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org Subject: Re: [GIT PULL] ext2, quota, and udf fixes for 6.6-rc1 Message-ID: <20231020180547.6r4qwlefs77uvdsv@quack3> References: <20231019164240.lhg5jotsh6vfuy67@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -6.60 X-Spamd-Result: default: False [-6.60 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-3.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_SEVEN(0.00)[10]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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-ext4@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Fri, 20 Oct 2023 11:05:57 -0700 (PDT) On Fri 20-10-23 17:51:59, Andy Shevchenko wrote: > On Thu, Oct 19, 2023 at 11:43:47AM -0700, Linus Torvalds wrote: > > On Thu, 19 Oct 2023 at 11:16, Andy Shevchenko > > wrote: > > > > > > Meanwhile a wild idea, can it be some git (automatic) conflict resolution that > > > makes that merge affect another (not related to the main contents of the merge) > > > files? Like upstream has one base, the merge has another which is older/newer > > > in the history? > > > > I already looked at any obvious case of that. > > > > The only quota-related issue on the other side is an obvious > > one-liner: commit 86be6b8bd834 ("quota: Check presence of quota > > operation structures instead of ->quota_read and ->quota_write > > callbacks"). > > > > It didn't affect the merge, because it was not related to any of the > > changes that came in from the quota branch (it was physically close to > > the change that used lockdep_assert_held_write() instead of a > > WARN_ON_ONCE(down_read_trylock()) sequence, but it is unrelated to > > it). > > > > I guess you could try reverting that one-liner after the merge, but I > > _really_ don't think it is at all relevant. > > > > What *would* probably be interesting is to start at the pre-merge > > state, and rebase the code that got merged in. And then bisect *that* > > series. > > > > IOW, with the merge that triggers your bisection being commit > > 1500e7e0726e, do perhaps something like this: > > > > # Name the states before the merge > > git branch pre-merge 1500e7e0726e^ > > git branch jan-state 1500e7e0726e^2 > > > > # Now double-check that this works for you, of course. > > # Just to be safe... > > git checkout pre-merge > > .. test-build and test-boot this with the bad config .. > > That's I have checked already [4], but okay, let me double check. > [5] is the same as [4] according to `git diff`. > > It boots. > > > # Then, let's create a new branch that is > > # the rebased version of Jan's state: > > git checkout -b jan-rebased jan-state > > git rebase pre-merge > > [6] is created. > > > # Verify that the tree is the same as the merge > > git diff 1500e7e0726e > > Yes, nothing in output. > > And it does not boot. > > > # Ok, that was empty, so do a bisect on this > > # rebased history > > git bisect start > > git bisect bad > > git bisect good pre-merge > > > > .. and see what commit it *now* claims is the bad commit. > > git bisect start > # status: waiting for both good and bad commits > # good: [63580f669d7ff5aa5a1fa2e3994114770a491722] Merge tag 'ovl-update-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs > git bisect good 63580f669d7ff5aa5a1fa2e3994114770a491722 > # status: waiting for bad commit, 1 good commit known > # bad: [2447ff4196091e41d385635f9b6d003119f24199] ext2: Fix kernel-doc warnings > git bisect bad 2447ff4196091e41d385635f9b6d003119f24199 > # bad: [a7c4109a1fa7f9f8cfa9aa93e7aae52d0df820f6] MAINTAINERS: change reiserfs status to obsolete > git bisect bad a7c4109a1fa7f9f8cfa9aa93e7aae52d0df820f6 > # bad: [74fdc82e4a4302bf8a519101a40691b78d9beb6c] quota: add new helper dquot_active() > git bisect bad 74fdc82e4a4302bf8a519101a40691b78d9beb6c > # bad: [e64db1c50eb5d3be2187b56d32ec39e56b739845] quota: factor out dquot_write_dquot() > git bisect bad e64db1c50eb5d3be2187b56d32ec39e56b739845 > # good: [eea7e964642984753768ddbb710e2eefd32c7a89] ext2: remove redundant assignment to variable desc and variable best_desc > git bisect good eea7e964642984753768ddbb710e2eefd32c7a89 > # first bad commit: [e64db1c50eb5d3be2187b56d32ec39e56b739845] quota: factor out dquot_write_dquot() Interesting, but it's a data point :) > > Would you be willing to do this? It should be only a few bisects, > > since Jan's branch only brought in 17 commits that the above rebases > > into this test branch. So four or five bisections should pinpoint the > > exact point where it goes bad. > > See above. > > I even rebuilt again with just rebased on top of e64db1c50eb5 and it doesn't > boot, so we found the culprit that triggers this issue. > > > Of course, since this is apparently about some "random code generation > > issue", that exact point still may not be very interesting. > > On top of the above I have tried the following: > 1) dropping inline, replacing it to __always_inline -- no help; > 2) commenting out the error message -- helps! > > --- a/fs/quota/dquot.c > +++ b/fs/quota/dquot.c > @@ -632,8 +632,10 @@ static inline int dquot_write_dquot(struct dquot *dquot) > { > int ret = dquot->dq_sb->dq_op->write_dquot(dquot); > if (ret < 0) { > +#if 0 > quota_error(dquot->dq_sb, "Can't write quota structure " > "(error %d). Quota may get out of sync!", ret); > +#endif > /* Clear dirty bit anyway to avoid infinite loop. */ > clear_dquot_dirty(dquot); > } > > If it's a timing issue it's related to that error message, as the new helper is > run outside of the spinlock. > > What's is fishy there besides the error message being available only in one > case, is the pointer that is used for dp_op. I'm not at all familiar with the > code, but can it be that these superblocks are different for those two cases? dquot->dq_sb could be different from the sb we have only if the dirty list would get corrupted in some way. Not impossible but does not seem too likely. Let's first check whether there are any quotas in the first place. I've asked this already but I don't think I've got an answer: What filesystem type is the root filesystem? Does it have any quotas (either there would be files like aquota.user, quota.user, aquota.group, quota.group in / or there would be quota feature enabled - how to find that out depends on the filesystem so once I know the fs type I can give you instructions). Honza -- Jan Kara SUSE Labs, CR