linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Baokun Li <libaokun1@huawei.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	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>,
	yangerkun <yangerkun@huawei.com>,
	Baokun Li <libaokun1@huawei.com>
Subject: Re: [GIT PULL] ext2, quota, and udf fixes for 6.6-rc1
Date: Mon, 23 Oct 2023 21:40:44 +0800	[thread overview]
Message-ID: <0c2de951-cd14-f1c7-fd9b-697563ad8092@huawei.com> (raw)
In-Reply-To: <ZTZktSo8oIUD5unq@smile.fi.intel.com>

Hello!

On 2023/10/23 20:19, Andy Shevchenko wrote:
> On Sat, Oct 21, 2023 at 09:48:38AM +0800, Baokun Li wrote:
>> On 2023/10/20 23:06, 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:
> ...
>
>>>> 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.
>> This patch does not seem to cause this problem. Just like linus said, this
>> patch
>> has only two slight differences from the previous:
>> 1) Change "if (err)" to "if (err < 0)"
>>      In all the implementations of dq_op->write_dquot(), the returned value
>> of err
>>      is not greater than 0. Therefore, this does not cause behavior
>> inconsistency.
>> 2) Adding quota_error()
>>      quota_error() does not seem to cause a boot failure.
>>
>> Also, you mentioned that the root file system is initramfs. If no other file
>> system
>> that supports quota is automatically mounted during startup, it seems that
>> quota
>> does not cause this problem logically.
>>
>> In my opinion, as Josh mentioned, replace the CONFIG_DEBUG_LIST related
>> BUG()/BUG_ON() with WARN_ON(), and then check whether the system can be
>> started normally. If yes, it indicates that the panic is caused by the list
>> corruption, then, check for the items that may damage the list. If WARN_ON()
>> is recorded in the dmesg log of the machine after the startup, it is easier
>> to locate the problem.
> I mentioned that I have checked that, but okay, lemme double check it.
> I took the test-mrfld-jr branch and applied that patch on top.
> And as expected no luck.
By "okay" do you mean that after replacing BUG()/BUG_ON() with WARN_ON()
you can boot up normally but don't see any prints, or does the 
replacement have
no effect and still fails to boot up?
> fstab I have, btw is this
>
> $ cat output/target/etc/fstab
> # <file system> <mount pt>      <type>  <options>       <dump>  <pass>
> /dev/root       /               ext2    rw,noauto       0       1
> proc            /proc           proc    defaults        0       0
> devpts          /dev/pts        devpts  defaults,gid=5,mode=620,ptmxmode=0666   0       0
> tmpfs           /dev/shm        tmpfs   mode=0777       0       0
> tmpfs           /tmp            tmpfs   mode=1777       0       0
> tmpfs           /run            tmpfs   mode=0755,nosuid,nodev  0       0
> sysfs           /sys            sysfs   defaults        0       0
>
> Not sure if /dev/root affects this all, it's Buildroot + Busybox in initramfs
> at the end.
>
> On the booted machine
> (clang build of my main branch, based on the latest -rcX):
>
> Welcome to Buildroot
> buildroot login: root
>
> # uname -a
> Linux buildroot 6.6.0-rc7-00142-g9266a02ba229 #28 SMP PREEMPT_DYNAMIC Mon Oct 23 15:00:17 EEST 2023 x86_64 GNU/Linux
>
> # mount
> rootfs on / type rootfs (rw,size=453412k,nr_inodes=113353)
> devtmpfs on /dev type devtmpfs (rw,relatime,size=453412k,nr_inodes=113353,mode=755)
> proc on /proc type proc (rw,relatime)
> devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=666)
> tmpfs on /dev/shm type tmpfs (rw,relatime,mode=777)
> tmpfs on /tmp type tmpfs (rw,relatime)
> tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
> sysfs on /sys type sysfs (rw,relatime)
>
> What is fishy here is the size of rootfs, it's only 30M compressed side,
> I can't be ~450M decompressed. I just noticed this, dunno if it's related.
>
Of the filesystems mounted above, only ext2 (aka rootfs) supports quota,
but it doesn't appear to have quota enabled.
If the quota change is causing ext2 to fail to load the root directory,
you can now do the following checks:

1) Compare the binary generated by ext2  before and after the quota patch.
2) `dumpe2fs -h /dev/root` to see if there are any useful error messages
saved on disk superblock.

Thanks!
-- 
With Best Regards,
Baokun Li
.

  reply	other threads:[~2023-10-23 13:40 UTC|newest]

Thread overview: 51+ 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
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 [this message]
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
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

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=0c2de951-cd14-f1c7-fd9b-697563ad8092@huawei.com \
    --to=libaokun1@huawei.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=ftoth@exalondelft.nl \
    --cc=jack@suse.cz \
    --cc=jpoimboe@kernel.org \
    --cc=keescook@chromium.org \
    --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 \
    --cc=yangerkun@huawei.com \
    /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;
as well as URLs for NNTP newsgroup(s).