mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 22:35:33 +00:00
clang-format: do several manual comment fixups
Automatic AlignTrailingComments fails to make those comments look right, so let's do it manually, so that they both satisfy AlignTrailingComments and also are human-readable. Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
This commit is contained in:
committed by
Andrei Vagin
parent
bbfd9031a3
commit
2064793225
@@ -121,12 +121,12 @@ unsigned int find_unused_fd(struct pstree_item *, int hint_fd);
|
|||||||
struct fdinfo_list_entry *find_used_fd(struct pstree_item *, int fd);
|
struct fdinfo_list_entry *find_used_fd(struct pstree_item *, int fd);
|
||||||
|
|
||||||
struct file_desc {
|
struct file_desc {
|
||||||
u32 id; /* File id, unique */
|
u32 id; /* File id, unique */
|
||||||
struct hlist_node hash; /* Descriptor hashing and lookup */
|
struct hlist_node hash; /* Descriptor hashing and lookup */
|
||||||
struct list_head fd_info_head; /* Chain of fdinfo_list_entry-s with same ID and type but different pids */
|
struct list_head fd_info_head; /* Chain of fdinfo_list_entry-s with same ID and type but different pids */
|
||||||
struct file_desc_ops *ops; /* Associated operations */
|
struct file_desc_ops *ops; /* Associated operations */
|
||||||
struct list_head fake_master_list; /* To chain in the list of file_desc, which don't
|
struct list_head fake_master_list; /* To chain in the list of file_desc, which don't
|
||||||
have a fle in a task, that having permissions */
|
* have a fle in a task, that having permissions */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct fdtype_ops {
|
struct fdtype_ops {
|
||||||
|
@@ -130,10 +130,8 @@ struct page_pipe {
|
|||||||
unsigned int flags; /* PP_FOO flags below */
|
unsigned int flags; /* PP_FOO flags below */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PP_CHUNK_MODE \
|
#define PP_CHUNK_MODE 0x1 /* Restrict the maximum buffer size of pipes and dump memory for a few iterations */
|
||||||
0x1 /* Restrict the maximum buffer size of pipes
|
#define PP_OWN_IOVS 0x4 /* create_page_pipe allocated IOVs memory */
|
||||||
and dump memory for a few iterations */
|
|
||||||
#define PP_OWN_IOVS 0x4 /* create_page_pipe allocated IOVs memory */
|
|
||||||
|
|
||||||
struct page_pipe *create_page_pipe(unsigned int nr_segs, struct iovec *iovs, unsigned flags);
|
struct page_pipe *create_page_pipe(unsigned int nr_segs, struct iovec *iovs, unsigned flags);
|
||||||
extern void destroy_page_pipe(struct page_pipe *p);
|
extern void destroy_page_pipe(struct page_pipe *p);
|
||||||
|
@@ -63,17 +63,14 @@ struct page_read {
|
|||||||
struct cr_img *pi;
|
struct cr_img *pi;
|
||||||
u32 pages_img_id;
|
u32 pages_img_id;
|
||||||
|
|
||||||
PagemapEntry *pe; /* current pagemap we are on */
|
PagemapEntry *pe; /* current pagemap we are on */
|
||||||
struct page_read *parent; /* parent pagemap (if ->in_parent
|
struct page_read *parent; /* parent pagemap (if ->in_parent pagemap is met in image,
|
||||||
pagemap is met in image, then
|
* then go to this guy for page, see read_pagemap_page */
|
||||||
go to this guy for page, see
|
unsigned long cvaddr; /* vaddr we are on */
|
||||||
read_pagemap_page */
|
off_t pi_off; /* current offset in pages file */
|
||||||
unsigned long cvaddr; /* vaddr we are on */
|
|
||||||
off_t pi_off; /* current offset in pages file */
|
|
||||||
|
|
||||||
struct iovec bunch; /* record consequent neighbour
|
struct iovec bunch; /* record consequent neighbour iovecs to punch together */
|
||||||
iovecs to punch together */
|
unsigned id; /* for logging */
|
||||||
unsigned id; /* for logging */
|
|
||||||
unsigned long img_id; /* pagemap image file ID */
|
unsigned long img_id; /* pagemap image file ID */
|
||||||
|
|
||||||
PagemapEntry **pmes;
|
PagemapEntry **pmes;
|
||||||
|
@@ -49,8 +49,8 @@ extern int restore_pipe_data(int img_type, int pfd, u32 id, struct pipe_data_rst
|
|||||||
struct pipe_info {
|
struct pipe_info {
|
||||||
PipeEntry *pe;
|
PipeEntry *pe;
|
||||||
struct list_head pipe_list; /* All pipe_info with the same pipe_id
|
struct list_head pipe_list; /* All pipe_info with the same pipe_id
|
||||||
* This is pure circular list without head */
|
* This is pure circular list without head */
|
||||||
struct list_head list; /* global list of pipes */
|
struct list_head list; /* global list of pipes */
|
||||||
struct file_desc d;
|
struct file_desc d;
|
||||||
unsigned int create : 1, reopen : 1;
|
unsigned int create : 1, reopen : 1;
|
||||||
};
|
};
|
||||||
|
@@ -85,7 +85,8 @@ struct shmem_info {
|
|||||||
int self_count; /* the number of regions, which belongs to "pid" */
|
int self_count; /* the number of regions, which belongs to "pid" */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct { /* For sysvipc restore */
|
/* For sysvipc restore */
|
||||||
|
struct {
|
||||||
struct list_head att; /* list of shmem_sysv_att-s */
|
struct list_head att; /* list of shmem_sysv_att-s */
|
||||||
int want_write;
|
int want_write;
|
||||||
};
|
};
|
||||||
|
@@ -19,27 +19,28 @@ extern int shmctl(int __shmid, int __cmd, struct shmid_ds *__buf);
|
|||||||
|
|
||||||
struct ipc_ids {
|
struct ipc_ids {
|
||||||
int in_use; /* TODO: Check for 0 */
|
int in_use; /* TODO: Check for 0 */
|
||||||
// unsigned short seq;
|
|
||||||
// unsigned short seq_max;
|
// unsigned short seq;
|
||||||
// struct rw_semaphore rw_mutex;
|
// unsigned short seq_max;
|
||||||
// struct idr ipcs_idr; /* TODO */
|
// struct rw_semaphore rw_mutex;
|
||||||
|
// struct idr ipcs_idr; /* TODO */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ipc_ns {
|
struct ipc_ns {
|
||||||
struct ipc_ids ids[3];
|
struct ipc_ids ids[3];
|
||||||
|
|
||||||
int sem_ctls[4]; // +
|
int sem_ctls[4];
|
||||||
int used_sems; // +
|
int used_sems;
|
||||||
|
|
||||||
int msg_ctlmax; // +
|
int msg_ctlmax;
|
||||||
int msg_ctlmnb; // +
|
int msg_ctlmnb;
|
||||||
int msg_ctlmni; // +
|
int msg_ctlmni;
|
||||||
int msg_bytes; // +
|
int msg_bytes;
|
||||||
int msg_hdrs; // +
|
int msg_hdrs;
|
||||||
int auto_msgmni; // +
|
int auto_msgmni;
|
||||||
int msg_next_id; // +
|
int msg_next_id;
|
||||||
int sem_next_id; // +
|
int sem_next_id;
|
||||||
int shm_next_id; // +
|
int shm_next_id;
|
||||||
|
|
||||||
size_t shm_ctlmax;
|
size_t shm_ctlmax;
|
||||||
size_t shm_ctlall;
|
size_t shm_ctlall;
|
||||||
|
Reference in New Issue
Block a user