mbox series

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

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

Message

Baokun Li June 30, 2023, 11:08 a.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 12+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 next branch (5c875096d590), this
patch set didn't degrade performance, but rather had a ~5% improvement.

V1->V2:
	Modify the solution to use dquot_srcu.
V2->V3:
	Merge some patches, optimize descriptions.
	Simplify solutions, and fix some spelling errors.

Baokun Li (5):
  quota: factor out dquot_write_dquot()
  quota: rename dquot_active() to inode_quota_active()
  quota: add new helper dquot_active()
  quota: fix dqput() to follow the guarantees dquot_srcu should provide
  quota: simplify drop_dquot_ref()

 fs/quota/dquot.c | 244 ++++++++++++++++++++++++-----------------------
 1 file changed, 125 insertions(+), 119 deletions(-)

Comments

Jan Kara July 3, 2023, 5:01 p.m. UTC | #1
Hello!

On Fri 30-06-23 19:08:17, Baokun Li wrote:
> Hello Honza,
> 
> This is a solution that uses dquot_srcu to avoid race condition between
> dqput() and dquot_mark_dquot_dirty(). I performed a 12+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 next branch (5c875096d590), this
> patch set didn't degrade performance, but rather had a ~5% improvement.
> 
> V1->V2:
> 	Modify the solution to use dquot_srcu.
> V2->V3:
> 	Merge some patches, optimize descriptions.
> 	Simplify solutions, and fix some spelling errors.
> 

Thanks! I've added the patches to my tree.

								Honza

> Baokun Li (5):
>   quota: factor out dquot_write_dquot()
>   quota: rename dquot_active() to inode_quota_active()
>   quota: add new helper dquot_active()
>   quota: fix dqput() to follow the guarantees dquot_srcu should provide
>   quota: simplify drop_dquot_ref()
> 
>  fs/quota/dquot.c | 244 ++++++++++++++++++++++++-----------------------
>  1 file changed, 125 insertions(+), 119 deletions(-)
> 
> -- 
> 2.31.1
>