Thread (13 messages) 13 messages, 4 authors, 2024-09-10

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

From: Linus Torvalds <torvalds@linuxfoundation.org>
Date: 2024-09-10 18:30:22
Also in: linux-ide, linux-xfs, lkml

On Tue, 10 Sept 2024 at 10:53, Jesper Dangaard Brouer [off-list ref] 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help