Skip to content
Snippets Groups Projects
  1. Jan 21, 2024
  2. Jan 01, 2024
    • Brian Foster's avatar
      bcachefs: return from fsync on writeback error to avoid early shutdown · 5a11b5fe
      Brian Foster authored
      
      When investigating transient failures of generic/441 on bcachefs, it
      was determined that the cause of the failure was a combination of
      unconditional emergency shutdown and racing between background
      journal activity and the test switchover from a working device
      mapper table to an error injecting table.
      
      Part of the reason for this sequence of events is that bcachefs
      aggressively flushes as much as possible during fsync(), regardless
      of errors. While this is reasonable behavior, it is technically
      unnecessary because once an error is returned from fsync(), the
      caller cannot make any assumptions about the resilience of data.
      
      Tweak the bch2_fsync() logic to return an error on failure of any of
      the steps involved in the flush. Note that this change alone does
      not prevent generic/441 failure, but in combination with a test
      tweak to avoid racing during the dm-error table switchover it avoids
      the unnecessary shutdowns and allows the test to pass reliably on
      bcachefs.
      
      Signed-off-by: default avatarBrian Foster <bfoster@redhat.com>
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      5a11b5fe
    • Kent Overstreet's avatar
      bcachefs: kill INODE_LOCK, use lock_two_nondirectories() · ecf8a74d
      Kent Overstreet authored
      
      In an ideal world, we'd have a common helper that could be used for
      sorting a list of inodes into the correct lock order, and then the same
      lock ordering could be used for any type of inode lock, not just
      i_rwsem.
      
      But the lock ordering rules for i_rwsem are a bit complicated, so -
      abandon that dream for now and do it the more standard way.
      
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
      ecf8a74d
  3. Oct 22, 2023
Loading