Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp23418rda; Fri, 20 Oct 2023 18:48:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHW2exvX+fnydhb1dZw8Ld/gCr75w8fKkwbL0rzmN0NzPcx2kt9zxdjMAG4q4yqvm1m20Q4 X-Received: by 2002:a05:6358:7201:b0:13e:bf50:73af with SMTP id h1-20020a056358720100b0013ebf5073afmr4065435rwa.18.1697852930596; Fri, 20 Oct 2023 18:48:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697852930; cv=none; d=google.com; s=arc-20160816; b=wuwExARS4JIEwpjNKbK3Hd8R4sf6yFfNftrQNhXZDr100t3J/MlB3Tku3FbAKrJpbC SvU1U4zKtCeF/f8a4XqThsiQhhdL9nvbgQ13jVuPrJIQ5EGcm/2uIPE97C/isZvXH1jk BCteZ76wSfNGN+qwUYQBlbiDw08BeqIXsazQ4fvEwVGeMyuAv77QJSH/bOW2K5GKhZXh 2gvv1dHUajYD4H8KVYfOTQgK3oHM8YQJktrd90mVBbQRIC+TvVZscweAugTIhhnH/3po yhZ/7oo2E8YRb27qly3A2imbt5WUdVtS20PMkxpFjt8m9Dds8lxGE2018+wy9UjnX63r yhUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=ctrerGJU4xb4CKW1PXUOxZXDgxzK9ifH3DN4RUdsDp0=; fh=gXNwf3GmZWkGTIIpZCPX7kvWLQmoWLkuUD/VOCYjaUI=; b=qjl+nbjnCOboCgDZiKD0fpgYAUbh5Z5IMtZPxWgJ2waCJN6olJ5j97C7TRO8Ck1058 N8EO7pmPngGncCxHT2k91oh8t5WRIN4t+QQBr1eG+FW/zh6/1ZNr6DW8bxnNKuZW87y/ veff+dDu0uzr5JiUtesz2j2UkXckRCu7RN2uYaUGs8i2/kuPayvlBM+QB2sGQO7mVKuV p3Y++15OrOsUX7p7kAqgl3/KvT5FS+Cd5nsUt2UvRrHDkX+KYtfpjdZB1qNwhtEwAotG 3zMf2DhFfkPX/7/6zxES6jV7cDeDdYExhhC2EAO6oreqBvE41sv5LkH2V1LlJCqdPxuv tQyQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id b137-20020a63348f000000b005b7d9aace98si2862787pga.109.2023.10.20.18.48.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 18:48:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 54CDF82A5997; Fri, 20 Oct 2023 18:48:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229518AbjJUBsp (ORCPT + 99 others); Fri, 20 Oct 2023 21:48:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229500AbjJUBso (ORCPT ); Fri, 20 Oct 2023 21:48:44 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8897DD6C; Fri, 20 Oct 2023 18:48:42 -0700 (PDT) Received: from dggpeml500021.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SC46T4YR8z15NKl; Sat, 21 Oct 2023 09:45:53 +0800 (CST) Received: from [10.174.177.174] (10.174.177.174) by dggpeml500021.china.huawei.com (7.185.36.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Sat, 21 Oct 2023 09:48:39 +0800 Message-ID: <826dbab6-f6e0-fc02-e5d3-141c00a2a141@huawei.com> Date: Sat, 21 Oct 2023 09:48:38 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.2 Subject: Re: [GIT PULL] ext2, quota, and udf fixes for 6.6-rc1 Content-Language: en-US To: Andy Shevchenko , Linus Torvalds CC: Josh Poimboeuf , Jan Kara , Nathan Chancellor , Nick Desaulniers , Kees Cook , Ferry Toth , , , yangerkun , Baokun Li References: <20231019164240.lhg5jotsh6vfuy67@treble> From: Baokun Li In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.174] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500021.china.huawei.com (7.185.36.21) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.1 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 20 Oct 2023 18:48:46 -0700 (PDT) On 2023/10/20 23:06, Andy Shevchenko wrote: > +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 >>> 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. >> Hello, Addy! 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. -- With Best Regards, Baokun Li .