1. 14 11月, 2019 3 次提交
    • G
      bcache: fix a lost wake-up problem caused by mca_cannibalize_lock · 34cf78bf
      Guoju Fang 提交于
      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: NGuoju Fang <fangguoju@gmail.com>
      Signed-off-by: NColy Li <colyli@suse.de>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      34cf78bf
    • C
      bcache: fix fifo index swapping condition in journal_pin_cmp() · c0e0954e
      Coly Li 提交于
      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: NColy Li <colyli@suse.de>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      c0e0954e
    • J
      Merge branch 'md-next' of... · e2a7b9f4
      Jens Axboe 提交于
      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 11月, 2019 3 次提交
  3. 07 11月, 2019 7 次提交
  4. 06 11月, 2019 1 次提交
  5. 05 11月, 2019 26 次提交