Commit eeb21b8a authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

proc_parse: Remember a type of FS provided by a kernel

We will need it for btrfs handling. Also print out the
FS type for easier debug

 | (00.003545)     type unsupported (cgroup) source cgroup 1c / @ /sys/fs/cgroup/blkio flags 30000e options blkio,
 | (00.003558)     type unsupported (cgroup) source cgroup 1d / @ /sys/fs/cgroup/perf_event flags 30000e options perf_event,
 | (00.003571)     type unsupported (cgroup) source cgroup 1e / @ /sys/fs/cgroup/hugetlb flags 30000e options hugetlb,
 | (00.003584)     type unsupported (ext4) source /dev/sda2 800002 / @ / flags 300000 options data=ordered,
 | (00.003670)     type tmpfs (tmpfs) source tmpfs 20 / @ /tmp flags 100000 options
 | (00.003696)     type unsupported (mqueue) source mqueue d / @ /dev/mqueue flags 300000 options
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 56f4679d
......@@ -107,6 +107,7 @@ struct mount_info {
int master_id;
int shared_id;
struct fstype *fstype;
char *kfstype;
char *source;
char *options;
bool mounted;
......
......@@ -1109,6 +1109,7 @@ void mnt_entry_free(struct mount_info *mi)
xfree(mi->root);
xfree(mi->mountpoint);
xfree(mi->kfstype);
xfree(mi->source);
xfree(mi->options);
xfree(mi);
......
......@@ -760,6 +760,9 @@ static int parse_mountinfo_ent(char *str, struct mount_info *new)
return -1;
ret = -1;
new->kfstype = xstrdup(fstype);
if (!new->kfstype)
goto err;
new->fstype = find_fstype_by_name(fstype);
new->options = xmalloc(strlen(opt) + 1);
......@@ -806,8 +809,8 @@ struct mount_info *parse_mountinfo(pid_t pid)
goto err;
}
pr_info("\ttype %s source %s %x %s @ %s flags %x options %s\n",
new->fstype->name, new->source,
pr_info("\ttype %s (%s) source %s %x %s @ %s flags %x options %s\n",
new->fstype->name, new->kfstype, new->source,
new->s_dev, new->root, new->mountpoint,
new->flags, new->options);
}
......
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