public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Baokun Li <libaokun1@huawei.com>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>, Jan Kara <jack@suse.cz>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Kees Cook <keescook@chromium.org>,
	Ferry Toth <ftoth@exalondelft.nl>,
	linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [GIT PULL] ext2, quota, and udf fixes for 6.6-rc1
Date: Fri, 20 Oct 2023 18:06:21 +0300	[thread overview]
Message-ID: <ZTKXbbSS2Pvmc-Fh@smile.fi.intel.com> (raw)
In-Reply-To: <ZTKUDzONVHXnWAJc@smile.fi.intel.com>

+Cc: Baokun, the author of the patch.

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
> > <andriy.shevchenko@intel.com> 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);
>         }
> 
> 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
> 
> 

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-10-20 15:06 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-30 10:24 [GIT PULL] ext2, quota, and udf fixes for 6.6-rc1 Jan Kara
2023-08-30 19:50 ` pr-tracker-bot
2023-10-17 10:27 ` Andy Shevchenko
2023-10-17 10:29   ` Andy Shevchenko
2023-10-17 10:32     ` Andy Shevchenko
2023-10-17 11:36       ` Jan Kara
2023-10-17 11:49         ` Andy Shevchenko
2023-10-17 11:46       ` Andy Shevchenko
2023-10-17 13:32         ` Jan Kara
2023-10-17 13:42           ` Andy Shevchenko
2023-10-17 14:50             ` Andy Shevchenko
2023-10-17 15:14               ` Andy Shevchenko
2023-10-17 15:34                 ` Andy Shevchenko
2023-10-17 16:02                   ` Andy Shevchenko
2023-10-18 18:46                     ` Jan Kara
2023-10-19  8:46                       ` Andy Shevchenko
2023-10-19 10:18                         ` Jan Kara
2023-10-19 12:01                           ` Andy Shevchenko
2023-10-19 14:12                             ` Andy Shevchenko
2023-10-19 14:49                               ` Andy Shevchenko
2023-10-19 14:44                             ` Andy Shevchenko
2023-10-19 16:42                               ` Josh Poimboeuf
2023-10-19 17:05                                 ` Andy Shevchenko
2023-10-19 17:26                                   ` Linus Torvalds
2023-10-19 17:51                                     ` Linus Torvalds
2023-10-19 18:10                                       ` Andy Shevchenko
2023-10-19 18:16                                         ` Andy Shevchenko
2023-10-19 18:43                                           ` Linus Torvalds
2023-10-20 14:51                                             ` Andy Shevchenko
2023-10-20 15:06                                               ` Andy Shevchenko [this message]
2023-10-20 15:12                                                 ` Andy Shevchenko
2023-10-20 17:26                                                   ` Linus Torvalds
2023-10-20 18:09                                                     ` Jan Kara
2023-10-21  1:48                                                 ` Baokun Li
2023-10-23 12:19                                                   ` Andy Shevchenko
2023-10-23 13:40                                                     ` Baokun Li
2023-10-20 17:23                                               ` Linus Torvalds
2023-10-20 18:29                                                 ` Andy Shevchenko
2023-10-20 18:31                                                   ` Andy Shevchenko
2023-10-20 19:43                                                   ` Linus Torvalds
2023-10-20 20:36                                                     ` andy.shevchenko
2023-10-21 23:36                                                       ` Kees Cook
2023-10-23 11:45                                                         ` Andy Shevchenko
2023-10-23 12:15                                                           ` Jan Kara
2023-10-23 16:08                                                             ` Kees Cook
2023-10-20 18:05                                               ` Jan Kara
2023-10-20 20:29                                                 ` andy.shevchenko
2023-10-20 11:07                                       ` Jan Kara
2025-01-28 13:24         ` Andy Shevchenko
2023-10-22 13:46   ` Linux regression tracking #adding (Thorsten Leemhuis)
2023-11-22  8:15     ` Linux regression tracking #update (Thorsten Leemhuis)
2023-11-24 16:47       ` Andy Shevchenko
2025-01-28 13:26         ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZTKXbbSS2Pvmc-Fh@smile.fi.intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=ftoth@exalondelft.nl \
    --cc=jack@suse.cz \
    --cc=jpoimboe@kernel.org \
    --cc=keescook@chromium.org \
    --cc=libaokun1@huawei.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox