btrfs-progs: receive: remove commented out transid checks
The checks for a subvolume being modified after it was received have
been commented out since they were added back in commit f1c24cd80d
("Btrfs-progs: add btrfs send/receive commands"). Let's just get rid of
the noise.
If they were ever in place, it would have never been possible
to do an incremental send and running dedupe against the parent
snapshot.
That particular use case used to cause send, the kernel side, to fail
(initially with a BUG_ON() and later with -EIO returned to user
space), see commit b4f9a1a87a48 ("Btrfs: fix incremental send failure
after deduplication").
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
[ add Filipe's note ]
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
59af046fd2
commit
d451fe2018
|
@ -345,15 +345,6 @@ static int process_snapshot(const char *path, const u8 *uuid, u64 ctransid,
|
||||||
parent_subvol->path[sub_len - root_len - 1] = '\0';
|
parent_subvol->path[sub_len - root_len - 1] = '\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*if (rs_args.ctransid > rs_args.rtransid) {
|
|
||||||
if (!r->force) {
|
|
||||||
ret = -EINVAL;
|
|
||||||
fprintf(stderr, "ERROR: subvolume %s was modified after it was received.\n", r->subvol_parent_name);
|
|
||||||
goto out;
|
|
||||||
} else {
|
|
||||||
fprintf(stderr, "WARNING: subvolume %s was modified after it was received.\n", r->subvol_parent_name);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
if (*parent_subvol->path == 0)
|
if (*parent_subvol->path == 0)
|
||||||
args_v2.fd = dup(rctx->mnt_fd);
|
args_v2.fd = dup(rctx->mnt_fd);
|
||||||
|
@ -771,22 +762,6 @@ static int process_clone(const char *path, u64 offset, u64 len,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/*if (rs_args.ctransid > rs_args.rtransid) {
|
|
||||||
if (!r->force) {
|
|
||||||
ret = -EINVAL;
|
|
||||||
fprintf(stderr, "ERROR: subvolume %s was "
|
|
||||||
"modified after it was "
|
|
||||||
"received.\n",
|
|
||||||
r->subvol_parent_name);
|
|
||||||
goto out;
|
|
||||||
} else {
|
|
||||||
fprintf(stderr, "WARNING: subvolume %s was "
|
|
||||||
"modified after it was "
|
|
||||||
"received.\n",
|
|
||||||
r->subvol_parent_name);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/* strip the subvolume that we are receiving to from the start of subvol_path */
|
/* strip the subvolume that we are receiving to from the start of subvol_path */
|
||||||
if (rctx->full_root_path) {
|
if (rctx->full_root_path) {
|
||||||
size_t root_len = strlen(rctx->full_root_path);
|
size_t root_len = strlen(rctx->full_root_path);
|
||||||
|
|
Loading…
Reference in New Issue