btrfs: Add ctime/mtime update for btrfs device add/remove.
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Wed, 16 Apr 2014 09:02:32 +0000 (17:02 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Jul 2014 03:09:45 +0000 (20:09 -0700)
commitde0914339196e139a21bfb1d82db0465afb4ed6c
tree07b30eeb243ceb06731ffd5aa61ee3cc4d3fca03
parent8e3ddf4c9b438953922840b3d236ac04777408e6
btrfs: Add ctime/mtime update for btrfs device add/remove.

commit 5a1972bd9fd4b2fb1bac8b7a0b636d633d8717e3 upstream.

Btrfs will send uevent to udev inform the device change,
but ctime/mtime for the block device inode is not udpated, which cause
libblkid used by btrfs-progs unable to detect device change and use old
cache, causing 'btrfs dev scan; btrfs dev rmove; btrfs dev scan' give an
error message.

Reported-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Cc: Karel Zak <kzak@redhat.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/volumes.c