On Wed, Oct 11, 2017 at 11:57:16AM -0600, Liu Bo wrote:
> If one of btrfs's devices was pulled out and we've replaced it with a
> new one, then they have the same uuid.
>
> If that device gets reconnected, 'btrfs filesystem show' will show the
> stale one instead of the new one, but on kernel side btrfs has a fix
> to not include the stale one, this could confuse users as people may
> monitor btrfs by running that cli.
>
> This does the similar thing to what kernel side has done.
>
> Signed-off-by: Liu Bo <bo.li.liu@xxxxxxxxxx>
> Reviewed-by: Anand Jain <anand.jain@xxxxxxxxxx>
Applied with the following diff, thanks.
--- a/volumes.c
+++ b/volumes.c
@@ -141,11 +141,12 @@ static int device_list_add(const char *path,
char *name;
/*
- * The existing device has newer generation, so this
- * one could be a stale one, don't add it.
+ * The existing device has newer generation, so this one could
+ * be a stale one, don't add it.
*/
if (found_transid < device->generation) {
- warning("adding device %s gen %llu but found an existing device %s gen %llu\n",
+ warning(
+ "adding device %s gen %llu but found an existing device %s gen %llu",
path, found_transid, device->name,
device->generation);
return -EEXIST;
--
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