mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 22:05:36 +00:00
files: Don't lookup fdesc twice
In the open_fdinfo we need to get a file_desc associated with the given fdinfo_list_entry. This is done by searching the hash of descs, but this can be speeded up by saving the desc pointer on the fdinfo at the time of collecting them. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
@@ -25,16 +25,17 @@ enum fdinfo_states {
|
||||
FD_STATE_MAX
|
||||
};
|
||||
|
||||
struct file_desc;
|
||||
|
||||
struct fdinfo_list_entry {
|
||||
struct list_head desc_list;
|
||||
struct file_desc *desc;
|
||||
struct list_head ps_list;
|
||||
int pid;
|
||||
futex_t real_pid;
|
||||
struct fdinfo_entry fe;
|
||||
};
|
||||
|
||||
struct file_desc;
|
||||
|
||||
struct file_desc_ops {
|
||||
int type;
|
||||
int (*open)(struct file_desc *);
|
||||
|
Reference in New Issue
Block a user