Re: Regression v6.11 booting cannot mount harddisks (xfs)

From: Jesper Dangaard Brouer
Date: Tue Sep 10 2024 - 15:08:58 EST




On 10/09/2024 20.30, Linus Torvalds wrote:
On Tue, 10 Sept 2024 at 10:53, Jesper Dangaard Brouer <hawk@xxxxxxxxxx> wrote:

af2814149883e2c1851866ea2afcd8eadc040f79 is the first bad commit

Just for fun - can you test moving the queue freezing *inside* the
mutex, ie something like

--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -670,11 +670,11 @@ queue_attr_store(struct kobject *kobj, struct
attribute *attr,
if (!entry->store)
return -EIO;

- blk_mq_freeze_queue(q);
mutex_lock(&q->sysfs_lock);
+ blk_mq_freeze_queue(q);
res = entry->store(disk, page, length);
- mutex_unlock(&q->sysfs_lock);
blk_mq_unfreeze_queue(q);
+ mutex_unlock(&q->sysfs_lock);
return res;
}

(Just do it by hand, my patch is whitespace-damaged on purpose -
untested and not well thought through).

Because I'm wondering whether maybe some IO is done under the
sysfs_lock, and then you might have a deadlock?

Linus

Tested the patch (manually applied change) and it did NOT help.

More likely the patch/fix Jens pointed to is the culprit.

--Jesper