1. 13 Nov, 2019 3 commits
    • Guoju Fang's avatar
      bcache: fix a lost wake-up problem caused by mca_cannibalize_lock · 34cf78bf
      Guoju Fang authored
      This patch fix a lost wake-up problem caused by the race between
      mca_cannibalize_lock and bch_cannibalize_unlock.
      
      Consider two processes, A and B. Process A is executing
      mca_cannibalize_lock, while process B takes c->btree_cache_alloc_lock
      and is executing bch_cannibalize_unlock. The problem happens that after
      process A executes cmpxchg and will execute prepare_to_wait. In this
      timeslice process B executes wake_up, but after that process A executes
      prepare_to_wait and set the state to TASK_INTERRUPTIBLE. Then process A
      goes to sleep but no one will wake up it. This problem may cause bcache
      device to dead.
      Signed-off-by: default avatarGuoju Fang <fangguoju@gmail.com>
      Signed-off-by: default avatarColy Li <colyli@suse.de>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      34cf78bf
    • Coly Li's avatar
      bcache: fix fifo index swapping condition in journal_pin_cmp() · c0e0954e
      Coly Li authored
      Fifo structure journal.pin is implemented by a cycle buffer, if the back
      index reaches highest location of the cycle buffer, it will be swapped
      to 0. Once the swapping happens, it means a smaller fifo index might be
      associated to a newer journal entry. So the btree node with oldest
      journal entry won't be selected in bch_btree_leaf_dirty() to reference
      the dirty B+tree leaf node. This problem may cause bcache journal won't
      protect unflushed oldest B+tree dirty leaf node in power failure, and
      this B+tree leaf node is possible to beinconsistent after reboot from
      power failure.
      
      This patch fixes the fifo index comparing logic in journal_pin_cmp(),
      to avoid potential corrupted B+tree leaf node when the back index of
      journal pin is swapped.
      Signed-off-by: default avatarColy Li <colyli@suse.de>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      c0e0954e
    • Jens Axboe's avatar
      Merge branch 'md-next' of... · e2a7b9f4
      Jens Axboe authored
      Merge branch 'md-next' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.5/drivers
      
      Pull MD changes from Song.
      
      * 'md-next' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md:
        md/raid10: prevent access of uninitialized resync_pages offset
        md: avoid invalid memory access for array sb->dev_roles
        md/raid1: avoid soft lockup under high load
      e2a7b9f4
  2. 12 Nov, 2019 3 commits
  3. 07 Nov, 2019 7 commits
  4. 06 Nov, 2019 1 commit
  5. 05 Nov, 2019 1 commit
  6. 04 Nov, 2019 25 commits