public inbox for linux-bcachefs@vger.kernel.org
 help / color / mirror / Atom feed
* Kernel hang with excessive resize-journal on replicated fs
@ 2021-10-24 13:26 Chris Webb
  2021-10-24 16:54 ` Kent Overstreet
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Webb @ 2021-10-24 13:26 UTC (permalink / raw)
  To: Kent Overstreet; +Cc: linux-bcachefs

The following ktest hangs in the kernel instead of producing an error from the
excessive journal resize:

  test_oversize_journal()
  {
      bcachefs format --errors=panic --replicas=2 /dev/sd[bc]
      mount -t bcachefs /dev/sdb:/dev/sdc /mnt

      # should fail, but actually hangs:
      ! bcachefs device resize-journal /dev/sdb $(blockdev --getsize64 /dev/sdb)

      umount /mnt
  }

(It would correctly return with an error on a single-device filesystem.)

The kernel is continuously looping on ret == -EAGAIN in
bch2_set_nr_journal_buckets. The disk reservation (unexpectedly) succeeds but
__bch2_set_nr_journal_buckets then keeps returning -EAGAIN because
bch2_bucket_alloc (correctly) fails.

Is the problem here that the disk reservation isn't confined to the specific
device we then want to allocate from? So although the space is available, it's
not available solely on the device where we want it?

Best wishes,

Chris.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-24 16:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-24 13:26 Kernel hang with excessive resize-journal on replicated fs Chris Webb
2021-10-24 16:54 ` Kent Overstreet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox