Commit dbe81233 authored by Pavel Emelyanov's avatar Pavel Emelyanov

files: Remove support for per-pid fdinfo-s

Since 0.3 fdinfo image is ID-s based, so old ones are not used at all.
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent c8e983c9
......@@ -695,21 +695,15 @@ int prepare_fd_pid(struct pstree_item *item)
INIT_LIST_HEAD(&rst_info->tty_slaves);
INIT_LIST_HEAD(&rst_info->tty_ctty);
if (!fdinfo_per_id) {
img = open_image(CR_FD_FDINFO, O_RSTR, pid);
if (!img)
return -1;
} else {
if (item->ids == NULL) /* zombie */
return 0;
if (item->ids == NULL) /* zombie */
return 0;
if (rsti(item)->fdt && rsti(item)->fdt->pid != item->pid.virt)
return 0;
if (rsti(item)->fdt && rsti(item)->fdt->pid != item->pid.virt)
return 0;
img = open_image(CR_FD_FDINFO, O_RSTR, item->ids->files_id);
if (!img)
return -1;
}
img = open_image(CR_FD_FDINFO, O_RSTR, item->ids->files_id);
if (!img)
return -1;
while (1) {
FdinfoEntry *e;
......
......@@ -14,7 +14,6 @@
#include "images/inventory.pb-c.h"
#include "images/pagemap.pb-c.h"
bool fdinfo_per_id = false;
bool ns_per_id = false;
bool img_common_magic = true;
TaskKobjIdsEntry *root_ids;
......@@ -34,7 +33,11 @@ int check_img_inventory(void)
if (pb_read_one(img, &he, PB_INVENTORY) < 0)
goto out_close;
fdinfo_per_id = he->has_fdinfo_per_id ? he->fdinfo_per_id : false;
if (!he->has_fdinfo_per_id || !he->fdinfo_per_id) {
pr_err("Too old image, no longer supported\n");
goto out_close;
}
ns_per_id = he->has_ns_per_id ? he->ns_per_id : false;
if (he->root_ids) {
......
......@@ -96,7 +96,6 @@
#define CR_PARENT_LINK "parent"
extern bool fdinfo_per_id;
extern bool ns_per_id;
extern bool img_common_magic;
......
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