From a55be46ec7a281f5c3d41d48edf32e57ef5e4ba1 Mon Sep 17 00:00:00 2001 From: sr Date: Mon, 3 Sep 2012 15:27:36 +0200 Subject: [*] Fixed and unified formatting --- src/kernel/dnbd3.h | 70 +++++++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'src/kernel/dnbd3.h') diff --git a/src/kernel/dnbd3.h b/src/kernel/dnbd3.h index 00cc676..fb83575 100644 --- a/src/kernel/dnbd3.h +++ b/src/kernel/dnbd3.h @@ -35,48 +35,48 @@ extern int major; typedef struct { - unsigned long rtts[4]; // Last four round trip time measurements in µs - uint16_t port; // Port in network representation - uint16_t protocol_version; // dnbd3 protocol version of this server - uint8_t hostaddr[16]; // Address in network representation (IPv4 or IPv6) - uint8_t hostaddrtype; // Address type (AF_INET or AF_INET6) - uint8_t failures; // How many times the server was unreachable + unsigned long rtts[4]; // Last four round trip time measurements in µs + uint16_t port; // Port in network representation + uint16_t protocol_version; // dnbd3 protocol version of this server + uint8_t hostaddr[16]; // Address in network representation (IPv4 or IPv6) + uint8_t hostaddrtype; // Address type (AF_INET or AF_INET6) + uint8_t failures; // How many times the server was unreachable } dnbd3_server_t; typedef struct { - // block - struct gendisk *disk; - spinlock_t blk_lock; + // block + struct gendisk *disk; + spinlock_t blk_lock; - // sysfs - struct kobject kobj; + // sysfs + struct kobject kobj; - // network - char *imgname; - struct socket *sock; - dnbd3_server_t cur_server, initial_server; - unsigned long cur_rtt; - serialized_buffer_t payload_buffer; - dnbd3_server_t alt_servers[NUMBER_SERVERS]; // array of alt servers - int new_servers_num; // number of new alt servers that are waiting to be copied to above array - dnbd3_server_entry_t new_servers[NUMBER_SERVERS]; // pending new alt servers - uint8_t discover, panic, disconnecting, is_server, update_available, panic_count; - uint16_t rid, heartbeat_count; - uint64_t reported_size; - // server switch - struct socket *better_sock; + // network + char *imgname; + struct socket *sock; + dnbd3_server_t cur_server, initial_server; + unsigned long cur_rtt; + serialized_buffer_t payload_buffer; + dnbd3_server_t alt_servers[NUMBER_SERVERS]; // array of alt servers + int new_servers_num; // number of new alt servers that are waiting to be copied to above array + dnbd3_server_entry_t new_servers[NUMBER_SERVERS]; // pending new alt servers + uint8_t discover, panic, disconnecting, is_server, update_available, panic_count; + uint16_t rid, heartbeat_count; + uint64_t reported_size; + // server switch + struct socket *better_sock; - // process - struct task_struct *thread_send; - struct task_struct *thread_receive; - struct task_struct *thread_discover; - struct timer_list hb_timer; - wait_queue_head_t process_queue_send; - wait_queue_head_t process_queue_receive; - wait_queue_head_t process_queue_discover; - struct list_head request_queue_send; - struct list_head request_queue_receive; + // process + struct task_struct *thread_send; + struct task_struct *thread_receive; + struct task_struct *thread_discover; + struct timer_list hb_timer; + wait_queue_head_t process_queue_send; + wait_queue_head_t process_queue_receive; + wait_queue_head_t process_queue_discover; + struct list_head request_queue_send; + struct list_head request_queue_receive; } dnbd3_device_t; -- cgit v1.2.3-55-g7522