Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Sidong Yang <realwakka@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: A question for kernel code in btrfs_run_qgroups()
Date: Mon, 31 Jan 2022 15:40:40 +0000	[thread overview]
Message-ID: <20220131154040.GA25010@realwakka> (raw)

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?

             reply	other threads:[~2022-01-31 15:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-31 15:40 Sidong Yang [this message]
2022-02-01  0:21 ` A question for kernel code in btrfs_run_qgroups() 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220131154040.GA25010@realwakka \
    --to=realwakka@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox