[RFC PATCH v1 0/6] bcache: fix journal no-space deadlock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi folks,

Sorry for taking such a long time to compose a fix patch set for bcache
journal deadlock issue since the first time it was reported. 

The initial issue was know as several kthreads or kworkers were reported
by kernel to hang for quite long time. The reason was a deadlock happened
when there is no more journal space avialable for new coming journal
request.

Finally it turns out to be two conditions that the jouranl no-space
deadlock may happen, one is in jouranl replay time, one is in normal
journal runtime.

During my testing, I find deadlock still exists with my fixes, after
a lot of effort other three related bugs are explored and fixed.

Now the patch set is testing on two machines for 3+ hours, the journal
deadlock does not appear yet. In my previous testings, it may show up
within 30 minutes on my machine. (In order to make the jouranl space to
be more easier exhuasted, I change SB_JOURNAL_BUCKETS from 256U to 3U
both in kernel and bcache-tools code).

More testings on more machines will start soon, and the patches are not
stable enough for production environment usage. Bbut I think it is time
to post the patch set for your review and comments.

I will continue to improve the fixes, e.g. remove some BUG_ON() once
I am sure they won't happen indeed. If you may help to test the patch
set, that will be really cool.

Hope we may make this patch set stable soon.

Thanks in advance for your help.

Coly Li
---

Coly Li (6):
  bcache: acquire c->journal.lock in bch_btree_leaf_dirty()
  bcache: move definition of 'int ret' out of macro read_bucket()
  bcache: never set 0 to KEY_PTRS of jouranl key in journal_reclaim()
  bcache: reload jouranl key information during journal replay
  bcache: fix journal deadlock during jouranl replay
  bcache: reserve space for journal_meta() in run time

 drivers/md/bcache/btree.c   |   2 +
 drivers/md/bcache/journal.c | 244 +++++++++++++++++++++++++++++++++++++++++---
 drivers/md/bcache/journal.h |   5 +
 3 files changed, 238 insertions(+), 13 deletions(-)

-- 
2.16.4




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM Kernel]     [Linux Filesystem Development]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux