linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: <dsterba@suse.cz>, <linux-btrfs@vger.kernel.org>,
	Karel Zak <kzak@redhat.com>
Subject: Re: [PATCH RFC] btrfs: Add ctime/mtime update for btrfs device add/remove.
Date: Fri, 30 May 2014 09:27:46 +0800	[thread overview]
Message-ID: <5387DE92.3080103@cn.fujitsu.com> (raw)
In-Reply-To: <20140529124308.GA29992@twin.jikos.cz>


-------- Original Message --------
Subject: Re: [PATCH RFC] btrfs: Add ctime/mtime update for btrfs device 
add/remove.
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>
Date: 2014年05月29日 20:43
> On Wed, Apr 16, 2014 at 05:02:32PM +0800, Qu Wenruo wrote:
>> @@ -1704,10 +1720,14 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path)
>>   
>>   	ret = 0;
>>   
>> -	/* Notify udev that device has changed */
>> -	if (bdev)
>> +	if (bdev) {
>> +		/* Notify udev that device has changed */
>>   		btrfs_kobject_uevent(bdev, KOBJ_CHANGE);
>>   
>> +		/* Update ctime/mtime for device path for libblkid */
>> +		update_dev_time(device_path);
> The change on the device comes after the uevent notification, is it
> possible that the event is delivered and processed before the device
> times are updated? I would say so.
Yes, udev event is delivered before device times updated, but now 
btrfs-progs still use libblkid to do device scan things
as default, so I didn't catch the point.

Would you please tell me what the problem is?

Thanks,
Qu
>
>> +	}
>> +
>>   error_brelse:
>>   	brelse(bh);
>>   	if (bdev)


  reply	other threads:[~2014-05-30  1:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16  9:02 [PATCH RFC] btrfs: Add ctime/mtime update for btrfs device add/remove Qu Wenruo
2014-05-29 12:43 ` David Sterba
2014-05-30  1:27   ` Qu Wenruo [this message]
2014-06-04  5:51   ` Qu Wenruo
2014-05-30  7:51 ` Anand Jain
2014-05-30  7:53   ` Anand Jain
2014-05-30  8:43   ` 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=5387DE92.3080103@cn.fujitsu.com \
    --to=quwenruo@cn.fujitsu.com \
    --cc=dsterba@suse.cz \
    --cc=kzak@redhat.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;
as well as URLs for NNTP newsgroup(s).