Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1091861rdb; Fri, 20 Oct 2023 08:13:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHhzAUqd1DHFekHKRVAHTRjTjYLryrLkwI63e3XrJoWSJEJVAxpmHuIVIfs+Aok/2kOAVx4 X-Received: by 2002:a17:902:d1c3:b0:1ca:8169:e853 with SMTP id g3-20020a170902d1c300b001ca8169e853mr1720039plb.4.1697814781995; Fri, 20 Oct 2023 08:13:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697814781; cv=none; d=google.com; s=arc-20160816; b=omudJaqfoLKfOlvUirwjqb9Czoybt0G+w7Ag2G9X/2ixFLmQoU8mlE0oS/RNz8zlzG KCYynucZ+yG6ubnEceSkOyUNsTmS5fvTWp3O5cmp3Gml1KdxoH1Uv5EMPgLbr3miexn9 sgBpibpcjWjDLoISDZ753+keMnmDaJ0kjzxPXVXNxVUP76kNv9ZQjv2I+cojk4/kMgPm NnW+KUlIud++ukptgSbq9VLGDCGv4OskGIHqi9G7W7tu8wAUPTAljKiHJXsU8y/2vxa5 Kl6PUbIGWFr7SAoZxaWCFhLGp2vHrRea0XPlD2ybFGba69Ax4OmAuwUW+WU5q5vRLWZ3 NHEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=xkQKfbTCPerrqKbtO6xu7myH4s7USRAit52MXUVu3A4=; fh=uNnw1nolXJ2dEmcZlmXNrEBnDud2jM2N7wV7iwnVInQ=; b=ubKgNTBD6d2GwDCM8b5Fi/IvGwuwvB+giFsPQlV5NUjQYv92pBPoO0HAyepytjmKpR oWx+ltNefitIuJ4j40NGRKlZA3lk7h7ZKjYtkUExXAJB5a4LKJ2STSh6DfKF53GZTMiW 7lHt9KnGKYmRqDx7Z2xsVdqJEBiai3BXsZrVp+mlBpykPqiqCAzN1LBXbHEWlWGWe9Lx VbbUGt7vtyvm1/vuC6QjoTqG/XTaNIC8exITMYvdr3G/yIaLk4T2xZPcAEH4LzazhpG/ W1xjF9truWe/mzagJlTGkKRZ1d7WOpYZG3blh3RvpE3BUVz/Sm/qewcYEiBs6nn3/64k bzpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Q0UJmXpm; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id l14-20020a170903244e00b001ca33bba8ecsi2253075pls.371.2023.10.20.08.13.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 08:13:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Q0UJmXpm; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D76EF82F7F8F; Fri, 20 Oct 2023 08:12:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377628AbjJTPMy (ORCPT + 99 others); Fri, 20 Oct 2023 11:12:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377529AbjJTPMw (ORCPT ); Fri, 20 Oct 2023 11:12:52 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD821FA; Fri, 20 Oct 2023 08:12:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697814770; x=1729350770; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=gXAirkdMH/amlSezswVD4m66mm6dUsGdCBipQZgrys4=; b=Q0UJmXpmH2FikMdOZAhkEeQZbbb1uNpnFCc5tuGoP176po0AQnDQQvlE 1Nc9f9nISPEw8ch6svHhxEze915XQK70LAj3t6IQRsemL4hGKfEm+lU2W TcVgqV6BnEm/bMvitsnmridBSDnvM+bl8C5MIxr/aRvedgSEIPs5LlgdL 8UAiWszNE5KaOocwFCu/4AiIjDAWT8Qm+T6ubinwCoonRJ2q7kuGoTWZw mEtmD+fO6iyVIxDFNcn9PD9wJO1JA8rjHzFR9JoiuDaItvek8sGsHSs83 PGKn8M2pjbDxVa38lFk9B5ac6Vl/szmqlpfBsGsWfA2AzET+gw3mXDUmU g==; X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="371585034" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="371585034" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 08:12:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="823278948" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="823278948" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga008.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 08:12:46 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC2) (envelope-from ) id 1qtrB4-00000007Aif-3j7t; Fri, 20 Oct 2023 18:12:42 +0300 Date: Fri, 20 Oct 2023 18:12:42 +0300 From: Andy Shevchenko To: Linus Torvalds , Baokun Li Cc: 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: References: <20231019164240.lhg5jotsh6vfuy67@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_NONE,URIBL_SBL_A autolearn=ham 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-ext4@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 20 Oct 2023 08:13:00 -0700 (PDT) On Fri, Oct 20, 2023 at 06:06:22PM +0300, Andy Shevchenko wrote: > On Fri, Oct 20, 2023 at 05:51:59PM +0300, 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() > > > > > 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); > > } Doing the same on the my branch based on top of v6.6-rc6 does not help. So looks like a race condition somewhere happening related to that dirty bit (as comment states it needs to be cleaned to avoid infinite loop, that's probably what happens). > > 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? > > > > [4]: https://bitbucket.org/andy-shev/linux/src/test-mrfld-before-merge/ > > [5]: https://bitbucket.org/andy-shev/linux/src/test-mrfld-pre-merge/ > > [6]: https://bitbucket.org/andy-shev/linux/src/test-mrfld-jan-rebased/ -- With Best Regards, Andy Shevchenko