Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Jan Schmidt <mail@jan-o-sch.net>
To: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
Cc: Jan Schmidt <list.btrfs@jan-o-sch.net>,
	chris.mason@fusionio.com, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2 2/3] Btrfs: rescan for qgroups
Date: Tue, 16 Apr 2013 12:34:34 +0200	[thread overview]
Message-ID: <516D293A.10502@jan-o-sch.net> (raw)
In-Reply-To: <516D2313.6050004@cn.fujitsu.com>

On Tue, April 16, 2013 at 12:08 (+0200), Wang Shilong wrote:
> Hello Jan,
>  
> 
>>  	slot = path->slots[0];
>>  	ptr = btrfs_item_ptr(l, slot, struct btrfs_qgroup_status_item);
>> +	spin_lock(&fs_info->qgroup_lock);
> 
> 
> Why we need hold qgroup_lock here? would you please explain...

It would have been easier for me if you had left the relevant context in there,
but I finally found it.

Thinking again about it, as update_qgroup_status_item is only called from
transaction commit context, we can do without a spinlock here. I meant to
protect fs_info->qgroup_flags and fs_info->qgroup_rescan_progress, but it seems
not required.

Thanks,
-Jan

  reply	other threads:[~2013-04-16 10:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-16  8:45 [PATCH v2 0/3] Btrfs: quota rescan for 3.10 Jan Schmidt
2013-04-16  8:45 ` [PATCH v2 1/3] Btrfs: split btrfs_qgroup_account_ref into four functions Jan Schmidt
2013-04-16  9:20   ` Wang Shilong
2013-04-16  9:38     ` Jan Schmidt
2013-04-16  9:56       ` Wang Shilong
2013-04-16 10:32         ` David Sterba
2013-04-16 10:47           ` Wang Shilong
2013-04-16 10:59             ` David Sterba
2013-04-16  8:45 ` [PATCH v2 2/3] Btrfs: rescan for qgroups Jan Schmidt
2013-04-16  9:26   ` Wang Shilong
2013-04-16  9:39     ` Jan Schmidt
2013-04-16  9:48       ` Wang Shilong
2013-04-16 10:08   ` Wang Shilong
2013-04-16 10:34     ` Jan Schmidt [this message]
2013-04-16 10:52   ` David Sterba
2013-04-16 12:22   ` Wang Shilong
2013-04-17 15:20     ` Jan Schmidt
2013-04-16  8:45 ` [PATCH v2 3/3] Btrfs: automatic rescan after "quota enable" command Jan Schmidt
2013-04-16 12:55   ` Wang Shilong

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=516D293A.10502@jan-o-sch.net \
    --to=mail@jan-o-sch.net \
    --cc=chris.mason@fusionio.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=list.btrfs@jan-o-sch.net \
    --cc=wangsl-fnst@cn.fujitsu.com \
    /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