Skip to content

quota: fix race condition between dqput() and dquot_mark_dquot_dirty()

Baokun Li linux-ext4 linux-fsdevel lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 1 replyIn review
  2. v27 patches 14 repliesSuperseded
  3. v11 patch 10 repliesSuperseded

Changes in v3 from the cover letter

Merge some patches, optimize descriptions. Simplify solutions, and fix some spelling errors.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5quota: factor out dquot_write_dquot()fs/quota/dquot.c+16 -230 replies
2/5quota: rename dquot_active() to inode_quota_active()fs/quota/dquot.c+10 -100 replies
3/5quota: add new helper dquot_active()fs/quota/dquot.c+14 -90 replies
4/5quota: fix dqput() to follow the guarantees dquot_srcu should providefs/quota/dquot.c+78 -180 replies
5/5quota: simplify drop_dquot_ref()fs/quota/dquot.c+9 -610 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

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

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(-)
Signature · 1 line
2.31.1