mbox series

[v2,0/7] quota: fix race condition between dqput() and dquot_mark_dquot_dirty()

Message ID 20230628132155.1560425-1-libaokun1@huawei.com (mailing list archive)
Headers show
Series quota: fix race condition between dqput() and dquot_mark_dquot_dirty() | expand

Message

Baokun Li June 28, 2023, 1:21 p.m. UTC
Hello Honza,

This is a solution that uses dquot_srcu to avoid race condition between
dqput() and dquot_mark_dquot_dirty(). I performed a 24+h fault injection
stress test (6 VMs, 4 test threads per VM) and have not found any problems.
And I tested the performance based on the latest mainline (6aeadf7896bf),
the patch set did not lead to performance degradation, and even a little
bit of improvement.

V1->V2:
	Modify the solution to use dquot_srcu.

Baokun Li (7):
  quota: factor out dquot_write_dquot()
  quota: add new global dquot list releasing_dquots
  quota: rename dquot_active() to inode_dquot_active()
  quota: add new helper dquot_active()
  quota: fix dqput() to follow the guarantees dquot_srcu should provide
  quota: simplify drop_dquot_ref()
  quota: remove unused function put_dquot_list()

 fs/quota/dquot.c | 237 +++++++++++++++++++++++++++--------------------
 1 file changed, 134 insertions(+), 103 deletions(-)