Re: [PATCH RFC] btrfs: Add ctime/mtime update for btrfs device add/remove.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




-------- Original Message --------
Subject: Re: [PATCH RFC] btrfs: Add ctime/mtime update for btrfs device add/remove.
From: David Sterba <dsterba@xxxxxxx>
To: Qu Wenruo <quwenruo@xxxxxxxxxxxxxx>
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)

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux