xfs: lock dquot buffer before detaching dquot from b_li_list
PATCH 1/1 xfs: lock dquot buffer before detaching dquot from b_li_list
From: Darrick J. Wong <[email protected]>
We have to lock the buffer before we can delete the dquot log item from the buffer's log item list.
--- fs/xfs/xfs_dquot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/xfs/xfs_dquot.c +2 -1
@@ -87,8 +87,9 @@ xfs_dquot_detach_buf( }spin_unlock (&qlip->qli_lock);if (bp) { +xfs_buf_lock (bp);list_del_init (&qlip->qli_item.li_bio_list); -xfs_buf_rele (bp); +xfs_buf_relse (bp); } }
Quoted 4 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
We have to lock the buffer before we can delete the dquot log item from the buffer's log item list.
Looks good:
I did look a bit over how the inode items handles the equivalent functionality, and AFAICS there is no direct one. xfs_qm_dquot_isolate is for shrinking the dquot LRU, which is handled through the VFS for inodes. xfs_qm_dqpurge tries to write back dirty dquots, which I thought is dead code as all dirty dquots should have log items and thus be handled through the log and AIL, but it seems like xfs_qm_quotacheck_dqadjust dirties dquots without logging them. So we'll need that for now, but I wonder if we should convert this last bit of meatada to also go through our normal log mechanism eventually?
Quoted 10 lines · Christoph Hellwig
Quoted 4 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
We have to lock the buffer before we can delete the dquot log item from the buffer's log item list.
Looks good:
Reviewed-by Christoph Hellwig <[email protected]>
Quoted 10 lines
I did look a bit over how the inode items handles the equivalent functionality, and AFAICS there is no direct one.
xfs_qm_dquot_isolateis for shrinking the dquot LRU, which is handled through the VFS for inodes.xfs_qm_dqpurgetries to write back dirty dquots, which I thought is dead code as all dirty dquots should have log items and thus be handled through the log and AIL, but it seems likexfs_qm_quotacheck_dqadjustdirties dquots without logging them. So we'll need that for now, but I wonder if we should convert this last bit of meatada to also go through our normal log mechanism eventually?
What if we replace it with the one in scrub/repair_quotacheck.c? :)
--D
Quoted 11 lines · Darrick J. Wong
Quoted 10 lines
I did look a bit over how the inode items handles the equivalent functionality, and AFAICS there is no direct one.
xfs_qm_dquot_isolateis for shrinking the dquot LRU, which is handled through the VFS for inodes.xfs_qm_dqpurgetries to write back dirty dquots, which I thought is dead code as all dirty dquots should have log items and thus be handled through the log and AIL, but it seems likexfs_qm_quotacheck_dqadjustdirties dquots without logging them. So we'll need that for now, but I wonder if we should convert this last bit of meatada to also go through our normal log mechanism eventually?
Quoted 1 line
What if we replace it with the one in
scrub/repair_quotacheck.c? :)
Yes, that's a much better implementation. It will probably be a while until we can get everyone convinced to actually build the online repair code into their kernels, though and I'm not sure if it's feasibable to have a subset just for quotacheck.
Quoted 4 lines · Darrick J. Wong
We have to lock the buffer before we can delete the dquot log item from the buffer's log item list.
Applied to next-rc, thanks!
[1/1] xfs: lock dquot buffer before detaching dquot from b_li_list
commit: 4e7dfb45fe08b2b54d7fe2499fab0eeaa42004ad
Best regards,
Signature · 1 line
Carlos Maiolino <[email protected]>
Quoted 10 lines · Carlos Maiolino
Quoted 4 lines · Darrick J. Wong
We have to lock the buffer before we can delete the dquot log item from the buffer's log item list.
Applied to next-rc, thanks!
[1/1] xfs: lock dquot buffer before detaching dquot from
b_li_listcommit: 4e7dfb45fe08b2b54d7fe2499fab0eeaa42004ad
Um... you already pushed this to Linus, why is it queued again? (albeit with the same commit id so I don't think it matters)
--D
Quoted 5 lines
Best regards,
Signature · 1 line
Carlos Maiolino <[email protected]>
Carlos Maiolino
maintainerQuoted 7 lines · Darrick J. Wong
Quoted 6 lines · Carlos Maiolino
Quoted 4 lines · Darrick J. Wong
We have to lock the buffer before we can delete the dquot log item from the buffer's log item list.
Quoted 7 lines
Quoted 4 lines
Applied to next-rc, thanks!
[1/1] xfs: lock dquot buffer before detaching dquot from
b_li_listcommit: 4e7dfb45fe08b2b54d7fe2499fab0eeaa42004adUm... you already pushed this to Linus, why is it queued again? (albeit with the same commit id so I don't think it matters)
I rushed to push this patch to -rc7 so I didn't end up sending a TY message to it. It was still on my b4 stack when I sent the last TY batch.
Which reminds me I should update the message, as the TY is going after I push to for-next, no to next-rc :).
Quoted 9 lines
--D
Quoted 5 lines
Best regards,
Signature · 1 line
Carlos Maiolino <[email protected]>
Quoted 13 lines · Carlos Maiolino
Quoted 12 lines · Darrick J. Wong
Quoted 10 lines · Carlos Maiolino
Quoted 4 lines · Darrick J. Wong
We have to lock the buffer before we can delete the dquot log item from the buffer's log item list.
Applied to next-rc, thanks!
[1/1] xfs: lock dquot buffer before detaching dquot from
b_li_listcommit: 4e7dfb45fe08b2b54d7fe2499fab0eeaa42004ad
Quoted 8 lines
Quoted 2 lines
Um... you already pushed this to Linus, why is it queued again? (albeit with the same commit id so I don't think it matters)
I rushed to push this patch to -rc7 so I didn't end up sending a TY message to it. It was still on my b4 stack when I sent the last TY batch.
Which reminds me I should update the message, as the TY is going after I push to for-next, no to next-rc :).
Ah, ok. Carry on! :)
--D
Quoted 11 lines
Quoted 10 lines
--D
Quoted 5 lines
Best regards,
Signature · 1 line
Carlos Maiolino <[email protected]>