Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* A question for kernel code in btrfs_run_qgroups()
@ 2022-01-31 15:40 Sidong Yang
  2022-02-01  0:21 ` Qu Wenruo
  0 siblings, 1 reply; 6+ messages in thread
From: Sidong Yang @ 2022-01-31 15:40 UTC (permalink / raw)
  To: linux-btrfs

Hi, I'm reading btrfs code for contributing.
I have a question about code in btrfs_run_qgroups().

It seems that it updates dirty qgroups modified in transaction.
And it iterates dirty qgroups with locking and unlocking qgroup_lock for
protecting dirty_qgroups list. According to code, It locks before enter
the loop and pick a entry and unlock. At the end of loop, It locks again
for next loop. And after loop, it set some flags and unlock.

I wonder that it should be locked with setting STATUS_FLAG_ON? if not,
is there unnecessary locking in last loop?

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-02-01 11:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-31 15:40 A question for kernel code in btrfs_run_qgroups() Sidong Yang
2022-02-01  0:21 ` Qu Wenruo
2022-02-01  4:05   ` Sidong Yang
2022-02-01  7:31     ` Qu Wenruo
2022-02-01  9:24       ` Sidong Yang
2022-02-01 11:35         ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox