Commit 5c89cc03 authored by Stanislav Kinsburskiy's avatar Stanislav Kinsburskiy Committed by Pavel Emelyanov

cr-dump: discover fs type in fill_fd_params_special

FS type is required to distinguish between local files and remove ones, which
will be restored via SPFS and thus has to be created first.
Signed-off-by: 's avatarStanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent dd0a45c3
......@@ -215,6 +215,8 @@ static int collect_fds(pid_t pid, struct parasite_drain_fd **dfds)
static int fill_fd_params_special(int fd, struct fd_parms *p)
{
struct statfs fst;
*p = FD_PARMS_INIT;
if (fstat(fd, &p->stat) < 0) {
......@@ -225,6 +227,13 @@ static int fill_fd_params_special(int fd, struct fd_parms *p)
if (get_fd_mntid(fd, &p->mnt_id))
return -1;
if (fstatfs(fd, &fst)) {
pr_perror("Unable to statfs fd %d", fd);
return -1;
}
p->fs_type = fst.f_type;
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment