extern void abort(void); extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); void reach_error() { __assert_fail("0", "drivers--block--drbd--drbd.ko_079.0c3f345.32_7a.cil_true-unreach-call.i", 3, "reach_error"); } /* Generated by CIL v. 1.5.1 */ /* print_CIL_Input is false */ typedef signed char __s8; typedef unsigned char __u8; typedef short __s16; typedef unsigned short __u16; typedef int __s32; typedef unsigned int __u32; typedef long long __s64; typedef unsigned long long __u64; typedef unsigned char u8; typedef unsigned short u16; typedef int s32; typedef unsigned int u32; typedef long long s64; typedef unsigned long long u64; typedef unsigned short umode_t; typedef u64 dma_addr_t; typedef unsigned int __kernel_mode_t; typedef unsigned long __kernel_nlink_t; typedef long __kernel_off_t; typedef int __kernel_pid_t; typedef unsigned int __kernel_uid_t; typedef unsigned int __kernel_gid_t; typedef unsigned long __kernel_size_t; typedef long __kernel_ssize_t; typedef long __kernel_time_t; typedef long __kernel_suseconds_t; typedef long __kernel_clock_t; typedef int __kernel_timer_t; typedef int __kernel_clockid_t; typedef long long __kernel_loff_t; typedef __kernel_uid_t __kernel_uid32_t; typedef __kernel_gid_t __kernel_gid32_t; typedef __u32 __kernel_dev_t; typedef __kernel_dev_t dev_t; typedef __kernel_mode_t mode_t; typedef __kernel_nlink_t nlink_t; typedef __kernel_off_t off_t; typedef __kernel_pid_t pid_t; typedef __kernel_clockid_t clockid_t; typedef _Bool bool; typedef __kernel_uid32_t uid_t; typedef __kernel_gid32_t gid_t; typedef __kernel_loff_t loff_t; typedef __kernel_size_t size_t; typedef __kernel_ssize_t ssize_t; typedef __kernel_time_t time_t; typedef __s32 int32_t; typedef __u32 uint32_t; typedef unsigned long sector_t; typedef unsigned long blkcnt_t; typedef __u16 __le16; typedef __u16 __be16; typedef __u32 __be32; typedef __u32 __wsum; typedef unsigned int gfp_t; typedef unsigned int fmode_t; struct __anonstruct_atomic_t_6 { int volatile counter ; }; typedef struct __anonstruct_atomic_t_6 atomic_t; struct __anonstruct_atomic64_t_7 { long volatile counter ; }; typedef struct __anonstruct_atomic64_t_7 atomic64_t; struct module; struct bug_entry { int bug_addr_disp ; int file_disp ; unsigned short line ; unsigned short flags ; }; struct completion; struct pt_regs; struct pid; struct task_struct; struct mm_struct; struct pt_regs { unsigned long r15 ; unsigned long r14 ; unsigned long r13 ; unsigned long r12 ; unsigned long bp ; unsigned long bx ; unsigned long r11 ; unsigned long r10 ; unsigned long r9 ; unsigned long r8 ; unsigned long ax ; unsigned long cx ; unsigned long dx ; unsigned long si ; unsigned long di ; unsigned long orig_ax ; unsigned long ip ; unsigned long cs ; unsigned long flags ; unsigned long sp ; unsigned long ss ; }; typedef void (*ctor_fn_t)(void); struct kernel_vm86_regs { struct pt_regs pt ; unsigned short es ; unsigned short __esh ; unsigned short ds ; unsigned short __dsh ; unsigned short fs ; unsigned short __fsh ; unsigned short gs ; unsigned short __gsh ; }; union __anonunion_ldv_1829_8 { struct pt_regs *regs ; struct kernel_vm86_regs *vm86 ; }; struct math_emu_info { long ___orig_eip ; union __anonunion_ldv_1829_8 ldv_1829 ; }; typedef unsigned long pgdval_t; typedef unsigned long pgprotval_t; struct pgprot { pgprotval_t pgprot ; }; typedef struct pgprot pgprot_t; struct __anonstruct_pgd_t_11 { pgdval_t pgd ; }; typedef struct __anonstruct_pgd_t_11 pgd_t; struct page; struct file; struct seq_file; struct __anonstruct_ldv_2048_15 { unsigned int a ; unsigned int b ; }; struct __anonstruct_ldv_2063_16 { u16 limit0 ; u16 base0 ; unsigned char base1 ; unsigned char type : 4 ; unsigned char s : 1 ; unsigned char dpl : 2 ; unsigned char p : 1 ; unsigned char limit : 4 ; unsigned char avl : 1 ; unsigned char l : 1 ; unsigned char d : 1 ; unsigned char g : 1 ; unsigned char base2 ; }; union __anonunion_ldv_2064_14 { struct __anonstruct_ldv_2048_15 ldv_2048 ; struct __anonstruct_ldv_2063_16 ldv_2063 ; }; struct desc_struct { union __anonunion_ldv_2064_14 ldv_2064 ; }; enum km_type { KM_BOUNCE_READ = 0, KM_SKB_SUNRPC_DATA = 1, KM_SKB_DATA_SOFTIRQ = 2, KM_USER0 = 3, KM_USER1 = 4, KM_BIO_SRC_IRQ = 5, KM_BIO_DST_IRQ = 6, KM_PTE0 = 7, KM_PTE1 = 8, KM_IRQ0 = 9, KM_IRQ1 = 10, KM_SOFTIRQ0 = 11, KM_SOFTIRQ1 = 12, KM_SYNC_ICACHE = 13, KM_SYNC_DCACHE = 14, KM_UML_USERCOPY = 15, KM_IRQ_PTE = 16, KM_NMI = 17, KM_NMI_PTE = 18, KM_TYPE_NR = 19 } ; struct thread_struct; struct cpumask; struct arch_spinlock; struct cpumask { unsigned long bits[64U] ; }; typedef struct cpumask cpumask_t; typedef struct cpumask *cpumask_var_t; struct exec_domain; struct map_segment; struct exec_domain { char const *name ; void (*handler)(int , struct pt_regs * ) ; unsigned char pers_low ; unsigned char pers_high ; unsigned long *signal_map ; unsigned long *signal_invmap ; struct map_segment *err_map ; struct map_segment *socktype_map ; struct map_segment *sockopt_map ; struct map_segment *af_map ; struct module *module ; struct exec_domain *next ; }; struct seq_operations; struct i387_fsave_struct { u32 cwd ; u32 swd ; u32 twd ; u32 fip ; u32 fcs ; u32 foo ; u32 fos ; u32 st_space[20U] ; u32 status ; }; struct __anonstruct_ldv_4658_20 { u64 rip ; u64 rdp ; }; struct __anonstruct_ldv_4664_21 { u32 fip ; u32 fcs ; u32 foo ; u32 fos ; }; union __anonunion_ldv_4665_19 { struct __anonstruct_ldv_4658_20 ldv_4658 ; struct __anonstruct_ldv_4664_21 ldv_4664 ; }; union __anonunion_ldv_4674_22 { u32 padding1[12U] ; u32 sw_reserved[12U] ; }; struct i387_fxsave_struct { u16 cwd ; u16 swd ; u16 twd ; u16 fop ; union __anonunion_ldv_4665_19 ldv_4665 ; u32 mxcsr ; u32 mxcsr_mask ; u32 st_space[32U] ; u32 xmm_space[64U] ; u32 padding[12U] ; union __anonunion_ldv_4674_22 ldv_4674 ; }; struct i387_soft_struct { u32 cwd ; u32 swd ; u32 twd ; u32 fip ; u32 fcs ; u32 foo ; u32 fos ; u32 st_space[20U] ; u8 ftop ; u8 changed ; u8 lookahead ; u8 no_update ; u8 rm ; u8 alimit ; struct math_emu_info *info ; u32 entry_eip ; }; struct ymmh_struct { u32 ymmh_space[64U] ; }; struct xsave_hdr_struct { u64 xstate_bv ; u64 reserved1[2U] ; u64 reserved2[5U] ; }; struct xsave_struct { struct i387_fxsave_struct i387 ; struct xsave_hdr_struct xsave_hdr ; struct ymmh_struct ymmh ; }; union thread_xstate { struct i387_fsave_struct fsave ; struct i387_fxsave_struct fxsave ; struct i387_soft_struct soft ; struct xsave_struct xsave ; }; struct kmem_cache; struct perf_event; struct ds_context; struct thread_struct { struct desc_struct tls_array[3U] ; unsigned long sp0 ; unsigned long sp ; unsigned long usersp ; unsigned short es ; unsigned short ds ; unsigned short fsindex ; unsigned short gsindex ; unsigned long fs ; unsigned long gs ; struct perf_event *ptrace_bps[4U] ; unsigned long debugreg6 ; unsigned long ptrace_dr7 ; unsigned long cr2 ; unsigned long trap_no ; unsigned long error_code ; union thread_xstate *xstate ; unsigned long *io_bitmap_ptr ; unsigned long iopl ; unsigned int io_bitmap_max ; unsigned long debugctlmsr ; struct ds_context *ds_ctx ; }; struct __anonstruct_mm_segment_t_24 { unsigned long seg ; }; typedef struct __anonstruct_mm_segment_t_24 mm_segment_t; struct list_head { struct list_head *next ; struct list_head *prev ; }; struct hlist_node; struct hlist_head { struct hlist_node *first ; }; struct hlist_node { struct hlist_node *next ; struct hlist_node **pprev ; }; struct arch_spinlock { unsigned int slock ; }; typedef struct arch_spinlock arch_spinlock_t; struct __anonstruct_arch_rwlock_t_25 { unsigned int lock ; }; typedef struct __anonstruct_arch_rwlock_t_25 arch_rwlock_t; struct lockdep_map; typedef atomic64_t atomic_long_t; struct stack_trace { unsigned int nr_entries ; unsigned int max_entries ; unsigned long *entries ; int skip ; }; struct lockdep_subclass_key { char __one_byte ; } __attribute__((__packed__)) ; struct lock_class_key { struct lockdep_subclass_key subkeys[8U] ; }; struct lock_class { struct list_head hash_entry ; struct list_head lock_entry ; struct lockdep_subclass_key *key ; unsigned int subclass ; unsigned int dep_gen_id ; unsigned long usage_mask ; struct stack_trace usage_traces[13U] ; struct list_head locks_after ; struct list_head locks_before ; unsigned int version ; unsigned long ops ; char const *name ; int name_version ; unsigned long contention_point[4U] ; unsigned long contending_point[4U] ; }; struct lockdep_map { struct lock_class_key *key ; struct lock_class *class_cache ; char const *name ; int cpu ; unsigned long ip ; }; struct held_lock { u64 prev_chain_key ; unsigned long acquire_ip ; struct lockdep_map *instance ; struct lockdep_map *nest_lock ; u64 waittime_stamp ; u64 holdtime_stamp ; unsigned short class_idx : 13 ; unsigned char irq_context : 2 ; unsigned char trylock : 1 ; unsigned char read : 2 ; unsigned char check : 2 ; unsigned char hardirqs_off : 1 ; unsigned short references : 11 ; }; struct raw_spinlock { arch_spinlock_t raw_lock ; unsigned int magic ; unsigned int owner_cpu ; void *owner ; struct lockdep_map dep_map ; }; typedef struct raw_spinlock raw_spinlock_t; struct __anonstruct_ldv_5574_27 { u8 __padding[1U] ; struct lockdep_map dep_map ; }; union __anonunion_ldv_5575_26 { struct raw_spinlock rlock ; struct __anonstruct_ldv_5574_27 ldv_5574 ; }; struct spinlock { union __anonunion_ldv_5575_26 ldv_5575 ; }; typedef struct spinlock spinlock_t; struct __anonstruct_rwlock_t_28 { arch_rwlock_t raw_lock ; unsigned int magic ; unsigned int owner_cpu ; void *owner ; struct lockdep_map dep_map ; }; typedef struct __anonstruct_rwlock_t_28 rwlock_t; struct thread_info; struct mutex { atomic_t count ; spinlock_t wait_lock ; struct list_head wait_list ; struct thread_info *owner ; char const *name ; void *magic ; struct lockdep_map dep_map ; }; struct mutex_waiter { struct list_head list ; struct task_struct *task ; void *magic ; }; struct timespec; struct compat_timespec; struct __anonstruct_ldv_5743_30 { unsigned long arg0 ; unsigned long arg1 ; unsigned long arg2 ; unsigned long arg3 ; }; struct __anonstruct_futex_31 { u32 *uaddr ; u32 val ; u32 flags ; u32 bitset ; u64 time ; u32 *uaddr2 ; }; struct __anonstruct_nanosleep_32 { clockid_t index ; struct timespec *rmtp ; struct compat_timespec *compat_rmtp ; u64 expires ; }; struct pollfd; struct __anonstruct_poll_33 { struct pollfd *ufds ; int nfds ; int has_timeout ; unsigned long tv_sec ; unsigned long tv_nsec ; }; union __anonunion_ldv_5766_29 { struct __anonstruct_ldv_5743_30 ldv_5743 ; struct __anonstruct_futex_31 futex ; struct __anonstruct_nanosleep_32 nanosleep ; struct __anonstruct_poll_33 poll ; }; struct restart_block { long (*fn)(struct restart_block * ) ; union __anonunion_ldv_5766_29 ldv_5766 ; }; struct thread_info { struct task_struct *task ; struct exec_domain *exec_domain ; __u32 flags ; __u32 status ; __u32 cpu ; int preempt_count ; mm_segment_t addr_limit ; struct restart_block restart_block ; void *sysenter_return ; int uaccess_err ; }; struct vm_area_struct; struct __anonstruct_seqlock_t_34 { unsigned int sequence ; spinlock_t lock ; }; typedef struct __anonstruct_seqlock_t_34 seqlock_t; struct timespec { __kernel_time_t tv_sec ; long tv_nsec ; }; struct timeval { __kernel_time_t tv_sec ; __kernel_suseconds_t tv_usec ; }; union ktime { s64 tv64 ; }; typedef union ktime ktime_t; struct tvec_base; struct timer_list { struct list_head entry ; unsigned long expires ; void (*function)(unsigned long ) ; unsigned long data ; struct tvec_base *base ; void *start_site ; char start_comm[16U] ; int start_pid ; struct lockdep_map lockdep_map ; }; struct hrtimer; enum hrtimer_restart; struct work_struct; struct work_struct { atomic_long_t data ; struct list_head entry ; void (*func)(struct work_struct * ) ; struct lockdep_map lockdep_map ; }; struct delayed_work { struct work_struct work ; struct timer_list timer ; }; struct hlist_nulls_node; struct hlist_nulls_head { struct hlist_nulls_node *first ; }; struct hlist_nulls_node { struct hlist_nulls_node *next ; struct hlist_nulls_node **pprev ; }; struct kstat { u64 ino ; dev_t dev ; umode_t mode ; unsigned int nlink ; uid_t uid ; gid_t gid ; dev_t rdev ; loff_t size ; struct timespec atime ; struct timespec mtime ; struct timespec ctime ; unsigned long blksize ; unsigned long long blocks ; }; struct __wait_queue; typedef struct __wait_queue wait_queue_t; struct __wait_queue { unsigned int flags ; void *private ; int (*func)(wait_queue_t * , unsigned int , int , void * ) ; struct list_head task_list ; }; struct __wait_queue_head { spinlock_t lock ; struct list_head task_list ; }; typedef struct __wait_queue_head wait_queue_head_t; struct __anonstruct_nodemask_t_35 { unsigned long bits[16U] ; }; typedef struct __anonstruct_nodemask_t_35 nodemask_t; struct rw_semaphore; typedef long rwsem_count_t; struct rw_semaphore { rwsem_count_t count ; spinlock_t wait_lock ; struct list_head wait_list ; struct lockdep_map dep_map ; }; struct ctl_table; struct device; struct completion { unsigned int done ; wait_queue_head_t wait ; }; struct pm_message { int event ; }; typedef struct pm_message pm_message_t; struct dev_pm_ops { int (*prepare)(struct device * ) ; void (*complete)(struct device * ) ; int (*suspend)(struct device * ) ; int (*resume)(struct device * ) ; int (*freeze)(struct device * ) ; int (*thaw)(struct device * ) ; int (*poweroff)(struct device * ) ; int (*restore)(struct device * ) ; int (*suspend_noirq)(struct device * ) ; int (*resume_noirq)(struct device * ) ; int (*freeze_noirq)(struct device * ) ; int (*thaw_noirq)(struct device * ) ; int (*poweroff_noirq)(struct device * ) ; int (*restore_noirq)(struct device * ) ; int (*runtime_suspend)(struct device * ) ; int (*runtime_resume)(struct device * ) ; int (*runtime_idle)(struct device * ) ; }; enum dpm_state { DPM_INVALID = 0, DPM_ON = 1, DPM_PREPARING = 2, DPM_RESUMING = 3, DPM_SUSPENDING = 4, DPM_OFF = 5, DPM_OFF_IRQ = 6 } ; enum rpm_status { RPM_ACTIVE = 0, RPM_RESUMING = 1, RPM_SUSPENDED = 2, RPM_SUSPENDING = 3 } ; enum rpm_request { RPM_REQ_NONE = 0, RPM_REQ_IDLE = 1, RPM_REQ_SUSPEND = 2, RPM_REQ_RESUME = 3 } ; struct dev_pm_info { pm_message_t power_state ; unsigned char can_wakeup : 1 ; unsigned char should_wakeup : 1 ; unsigned char async_suspend : 1 ; enum dpm_state status ; struct list_head entry ; struct completion completion ; struct timer_list suspend_timer ; unsigned long timer_expires ; struct work_struct work ; wait_queue_head_t wait_queue ; spinlock_t lock ; atomic_t usage_count ; atomic_t child_count ; unsigned char disable_depth : 3 ; unsigned char ignore_children : 1 ; unsigned char idle_notification : 1 ; unsigned char request_pending : 1 ; unsigned char deferred_resume : 1 ; unsigned char run_wake : 1 ; unsigned char runtime_auto : 1 ; enum rpm_request request ; enum rpm_status runtime_status ; int runtime_error ; }; struct __anonstruct_mm_context_t_100 { void *ldt ; int size ; struct mutex lock ; void *vdso ; }; typedef struct __anonstruct_mm_context_t_100 mm_context_t; struct call_single_data { struct list_head list ; void (*func)(void * ) ; void *info ; u16 flags ; u16 priv ; }; struct key; struct linux_binprm; typedef __u64 Elf64_Addr; typedef __u16 Elf64_Half; typedef __u32 Elf64_Word; typedef __u64 Elf64_Xword; struct elf64_sym { Elf64_Word st_name ; unsigned char st_info ; unsigned char st_other ; Elf64_Half st_shndx ; Elf64_Addr st_value ; Elf64_Xword st_size ; }; typedef struct elf64_sym Elf64_Sym; struct kobject; struct attribute { char const *name ; struct module *owner ; mode_t mode ; struct lock_class_key *key ; struct lock_class_key skey ; }; struct attribute_group { char const *name ; mode_t (*is_visible)(struct kobject * , struct attribute * , int ) ; struct attribute **attrs ; }; struct sysfs_ops { ssize_t (*show)(struct kobject * , struct attribute * , char * ) ; ssize_t (*store)(struct kobject * , struct attribute * , char const * , size_t ) ; }; struct sysfs_dirent; struct kref { atomic_t refcount ; }; struct kset; struct kobj_type; struct kobject { char const *name ; struct list_head entry ; struct kobject *parent ; struct kset *kset ; struct kobj_type *ktype ; struct sysfs_dirent *sd ; struct kref kref ; unsigned char state_initialized : 1 ; unsigned char state_in_sysfs : 1 ; unsigned char state_add_uevent_sent : 1 ; unsigned char state_remove_uevent_sent : 1 ; unsigned char uevent_suppress : 1 ; }; struct kobj_type { void (*release)(struct kobject * ) ; struct sysfs_ops const *sysfs_ops ; struct attribute **default_attrs ; }; struct kobj_uevent_env { char *envp[32U] ; int envp_idx ; char buf[2048U] ; int buflen ; }; struct kset_uevent_ops { int (* const filter)(struct kset * , struct kobject * ) ; char const *(* const name)(struct kset * , struct kobject * ) ; int (* const uevent)(struct kset * , struct kobject * , struct kobj_uevent_env * ) ; }; struct kset { struct list_head list ; spinlock_t list_lock ; struct kobject kobj ; struct kset_uevent_ops const *uevent_ops ; }; struct kernel_param; struct kparam_string; struct kparam_array; union __anonunion_ldv_10870_110 { void *arg ; struct kparam_string const *str ; struct kparam_array const *arr ; }; struct kernel_param { char const *name ; u16 perm ; u16 flags ; int (*set)(char const * , struct kernel_param * ) ; int (*get)(char * , struct kernel_param * ) ; union __anonunion_ldv_10870_110 ldv_10870 ; }; struct kparam_string { unsigned int maxlen ; char *string ; }; struct kparam_array { unsigned int max ; unsigned int *num ; int (*set)(char const * , struct kernel_param * ) ; int (*get)(char * , struct kernel_param * ) ; unsigned int elemsize ; void *elem ; }; struct rcu_head { struct rcu_head *next ; void (*func)(struct rcu_head * ) ; }; struct tracepoint; struct tracepoint { char const *name ; int state ; void (*regfunc)(void) ; void (*unregfunc)(void) ; void **funcs ; }; struct mod_arch_specific { }; struct kernel_symbol { unsigned long value ; char const *name ; }; struct module_attribute { struct attribute attr ; ssize_t (*show)(struct module_attribute * , struct module * , char * ) ; ssize_t (*store)(struct module_attribute * , struct module * , char const * , size_t ) ; void (*setup)(struct module * , char const * ) ; int (*test)(struct module * ) ; void (*free)(struct module * ) ; }; struct module_param_attrs; struct module_kobject { struct kobject kobj ; struct module *mod ; struct kobject *drivers_dir ; struct module_param_attrs *mp ; }; struct exception_table_entry; enum module_state { MODULE_STATE_LIVE = 0, MODULE_STATE_COMING = 1, MODULE_STATE_GOING = 2 } ; struct module_ref { unsigned int incs ; unsigned int decs ; }; struct module_sect_attrs; struct module_notes_attrs; struct ftrace_event_call; struct module { enum module_state state ; struct list_head list ; char name[56U] ; struct module_kobject mkobj ; struct module_attribute *modinfo_attrs ; char const *version ; char const *srcversion ; struct kobject *holders_dir ; struct kernel_symbol const *syms ; unsigned long const *crcs ; unsigned int num_syms ; struct kernel_param *kp ; unsigned int num_kp ; unsigned int num_gpl_syms ; struct kernel_symbol const *gpl_syms ; unsigned long const *gpl_crcs ; struct kernel_symbol const *unused_syms ; unsigned long const *unused_crcs ; unsigned int num_unused_syms ; unsigned int num_unused_gpl_syms ; struct kernel_symbol const *unused_gpl_syms ; unsigned long const *unused_gpl_crcs ; struct kernel_symbol const *gpl_future_syms ; unsigned long const *gpl_future_crcs ; unsigned int num_gpl_future_syms ; unsigned int num_exentries ; struct exception_table_entry *extable ; int (*init)(void) ; void *module_init ; void *module_core ; unsigned int init_size ; unsigned int core_size ; unsigned int init_text_size ; unsigned int core_text_size ; struct mod_arch_specific arch ; unsigned int taints ; unsigned int num_bugs ; struct list_head bug_list ; struct bug_entry *bug_table ; Elf64_Sym *symtab ; Elf64_Sym *core_symtab ; unsigned int num_symtab ; unsigned int core_num_syms ; char *strtab ; char *core_strtab ; struct module_sect_attrs *sect_attrs ; struct module_notes_attrs *notes_attrs ; void *percpu ; unsigned int percpu_size ; char *args ; struct tracepoint *tracepoints ; unsigned int num_tracepoints ; char const **trace_bprintk_fmt_start ; unsigned int num_trace_bprintk_fmt ; struct ftrace_event_call *trace_events ; unsigned int num_trace_events ; struct list_head modules_which_use_me ; struct task_struct *waiter ; void (*exit)(void) ; struct module_ref *refptr ; ctor_fn_t (**ctors)(void) ; unsigned int num_ctors ; }; struct device_driver; struct iovec { void *iov_base ; __kernel_size_t iov_len ; }; typedef unsigned short sa_family_t; struct sockaddr { sa_family_t sa_family ; char sa_data[14U] ; }; struct msghdr { void *msg_name ; int msg_namelen ; struct iovec *msg_iov ; __kernel_size_t msg_iovlen ; void *msg_control ; __kernel_size_t msg_controllen ; unsigned int msg_flags ; }; struct ucred { __u32 pid ; __u32 uid ; __u32 gid ; }; struct __anonstruct_sync_serial_settings_111 { unsigned int clock_rate ; unsigned int clock_type ; unsigned short loopback ; }; typedef struct __anonstruct_sync_serial_settings_111 sync_serial_settings; struct __anonstruct_te1_settings_112 { unsigned int clock_rate ; unsigned int clock_type ; unsigned short loopback ; unsigned int slot_map ; }; typedef struct __anonstruct_te1_settings_112 te1_settings; struct __anonstruct_raw_hdlc_proto_113 { unsigned short encoding ; unsigned short parity ; }; typedef struct __anonstruct_raw_hdlc_proto_113 raw_hdlc_proto; struct __anonstruct_fr_proto_114 { unsigned int t391 ; unsigned int t392 ; unsigned int n391 ; unsigned int n392 ; unsigned int n393 ; unsigned short lmi ; unsigned short dce ; }; typedef struct __anonstruct_fr_proto_114 fr_proto; struct __anonstruct_fr_proto_pvc_115 { unsigned int dlci ; }; typedef struct __anonstruct_fr_proto_pvc_115 fr_proto_pvc; struct __anonstruct_fr_proto_pvc_info_116 { unsigned int dlci ; char master[16U] ; }; typedef struct __anonstruct_fr_proto_pvc_info_116 fr_proto_pvc_info; struct __anonstruct_cisco_proto_117 { unsigned int interval ; unsigned int timeout ; }; typedef struct __anonstruct_cisco_proto_117 cisco_proto; struct ifmap { unsigned long mem_start ; unsigned long mem_end ; unsigned short base_addr ; unsigned char irq ; unsigned char dma ; unsigned char port ; }; union __anonunion_ifs_ifsu_118 { raw_hdlc_proto *raw_hdlc ; cisco_proto *cisco ; fr_proto *fr ; fr_proto_pvc *fr_pvc ; fr_proto_pvc_info *fr_pvc_info ; sync_serial_settings *sync ; te1_settings *te1 ; }; struct if_settings { unsigned int type ; unsigned int size ; union __anonunion_ifs_ifsu_118 ifs_ifsu ; }; union __anonunion_ifr_ifrn_119 { char ifrn_name[16U] ; }; union __anonunion_ifr_ifru_120 { struct sockaddr ifru_addr ; struct sockaddr ifru_dstaddr ; struct sockaddr ifru_broadaddr ; struct sockaddr ifru_netmask ; struct sockaddr ifru_hwaddr ; short ifru_flags ; int ifru_ivalue ; int ifru_mtu ; struct ifmap ifru_map ; char ifru_slave[16U] ; char ifru_newname[16U] ; void *ifru_data ; struct if_settings ifru_settings ; }; struct ifreq { union __anonunion_ifr_ifrn_119 ifr_ifrn ; union __anonunion_ifr_ifru_120 ifr_ifru ; }; struct prio_tree_node; struct raw_prio_tree_node { struct prio_tree_node *left ; struct prio_tree_node *right ; struct prio_tree_node *parent ; }; struct prio_tree_node { struct prio_tree_node *left ; struct prio_tree_node *right ; struct prio_tree_node *parent ; unsigned long start ; unsigned long last ; }; struct prio_tree_root { struct prio_tree_node *prio_tree_node ; unsigned short index_bits ; unsigned short raw ; }; struct rb_node { unsigned long rb_parent_color ; struct rb_node *rb_right ; struct rb_node *rb_left ; }; struct rb_root { struct rb_node *rb_node ; }; struct address_space; struct __anonstruct_ldv_12081_123 { u16 inuse ; u16 objects ; }; union __anonunion_ldv_12082_122 { atomic_t _mapcount ; struct __anonstruct_ldv_12081_123 ldv_12081 ; }; struct __anonstruct_ldv_12087_125 { unsigned long private ; struct address_space *mapping ; }; union __anonunion_ldv_12090_124 { struct __anonstruct_ldv_12087_125 ldv_12087 ; struct kmem_cache *slab ; struct page *first_page ; }; union __anonunion_ldv_12094_126 { unsigned long index ; void *freelist ; }; struct page { unsigned long flags ; atomic_t _count ; union __anonunion_ldv_12082_122 ldv_12082 ; union __anonunion_ldv_12090_124 ldv_12090 ; union __anonunion_ldv_12094_126 ldv_12094 ; struct list_head lru ; }; struct __anonstruct_vm_set_128 { struct list_head list ; void *parent ; struct vm_area_struct *head ; }; union __anonunion_shared_127 { struct __anonstruct_vm_set_128 vm_set ; struct raw_prio_tree_node prio_tree_node ; }; struct anon_vma; struct vm_operations_struct; struct mempolicy; struct vm_area_struct { struct mm_struct *vm_mm ; unsigned long vm_start ; unsigned long vm_end ; struct vm_area_struct *vm_next ; pgprot_t vm_page_prot ; unsigned long vm_flags ; struct rb_node vm_rb ; union __anonunion_shared_127 shared ; struct list_head anon_vma_chain ; struct anon_vma *anon_vma ; struct vm_operations_struct const *vm_ops ; unsigned long vm_pgoff ; struct file *vm_file ; void *vm_private_data ; unsigned long vm_truncate_count ; struct mempolicy *vm_policy ; }; struct core_thread { struct task_struct *task ; struct core_thread *next ; }; struct core_state { atomic_t nr_threads ; struct core_thread dumper ; struct completion startup ; }; struct mm_rss_stat { unsigned long count[3U] ; }; struct linux_binfmt; struct mmu_notifier_mm; struct mm_struct { struct vm_area_struct *mmap ; struct rb_root mm_rb ; struct vm_area_struct *mmap_cache ; unsigned long (*get_unmapped_area)(struct file * , unsigned long , unsigned long , unsigned long , unsigned long ) ; void (*unmap_area)(struct mm_struct * , unsigned long ) ; unsigned long mmap_base ; unsigned long task_size ; unsigned long cached_hole_size ; unsigned long free_area_cache ; pgd_t *pgd ; atomic_t mm_users ; atomic_t mm_count ; int map_count ; struct rw_semaphore mmap_sem ; spinlock_t page_table_lock ; struct list_head mmlist ; unsigned long hiwater_rss ; unsigned long hiwater_vm ; unsigned long total_vm ; unsigned long locked_vm ; unsigned long shared_vm ; unsigned long exec_vm ; unsigned long stack_vm ; unsigned long reserved_vm ; unsigned long def_flags ; unsigned long nr_ptes ; unsigned long start_code ; unsigned long end_code ; unsigned long start_data ; unsigned long end_data ; unsigned long start_brk ; unsigned long brk ; unsigned long start_stack ; unsigned long arg_start ; unsigned long arg_end ; unsigned long env_start ; unsigned long env_end ; unsigned long saved_auxv[44U] ; struct mm_rss_stat rss_stat ; struct linux_binfmt *binfmt ; cpumask_t cpu_vm_mask ; mm_context_t context ; unsigned int faultstamp ; unsigned int token_priority ; unsigned int last_interval ; unsigned long flags ; struct core_state *core_state ; spinlock_t ioctx_lock ; struct hlist_head ioctx_list ; struct task_struct *owner ; struct file *exe_file ; unsigned long num_exe_file_vmas ; struct mmu_notifier_mm *mmu_notifier_mm ; }; enum ldv_12789 { SS_FREE = 0, SS_UNCONNECTED = 1, SS_CONNECTING = 2, SS_CONNECTED = 3, SS_DISCONNECTING = 4 } ; typedef enum ldv_12789 socket_state; struct poll_table_struct; struct pipe_inode_info; struct inode; struct net; struct fasync_struct; struct sock; struct proto_ops; struct socket { socket_state state ; short type ; unsigned long flags ; struct fasync_struct *fasync_list ; wait_queue_head_t wait ; struct file *file ; struct sock *sk ; struct proto_ops const *ops ; }; struct kiocb; struct proto_ops { int family ; struct module *owner ; int (*release)(struct socket * ) ; int (*bind)(struct socket * , struct sockaddr * , int ) ; int (*connect)(struct socket * , struct sockaddr * , int , int ) ; int (*socketpair)(struct socket * , struct socket * ) ; int (*accept)(struct socket * , struct socket * , int ) ; int (*getname)(struct socket * , struct sockaddr * , int * , int ) ; unsigned int (*poll)(struct file * , struct socket * , struct poll_table_struct * ) ; int (*ioctl)(struct socket * , unsigned int , unsigned long ) ; int (*compat_ioctl)(struct socket * , unsigned int , unsigned long ) ; int (*listen)(struct socket * , int ) ; int (*shutdown)(struct socket * , int ) ; int (*setsockopt)(struct socket * , int , int , char * , unsigned int ) ; int (*getsockopt)(struct socket * , int , int , char * , int * ) ; int (*compat_setsockopt)(struct socket * , int , int , char * , unsigned int ) ; int (*compat_getsockopt)(struct socket * , int , int , char * , int * ) ; int (*sendmsg)(struct kiocb * , struct socket * , struct msghdr * , size_t ) ; int (*recvmsg)(struct kiocb * , struct socket * , struct msghdr * , size_t , int ) ; int (*mmap)(struct file * , struct socket * , struct vm_area_struct * ) ; ssize_t (*sendpage)(struct socket * , struct page * , int , size_t , int ) ; ssize_t (*splice_read)(struct socket * , loff_t * , struct pipe_inode_info * , size_t , unsigned int ) ; }; struct nsproxy; struct ctl_table_root; struct ctl_table_set { struct list_head list ; struct ctl_table_set *parent ; int (*is_seen)(struct ctl_table_set * ) ; }; struct ctl_table_header; typedef int proc_handler(struct ctl_table * , int , void * , size_t * , loff_t * ); struct ctl_table { char const *procname ; void *data ; int maxlen ; mode_t mode ; struct ctl_table *child ; struct ctl_table *parent ; proc_handler *proc_handler ; void *extra1 ; void *extra2 ; }; struct ctl_table_root { struct list_head root_list ; struct ctl_table_set default_set ; struct ctl_table_set *(*lookup)(struct ctl_table_root * , struct nsproxy * ) ; int (*permissions)(struct ctl_table_root * , struct nsproxy * , struct ctl_table * ) ; }; struct ctl_table_header { struct ctl_table *ctl_table ; struct list_head ctl_entry ; int used ; int count ; struct completion *unregistering ; struct ctl_table *ctl_table_arg ; struct ctl_table_root *root ; struct ctl_table_set *set ; struct ctl_table *attached_by ; struct ctl_table *attached_to ; struct ctl_table_header *parent ; }; struct ratelimit_state { spinlock_t lock ; int interval ; int burst ; int printed ; int missed ; unsigned long begin ; }; struct kmem_cache_cpu { void **freelist ; struct page *page ; int node ; unsigned int stat[18U] ; }; struct kmem_cache_node { spinlock_t list_lock ; unsigned long nr_partial ; struct list_head partial ; atomic_long_t nr_slabs ; atomic_long_t total_objects ; struct list_head full ; }; struct kmem_cache_order_objects { unsigned long x ; }; struct kmem_cache { struct kmem_cache_cpu *cpu_slab ; unsigned long flags ; int size ; int objsize ; int offset ; struct kmem_cache_order_objects oo ; struct kmem_cache_node local_node ; struct kmem_cache_order_objects max ; struct kmem_cache_order_objects min ; gfp_t allocflags ; int refcount ; void (*ctor)(void * ) ; int inuse ; int align ; unsigned long min_partial ; char const *name ; struct list_head list ; struct kobject kobj ; int remote_node_defrag_ratio ; struct kmem_cache_node *node[1024U] ; }; struct exception_table_entry { unsigned long insn ; unsigned long fixup ; }; struct in6_addr; struct sk_buff; struct klist_node; struct klist_node { void *n_klist ; struct list_head n_node ; struct kref n_ref ; }; struct semaphore { spinlock_t lock ; unsigned int count ; struct list_head wait_list ; }; struct dma_map_ops; struct dev_archdata { void *acpi_handle ; struct dma_map_ops *dma_ops ; void *iommu ; }; struct device_private; struct driver_private; struct class; struct class_private; struct bus_type; struct bus_type_private; struct bus_attribute { struct attribute attr ; ssize_t (*show)(struct bus_type * , char * ) ; ssize_t (*store)(struct bus_type * , char const * , size_t ) ; }; struct device_attribute; struct driver_attribute; struct bus_type { char const *name ; struct bus_attribute *bus_attrs ; struct device_attribute *dev_attrs ; struct driver_attribute *drv_attrs ; int (*match)(struct device * , struct device_driver * ) ; int (*uevent)(struct device * , struct kobj_uevent_env * ) ; int (*probe)(struct device * ) ; int (*remove)(struct device * ) ; void (*shutdown)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct dev_pm_ops const *pm ; struct bus_type_private *p ; }; struct device_driver { char const *name ; struct bus_type *bus ; struct module *owner ; char const *mod_name ; bool suppress_bind_attrs ; int (*probe)(struct device * ) ; int (*remove)(struct device * ) ; void (*shutdown)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct attribute_group const **groups ; struct dev_pm_ops const *pm ; struct driver_private *p ; }; struct driver_attribute { struct attribute attr ; ssize_t (*show)(struct device_driver * , char * ) ; ssize_t (*store)(struct device_driver * , char const * , size_t ) ; }; struct class_attribute; struct class { char const *name ; struct module *owner ; struct class_attribute *class_attrs ; struct device_attribute *dev_attrs ; struct kobject *dev_kobj ; int (*dev_uevent)(struct device * , struct kobj_uevent_env * ) ; char *(*devnode)(struct device * , mode_t * ) ; void (*class_release)(struct class * ) ; void (*dev_release)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct dev_pm_ops const *pm ; struct class_private *p ; }; struct device_type; struct class_attribute { struct attribute attr ; ssize_t (*show)(struct class * , struct class_attribute * , char * ) ; ssize_t (*store)(struct class * , struct class_attribute * , char const * , size_t ) ; }; struct device_type { char const *name ; struct attribute_group const **groups ; int (*uevent)(struct device * , struct kobj_uevent_env * ) ; char *(*devnode)(struct device * , mode_t * ) ; void (*release)(struct device * ) ; struct dev_pm_ops const *pm ; }; struct device_attribute { struct attribute attr ; ssize_t (*show)(struct device * , struct device_attribute * , char * ) ; ssize_t (*store)(struct device * , struct device_attribute * , char const * , size_t ) ; }; struct device_dma_parameters { unsigned int max_segment_size ; unsigned long segment_boundary_mask ; }; struct dma_coherent_mem; struct device { struct device *parent ; struct device_private *p ; struct kobject kobj ; char const *init_name ; struct device_type *type ; struct semaphore sem ; struct bus_type *bus ; struct device_driver *driver ; void *platform_data ; struct dev_pm_info power ; int numa_node ; u64 *dma_mask ; u64 coherent_dma_mask ; struct device_dma_parameters *dma_parms ; struct list_head dma_pools ; struct dma_coherent_mem *dma_mem ; struct dev_archdata archdata ; dev_t devt ; spinlock_t devres_lock ; struct list_head devres_head ; struct klist_node knode_class ; struct class *class ; struct attribute_group const **groups ; void (*release)(struct device * ) ; }; struct dma_attrs { unsigned long flags[1U] ; }; struct scatterlist { unsigned long sg_magic ; unsigned long page_link ; unsigned int offset ; unsigned int length ; dma_addr_t dma_address ; unsigned int dma_length ; }; struct file_ra_state; struct user_struct; struct writeback_control; struct rlimit; struct vm_fault { unsigned int flags ; unsigned long pgoff ; void *virtual_address ; struct page *page ; }; struct vm_operations_struct { void (*open)(struct vm_area_struct * ) ; void (*close)(struct vm_area_struct * ) ; int (*fault)(struct vm_area_struct * , struct vm_fault * ) ; int (*page_mkwrite)(struct vm_area_struct * , struct vm_fault * ) ; int (*access)(struct vm_area_struct * , unsigned long , void * , int , int ) ; int (*set_policy)(struct vm_area_struct * , struct mempolicy * ) ; struct mempolicy *(*get_policy)(struct vm_area_struct * , unsigned long ) ; int (*migrate)(struct vm_area_struct * , nodemask_t const * , nodemask_t const * , unsigned long ) ; }; enum dma_data_direction { DMA_BIDIRECTIONAL = 0, DMA_TO_DEVICE = 1, DMA_FROM_DEVICE = 2, DMA_NONE = 3 } ; struct dma_map_ops { void *(*alloc_coherent)(struct device * , size_t , dma_addr_t * , gfp_t ) ; void (*free_coherent)(struct device * , size_t , void * , dma_addr_t ) ; dma_addr_t (*map_page)(struct device * , struct page * , unsigned long , size_t , enum dma_data_direction , struct dma_attrs * ) ; void (*unmap_page)(struct device * , dma_addr_t , size_t , enum dma_data_direction , struct dma_attrs * ) ; int (*map_sg)(struct device * , struct scatterlist * , int , enum dma_data_direction , struct dma_attrs * ) ; void (*unmap_sg)(struct device * , struct scatterlist * , int , enum dma_data_direction , struct dma_attrs * ) ; void (*sync_single_for_cpu)(struct device * , dma_addr_t , size_t , enum dma_data_direction ) ; void (*sync_single_for_device)(struct device * , dma_addr_t , size_t , enum dma_data_direction ) ; void (*sync_single_range_for_cpu)(struct device * , dma_addr_t , unsigned long , size_t , enum dma_data_direction ) ; void (*sync_single_range_for_device)(struct device * , dma_addr_t , unsigned long , size_t , enum dma_data_direction ) ; void (*sync_sg_for_cpu)(struct device * , struct scatterlist * , int , enum dma_data_direction ) ; void (*sync_sg_for_device)(struct device * , struct scatterlist * , int , enum dma_data_direction ) ; int (*mapping_error)(struct device * , dma_addr_t ) ; int (*dma_supported)(struct device * , u64 ) ; int (*set_dma_mask)(struct device * , u64 ) ; int is_phys ; }; typedef s32 dma_cookie_t; struct hrtimer_clock_base; struct hrtimer_cpu_base; enum hrtimer_restart { HRTIMER_NORESTART = 0, HRTIMER_RESTART = 1 } ; struct hrtimer { struct rb_node node ; ktime_t _expires ; ktime_t _softexpires ; enum hrtimer_restart (*function)(struct hrtimer * ) ; struct hrtimer_clock_base *base ; unsigned long state ; int start_pid ; void *start_site ; char start_comm[16U] ; }; struct hrtimer_clock_base { struct hrtimer_cpu_base *cpu_base ; clockid_t index ; struct rb_root active ; struct rb_node *first ; ktime_t resolution ; ktime_t (*get_time)(void) ; ktime_t softirq_time ; ktime_t offset ; }; struct hrtimer_cpu_base { raw_spinlock_t lock ; struct hrtimer_clock_base clock_base[2U] ; ktime_t expires_next ; int hres_active ; int hang_detected ; unsigned long nr_events ; unsigned long nr_retries ; unsigned long nr_hangs ; ktime_t max_hang_time ; }; struct net_device; struct nf_conntrack { atomic_t use ; }; struct nf_bridge_info { atomic_t use ; struct net_device *physindev ; struct net_device *physoutdev ; unsigned int mask ; unsigned long data[4U] ; }; struct sk_buff_head { struct sk_buff *next ; struct sk_buff *prev ; __u32 qlen ; spinlock_t lock ; }; typedef unsigned int sk_buff_data_t; struct sec_path; struct __anonstruct_ldv_18503_132 { __u16 csum_start ; __u16 csum_offset ; }; union __anonunion_ldv_18504_131 { __wsum csum ; struct __anonstruct_ldv_18503_132 ldv_18503 ; }; union __anonunion_ldv_18532_133 { __u32 mark ; __u32 dropcount ; }; struct sk_buff { struct sk_buff *next ; struct sk_buff *prev ; ktime_t tstamp ; struct sock *sk ; struct net_device *dev ; char cb[48U] ; unsigned long _skb_dst ; struct sec_path *sp ; unsigned int len ; unsigned int data_len ; __u16 mac_len ; __u16 hdr_len ; union __anonunion_ldv_18504_131 ldv_18504 ; __u32 priority ; unsigned char local_df : 1 ; unsigned char cloned : 1 ; unsigned char ip_summed : 2 ; unsigned char nohdr : 1 ; unsigned char nfctinfo : 3 ; unsigned char pkt_type : 3 ; unsigned char fclone : 2 ; unsigned char ipvs_property : 1 ; unsigned char peeked : 1 ; unsigned char nf_trace : 1 ; __be16 protocol ; void (*destructor)(struct sk_buff * ) ; struct nf_conntrack *nfct ; struct sk_buff *nfct_reasm ; struct nf_bridge_info *nf_bridge ; int skb_iif ; __u16 tc_index ; __u16 tc_verd ; __u16 queue_mapping ; unsigned char ndisc_nodetype : 2 ; dma_cookie_t dma_cookie ; __u32 secmark ; union __anonunion_ldv_18532_133 ldv_18532 ; __u16 vlan_tci ; sk_buff_data_t transport_header ; sk_buff_data_t network_header ; sk_buff_data_t mac_header ; sk_buff_data_t tail ; sk_buff_data_t end ; unsigned char *head ; unsigned char *data ; unsigned int truesize ; atomic_t users ; }; struct dst_entry; struct rtable; struct nlattr { __u16 nla_len ; __u16 nla_type ; }; struct kernel_cap_struct { __u32 cap[2U] ; }; typedef struct kernel_cap_struct kernel_cap_t; struct dentry; struct ifla_vf_info { __u32 vf ; __u8 mac[32U] ; __u32 vlan ; __u32 qos ; __u32 tx_rate ; }; struct ethtool_cmd { __u32 cmd ; __u32 supported ; __u32 advertising ; __u16 speed ; __u8 duplex ; __u8 port ; __u8 phy_address ; __u8 transceiver ; __u8 autoneg ; __u8 mdio_support ; __u32 maxtxpkt ; __u32 maxrxpkt ; __u16 speed_hi ; __u8 eth_tp_mdix ; __u8 reserved2 ; __u32 lp_advertising ; __u32 reserved[2U] ; }; struct ethtool_drvinfo { __u32 cmd ; char driver[32U] ; char version[32U] ; char fw_version[32U] ; char bus_info[32U] ; char reserved1[32U] ; char reserved2[12U] ; __u32 n_priv_flags ; __u32 n_stats ; __u32 testinfo_len ; __u32 eedump_len ; __u32 regdump_len ; }; struct ethtool_wolinfo { __u32 cmd ; __u32 supported ; __u32 wolopts ; __u8 sopass[6U] ; }; struct ethtool_regs { __u32 cmd ; __u32 version ; __u32 len ; __u8 data[0U] ; }; struct ethtool_eeprom { __u32 cmd ; __u32 magic ; __u32 offset ; __u32 len ; __u8 data[0U] ; }; struct ethtool_coalesce { __u32 cmd ; __u32 rx_coalesce_usecs ; __u32 rx_max_coalesced_frames ; __u32 rx_coalesce_usecs_irq ; __u32 rx_max_coalesced_frames_irq ; __u32 tx_coalesce_usecs ; __u32 tx_max_coalesced_frames ; __u32 tx_coalesce_usecs_irq ; __u32 tx_max_coalesced_frames_irq ; __u32 stats_block_coalesce_usecs ; __u32 use_adaptive_rx_coalesce ; __u32 use_adaptive_tx_coalesce ; __u32 pkt_rate_low ; __u32 rx_coalesce_usecs_low ; __u32 rx_max_coalesced_frames_low ; __u32 tx_coalesce_usecs_low ; __u32 tx_max_coalesced_frames_low ; __u32 pkt_rate_high ; __u32 rx_coalesce_usecs_high ; __u32 rx_max_coalesced_frames_high ; __u32 tx_coalesce_usecs_high ; __u32 tx_max_coalesced_frames_high ; __u32 rate_sample_interval ; }; struct ethtool_ringparam { __u32 cmd ; __u32 rx_max_pending ; __u32 rx_mini_max_pending ; __u32 rx_jumbo_max_pending ; __u32 tx_max_pending ; __u32 rx_pending ; __u32 rx_mini_pending ; __u32 rx_jumbo_pending ; __u32 tx_pending ; }; struct ethtool_pauseparam { __u32 cmd ; __u32 autoneg ; __u32 rx_pause ; __u32 tx_pause ; }; struct ethtool_test { __u32 cmd ; __u32 flags ; __u32 reserved ; __u32 len ; __u64 data[0U] ; }; struct ethtool_stats { __u32 cmd ; __u32 n_stats ; __u64 data[0U] ; }; struct ethtool_tcpip4_spec { __be32 ip4src ; __be32 ip4dst ; __be16 psrc ; __be16 pdst ; __u8 tos ; }; struct ethtool_ah_espip4_spec { __be32 ip4src ; __be32 ip4dst ; __be32 spi ; __u8 tos ; }; struct ethtool_rawip4_spec { __be32 ip4src ; __be32 ip4dst ; __u8 hdata[64U] ; }; struct ethtool_ether_spec { __be16 ether_type ; __u8 frame_size ; __u8 eframe[16U] ; }; struct ethtool_usrip4_spec { __be32 ip4src ; __be32 ip4dst ; __be32 l4_4_bytes ; __u8 tos ; __u8 ip_ver ; __u8 proto ; }; union __anonunion_h_u_135 { struct ethtool_tcpip4_spec tcp_ip4_spec ; struct ethtool_tcpip4_spec udp_ip4_spec ; struct ethtool_tcpip4_spec sctp_ip4_spec ; struct ethtool_ah_espip4_spec ah_ip4_spec ; struct ethtool_ah_espip4_spec esp_ip4_spec ; struct ethtool_rawip4_spec raw_ip4_spec ; struct ethtool_ether_spec ether_spec ; struct ethtool_usrip4_spec usr_ip4_spec ; __u8 hdata[64U] ; }; union __anonunion_m_u_136 { struct ethtool_tcpip4_spec tcp_ip4_spec ; struct ethtool_tcpip4_spec udp_ip4_spec ; struct ethtool_tcpip4_spec sctp_ip4_spec ; struct ethtool_ah_espip4_spec ah_ip4_spec ; struct ethtool_ah_espip4_spec esp_ip4_spec ; struct ethtool_rawip4_spec raw_ip4_spec ; struct ethtool_ether_spec ether_spec ; struct ethtool_usrip4_spec usr_ip4_spec ; __u8 hdata[64U] ; }; struct ethtool_rx_flow_spec { __u32 flow_type ; union __anonunion_h_u_135 h_u ; union __anonunion_m_u_136 m_u ; __u64 ring_cookie ; __u32 location ; }; struct ethtool_rxnfc { __u32 cmd ; __u32 flow_type ; __u64 data ; struct ethtool_rx_flow_spec fs ; __u32 rule_cnt ; __u32 rule_locs[0U] ; }; union __anonunion_h_u_137 { struct ethtool_tcpip4_spec tcp_ip4_spec ; struct ethtool_tcpip4_spec udp_ip4_spec ; struct ethtool_tcpip4_spec sctp_ip4_spec ; struct ethtool_ah_espip4_spec ah_ip4_spec ; struct ethtool_ah_espip4_spec esp_ip4_spec ; struct ethtool_rawip4_spec raw_ip4_spec ; struct ethtool_ether_spec ether_spec ; struct ethtool_usrip4_spec usr_ip4_spec ; __u8 hdata[64U] ; }; union __anonunion_m_u_138 { struct ethtool_tcpip4_spec tcp_ip4_spec ; struct ethtool_tcpip4_spec udp_ip4_spec ; struct ethtool_tcpip4_spec sctp_ip4_spec ; struct ethtool_ah_espip4_spec ah_ip4_spec ; struct ethtool_ah_espip4_spec esp_ip4_spec ; struct ethtool_rawip4_spec raw_ip4_spec ; struct ethtool_ether_spec ether_spec ; struct ethtool_usrip4_spec usr_ip4_spec ; __u8 hdata[64U] ; }; struct ethtool_rx_ntuple_flow_spec { __u32 flow_type ; union __anonunion_h_u_137 h_u ; union __anonunion_m_u_138 m_u ; __u16 vlan_tag ; __u16 vlan_tag_mask ; __u64 data ; __u64 data_mask ; __s32 action ; }; struct ethtool_rx_ntuple { __u32 cmd ; struct ethtool_rx_ntuple_flow_spec fs ; }; struct ethtool_flash { __u32 cmd ; __u32 region ; char data[128U] ; }; struct ethtool_rx_ntuple_list { struct list_head list ; unsigned int count ; }; struct ethtool_ops { int (*get_settings)(struct net_device * , struct ethtool_cmd * ) ; int (*set_settings)(struct net_device * , struct ethtool_cmd * ) ; void (*get_drvinfo)(struct net_device * , struct ethtool_drvinfo * ) ; int (*get_regs_len)(struct net_device * ) ; void (*get_regs)(struct net_device * , struct ethtool_regs * , void * ) ; void (*get_wol)(struct net_device * , struct ethtool_wolinfo * ) ; int (*set_wol)(struct net_device * , struct ethtool_wolinfo * ) ; u32 (*get_msglevel)(struct net_device * ) ; void (*set_msglevel)(struct net_device * , u32 ) ; int (*nway_reset)(struct net_device * ) ; u32 (*get_link)(struct net_device * ) ; int (*get_eeprom_len)(struct net_device * ) ; int (*get_eeprom)(struct net_device * , struct ethtool_eeprom * , u8 * ) ; int (*set_eeprom)(struct net_device * , struct ethtool_eeprom * , u8 * ) ; int (*get_coalesce)(struct net_device * , struct ethtool_coalesce * ) ; int (*set_coalesce)(struct net_device * , struct ethtool_coalesce * ) ; void (*get_ringparam)(struct net_device * , struct ethtool_ringparam * ) ; int (*set_ringparam)(struct net_device * , struct ethtool_ringparam * ) ; void (*get_pauseparam)(struct net_device * , struct ethtool_pauseparam * ) ; int (*set_pauseparam)(struct net_device * , struct ethtool_pauseparam * ) ; u32 (*get_rx_csum)(struct net_device * ) ; int (*set_rx_csum)(struct net_device * , u32 ) ; u32 (*get_tx_csum)(struct net_device * ) ; int (*set_tx_csum)(struct net_device * , u32 ) ; u32 (*get_sg)(struct net_device * ) ; int (*set_sg)(struct net_device * , u32 ) ; u32 (*get_tso)(struct net_device * ) ; int (*set_tso)(struct net_device * , u32 ) ; void (*self_test)(struct net_device * , struct ethtool_test * , u64 * ) ; void (*get_strings)(struct net_device * , u32 , u8 * ) ; int (*phys_id)(struct net_device * , u32 ) ; void (*get_ethtool_stats)(struct net_device * , struct ethtool_stats * , u64 * ) ; int (*begin)(struct net_device * ) ; void (*complete)(struct net_device * ) ; u32 (*get_ufo)(struct net_device * ) ; int (*set_ufo)(struct net_device * , u32 ) ; u32 (*get_flags)(struct net_device * ) ; int (*set_flags)(struct net_device * , u32 ) ; u32 (*get_priv_flags)(struct net_device * ) ; int (*set_priv_flags)(struct net_device * , u32 ) ; int (*get_sset_count)(struct net_device * , int ) ; int (*get_rxnfc)(struct net_device * , struct ethtool_rxnfc * , void * ) ; int (*set_rxnfc)(struct net_device * , struct ethtool_rxnfc * ) ; int (*flash_device)(struct net_device * , struct ethtool_flash * ) ; int (*reset)(struct net_device * , u32 * ) ; int (*set_rx_ntuple)(struct net_device * , struct ethtool_rx_ntuple * ) ; int (*get_rx_ntuple)(struct net_device * , u32 , void * ) ; }; struct prot_inuse; struct netns_core { struct ctl_table_header *sysctl_hdr ; int sysctl_somaxconn ; struct prot_inuse *inuse ; }; struct ipstats_mib { unsigned long mibs[31U] ; }; struct icmp_mib { unsigned long mibs[28U] ; }; struct icmpmsg_mib { unsigned long mibs[512U] ; }; struct icmpv6_mib { unsigned long mibs[4U] ; }; struct icmpv6msg_mib { unsigned long mibs[512U] ; }; struct tcp_mib { unsigned long mibs[15U] ; }; struct udp_mib { unsigned long mibs[7U] ; }; struct linux_mib { unsigned long mibs[77U] ; }; struct linux_xfrm_mib { unsigned long mibs[27U] ; }; struct proc_dir_entry; struct netns_mib { struct tcp_mib *tcp_statistics[2U] ; struct ipstats_mib *ip_statistics[2U] ; struct linux_mib *net_statistics[2U] ; struct udp_mib *udp_statistics[2U] ; struct udp_mib *udplite_statistics[2U] ; struct icmp_mib *icmp_statistics[2U] ; struct icmpmsg_mib *icmpmsg_statistics[2U] ; struct proc_dir_entry *proc_net_devsnmp6 ; struct udp_mib *udp_stats_in6[2U] ; struct udp_mib *udplite_stats_in6[2U] ; struct ipstats_mib *ipv6_statistics[2U] ; struct icmpv6_mib *icmpv6_statistics[2U] ; struct icmpv6msg_mib *icmpv6msg_statistics[2U] ; struct linux_xfrm_mib *xfrm_statistics[2U] ; }; struct netns_unix { int sysctl_max_dgram_qlen ; struct ctl_table_header *ctl ; }; struct netns_packet { spinlock_t sklist_lock ; struct hlist_head sklist ; }; struct netns_frags { int nqueues ; atomic_t mem ; struct list_head lru_list ; int timeout ; int high_thresh ; int low_thresh ; }; struct ipv4_devconf; struct fib_rules_ops; struct xt_table; struct mfc_cache; struct vif_device; struct netns_ipv4 { struct ctl_table_header *forw_hdr ; struct ctl_table_header *frags_hdr ; struct ctl_table_header *ipv4_hdr ; struct ctl_table_header *route_hdr ; struct ipv4_devconf *devconf_all ; struct ipv4_devconf *devconf_dflt ; struct fib_rules_ops *rules_ops ; struct hlist_head *fib_table_hash ; struct sock *fibnl ; struct sock **icmp_sk ; struct sock *tcp_sock ; struct netns_frags frags ; struct xt_table *iptable_filter ; struct xt_table *iptable_mangle ; struct xt_table *iptable_raw ; struct xt_table *arptable_filter ; struct xt_table *iptable_security ; struct xt_table *nat_table ; struct hlist_head *nat_bysource ; unsigned int nat_htable_size ; int nat_vmalloced ; int sysctl_icmp_echo_ignore_all ; int sysctl_icmp_echo_ignore_broadcasts ; int sysctl_icmp_ignore_bogus_error_responses ; int sysctl_icmp_ratelimit ; int sysctl_icmp_ratemask ; int sysctl_icmp_errors_use_inbound_ifaddr ; int sysctl_rt_cache_rebuild_count ; int current_rt_cache_rebuild_count ; struct timer_list rt_secret_timer ; atomic_t rt_genid ; struct sock *mroute_sk ; struct mfc_cache **mfc_cache_array ; struct vif_device *vif_table ; int maxvif ; atomic_t cache_resolve_queue_len ; int mroute_do_assert ; int mroute_do_pim ; int mroute_reg_vif_num ; }; struct dst_ops { unsigned short family ; __be16 protocol ; unsigned int gc_thresh ; int (*gc)(struct dst_ops * ) ; struct dst_entry *(*check)(struct dst_entry * , __u32 ) ; void (*destroy)(struct dst_entry * ) ; void (*ifdown)(struct dst_entry * , struct net_device * , int ) ; struct dst_entry *(*negative_advice)(struct dst_entry * ) ; void (*link_failure)(struct sk_buff * ) ; void (*update_pmtu)(struct dst_entry * , u32 ) ; int (*local_out)(struct sk_buff * ) ; atomic_t entries ; struct kmem_cache *kmem_cachep ; }; struct netns_sysctl_ipv6 { struct ctl_table_header *table ; struct ctl_table_header *frags_hdr ; int bindv6only ; int flush_delay ; int ip6_rt_max_size ; int ip6_rt_gc_min_interval ; int ip6_rt_gc_timeout ; int ip6_rt_gc_interval ; int ip6_rt_gc_elasticity ; int ip6_rt_mtu_expires ; int ip6_rt_min_advmss ; int icmpv6_time ; }; struct ipv6_devconf; struct rt6_info; struct rt6_statistics; struct fib6_table; struct mfc6_cache; struct mif_device; struct netns_ipv6 { struct netns_sysctl_ipv6 sysctl ; struct ipv6_devconf *devconf_all ; struct ipv6_devconf *devconf_dflt ; struct netns_frags frags ; struct xt_table *ip6table_filter ; struct xt_table *ip6table_mangle ; struct xt_table *ip6table_raw ; struct xt_table *ip6table_security ; struct rt6_info *ip6_null_entry ; struct rt6_statistics *rt6_stats ; struct timer_list ip6_fib_timer ; struct hlist_head *fib_table_hash ; struct fib6_table *fib6_main_tbl ; struct dst_ops ip6_dst_ops ; unsigned int ip6_rt_gc_expire ; unsigned long ip6_rt_last_gc ; struct rt6_info *ip6_prohibit_entry ; struct rt6_info *ip6_blk_hole_entry ; struct fib6_table *fib6_local_tbl ; struct fib_rules_ops *fib6_rules_ops ; struct sock **icmp_sk ; struct sock *ndisc_sk ; struct sock *tcp_sk ; struct sock *igmp_sk ; struct sock *mroute6_sk ; struct mfc6_cache **mfc6_cache_array ; struct mif_device *vif6_table ; int maxvif ; atomic_t cache_resolve_queue_len ; int mroute_do_assert ; int mroute_do_pim ; int mroute_reg_vif_num ; }; struct netns_dccp { struct sock *v4_ctl_sk ; struct sock *v6_ctl_sk ; }; union __anonunion_in6_u_139 { __u8 u6_addr8[16U] ; __be16 u6_addr16[8U] ; __be32 u6_addr32[4U] ; }; struct in6_addr { union __anonunion_in6_u_139 in6_u ; }; struct flowi; struct __anonstruct_ip4_u_141 { __be32 daddr ; __be32 saddr ; __u8 tos ; __u8 scope ; }; struct __anonstruct_ip6_u_142 { struct in6_addr daddr ; struct in6_addr saddr ; __be32 flowlabel ; }; struct __anonstruct_dn_u_143 { __le16 daddr ; __le16 saddr ; __u8 scope ; }; union __anonunion_nl_u_140 { struct __anonstruct_ip4_u_141 ip4_u ; struct __anonstruct_ip6_u_142 ip6_u ; struct __anonstruct_dn_u_143 dn_u ; }; struct __anonstruct_ports_145 { __be16 sport ; __be16 dport ; }; struct __anonstruct_icmpt_146 { __u8 type ; __u8 code ; }; struct __anonstruct_dnports_147 { __le16 sport ; __le16 dport ; }; struct __anonstruct_mht_148 { __u8 type ; }; union __anonunion_uli_u_144 { struct __anonstruct_ports_145 ports ; struct __anonstruct_icmpt_146 icmpt ; struct __anonstruct_dnports_147 dnports ; __be32 spi ; struct __anonstruct_mht_148 mht ; }; struct flowi { int oif ; int iif ; __u32 mark ; union __anonunion_nl_u_140 nl_u ; __u8 proto ; __u8 flags ; union __anonunion_uli_u_144 uli_u ; __u32 secid ; }; struct nameidata; struct path; struct vfsmount; struct qstr { unsigned int hash ; unsigned int len ; unsigned char const *name ; }; union __anonunion_d_u_149 { struct list_head d_child ; struct rcu_head d_rcu ; }; struct dentry_operations; struct super_block; struct dentry { atomic_t d_count ; unsigned int d_flags ; spinlock_t d_lock ; int d_mounted ; struct inode *d_inode ; struct hlist_node d_hash ; struct dentry *d_parent ; struct qstr d_name ; struct list_head d_lru ; union __anonunion_d_u_149 d_u ; struct list_head d_subdirs ; struct list_head d_alias ; unsigned long d_time ; struct dentry_operations const *d_op ; struct super_block *d_sb ; void *d_fsdata ; unsigned char d_iname[32U] ; }; struct dentry_operations { int (*d_revalidate)(struct dentry * , struct nameidata * ) ; int (*d_hash)(struct dentry * , struct qstr * ) ; int (*d_compare)(struct dentry * , struct qstr * , struct qstr * ) ; int (*d_delete)(struct dentry * ) ; void (*d_release)(struct dentry * ) ; void (*d_iput)(struct dentry * , struct inode * ) ; char *(*d_dname)(struct dentry * , char * , int ) ; }; struct path { struct vfsmount *mnt ; struct dentry *dentry ; }; struct radix_tree_node; struct radix_tree_root { unsigned int height ; gfp_t gfp_mask ; struct radix_tree_node *rnode ; }; enum pid_type { PIDTYPE_PID = 0, PIDTYPE_PGID = 1, PIDTYPE_SID = 2, PIDTYPE_MAX = 3 } ; struct pid_namespace; struct upid { int nr ; struct pid_namespace *ns ; struct hlist_node pid_chain ; }; struct pid { atomic_t count ; unsigned int level ; struct hlist_head tasks[3U] ; struct rcu_head rcu ; struct upid numbers[1U] ; }; struct pid_link { struct hlist_node node ; struct pid *pid ; }; struct fiemap_extent { __u64 fe_logical ; __u64 fe_physical ; __u64 fe_length ; __u64 fe_reserved64[2U] ; __u32 fe_flags ; __u32 fe_reserved[3U] ; }; struct export_operations; struct hd_geometry; struct kstatfs; struct cred; struct iattr { unsigned int ia_valid ; umode_t ia_mode ; uid_t ia_uid ; gid_t ia_gid ; loff_t ia_size ; struct timespec ia_atime ; struct timespec ia_mtime ; struct timespec ia_ctime ; struct file *ia_file ; }; struct if_dqblk { __u64 dqb_bhardlimit ; __u64 dqb_bsoftlimit ; __u64 dqb_curspace ; __u64 dqb_ihardlimit ; __u64 dqb_isoftlimit ; __u64 dqb_curinodes ; __u64 dqb_btime ; __u64 dqb_itime ; __u32 dqb_valid ; }; struct if_dqinfo { __u64 dqi_bgrace ; __u64 dqi_igrace ; __u32 dqi_flags ; __u32 dqi_valid ; }; struct fs_disk_quota { __s8 d_version ; __s8 d_flags ; __u16 d_fieldmask ; __u32 d_id ; __u64 d_blk_hardlimit ; __u64 d_blk_softlimit ; __u64 d_ino_hardlimit ; __u64 d_ino_softlimit ; __u64 d_bcount ; __u64 d_icount ; __s32 d_itimer ; __s32 d_btimer ; __u16 d_iwarns ; __u16 d_bwarns ; __s32 d_padding2 ; __u64 d_rtb_hardlimit ; __u64 d_rtb_softlimit ; __u64 d_rtbcount ; __s32 d_rtbtimer ; __u16 d_rtbwarns ; __s16 d_padding3 ; char d_padding4[8U] ; }; struct fs_qfilestat { __u64 qfs_ino ; __u64 qfs_nblks ; __u32 qfs_nextents ; }; typedef struct fs_qfilestat fs_qfilestat_t; struct fs_quota_stat { __s8 qs_version ; __u16 qs_flags ; __s8 qs_pad ; fs_qfilestat_t qs_uquota ; fs_qfilestat_t qs_gquota ; __u32 qs_incoredqs ; __s32 qs_btimelimit ; __s32 qs_itimelimit ; __s32 qs_rtbtimelimit ; __u16 qs_bwarnlimit ; __u16 qs_iwarnlimit ; }; struct dquot; typedef __kernel_uid32_t qid_t; typedef long long qsize_t; struct mem_dqblk { qsize_t dqb_bhardlimit ; qsize_t dqb_bsoftlimit ; qsize_t dqb_curspace ; qsize_t dqb_rsvspace ; qsize_t dqb_ihardlimit ; qsize_t dqb_isoftlimit ; qsize_t dqb_curinodes ; time_t dqb_btime ; time_t dqb_itime ; }; struct quota_format_type; struct mem_dqinfo { struct quota_format_type *dqi_format ; int dqi_fmt_id ; struct list_head dqi_dirty_list ; unsigned long dqi_flags ; unsigned int dqi_bgrace ; unsigned int dqi_igrace ; qsize_t dqi_maxblimit ; qsize_t dqi_maxilimit ; void *dqi_priv ; }; struct dquot { struct hlist_node dq_hash ; struct list_head dq_inuse ; struct list_head dq_free ; struct list_head dq_dirty ; struct mutex dq_lock ; atomic_t dq_count ; wait_queue_head_t dq_wait_unused ; struct super_block *dq_sb ; unsigned int dq_id ; loff_t dq_off ; unsigned long dq_flags ; short dq_type ; struct mem_dqblk dq_dqb ; }; struct quota_format_ops { int (*check_quota_file)(struct super_block * , int ) ; int (*read_file_info)(struct super_block * , int ) ; int (*write_file_info)(struct super_block * , int ) ; int (*free_file_info)(struct super_block * , int ) ; int (*read_dqblk)(struct dquot * ) ; int (*commit_dqblk)(struct dquot * ) ; int (*release_dqblk)(struct dquot * ) ; }; struct dquot_operations { int (*write_dquot)(struct dquot * ) ; struct dquot *(*alloc_dquot)(struct super_block * , int ) ; void (*destroy_dquot)(struct dquot * ) ; int (*acquire_dquot)(struct dquot * ) ; int (*release_dquot)(struct dquot * ) ; int (*mark_dirty)(struct dquot * ) ; int (*write_info)(struct super_block * , int ) ; qsize_t *(*get_reserved_space)(struct inode * ) ; }; struct quotactl_ops { int (*quota_on)(struct super_block * , int , int , char * , int ) ; int (*quota_off)(struct super_block * , int , int ) ; int (*quota_sync)(struct super_block * , int , int ) ; int (*get_info)(struct super_block * , int , struct if_dqinfo * ) ; int (*set_info)(struct super_block * , int , struct if_dqinfo * ) ; int (*get_dqblk)(struct super_block * , int , qid_t , struct if_dqblk * ) ; int (*set_dqblk)(struct super_block * , int , qid_t , struct if_dqblk * ) ; int (*get_xstate)(struct super_block * , struct fs_quota_stat * ) ; int (*set_xstate)(struct super_block * , unsigned int , int ) ; int (*get_xquota)(struct super_block * , int , qid_t , struct fs_disk_quota * ) ; int (*set_xquota)(struct super_block * , int , qid_t , struct fs_disk_quota * ) ; }; struct quota_format_type { int qf_fmt_id ; struct quota_format_ops const *qf_ops ; struct module *qf_owner ; struct quota_format_type *qf_next ; }; struct quota_info { unsigned int flags ; struct mutex dqio_mutex ; struct mutex dqonoff_mutex ; struct rw_semaphore dqptr_sem ; struct inode *files[2U] ; struct mem_dqinfo info[2U] ; struct quota_format_ops const *ops[2U] ; }; union __anonunion_arg_151 { char *buf ; void *data ; }; struct __anonstruct_read_descriptor_t_150 { size_t written ; size_t count ; union __anonunion_arg_151 arg ; int error ; }; typedef struct __anonstruct_read_descriptor_t_150 read_descriptor_t; struct address_space_operations { int (*writepage)(struct page * , struct writeback_control * ) ; int (*readpage)(struct file * , struct page * ) ; void (*sync_page)(struct page * ) ; int (*writepages)(struct address_space * , struct writeback_control * ) ; int (*set_page_dirty)(struct page * ) ; int (*readpages)(struct file * , struct address_space * , struct list_head * , unsigned int ) ; int (*write_begin)(struct file * , struct address_space * , loff_t , unsigned int , unsigned int , struct page ** , void ** ) ; int (*write_end)(struct file * , struct address_space * , loff_t , unsigned int , unsigned int , struct page * , void * ) ; sector_t (*bmap)(struct address_space * , sector_t ) ; void (*invalidatepage)(struct page * , unsigned long ) ; int (*releasepage)(struct page * , gfp_t ) ; ssize_t (*direct_IO)(int , struct kiocb * , struct iovec const * , loff_t , unsigned long ) ; int (*get_xip_mem)(struct address_space * , unsigned long , int , void ** , unsigned long * ) ; int (*migratepage)(struct address_space * , struct page * , struct page * ) ; int (*launder_page)(struct page * ) ; int (*is_partially_uptodate)(struct page * , read_descriptor_t * , unsigned long ) ; int (*error_remove_page)(struct address_space * , struct page * ) ; }; struct backing_dev_info; struct address_space { struct inode *host ; struct radix_tree_root page_tree ; spinlock_t tree_lock ; unsigned int i_mmap_writable ; struct prio_tree_root i_mmap ; struct list_head i_mmap_nonlinear ; spinlock_t i_mmap_lock ; unsigned int truncate_count ; unsigned long nrpages ; unsigned long writeback_index ; struct address_space_operations const *a_ops ; unsigned long flags ; struct backing_dev_info *backing_dev_info ; spinlock_t private_lock ; struct list_head private_list ; struct address_space *assoc_mapping ; }; struct hd_struct; struct gendisk; struct block_device { dev_t bd_dev ; struct inode *bd_inode ; struct super_block *bd_super ; int bd_openers ; struct mutex bd_mutex ; struct list_head bd_inodes ; void *bd_claiming ; void *bd_holder ; int bd_holders ; struct list_head bd_holder_list ; struct block_device *bd_contains ; unsigned int bd_block_size ; struct hd_struct *bd_part ; unsigned int bd_part_count ; int bd_invalidated ; struct gendisk *bd_disk ; struct list_head bd_list ; unsigned long bd_private ; int bd_fsfreeze_count ; struct mutex bd_fsfreeze_mutex ; }; struct posix_acl; struct inode_operations; struct file_operations; struct file_lock; struct cdev; union __anonunion_ldv_22098_152 { struct pipe_inode_info *i_pipe ; struct block_device *i_bdev ; struct cdev *i_cdev ; }; struct inode { struct hlist_node i_hash ; struct list_head i_list ; struct list_head i_sb_list ; struct list_head i_dentry ; unsigned long i_ino ; atomic_t i_count ; unsigned int i_nlink ; uid_t i_uid ; gid_t i_gid ; dev_t i_rdev ; unsigned int i_blkbits ; u64 i_version ; loff_t i_size ; struct timespec i_atime ; struct timespec i_mtime ; struct timespec i_ctime ; blkcnt_t i_blocks ; unsigned short i_bytes ; umode_t i_mode ; spinlock_t i_lock ; struct mutex i_mutex ; struct rw_semaphore i_alloc_sem ; struct inode_operations const *i_op ; struct file_operations const *i_fop ; struct super_block *i_sb ; struct file_lock *i_flock ; struct address_space *i_mapping ; struct address_space i_data ; struct dquot *i_dquot[2U] ; struct list_head i_devices ; union __anonunion_ldv_22098_152 ldv_22098 ; __u32 i_generation ; __u32 i_fsnotify_mask ; struct hlist_head i_fsnotify_mark_entries ; struct list_head inotify_watches ; struct mutex inotify_mutex ; unsigned long i_state ; unsigned long dirtied_when ; unsigned int i_flags ; atomic_t i_writecount ; void *i_security ; struct posix_acl *i_acl ; struct posix_acl *i_default_acl ; void *i_private ; }; struct fown_struct { rwlock_t lock ; struct pid *pid ; enum pid_type pid_type ; uid_t uid ; uid_t euid ; int signum ; }; struct file_ra_state { unsigned long start ; unsigned int size ; unsigned int async_size ; unsigned int ra_pages ; unsigned int mmap_miss ; loff_t prev_pos ; }; union __anonunion_f_u_153 { struct list_head fu_list ; struct rcu_head fu_rcuhead ; }; struct file { union __anonunion_f_u_153 f_u ; struct path f_path ; struct file_operations const *f_op ; spinlock_t f_lock ; atomic_long_t f_count ; unsigned int f_flags ; fmode_t f_mode ; loff_t f_pos ; struct fown_struct f_owner ; struct cred const *f_cred ; struct file_ra_state f_ra ; u64 f_version ; void *f_security ; void *private_data ; struct list_head f_ep_links ; struct address_space *f_mapping ; unsigned long f_mnt_write_state ; }; struct files_struct; typedef struct files_struct *fl_owner_t; struct file_lock_operations { void (*fl_copy_lock)(struct file_lock * , struct file_lock * ) ; void (*fl_release_private)(struct file_lock * ) ; }; struct lock_manager_operations { int (*fl_compare_owner)(struct file_lock * , struct file_lock * ) ; void (*fl_notify)(struct file_lock * ) ; int (*fl_grant)(struct file_lock * , struct file_lock * , int ) ; void (*fl_copy_lock)(struct file_lock * , struct file_lock * ) ; void (*fl_release_private)(struct file_lock * ) ; void (*fl_break)(struct file_lock * ) ; int (*fl_mylease)(struct file_lock * , struct file_lock * ) ; int (*fl_change)(struct file_lock ** , int ) ; }; struct nlm_lockowner; struct nfs_lock_info { u32 state ; struct nlm_lockowner *owner ; struct list_head list ; }; struct nfs4_lock_state; struct nfs4_lock_info { struct nfs4_lock_state *owner ; }; struct __anonstruct_afs_155 { struct list_head link ; int state ; }; union __anonunion_fl_u_154 { struct nfs_lock_info nfs_fl ; struct nfs4_lock_info nfs4_fl ; struct __anonstruct_afs_155 afs ; }; struct file_lock { struct file_lock *fl_next ; struct list_head fl_link ; struct list_head fl_block ; fl_owner_t fl_owner ; unsigned char fl_flags ; unsigned char fl_type ; unsigned int fl_pid ; struct pid *fl_nspid ; wait_queue_head_t fl_wait ; struct file *fl_file ; loff_t fl_start ; loff_t fl_end ; struct fasync_struct *fl_fasync ; unsigned long fl_break_time ; struct file_lock_operations const *fl_ops ; struct lock_manager_operations const *fl_lmops ; union __anonunion_fl_u_154 fl_u ; }; struct fasync_struct { int magic ; int fa_fd ; struct fasync_struct *fa_next ; struct file *fa_file ; }; struct file_system_type; struct super_operations; struct xattr_handler; struct mtd_info; struct super_block { struct list_head s_list ; dev_t s_dev ; unsigned char s_dirt ; unsigned char s_blocksize_bits ; unsigned long s_blocksize ; loff_t s_maxbytes ; struct file_system_type *s_type ; struct super_operations const *s_op ; struct dquot_operations const *dq_op ; struct quotactl_ops const *s_qcop ; struct export_operations const *s_export_op ; unsigned long s_flags ; unsigned long s_magic ; struct dentry *s_root ; struct rw_semaphore s_umount ; struct mutex s_lock ; int s_count ; int s_need_sync ; atomic_t s_active ; void *s_security ; struct xattr_handler **s_xattr ; struct list_head s_inodes ; struct hlist_head s_anon ; struct list_head s_files ; struct list_head s_dentry_lru ; int s_nr_dentry_unused ; struct block_device *s_bdev ; struct backing_dev_info *s_bdi ; struct mtd_info *s_mtd ; struct list_head s_instances ; struct quota_info s_dquot ; int s_frozen ; wait_queue_head_t s_wait_unfrozen ; char s_id[32U] ; void *s_fs_info ; fmode_t s_mode ; u32 s_time_gran ; struct mutex s_vfs_rename_mutex ; char *s_subtype ; char *s_options ; }; struct fiemap_extent_info { unsigned int fi_flags ; unsigned int fi_extents_mapped ; unsigned int fi_extents_max ; struct fiemap_extent *fi_extents_start ; }; struct block_device_operations; struct file_operations { struct module *owner ; loff_t (*llseek)(struct file * , loff_t , int ) ; ssize_t (*read)(struct file * , char * , size_t , loff_t * ) ; ssize_t (*write)(struct file * , char const * , size_t , loff_t * ) ; ssize_t (*aio_read)(struct kiocb * , struct iovec const * , unsigned long , loff_t ) ; ssize_t (*aio_write)(struct kiocb * , struct iovec const * , unsigned long , loff_t ) ; int (*readdir)(struct file * , void * , int (*)(void * , char const * , int , loff_t , u64 , unsigned int ) ) ; unsigned int (*poll)(struct file * , struct poll_table_struct * ) ; int (*ioctl)(struct inode * , struct file * , unsigned int , unsigned long ) ; long (*unlocked_ioctl)(struct file * , unsigned int , unsigned long ) ; long (*compat_ioctl)(struct file * , unsigned int , unsigned long ) ; int (*mmap)(struct file * , struct vm_area_struct * ) ; int (*open)(struct inode * , struct file * ) ; int (*flush)(struct file * , fl_owner_t ) ; int (*release)(struct inode * , struct file * ) ; int (*fsync)(struct file * , struct dentry * , int ) ; int (*aio_fsync)(struct kiocb * , int ) ; int (*fasync)(int , struct file * , int ) ; int (*lock)(struct file * , int , struct file_lock * ) ; ssize_t (*sendpage)(struct file * , struct page * , int , size_t , loff_t * , int ) ; unsigned long (*get_unmapped_area)(struct file * , unsigned long , unsigned long , unsigned long , unsigned long ) ; int (*check_flags)(int ) ; int (*flock)(struct file * , int , struct file_lock * ) ; ssize_t (*splice_write)(struct pipe_inode_info * , struct file * , loff_t * , size_t , unsigned int ) ; ssize_t (*splice_read)(struct file * , loff_t * , struct pipe_inode_info * , size_t , unsigned int ) ; int (*setlease)(struct file * , long , struct file_lock ** ) ; }; struct inode_operations { int (*create)(struct inode * , struct dentry * , int , struct nameidata * ) ; struct dentry *(*lookup)(struct inode * , struct dentry * , struct nameidata * ) ; int (*link)(struct dentry * , struct inode * , struct dentry * ) ; int (*unlink)(struct inode * , struct dentry * ) ; int (*symlink)(struct inode * , struct dentry * , char const * ) ; int (*mkdir)(struct inode * , struct dentry * , int ) ; int (*rmdir)(struct inode * , struct dentry * ) ; int (*mknod)(struct inode * , struct dentry * , int , dev_t ) ; int (*rename)(struct inode * , struct dentry * , struct inode * , struct dentry * ) ; int (*readlink)(struct dentry * , char * , int ) ; void *(*follow_link)(struct dentry * , struct nameidata * ) ; void (*put_link)(struct dentry * , struct nameidata * , void * ) ; void (*truncate)(struct inode * ) ; int (*permission)(struct inode * , int ) ; int (*check_acl)(struct inode * , int ) ; int (*setattr)(struct dentry * , struct iattr * ) ; int (*getattr)(struct vfsmount * , struct dentry * , struct kstat * ) ; int (*setxattr)(struct dentry * , char const * , void const * , size_t , int ) ; ssize_t (*getxattr)(struct dentry * , char const * , void * , size_t ) ; ssize_t (*listxattr)(struct dentry * , char * , size_t ) ; int (*removexattr)(struct dentry * , char const * ) ; void (*truncate_range)(struct inode * , loff_t , loff_t ) ; long (*fallocate)(struct inode * , int , loff_t , loff_t ) ; int (*fiemap)(struct inode * , struct fiemap_extent_info * , u64 , u64 ) ; }; struct super_operations { struct inode *(*alloc_inode)(struct super_block * ) ; void (*destroy_inode)(struct inode * ) ; void (*dirty_inode)(struct inode * ) ; int (*write_inode)(struct inode * , struct writeback_control * ) ; void (*drop_inode)(struct inode * ) ; void (*delete_inode)(struct inode * ) ; void (*put_super)(struct super_block * ) ; void (*write_super)(struct super_block * ) ; int (*sync_fs)(struct super_block * , int ) ; int (*freeze_fs)(struct super_block * ) ; int (*unfreeze_fs)(struct super_block * ) ; int (*statfs)(struct dentry * , struct kstatfs * ) ; int (*remount_fs)(struct super_block * , int * , char * ) ; void (*clear_inode)(struct inode * ) ; void (*umount_begin)(struct super_block * ) ; int (*show_options)(struct seq_file * , struct vfsmount * ) ; int (*show_stats)(struct seq_file * , struct vfsmount * ) ; ssize_t (*quota_read)(struct super_block * , int , char * , size_t , loff_t ) ; ssize_t (*quota_write)(struct super_block * , int , char const * , size_t , loff_t ) ; int (*bdev_try_to_free_page)(struct super_block * , struct page * , gfp_t ) ; }; struct file_system_type { char const *name ; int fs_flags ; int (*get_sb)(struct file_system_type * , int , char const * , void * , struct vfsmount * ) ; void (*kill_sb)(struct super_block * ) ; struct module *owner ; struct file_system_type *next ; struct list_head fs_supers ; struct lock_class_key s_lock_key ; struct lock_class_key s_umount_key ; struct lock_class_key i_lock_key ; struct lock_class_key i_mutex_key ; struct lock_class_key i_mutex_dir_key ; struct lock_class_key i_alloc_sem_key ; }; struct bio; typedef int read_proc_t(char * , char ** , off_t , int , int * , void * ); typedef int write_proc_t(struct file * , char const * , unsigned long , void * ); struct proc_dir_entry { unsigned int low_ino ; unsigned short namelen ; char const *name ; mode_t mode ; nlink_t nlink ; uid_t uid ; gid_t gid ; loff_t size ; struct inode_operations const *proc_iops ; struct file_operations const *proc_fops ; struct proc_dir_entry *next ; struct proc_dir_entry *parent ; struct proc_dir_entry *subdir ; void *data ; read_proc_t *read_proc ; write_proc_t *write_proc ; atomic_t count ; int pde_users ; spinlock_t pde_unload_lock ; struct completion *pde_unload_completion ; struct list_head pde_openers ; }; struct ebt_table; struct netns_xt { struct list_head tables[13U] ; struct ebt_table *broute_table ; struct ebt_table *frame_filter ; struct ebt_table *frame_nat ; }; struct ip_conntrack_stat; struct netns_ct { atomic_t count ; unsigned int expect_count ; unsigned int htable_size ; struct kmem_cache *nf_conntrack_cachep ; struct hlist_nulls_head *hash ; struct hlist_head *expect_hash ; struct hlist_nulls_head unconfirmed ; struct hlist_nulls_head dying ; struct ip_conntrack_stat *stat ; int sysctl_events ; unsigned int sysctl_events_retry_timeout ; int sysctl_acct ; int sysctl_checksum ; unsigned int sysctl_log_invalid ; struct ctl_table_header *sysctl_header ; struct ctl_table_header *acct_sysctl_header ; struct ctl_table_header *event_sysctl_header ; int hash_vmalloc ; int expect_vmalloc ; char *slabname ; }; struct xfrm_policy_hash { struct hlist_head *table ; unsigned int hmask ; }; struct netns_xfrm { struct list_head state_all ; struct hlist_head *state_bydst ; struct hlist_head *state_bysrc ; struct hlist_head *state_byspi ; unsigned int state_hmask ; unsigned int state_num ; struct work_struct state_hash_work ; struct hlist_head state_gc_list ; struct work_struct state_gc_work ; wait_queue_head_t km_waitq ; struct list_head policy_all ; struct hlist_head *policy_byidx ; unsigned int policy_idx_hmask ; struct hlist_head policy_inexact[6U] ; struct xfrm_policy_hash policy_bydst[6U] ; unsigned int policy_count[6U] ; struct work_struct policy_hash_work ; struct dst_ops xfrm4_dst_ops ; struct dst_ops xfrm6_dst_ops ; struct sock *nlsk ; struct sock *nlsk_stash ; u32 sysctl_aevent_etime ; u32 sysctl_aevent_rseqth ; int sysctl_larval_drop ; u32 sysctl_acq_expires ; struct ctl_table_header *sysctl_hdr ; }; struct net_generic; struct net { atomic_t count ; struct list_head list ; struct list_head cleanup_list ; struct list_head exit_list ; struct proc_dir_entry *proc_net ; struct proc_dir_entry *proc_net_stat ; struct ctl_table_set sysctls ; struct net_device *loopback_dev ; struct list_head dev_base_head ; struct hlist_head *dev_name_head ; struct hlist_head *dev_index_head ; struct list_head rules_ops ; spinlock_t rules_mod_lock ; struct sock *rtnl ; struct sock *genl_sock ; struct netns_core core ; struct netns_mib mib ; struct netns_packet packet ; struct netns_unix unx ; struct netns_ipv4 ipv4 ; struct netns_ipv6 ipv6 ; struct netns_dccp dccp ; struct netns_xt xt ; struct netns_ct ct ; struct sock *nfnl ; struct sock *nfnl_stash ; struct netns_xfrm xfrm ; struct sk_buff_head wext_nlevents ; struct net_generic *gen ; }; struct seq_file { char *buf ; size_t size ; size_t from ; size_t count ; loff_t index ; loff_t read_pos ; u64 version ; struct mutex lock ; struct seq_operations const *op ; void *private ; }; struct seq_operations { void *(*start)(struct seq_file * , loff_t * ) ; void (*stop)(struct seq_file * , void * ) ; void *(*next)(struct seq_file * , void * , loff_t * ) ; int (*show)(struct seq_file * , void * ) ; }; struct dcbnl_rtnl_ops { u8 (*getstate)(struct net_device * ) ; u8 (*setstate)(struct net_device * , u8 ) ; void (*getpermhwaddr)(struct net_device * , u8 * ) ; void (*setpgtccfgtx)(struct net_device * , int , u8 , u8 , u8 , u8 ) ; void (*setpgbwgcfgtx)(struct net_device * , int , u8 ) ; void (*setpgtccfgrx)(struct net_device * , int , u8 , u8 , u8 , u8 ) ; void (*setpgbwgcfgrx)(struct net_device * , int , u8 ) ; void (*getpgtccfgtx)(struct net_device * , int , u8 * , u8 * , u8 * , u8 * ) ; void (*getpgbwgcfgtx)(struct net_device * , int , u8 * ) ; void (*getpgtccfgrx)(struct net_device * , int , u8 * , u8 * , u8 * , u8 * ) ; void (*getpgbwgcfgrx)(struct net_device * , int , u8 * ) ; void (*setpfccfg)(struct net_device * , int , u8 ) ; void (*getpfccfg)(struct net_device * , int , u8 * ) ; u8 (*setall)(struct net_device * ) ; u8 (*getcap)(struct net_device * , int , u8 * ) ; u8 (*getnumtcs)(struct net_device * , int , u8 * ) ; u8 (*setnumtcs)(struct net_device * , int , u8 ) ; u8 (*getpfcstate)(struct net_device * ) ; void (*setpfcstate)(struct net_device * , u8 ) ; void (*getbcncfg)(struct net_device * , int , u32 * ) ; void (*setbcncfg)(struct net_device * , int , u32 ) ; void (*getbcnrp)(struct net_device * , int , u8 * ) ; void (*setbcnrp)(struct net_device * , int , u8 ) ; u8 (*setapp)(struct net_device * , u8 , u16 , u8 ) ; u8 (*getapp)(struct net_device * , u8 , u16 ) ; }; struct vlan_group; struct netpoll_info; struct wireless_dev; enum netdev_tx { __NETDEV_TX_MIN = (-0x7FFFFFFF-1), NETDEV_TX_OK = 0, NETDEV_TX_BUSY = 16, NETDEV_TX_LOCKED = 32 } ; typedef enum netdev_tx netdev_tx_t; struct net_device_stats { unsigned long rx_packets ; unsigned long tx_packets ; unsigned long rx_bytes ; unsigned long tx_bytes ; unsigned long rx_errors ; unsigned long tx_errors ; unsigned long rx_dropped ; unsigned long tx_dropped ; unsigned long multicast ; unsigned long collisions ; unsigned long rx_length_errors ; unsigned long rx_over_errors ; unsigned long rx_crc_errors ; unsigned long rx_frame_errors ; unsigned long rx_fifo_errors ; unsigned long rx_missed_errors ; unsigned long tx_aborted_errors ; unsigned long tx_carrier_errors ; unsigned long tx_fifo_errors ; unsigned long tx_heartbeat_errors ; unsigned long tx_window_errors ; unsigned long rx_compressed ; unsigned long tx_compressed ; }; struct neighbour; struct neigh_parms; struct dev_addr_list { struct dev_addr_list *next ; u8 da_addr[32U] ; u8 da_addrlen ; u8 da_synced ; int da_users ; int da_gusers ; }; struct netdev_hw_addr_list { struct list_head list ; int count ; }; struct hh_cache { struct hh_cache *hh_next ; atomic_t hh_refcnt ; __be16 hh_type ; u16 hh_len ; int (*hh_output)(struct sk_buff * ) ; seqlock_t hh_lock ; unsigned long hh_data[16U] ; }; struct header_ops { int (*create)(struct sk_buff * , struct net_device * , unsigned short , void const * , void const * , unsigned int ) ; int (*parse)(struct sk_buff const * , unsigned char * ) ; int (*rebuild)(struct sk_buff * ) ; int (*cache)(struct neighbour const * , struct hh_cache * ) ; void (*cache_update)(struct hh_cache * , struct net_device const * , unsigned char const * ) ; }; struct Qdisc; struct netdev_queue { struct net_device *dev ; struct Qdisc *qdisc ; unsigned long state ; struct Qdisc *qdisc_sleeping ; spinlock_t _xmit_lock ; int xmit_lock_owner ; unsigned long trans_start ; unsigned long tx_bytes ; unsigned long tx_packets ; unsigned long tx_dropped ; }; struct net_device_ops { int (*ndo_init)(struct net_device * ) ; void (*ndo_uninit)(struct net_device * ) ; int (*ndo_open)(struct net_device * ) ; int (*ndo_stop)(struct net_device * ) ; netdev_tx_t (*ndo_start_xmit)(struct sk_buff * , struct net_device * ) ; u16 (*ndo_select_queue)(struct net_device * , struct sk_buff * ) ; void (*ndo_change_rx_flags)(struct net_device * , int ) ; void (*ndo_set_rx_mode)(struct net_device * ) ; void (*ndo_set_multicast_list)(struct net_device * ) ; int (*ndo_set_mac_address)(struct net_device * , void * ) ; int (*ndo_validate_addr)(struct net_device * ) ; int (*ndo_do_ioctl)(struct net_device * , struct ifreq * , int ) ; int (*ndo_set_config)(struct net_device * , struct ifmap * ) ; int (*ndo_change_mtu)(struct net_device * , int ) ; int (*ndo_neigh_setup)(struct net_device * , struct neigh_parms * ) ; void (*ndo_tx_timeout)(struct net_device * ) ; struct net_device_stats *(*ndo_get_stats)(struct net_device * ) ; void (*ndo_vlan_rx_register)(struct net_device * , struct vlan_group * ) ; void (*ndo_vlan_rx_add_vid)(struct net_device * , unsigned short ) ; void (*ndo_vlan_rx_kill_vid)(struct net_device * , unsigned short ) ; void (*ndo_poll_controller)(struct net_device * ) ; int (*ndo_set_vf_mac)(struct net_device * , int , u8 * ) ; int (*ndo_set_vf_vlan)(struct net_device * , int , u16 , u8 ) ; int (*ndo_set_vf_tx_rate)(struct net_device * , int , int ) ; int (*ndo_get_vf_config)(struct net_device * , int , struct ifla_vf_info * ) ; int (*ndo_fcoe_enable)(struct net_device * ) ; int (*ndo_fcoe_disable)(struct net_device * ) ; int (*ndo_fcoe_ddp_setup)(struct net_device * , u16 , struct scatterlist * , unsigned int ) ; int (*ndo_fcoe_ddp_done)(struct net_device * , u16 ) ; int (*ndo_fcoe_get_wwn)(struct net_device * , u64 * , int ) ; }; struct iw_handler_def; struct iw_public_data; struct net_bridge_port; struct macvlan_port; struct garp_port; struct rtnl_link_ops; struct net_device { char name[16U] ; struct hlist_node name_hlist ; char *ifalias ; unsigned long mem_end ; unsigned long mem_start ; unsigned long base_addr ; unsigned int irq ; unsigned char if_port ; unsigned char dma ; unsigned long state ; struct list_head dev_list ; struct list_head napi_list ; struct list_head unreg_list ; unsigned long features ; int ifindex ; int iflink ; struct net_device_stats stats ; struct iw_handler_def const *wireless_handlers ; struct iw_public_data *wireless_data ; struct net_device_ops const *netdev_ops ; struct ethtool_ops const *ethtool_ops ; struct header_ops const *header_ops ; unsigned int flags ; unsigned short gflags ; unsigned short priv_flags ; unsigned short padded ; unsigned char operstate ; unsigned char link_mode ; unsigned int mtu ; unsigned short type ; unsigned short hard_header_len ; unsigned short needed_headroom ; unsigned short needed_tailroom ; struct net_device *master ; unsigned char perm_addr[32U] ; unsigned char addr_len ; unsigned short dev_id ; struct netdev_hw_addr_list uc ; int uc_promisc ; spinlock_t addr_list_lock ; struct dev_addr_list *mc_list ; int mc_count ; unsigned int promiscuity ; unsigned int allmulti ; void *dsa_ptr ; void *atalk_ptr ; void *ip_ptr ; void *dn_ptr ; void *ip6_ptr ; void *ec_ptr ; void *ax25_ptr ; struct wireless_dev *ieee80211_ptr ; unsigned long last_rx ; unsigned char *dev_addr ; struct netdev_hw_addr_list dev_addrs ; unsigned char broadcast[32U] ; struct netdev_queue rx_queue ; struct netdev_queue *_tx ; unsigned int num_tx_queues ; unsigned int real_num_tx_queues ; struct Qdisc *qdisc ; unsigned long tx_queue_len ; spinlock_t tx_global_lock ; unsigned long trans_start ; int watchdog_timeo ; struct timer_list watchdog_timer ; atomic_t refcnt ; struct list_head todo_list ; struct hlist_node index_hlist ; struct list_head link_watch_list ; unsigned short reg_state ; unsigned short rtnl_link_state ; void (*destructor)(struct net_device * ) ; struct netpoll_info *npinfo ; struct net *nd_net ; void *ml_priv ; struct net_bridge_port *br_port ; struct macvlan_port *macvlan_port ; struct garp_port *garp_port ; struct device dev ; struct attribute_group const *sysfs_groups[4U] ; struct rtnl_link_ops const *rtnl_link_ops ; unsigned long vlan_features ; unsigned int gso_max_size ; struct dcbnl_rtnl_ops const *dcbnl_ops ; unsigned int fcoe_ddp_xid ; struct ethtool_rx_ntuple_list ethtool_ntuple_list ; }; enum irqreturn { IRQ_NONE = 0, IRQ_HANDLED = 1, IRQ_WAKE_THREAD = 2 } ; typedef enum irqreturn irqreturn_t; struct timer_rand_state; struct irqaction; struct irqaction { irqreturn_t (*handler)(int , void * ) ; unsigned long flags ; char const *name ; void *dev_id ; struct irqaction *next ; int irq ; struct proc_dir_entry *dir ; irqreturn_t (*thread_fn)(int , void * ) ; struct task_struct *thread ; unsigned long thread_flags ; }; struct linux_binprm { char buf[128U] ; struct vm_area_struct *vma ; struct mm_struct *mm ; unsigned long p ; unsigned char cred_prepared : 1 ; unsigned char cap_effective : 1 ; unsigned int recursion_depth ; struct file *file ; struct cred *cred ; int unsafe ; unsigned int per_clear ; int argc ; int envc ; char *filename ; char *interp ; unsigned int interp_flags ; unsigned int interp_data ; unsigned long loader ; unsigned long exec ; }; struct coredump_params { long signr ; struct pt_regs *regs ; struct file *file ; unsigned long limit ; unsigned long mm_flags ; }; struct linux_binfmt { struct list_head lh ; struct module *module ; int (*load_binary)(struct linux_binprm * , struct pt_regs * ) ; int (*load_shlib)(struct file * ) ; int (*core_dump)(struct coredump_params * ) ; unsigned long min_coredump ; int hasvdso ; }; struct siginfo; struct __anonstruct_sigset_t_158 { unsigned long sig[1U] ; }; typedef struct __anonstruct_sigset_t_158 sigset_t; typedef void __signalfn_t(int ); typedef __signalfn_t *__sighandler_t; typedef void __restorefn_t(void); typedef __restorefn_t *__sigrestore_t; struct sigaction { __sighandler_t sa_handler ; unsigned long sa_flags ; __sigrestore_t sa_restorer ; sigset_t sa_mask ; }; struct k_sigaction { struct sigaction sa ; }; union sigval { int sival_int ; void *sival_ptr ; }; typedef union sigval sigval_t; struct __anonstruct__kill_160 { __kernel_pid_t _pid ; __kernel_uid32_t _uid ; }; struct __anonstruct__timer_161 { __kernel_timer_t _tid ; int _overrun ; char _pad[0U] ; sigval_t _sigval ; int _sys_private ; }; struct __anonstruct__rt_162 { __kernel_pid_t _pid ; __kernel_uid32_t _uid ; sigval_t _sigval ; }; struct __anonstruct__sigchld_163 { __kernel_pid_t _pid ; __kernel_uid32_t _uid ; int _status ; __kernel_clock_t _utime ; __kernel_clock_t _stime ; }; struct __anonstruct__sigfault_164 { void *_addr ; short _addr_lsb ; }; struct __anonstruct__sigpoll_165 { long _band ; int _fd ; }; union __anonunion__sifields_159 { int _pad[28U] ; struct __anonstruct__kill_160 _kill ; struct __anonstruct__timer_161 _timer ; struct __anonstruct__rt_162 _rt ; struct __anonstruct__sigchld_163 _sigchld ; struct __anonstruct__sigfault_164 _sigfault ; struct __anonstruct__sigpoll_165 _sigpoll ; }; struct siginfo { int si_signo ; int si_errno ; int si_code ; union __anonunion__sifields_159 _sifields ; }; typedef struct siginfo siginfo_t; struct sigpending { struct list_head list ; sigset_t signal ; }; struct rlimit { unsigned long rlim_cur ; unsigned long rlim_max ; }; struct sem_undo_list; struct sem_undo_list { atomic_t refcnt ; spinlock_t lock ; struct list_head list_proc ; }; struct sysv_sem { struct sem_undo_list *undo_list ; }; typedef unsigned long cputime_t; struct percpu_counter { spinlock_t lock ; s64 count ; struct list_head list ; s32 *counters ; }; struct prop_local_percpu { struct percpu_counter events ; int shift ; unsigned long period ; spinlock_t lock ; }; struct prop_local_single { unsigned long events ; unsigned long period ; int shift ; spinlock_t lock ; }; struct __anonstruct_seccomp_t_168 { int mode ; }; typedef struct __anonstruct_seccomp_t_168 seccomp_t; struct plist_head { struct list_head prio_list ; struct list_head node_list ; raw_spinlock_t *rawlock ; spinlock_t *spinlock ; }; struct plist_node { int prio ; struct plist_head plist ; }; struct rt_mutex_waiter; struct task_io_accounting { u64 rchar ; u64 wchar ; u64 syscr ; u64 syscw ; u64 read_bytes ; u64 write_bytes ; u64 cancelled_write_bytes ; }; struct latency_record { unsigned long backtrace[12U] ; unsigned int count ; unsigned long time ; unsigned long max ; }; typedef int32_t key_serial_t; typedef uint32_t key_perm_t; struct signal_struct; struct key_type; struct keyring_list; struct key_user; union __anonunion_ldv_27783_169 { time_t expiry ; time_t revoked_at ; }; union __anonunion_type_data_170 { struct list_head link ; unsigned long x[2U] ; void *p[2U] ; }; union __anonunion_payload_171 { unsigned long value ; void *data ; struct keyring_list *subscriptions ; }; struct key { atomic_t usage ; key_serial_t serial ; struct rb_node serial_node ; struct key_type *type ; struct rw_semaphore sem ; struct key_user *user ; void *security ; union __anonunion_ldv_27783_169 ldv_27783 ; uid_t uid ; gid_t gid ; key_perm_t perm ; unsigned short quotalen ; unsigned short datalen ; unsigned long flags ; char *description ; union __anonunion_type_data_170 type_data ; union __anonunion_payload_171 payload ; }; struct audit_context; struct group_info { atomic_t usage ; int ngroups ; int nblocks ; gid_t small_block[32U] ; gid_t *blocks[0U] ; }; struct thread_group_cred { atomic_t usage ; pid_t tgid ; spinlock_t lock ; struct key *session_keyring ; struct key *process_keyring ; struct rcu_head rcu ; }; struct cred { atomic_t usage ; atomic_t subscribers ; void *put_addr ; unsigned int magic ; uid_t uid ; gid_t gid ; uid_t suid ; gid_t sgid ; uid_t euid ; gid_t egid ; uid_t fsuid ; gid_t fsgid ; unsigned int securebits ; kernel_cap_t cap_inheritable ; kernel_cap_t cap_permitted ; kernel_cap_t cap_effective ; kernel_cap_t cap_bset ; unsigned char jit_keyring ; struct key *thread_keyring ; struct key *request_key_auth ; struct thread_group_cred *tgcred ; void *security ; struct user_struct *user ; struct group_info *group_info ; struct rcu_head rcu ; }; struct futex_pi_state; struct robust_list_head; struct bio_list; struct fs_struct; struct bts_context; struct perf_event_context; struct cfs_rq; struct user_namespace; struct io_event { __u64 data ; __u64 obj ; __s64 res ; __s64 res2 ; }; struct kioctx; union __anonunion_ki_obj_172 { void *user ; struct task_struct *tsk ; }; struct eventfd_ctx; struct kiocb { struct list_head ki_run_list ; unsigned long ki_flags ; int ki_users ; unsigned int ki_key ; struct file *ki_filp ; struct kioctx *ki_ctx ; int (*ki_cancel)(struct kiocb * , struct io_event * ) ; ssize_t (*ki_retry)(struct kiocb * ) ; void (*ki_dtor)(struct kiocb * ) ; union __anonunion_ki_obj_172 ki_obj ; __u64 ki_user_data ; loff_t ki_pos ; void *private ; unsigned short ki_opcode ; size_t ki_nbytes ; char *ki_buf ; size_t ki_left ; struct iovec ki_inline_vec ; struct iovec *ki_iovec ; unsigned long ki_nr_segs ; unsigned long ki_cur_seg ; struct list_head ki_list ; struct eventfd_ctx *ki_eventfd ; }; struct aio_ring_info { unsigned long mmap_base ; unsigned long mmap_size ; struct page **ring_pages ; spinlock_t ring_lock ; long nr_pages ; unsigned int nr ; unsigned int tail ; struct page *internal_pages[8U] ; }; struct kioctx { atomic_t users ; int dead ; struct mm_struct *mm ; unsigned long user_id ; struct hlist_node list ; wait_queue_head_t wait ; spinlock_t ctx_lock ; int reqs_active ; struct list_head active_reqs ; struct list_head run_list ; unsigned int max_reqs ; struct aio_ring_info ring_info ; struct delayed_work wq ; struct rcu_head rcu_head ; }; struct sighand_struct { atomic_t count ; struct k_sigaction action[64U] ; spinlock_t siglock ; wait_queue_head_t signalfd_wqh ; }; struct pacct_struct { int ac_flag ; long ac_exitcode ; unsigned long ac_mem ; cputime_t ac_utime ; cputime_t ac_stime ; unsigned long ac_minflt ; unsigned long ac_majflt ; }; struct cpu_itimer { cputime_t expires ; cputime_t incr ; u32 error ; u32 incr_error ; }; struct task_cputime { cputime_t utime ; cputime_t stime ; unsigned long long sum_exec_runtime ; }; struct thread_group_cputimer { struct task_cputime cputime ; int running ; spinlock_t lock ; }; struct tty_struct; struct taskstats; struct tty_audit_buf; struct signal_struct { atomic_t count ; atomic_t live ; wait_queue_head_t wait_chldexit ; struct task_struct *curr_target ; struct sigpending shared_pending ; int group_exit_code ; int notify_count ; struct task_struct *group_exit_task ; int group_stop_count ; unsigned int flags ; struct list_head posix_timers ; struct hrtimer real_timer ; struct pid *leader_pid ; ktime_t it_real_incr ; struct cpu_itimer it[2U] ; struct thread_group_cputimer cputimer ; struct task_cputime cputime_expires ; struct list_head cpu_timers[3U] ; struct pid *tty_old_pgrp ; int leader ; struct tty_struct *tty ; cputime_t utime ; cputime_t stime ; cputime_t cutime ; cputime_t cstime ; cputime_t gtime ; cputime_t cgtime ; cputime_t prev_utime ; cputime_t prev_stime ; unsigned long nvcsw ; unsigned long nivcsw ; unsigned long cnvcsw ; unsigned long cnivcsw ; unsigned long min_flt ; unsigned long maj_flt ; unsigned long cmin_flt ; unsigned long cmaj_flt ; unsigned long inblock ; unsigned long oublock ; unsigned long cinblock ; unsigned long coublock ; unsigned long maxrss ; unsigned long cmaxrss ; struct task_io_accounting ioac ; unsigned long long sum_sched_runtime ; struct rlimit rlim[16U] ; struct pacct_struct pacct ; struct taskstats *stats ; unsigned int audit_tty ; struct tty_audit_buf *tty_audit_buf ; int oom_adj ; }; struct user_struct { atomic_t __count ; atomic_t processes ; atomic_t files ; atomic_t sigpending ; atomic_t inotify_watches ; atomic_t inotify_devs ; atomic_t epoll_watches ; unsigned long mq_bytes ; unsigned long locked_shm ; struct key *uid_keyring ; struct key *session_keyring ; struct hlist_node uidhash_node ; uid_t uid ; struct user_namespace *user_ns ; atomic_long_t locked_vm ; }; struct reclaim_state; struct sched_info { unsigned long pcount ; unsigned long long run_delay ; unsigned long long last_arrival ; unsigned long long last_queued ; unsigned int bkl_count ; }; struct task_delay_info { spinlock_t lock ; unsigned int flags ; struct timespec blkio_start ; struct timespec blkio_end ; u64 blkio_delay ; u64 swapin_delay ; u32 blkio_count ; u32 swapin_count ; struct timespec freepages_start ; struct timespec freepages_end ; u64 freepages_delay ; u32 freepages_count ; }; struct io_context; struct rq; struct sched_class { struct sched_class const *next ; void (*enqueue_task)(struct rq * , struct task_struct * , int , bool ) ; void (*dequeue_task)(struct rq * , struct task_struct * , int ) ; void (*yield_task)(struct rq * ) ; void (*check_preempt_curr)(struct rq * , struct task_struct * , int ) ; struct task_struct *(*pick_next_task)(struct rq * ) ; void (*put_prev_task)(struct rq * , struct task_struct * ) ; int (*select_task_rq)(struct task_struct * , int , int ) ; void (*pre_schedule)(struct rq * , struct task_struct * ) ; void (*post_schedule)(struct rq * ) ; void (*task_waking)(struct rq * , struct task_struct * ) ; void (*task_woken)(struct rq * , struct task_struct * ) ; void (*set_cpus_allowed)(struct task_struct * , struct cpumask const * ) ; void (*rq_online)(struct rq * ) ; void (*rq_offline)(struct rq * ) ; void (*set_curr_task)(struct rq * ) ; void (*task_tick)(struct rq * , struct task_struct * , int ) ; void (*task_fork)(struct task_struct * ) ; void (*switched_from)(struct rq * , struct task_struct * , int ) ; void (*switched_to)(struct rq * , struct task_struct * , int ) ; void (*prio_changed)(struct rq * , struct task_struct * , int , int ) ; unsigned int (*get_rr_interval)(struct rq * , struct task_struct * ) ; void (*moved_group)(struct task_struct * , int ) ; }; struct load_weight { unsigned long weight ; unsigned long inv_weight ; }; struct sched_entity { struct load_weight load ; struct rb_node run_node ; struct list_head group_node ; unsigned int on_rq ; u64 exec_start ; u64 sum_exec_runtime ; u64 vruntime ; u64 prev_sum_exec_runtime ; u64 last_wakeup ; u64 avg_overlap ; u64 nr_migrations ; u64 start_runtime ; u64 avg_wakeup ; u64 wait_start ; u64 wait_max ; u64 wait_count ; u64 wait_sum ; u64 iowait_count ; u64 iowait_sum ; u64 sleep_start ; u64 sleep_max ; s64 sum_sleep_runtime ; u64 block_start ; u64 block_max ; u64 exec_max ; u64 slice_max ; u64 nr_migrations_cold ; u64 nr_failed_migrations_affine ; u64 nr_failed_migrations_running ; u64 nr_failed_migrations_hot ; u64 nr_forced_migrations ; u64 nr_wakeups ; u64 nr_wakeups_sync ; u64 nr_wakeups_migrate ; u64 nr_wakeups_local ; u64 nr_wakeups_remote ; u64 nr_wakeups_affine ; u64 nr_wakeups_affine_attempts ; u64 nr_wakeups_passive ; u64 nr_wakeups_idle ; struct sched_entity *parent ; struct cfs_rq *cfs_rq ; struct cfs_rq *my_q ; }; struct rt_rq; struct sched_rt_entity { struct list_head run_list ; unsigned long timeout ; unsigned int time_slice ; int nr_cpus_allowed ; struct sched_rt_entity *back ; struct sched_rt_entity *parent ; struct rt_rq *rt_rq ; struct rt_rq *my_q ; }; struct mem_cgroup; struct memcg_batch_info { int do_batch ; struct mem_cgroup *memcg ; unsigned long bytes ; unsigned long memsw_bytes ; }; struct css_set; struct compat_robust_list_head; struct task_struct { long volatile state ; void *stack ; atomic_t usage ; unsigned int flags ; unsigned int ptrace ; int lock_depth ; int prio ; int static_prio ; int normal_prio ; unsigned int rt_priority ; struct sched_class const *sched_class ; struct sched_entity se ; struct sched_rt_entity rt ; struct hlist_head preempt_notifiers ; unsigned char fpu_counter ; unsigned int policy ; cpumask_t cpus_allowed ; struct sched_info sched_info ; struct list_head tasks ; struct plist_node pushable_tasks ; struct mm_struct *mm ; struct mm_struct *active_mm ; int exit_state ; int exit_code ; int exit_signal ; int pdeath_signal ; unsigned int personality ; unsigned char did_exec : 1 ; unsigned char in_execve : 1 ; unsigned char in_iowait : 1 ; unsigned char sched_reset_on_fork : 1 ; pid_t pid ; pid_t tgid ; unsigned long stack_canary ; struct task_struct *real_parent ; struct task_struct *parent ; struct list_head children ; struct list_head sibling ; struct task_struct *group_leader ; struct list_head ptraced ; struct list_head ptrace_entry ; struct bts_context *bts ; struct pid_link pids[3U] ; struct list_head thread_group ; struct completion *vfork_done ; int *set_child_tid ; int *clear_child_tid ; cputime_t utime ; cputime_t stime ; cputime_t utimescaled ; cputime_t stimescaled ; cputime_t gtime ; cputime_t prev_utime ; cputime_t prev_stime ; unsigned long nvcsw ; unsigned long nivcsw ; struct timespec start_time ; struct timespec real_start_time ; unsigned long min_flt ; unsigned long maj_flt ; struct task_cputime cputime_expires ; struct list_head cpu_timers[3U] ; struct cred const *real_cred ; struct cred const *cred ; struct mutex cred_guard_mutex ; struct cred *replacement_session_keyring ; char comm[16U] ; int link_count ; int total_link_count ; struct sysv_sem sysvsem ; unsigned long last_switch_count ; struct thread_struct thread ; struct fs_struct *fs ; struct files_struct *files ; struct nsproxy *nsproxy ; struct signal_struct *signal ; struct sighand_struct *sighand ; sigset_t blocked ; sigset_t real_blocked ; sigset_t saved_sigmask ; struct sigpending pending ; unsigned long sas_ss_sp ; size_t sas_ss_size ; int (*notifier)(void * ) ; void *notifier_data ; sigset_t *notifier_mask ; struct audit_context *audit_context ; uid_t loginuid ; unsigned int sessionid ; seccomp_t seccomp ; u32 parent_exec_id ; u32 self_exec_id ; spinlock_t alloc_lock ; struct irqaction *irqaction ; raw_spinlock_t pi_lock ; struct plist_head pi_waiters ; struct rt_mutex_waiter *pi_blocked_on ; struct mutex_waiter *blocked_on ; unsigned int irq_events ; unsigned long hardirq_enable_ip ; unsigned long hardirq_disable_ip ; unsigned int hardirq_enable_event ; unsigned int hardirq_disable_event ; int hardirqs_enabled ; int hardirq_context ; unsigned long softirq_disable_ip ; unsigned long softirq_enable_ip ; unsigned int softirq_disable_event ; unsigned int softirq_enable_event ; int softirqs_enabled ; int softirq_context ; u64 curr_chain_key ; int lockdep_depth ; unsigned int lockdep_recursion ; struct held_lock held_locks[48U] ; gfp_t lockdep_reclaim_gfp ; void *journal_info ; struct bio_list *bio_list ; struct reclaim_state *reclaim_state ; struct backing_dev_info *backing_dev_info ; struct io_context *io_context ; unsigned long ptrace_message ; siginfo_t *last_siginfo ; struct task_io_accounting ioac ; u64 acct_rss_mem1 ; u64 acct_vm_mem1 ; cputime_t acct_timexpd ; nodemask_t mems_allowed ; int cpuset_mem_spread_rotor ; struct css_set *cgroups ; struct list_head cg_list ; struct robust_list_head *robust_list ; struct compat_robust_list_head *compat_robust_list ; struct list_head pi_state_list ; struct futex_pi_state *pi_state_cache ; struct perf_event_context *perf_event_ctxp ; struct mutex perf_event_mutex ; struct list_head perf_event_list ; struct mempolicy *mempolicy ; short il_next ; atomic_t fs_excl ; struct rcu_head rcu ; struct pipe_inode_info *splice_pipe ; struct task_delay_info *delays ; int make_it_fail ; struct prop_local_single dirties ; int latency_record_count ; struct latency_record latency_record[32U] ; unsigned long timer_slack_ns ; unsigned long default_timer_slack_ns ; struct list_head *scm_work_list ; unsigned long trace ; unsigned long trace_recursion ; unsigned long stack_start ; struct memcg_batch_info memcg_batch ; }; struct xfrm_policy; struct xfrm_state; struct request_sock; struct sock_filter { __u16 code ; __u8 jt ; __u8 jf ; __u32 k ; }; struct sk_filter { atomic_t refcnt ; unsigned int len ; struct rcu_head rcu ; struct sock_filter insns[0U] ; }; struct pollfd { int fd ; short events ; short revents ; }; struct poll_table_struct { void (*qproc)(struct file * , wait_queue_head_t * , struct poll_table_struct * ) ; unsigned long key ; }; struct nla_policy { u16 type ; u16 len ; }; struct rtnl_link_ops { struct list_head list ; char const *kind ; size_t priv_size ; void (*setup)(struct net_device * ) ; int maxtype ; struct nla_policy const *policy ; int (*validate)(struct nlattr ** , struct nlattr ** ) ; int (*newlink)(struct net * , struct net_device * , struct nlattr ** , struct nlattr ** ) ; int (*changelink)(struct net_device * , struct nlattr ** , struct nlattr ** ) ; void (*dellink)(struct net_device * , struct list_head * ) ; size_t (*get_size)(struct net_device const * ) ; int (*fill_info)(struct sk_buff * , struct net_device const * ) ; size_t (*get_xstats_size)(struct net_device const * ) ; int (*fill_xstats)(struct sk_buff * , struct net_device const * ) ; int (*get_tx_queues)(struct net * , struct nlattr ** , unsigned int * , unsigned int * ) ; }; struct neigh_table; struct neigh_parms { struct net *net ; struct net_device *dev ; struct neigh_parms *next ; int (*neigh_setup)(struct neighbour * ) ; void (*neigh_cleanup)(struct neighbour * ) ; struct neigh_table *tbl ; void *sysctl_table ; int dead ; atomic_t refcnt ; struct rcu_head rcu_head ; int base_reachable_time ; int retrans_time ; int gc_staletime ; int reachable_time ; int delay_probe_time ; int queue_len ; int ucast_probes ; int app_probes ; int mcast_probes ; int anycast_delay ; int proxy_delay ; int proxy_qlen ; int locktime ; }; struct neigh_statistics { unsigned long allocs ; unsigned long destroys ; unsigned long hash_grows ; unsigned long res_failed ; unsigned long lookups ; unsigned long hits ; unsigned long rcv_probes_mcast ; unsigned long rcv_probes_ucast ; unsigned long periodic_gc_runs ; unsigned long forced_gc_runs ; unsigned long unres_discards ; }; struct neigh_ops; struct neighbour { struct neighbour *next ; struct neigh_table *tbl ; struct neigh_parms *parms ; struct net_device *dev ; unsigned long used ; unsigned long confirmed ; unsigned long updated ; __u8 flags ; __u8 nud_state ; __u8 type ; __u8 dead ; atomic_t probes ; rwlock_t lock ; unsigned char ha[32U] ; struct hh_cache *hh ; atomic_t refcnt ; int (*output)(struct sk_buff * ) ; struct sk_buff_head arp_queue ; struct timer_list timer ; struct neigh_ops const *ops ; u8 primary_key[0U] ; }; struct neigh_ops { int family ; void (*solicit)(struct neighbour * , struct sk_buff * ) ; void (*error_report)(struct neighbour * , struct sk_buff * ) ; int (*output)(struct sk_buff * ) ; int (*connected_output)(struct sk_buff * ) ; int (*hh_output)(struct sk_buff * ) ; int (*queue_xmit)(struct sk_buff * ) ; }; struct pneigh_entry { struct pneigh_entry *next ; struct net *net ; struct net_device *dev ; u8 flags ; u8 key[0U] ; }; struct neigh_table { struct neigh_table *next ; int family ; int entry_size ; int key_len ; __u32 (*hash)(void const * , struct net_device const * ) ; int (*constructor)(struct neighbour * ) ; int (*pconstructor)(struct pneigh_entry * ) ; void (*pdestructor)(struct pneigh_entry * ) ; void (*proxy_redo)(struct sk_buff * ) ; char *id ; struct neigh_parms parms ; int gc_interval ; int gc_thresh1 ; int gc_thresh2 ; int gc_thresh3 ; unsigned long last_flush ; struct delayed_work gc_work ; struct timer_list proxy_timer ; struct sk_buff_head proxy_queue ; atomic_t entries ; rwlock_t lock ; unsigned long last_rand ; struct kmem_cache *kmem_cachep ; struct neigh_statistics *stats ; struct neighbour **hash_buckets ; unsigned int hash_mask ; __u32 hash_rnd ; struct pneigh_entry **phash_buckets ; }; struct dn_route; union __anonunion_ldv_32160_177 { struct dst_entry *next ; struct rtable *rt_next ; struct rt6_info *rt6_next ; struct dn_route *dn_next ; }; struct dst_entry { struct rcu_head rcu_head ; struct dst_entry *child ; struct net_device *dev ; short error ; short obsolete ; int flags ; unsigned long expires ; unsigned short header_len ; unsigned short trailer_len ; unsigned int rate_tokens ; unsigned long rate_last ; struct dst_entry *path ; struct neighbour *neighbour ; struct hh_cache *hh ; struct xfrm_state *xfrm ; int (*input)(struct sk_buff * ) ; int (*output)(struct sk_buff * ) ; struct dst_ops *ops ; u32 metrics[14U] ; __u32 tclassid ; long __pad_to_align_refcnt[1U] ; atomic_t __refcnt ; int __use ; unsigned long lastuse ; union __anonunion_ldv_32160_177 ldv_32160 ; }; struct __anonstruct_socket_lock_t_178 { spinlock_t slock ; int owned ; wait_queue_head_t wq ; struct lockdep_map dep_map ; }; typedef struct __anonstruct_socket_lock_t_178 socket_lock_t; struct proto; union __anonunion_ldv_32290_179 { struct hlist_node skc_node ; struct hlist_nulls_node skc_nulls_node ; }; union __anonunion_ldv_32296_180 { unsigned int skc_hash ; __u16 skc_u16hashes[2U] ; }; union __anonunion_ldv_32304_181 { struct hlist_node skc_bind_node ; struct hlist_nulls_node skc_portaddr_node ; }; struct sock_common { union __anonunion_ldv_32290_179 ldv_32290 ; atomic_t skc_refcnt ; int skc_tx_queue_mapping ; union __anonunion_ldv_32296_180 ldv_32296 ; unsigned short skc_family ; unsigned char volatile skc_state ; unsigned char skc_reuse ; int skc_bound_dev_if ; union __anonunion_ldv_32304_181 ldv_32304 ; struct proto *skc_prot ; struct net *skc_net ; }; struct __anonstruct_sk_backlog_182 { struct sk_buff *head ; struct sk_buff *tail ; int len ; int limit ; }; struct sock { struct sock_common __sk_common ; unsigned char sk_shutdown : 2 ; unsigned char sk_no_check : 2 ; unsigned char sk_userlocks : 4 ; unsigned char sk_protocol ; unsigned short sk_type ; int sk_rcvbuf ; socket_lock_t sk_lock ; struct __anonstruct_sk_backlog_182 sk_backlog ; wait_queue_head_t *sk_sleep ; struct dst_entry *sk_dst_cache ; struct xfrm_policy *sk_policy[2U] ; rwlock_t sk_dst_lock ; atomic_t sk_rmem_alloc ; atomic_t sk_wmem_alloc ; atomic_t sk_omem_alloc ; int sk_sndbuf ; struct sk_buff_head sk_receive_queue ; struct sk_buff_head sk_write_queue ; struct sk_buff_head sk_async_wait_queue ; int sk_wmem_queued ; int sk_forward_alloc ; gfp_t sk_allocation ; int sk_route_caps ; int sk_gso_type ; unsigned int sk_gso_max_size ; int sk_rcvlowat ; unsigned long sk_flags ; unsigned long sk_lingertime ; struct sk_buff_head sk_error_queue ; struct proto *sk_prot_creator ; rwlock_t sk_callback_lock ; int sk_err ; int sk_err_soft ; atomic_t sk_drops ; unsigned short sk_ack_backlog ; unsigned short sk_max_ack_backlog ; __u32 sk_priority ; struct ucred sk_peercred ; long sk_rcvtimeo ; long sk_sndtimeo ; struct sk_filter *sk_filter ; void *sk_protinfo ; struct timer_list sk_timer ; ktime_t sk_stamp ; struct socket *sk_socket ; void *sk_user_data ; struct page *sk_sndmsg_page ; struct sk_buff *sk_send_head ; __u32 sk_sndmsg_off ; int sk_write_pending ; void *sk_security ; __u32 sk_mark ; void (*sk_state_change)(struct sock * ) ; void (*sk_data_ready)(struct sock * , int ) ; void (*sk_write_space)(struct sock * ) ; void (*sk_error_report)(struct sock * ) ; int (*sk_backlog_rcv)(struct sock * , struct sk_buff * ) ; void (*sk_destruct)(struct sock * ) ; }; struct request_sock_ops; struct timewait_sock_ops; struct inet_hashinfo; struct raw_hashinfo; struct udp_table; union __anonunion_h_183 { struct inet_hashinfo *hashinfo ; struct udp_table *udp_table ; struct raw_hashinfo *raw_hash ; }; struct proto { void (*close)(struct sock * , long ) ; int (*connect)(struct sock * , struct sockaddr * , int ) ; int (*disconnect)(struct sock * , int ) ; struct sock *(*accept)(struct sock * , int , int * ) ; int (*ioctl)(struct sock * , int , unsigned long ) ; int (*init)(struct sock * ) ; void (*destroy)(struct sock * ) ; void (*shutdown)(struct sock * , int ) ; int (*setsockopt)(struct sock * , int , int , char * , unsigned int ) ; int (*getsockopt)(struct sock * , int , int , char * , int * ) ; int (*compat_setsockopt)(struct sock * , int , int , char * , unsigned int ) ; int (*compat_getsockopt)(struct sock * , int , int , char * , int * ) ; int (*sendmsg)(struct kiocb * , struct sock * , struct msghdr * , size_t ) ; int (*recvmsg)(struct kiocb * , struct sock * , struct msghdr * , size_t , int , int , int * ) ; int (*sendpage)(struct sock * , struct page * , int , size_t , int ) ; int (*bind)(struct sock * , struct sockaddr * , int ) ; int (*backlog_rcv)(struct sock * , struct sk_buff * ) ; void (*hash)(struct sock * ) ; void (*unhash)(struct sock * ) ; int (*get_port)(struct sock * , unsigned short ) ; unsigned int inuse_idx ; void (*enter_memory_pressure)(struct sock * ) ; atomic_t *memory_allocated ; struct percpu_counter *sockets_allocated ; int *memory_pressure ; int *sysctl_mem ; int *sysctl_wmem ; int *sysctl_rmem ; int max_header ; struct kmem_cache *slab ; unsigned int obj_size ; int slab_flags ; struct percpu_counter *orphan_count ; struct request_sock_ops *rsk_prot ; struct timewait_sock_ops *twsk_prot ; union __anonunion_h_183 h ; struct module *owner ; char name[32U] ; struct list_head node ; }; enum drbd_disk_state { D_DISKLESS = 0, D_ATTACHING = 1, D_FAILED = 2, D_NEGOTIATING = 3, D_INCONSISTENT = 4, D_OUTDATED = 5, D_UNKNOWN = 6, D_CONSISTENT = 7, D_UP_TO_DATE = 8, D_MASK = 15 } ; struct __anonstruct_ldv_33381_184 { unsigned char role : 2 ; unsigned char peer : 2 ; unsigned char conn : 5 ; unsigned char disk : 4 ; unsigned char pdsk : 4 ; unsigned char susp : 1 ; unsigned char aftr_isp : 1 ; unsigned char peer_isp : 1 ; unsigned char user_isp : 1 ; unsigned short _pad : 11 ; }; union drbd_state { struct __anonstruct_ldv_33381_184 ldv_33381 ; unsigned int i ; }; struct crypto_ablkcipher; struct crypto_async_request; struct crypto_aead; struct crypto_blkcipher; struct crypto_hash; struct crypto_rng; struct crypto_tfm; struct crypto_type; struct aead_givcrypt_request; struct skcipher_givcrypt_request; struct crypto_async_request { struct list_head list ; void (*complete)(struct crypto_async_request * , int ) ; void *data ; struct crypto_tfm *tfm ; u32 flags ; }; struct ablkcipher_request { struct crypto_async_request base ; unsigned int nbytes ; void *info ; struct scatterlist *src ; struct scatterlist *dst ; void *__ctx[] ; }; struct aead_request { struct crypto_async_request base ; unsigned int assoclen ; unsigned int cryptlen ; u8 *iv ; struct scatterlist *assoc ; struct scatterlist *src ; struct scatterlist *dst ; void *__ctx[] ; }; struct blkcipher_desc { struct crypto_blkcipher *tfm ; void *info ; u32 flags ; }; struct hash_desc { struct crypto_hash *tfm ; u32 flags ; }; struct ablkcipher_alg { int (*setkey)(struct crypto_ablkcipher * , u8 const * , unsigned int ) ; int (*encrypt)(struct ablkcipher_request * ) ; int (*decrypt)(struct ablkcipher_request * ) ; int (*givencrypt)(struct skcipher_givcrypt_request * ) ; int (*givdecrypt)(struct skcipher_givcrypt_request * ) ; char const *geniv ; unsigned int min_keysize ; unsigned int max_keysize ; unsigned int ivsize ; }; struct aead_alg { int (*setkey)(struct crypto_aead * , u8 const * , unsigned int ) ; int (*setauthsize)(struct crypto_aead * , unsigned int ) ; int (*encrypt)(struct aead_request * ) ; int (*decrypt)(struct aead_request * ) ; int (*givencrypt)(struct aead_givcrypt_request * ) ; int (*givdecrypt)(struct aead_givcrypt_request * ) ; char const *geniv ; unsigned int ivsize ; unsigned int maxauthsize ; }; struct blkcipher_alg { int (*setkey)(struct crypto_tfm * , u8 const * , unsigned int ) ; int (*encrypt)(struct blkcipher_desc * , struct scatterlist * , struct scatterlist * , unsigned int ) ; int (*decrypt)(struct blkcipher_desc * , struct scatterlist * , struct scatterlist * , unsigned int ) ; char const *geniv ; unsigned int min_keysize ; unsigned int max_keysize ; unsigned int ivsize ; }; struct cipher_alg { unsigned int cia_min_keysize ; unsigned int cia_max_keysize ; int (*cia_setkey)(struct crypto_tfm * , u8 const * , unsigned int ) ; void (*cia_encrypt)(struct crypto_tfm * , u8 * , u8 const * ) ; void (*cia_decrypt)(struct crypto_tfm * , u8 * , u8 const * ) ; }; struct compress_alg { int (*coa_compress)(struct crypto_tfm * , u8 const * , unsigned int , u8 * , unsigned int * ) ; int (*coa_decompress)(struct crypto_tfm * , u8 const * , unsigned int , u8 * , unsigned int * ) ; }; struct rng_alg { int (*rng_make_random)(struct crypto_rng * , u8 * , unsigned int ) ; int (*rng_reset)(struct crypto_rng * , u8 * , unsigned int ) ; unsigned int seedsize ; }; union __anonunion_cra_u_185 { struct ablkcipher_alg ablkcipher ; struct aead_alg aead ; struct blkcipher_alg blkcipher ; struct cipher_alg cipher ; struct compress_alg compress ; struct rng_alg rng ; }; struct crypto_alg { struct list_head cra_list ; struct list_head cra_users ; u32 cra_flags ; unsigned int cra_blocksize ; unsigned int cra_ctxsize ; unsigned int cra_alignmask ; int cra_priority ; atomic_t cra_refcnt ; char cra_name[64U] ; char cra_driver_name[64U] ; struct crypto_type const *cra_type ; union __anonunion_cra_u_185 cra_u ; int (*cra_init)(struct crypto_tfm * ) ; void (*cra_exit)(struct crypto_tfm * ) ; void (*cra_destroy)(struct crypto_alg * ) ; struct module *cra_module ; }; struct ablkcipher_tfm { int (*setkey)(struct crypto_ablkcipher * , u8 const * , unsigned int ) ; int (*encrypt)(struct ablkcipher_request * ) ; int (*decrypt)(struct ablkcipher_request * ) ; int (*givencrypt)(struct skcipher_givcrypt_request * ) ; int (*givdecrypt)(struct skcipher_givcrypt_request * ) ; struct crypto_ablkcipher *base ; unsigned int ivsize ; unsigned int reqsize ; }; struct aead_tfm { int (*setkey)(struct crypto_aead * , u8 const * , unsigned int ) ; int (*encrypt)(struct aead_request * ) ; int (*decrypt)(struct aead_request * ) ; int (*givencrypt)(struct aead_givcrypt_request * ) ; int (*givdecrypt)(struct aead_givcrypt_request * ) ; struct crypto_aead *base ; unsigned int ivsize ; unsigned int authsize ; unsigned int reqsize ; }; struct blkcipher_tfm { void *iv ; int (*setkey)(struct crypto_tfm * , u8 const * , unsigned int ) ; int (*encrypt)(struct blkcipher_desc * , struct scatterlist * , struct scatterlist * , unsigned int ) ; int (*decrypt)(struct blkcipher_desc * , struct scatterlist * , struct scatterlist * , unsigned int ) ; }; struct cipher_tfm { int (*cit_setkey)(struct crypto_tfm * , u8 const * , unsigned int ) ; void (*cit_encrypt_one)(struct crypto_tfm * , u8 * , u8 const * ) ; void (*cit_decrypt_one)(struct crypto_tfm * , u8 * , u8 const * ) ; }; struct hash_tfm { int (*init)(struct hash_desc * ) ; int (*update)(struct hash_desc * , struct scatterlist * , unsigned int ) ; int (*final)(struct hash_desc * , u8 * ) ; int (*digest)(struct hash_desc * , struct scatterlist * , unsigned int , u8 * ) ; int (*setkey)(struct crypto_hash * , u8 const * , unsigned int ) ; unsigned int digestsize ; }; struct compress_tfm { int (*cot_compress)(struct crypto_tfm * , u8 const * , unsigned int , u8 * , unsigned int * ) ; int (*cot_decompress)(struct crypto_tfm * , u8 const * , unsigned int , u8 * , unsigned int * ) ; }; struct rng_tfm { int (*rng_gen_random)(struct crypto_rng * , u8 * , unsigned int ) ; int (*rng_reset)(struct crypto_rng * , u8 * , unsigned int ) ; }; union __anonunion_crt_u_186 { struct ablkcipher_tfm ablkcipher ; struct aead_tfm aead ; struct blkcipher_tfm blkcipher ; struct cipher_tfm cipher ; struct hash_tfm hash ; struct compress_tfm compress ; struct rng_tfm rng ; }; struct crypto_tfm { u32 crt_flags ; union __anonunion_crt_u_186 crt_u ; void (*exit)(struct crypto_tfm * ) ; struct crypto_alg *__crt_alg ; void *__crt_ctx[] ; }; struct crypto_ablkcipher { struct crypto_tfm base ; }; struct crypto_aead { struct crypto_tfm base ; }; struct crypto_blkcipher { struct crypto_tfm base ; }; struct crypto_hash { struct crypto_tfm base ; }; struct crypto_rng { struct crypto_tfm base ; }; struct request_values { }; struct request_sock_ops { int family ; int obj_size ; struct kmem_cache *slab ; char *slab_name ; int (*rtx_syn_ack)(struct sock * , struct request_sock * , struct request_values * ) ; void (*send_ack)(struct sock * , struct sk_buff * , struct request_sock * ) ; void (*send_reset)(struct sock * , struct sk_buff * ) ; void (*destructor)(struct request_sock * ) ; void (*syn_ack_timeout)(struct sock * , struct request_sock * ) ; }; struct request_sock { struct request_sock *dl_next ; u16 mss ; u8 retrans ; u8 cookie_ts ; u32 window_clamp ; u32 rcv_wnd ; u32 ts_recent ; unsigned long expires ; struct request_sock_ops const *rsk_ops ; struct sock *sk ; u32 secid ; u32 peer_secid ; }; struct timewait_sock_ops { struct kmem_cache *twsk_slab ; char *twsk_slab_name ; unsigned int twsk_obj_size ; int (*twsk_unique)(struct sock * , struct sock * , void * ) ; void (*twsk_destructor)(struct sock * ) ; }; struct disk_stats { unsigned long sectors[2U] ; unsigned long ios[2U] ; unsigned long merges[2U] ; unsigned long ticks[2U] ; unsigned long io_ticks ; unsigned long time_in_queue ; }; struct hd_struct { sector_t start_sect ; sector_t nr_sects ; sector_t alignment_offset ; unsigned int discard_alignment ; struct device __dev ; struct kobject *holder_dir ; int policy ; int partno ; int make_it_fail ; unsigned long stamp ; int in_flight[2U] ; struct disk_stats *dkstats ; struct rcu_head rcu_head ; }; struct disk_part_tbl { struct rcu_head rcu_head ; int len ; struct hd_struct *last_lookup ; struct hd_struct *part[] ; }; struct request_queue; struct blk_integrity; struct gendisk { int major ; int first_minor ; int minors ; char disk_name[32U] ; char *(*devnode)(struct gendisk * , mode_t * ) ; struct disk_part_tbl *part_tbl ; struct hd_struct part0 ; struct block_device_operations const *fops ; struct request_queue *queue ; void *private_data ; int flags ; struct device *driverfs_dev ; struct kobject *slave_dir ; struct timer_rand_state *random ; atomic_t sync_io ; struct work_struct async_notify ; struct blk_integrity *integrity ; int node_id ; }; enum writeback_sync_modes { WB_SYNC_NONE = 0, WB_SYNC_ALL = 1 } ; struct writeback_control { struct backing_dev_info *bdi ; struct super_block *sb ; enum writeback_sync_modes sync_mode ; unsigned long *older_than_this ; unsigned long wb_start ; long nr_to_write ; long pages_skipped ; loff_t range_start ; loff_t range_end ; unsigned char nonblocking : 1 ; unsigned char encountered_congestion : 1 ; unsigned char for_kupdate : 1 ; unsigned char for_background : 1 ; unsigned char for_reclaim : 1 ; unsigned char range_cyclic : 1 ; unsigned char more_io : 1 ; unsigned char no_nrwrite_index_update : 1 ; unsigned char sb_pinned : 1 ; }; struct bdi_writeback; typedef int congested_fn(void * , int ); struct bdi_writeback { struct list_head list ; struct backing_dev_info *bdi ; unsigned int nr ; unsigned long last_old_flush ; struct task_struct *task ; struct list_head b_dirty ; struct list_head b_io ; struct list_head b_more_io ; }; struct backing_dev_info { struct list_head bdi_list ; struct rcu_head rcu_head ; unsigned long ra_pages ; unsigned long state ; unsigned int capabilities ; congested_fn *congested_fn ; void *congested_data ; void (*unplug_io_fn)(struct backing_dev_info * , struct page * ) ; void *unplug_io_data ; char *name ; struct percpu_counter bdi_stat[2U] ; struct prop_local_percpu completions ; int dirty_exceeded ; unsigned int min_ratio ; unsigned int max_ratio ; unsigned int max_prop_frac ; struct bdi_writeback wb ; spinlock_t wb_lock ; struct list_head wb_list ; unsigned long wb_mask ; unsigned int wb_cnt ; struct list_head work_list ; struct device *dev ; struct timer_list laptop_mode_wb_timer ; struct dentry *debug_dir ; struct dentry *debug_stats ; }; typedef void *mempool_alloc_t(gfp_t , void * ); typedef void mempool_free_t(void * , void * ); struct mempool_s { spinlock_t lock ; int min_nr ; int curr_nr ; void **elements ; void *pool_data ; mempool_alloc_t *alloc ; mempool_free_t *free ; wait_queue_head_t wait ; }; typedef struct mempool_s mempool_t; struct io_context { atomic_long_t refcount ; atomic_t nr_tasks ; spinlock_t lock ; unsigned short ioprio ; unsigned short ioprio_changed ; unsigned short cgroup_changed ; int nr_batch_requests ; unsigned long last_waited ; struct radix_tree_root radix_root ; struct hlist_head cic_list ; void *ioc_data ; }; struct bio_vec { struct page *bv_page ; unsigned int bv_len ; unsigned int bv_offset ; }; struct bio_integrity_payload; typedef void bio_end_io_t(struct bio * , int ); typedef void bio_destructor_t(struct bio * ); struct bio { sector_t bi_sector ; struct bio *bi_next ; struct block_device *bi_bdev ; unsigned long bi_flags ; unsigned long bi_rw ; unsigned short bi_vcnt ; unsigned short bi_idx ; unsigned int bi_phys_segments ; unsigned int bi_size ; unsigned int bi_seg_front_size ; unsigned int bi_seg_back_size ; unsigned int bi_max_vecs ; unsigned int bi_comp_cpu ; atomic_t bi_cnt ; struct bio_vec *bi_io_vec ; bio_end_io_t *bi_end_io ; void *bi_private ; struct bio_integrity_payload *bi_integrity ; bio_destructor_t *bi_destructor ; struct bio_vec bi_inline_vecs[0U] ; }; struct bio_integrity_payload { struct bio *bip_bio ; sector_t bip_sector ; void *bip_buf ; bio_end_io_t *bip_end_io ; unsigned int bip_size ; unsigned short bip_slab ; unsigned short bip_vcnt ; unsigned short bip_idx ; struct work_struct bip_work ; struct bio_vec bip_vec[0U] ; }; struct bio_list { struct bio *head ; struct bio *tail ; }; struct bsg_class_device { struct device *class_dev ; struct device *parent ; int minor ; struct request_queue *queue ; struct kref ref ; void (*release)(struct device * ) ; }; struct elevator_queue; struct request; typedef void rq_end_io_fn(struct request * , int ); struct request_list { int count[2U] ; int starved[2U] ; int elvpriv ; mempool_t *rq_pool ; wait_queue_head_t wait[2U] ; }; enum rq_cmd_type_bits { REQ_TYPE_FS = 1, REQ_TYPE_BLOCK_PC = 2, REQ_TYPE_SENSE = 3, REQ_TYPE_PM_SUSPEND = 4, REQ_TYPE_PM_RESUME = 5, REQ_TYPE_PM_SHUTDOWN = 6, REQ_TYPE_SPECIAL = 7, REQ_TYPE_LINUX_BLOCK = 8, REQ_TYPE_ATA_TASKFILE = 9, REQ_TYPE_ATA_PC = 10 } ; union __anonunion_ldv_37004_194 { struct rb_node rb_node ; void *completion_data ; }; struct request { struct list_head queuelist ; struct call_single_data csd ; struct request_queue *q ; unsigned int cmd_flags ; enum rq_cmd_type_bits cmd_type ; unsigned long atomic_flags ; int cpu ; unsigned int __data_len ; sector_t __sector ; struct bio *bio ; struct bio *biotail ; struct hlist_node hash ; union __anonunion_ldv_37004_194 ldv_37004 ; void *elevator_private ; void *elevator_private2 ; void *elevator_private3 ; struct gendisk *rq_disk ; unsigned long start_time ; unsigned short nr_phys_segments ; unsigned short ioprio ; int ref_count ; void *special ; char *buffer ; int tag ; int errors ; unsigned char __cmd[16U] ; unsigned char *cmd ; unsigned short cmd_len ; unsigned int extra_len ; unsigned int sense_len ; unsigned int resid_len ; void *sense ; unsigned long deadline ; struct list_head timeout_list ; unsigned int timeout ; int retries ; rq_end_io_fn *end_io ; void *end_io_data ; struct request *next_rq ; }; typedef int elevator_merge_fn(struct request_queue * , struct request ** , struct bio * ); typedef void elevator_merge_req_fn(struct request_queue * , struct request * , struct request * ); typedef void elevator_merged_fn(struct request_queue * , struct request * , int ); typedef int elevator_allow_merge_fn(struct request_queue * , struct request * , struct bio * ); typedef void elevator_bio_merged_fn(struct request_queue * , struct request * , struct bio * ); typedef int elevator_dispatch_fn(struct request_queue * , int ); typedef void elevator_add_req_fn(struct request_queue * , struct request * ); typedef int elevator_queue_empty_fn(struct request_queue * ); typedef struct request *elevator_request_list_fn(struct request_queue * , struct request * ); typedef void elevator_completed_req_fn(struct request_queue * , struct request * ); typedef int elevator_may_queue_fn(struct request_queue * , int ); typedef int elevator_set_req_fn(struct request_queue * , struct request * , gfp_t ); typedef void elevator_put_req_fn(struct request * ); typedef void elevator_activate_req_fn(struct request_queue * , struct request * ); typedef void elevator_deactivate_req_fn(struct request_queue * , struct request * ); typedef void *elevator_init_fn(struct request_queue * ); typedef void elevator_exit_fn(struct elevator_queue * ); struct elevator_ops { elevator_merge_fn *elevator_merge_fn ; elevator_merged_fn *elevator_merged_fn ; elevator_merge_req_fn *elevator_merge_req_fn ; elevator_allow_merge_fn *elevator_allow_merge_fn ; elevator_bio_merged_fn *elevator_bio_merged_fn ; elevator_dispatch_fn *elevator_dispatch_fn ; elevator_add_req_fn *elevator_add_req_fn ; elevator_activate_req_fn *elevator_activate_req_fn ; elevator_deactivate_req_fn *elevator_deactivate_req_fn ; elevator_queue_empty_fn *elevator_queue_empty_fn ; elevator_completed_req_fn *elevator_completed_req_fn ; elevator_request_list_fn *elevator_former_req_fn ; elevator_request_list_fn *elevator_latter_req_fn ; elevator_set_req_fn *elevator_set_req_fn ; elevator_put_req_fn *elevator_put_req_fn ; elevator_may_queue_fn *elevator_may_queue_fn ; elevator_init_fn *elevator_init_fn ; elevator_exit_fn *elevator_exit_fn ; void (*trim)(struct io_context * ) ; }; struct elv_fs_entry { struct attribute attr ; ssize_t (*show)(struct elevator_queue * , char * ) ; ssize_t (*store)(struct elevator_queue * , char const * , size_t ) ; }; struct elevator_type { struct list_head list ; struct elevator_ops ops ; struct elv_fs_entry *elevator_attrs ; char elevator_name[16U] ; struct module *elevator_owner ; }; struct elevator_queue { struct elevator_ops *ops ; void *elevator_data ; struct kobject kobj ; struct elevator_type *elevator_type ; struct mutex sysfs_lock ; struct hlist_head *hash ; }; typedef void request_fn_proc(struct request_queue * ); typedef int make_request_fn(struct request_queue * , struct bio * ); typedef int prep_rq_fn(struct request_queue * , struct request * ); typedef void unplug_fn(struct request_queue * ); struct bvec_merge_data { struct block_device *bi_bdev ; sector_t bi_sector ; unsigned int bi_size ; unsigned long bi_rw ; }; typedef int merge_bvec_fn(struct request_queue * , struct bvec_merge_data * , struct bio_vec * ); typedef void prepare_flush_fn(struct request_queue * , struct request * ); typedef void softirq_done_fn(struct request * ); typedef int dma_drain_needed_fn(struct request * ); typedef int lld_busy_fn(struct request_queue * ); enum blk_eh_timer_return { BLK_EH_NOT_HANDLED = 0, BLK_EH_HANDLED = 1, BLK_EH_RESET_TIMER = 2 } ; typedef enum blk_eh_timer_return rq_timed_out_fn(struct request * ); struct blk_queue_tag { struct request **tag_index ; unsigned long *tag_map ; int busy ; int max_depth ; int real_max_depth ; atomic_t refcnt ; }; struct queue_limits { unsigned long bounce_pfn ; unsigned long seg_boundary_mask ; unsigned int max_hw_sectors ; unsigned int max_sectors ; unsigned int max_segment_size ; unsigned int physical_block_size ; unsigned int alignment_offset ; unsigned int io_min ; unsigned int io_opt ; unsigned int max_discard_sectors ; unsigned int discard_granularity ; unsigned int discard_alignment ; unsigned short logical_block_size ; unsigned short max_segments ; unsigned char misaligned ; unsigned char discard_misaligned ; unsigned char no_cluster ; signed char discard_zeroes_data ; }; struct request_queue { struct list_head queue_head ; struct request *last_merge ; struct elevator_queue *elevator ; struct request_list rq ; request_fn_proc *request_fn ; make_request_fn *make_request_fn ; prep_rq_fn *prep_rq_fn ; unplug_fn *unplug_fn ; merge_bvec_fn *merge_bvec_fn ; prepare_flush_fn *prepare_flush_fn ; softirq_done_fn *softirq_done_fn ; rq_timed_out_fn *rq_timed_out_fn ; dma_drain_needed_fn *dma_drain_needed ; lld_busy_fn *lld_busy_fn ; sector_t end_sector ; struct request *boundary_rq ; struct timer_list unplug_timer ; int unplug_thresh ; unsigned long unplug_delay ; struct work_struct unplug_work ; struct backing_dev_info backing_dev_info ; void *queuedata ; gfp_t bounce_gfp ; unsigned long queue_flags ; spinlock_t __queue_lock ; spinlock_t *queue_lock ; struct kobject kobj ; unsigned long nr_requests ; unsigned int nr_congestion_on ; unsigned int nr_congestion_off ; unsigned int nr_batching ; void *dma_drain_buffer ; unsigned int dma_drain_size ; unsigned int dma_pad_mask ; unsigned int dma_alignment ; struct blk_queue_tag *queue_tags ; struct list_head tag_busy_list ; unsigned int nr_sorted ; unsigned int in_flight[2U] ; unsigned int rq_timeout ; struct timer_list timeout ; struct list_head timeout_list ; struct queue_limits limits ; unsigned int sg_timeout ; unsigned int sg_reserved_size ; int node ; unsigned int ordered ; unsigned int next_ordered ; unsigned int ordseq ; int orderr ; int ordcolor ; struct request pre_flush_rq ; struct request bar_rq ; struct request post_flush_rq ; struct request *orig_bar_rq ; struct mutex sysfs_lock ; struct bsg_class_device bsg_dev ; }; struct blk_integrity_exchg { void *prot_buf ; void *data_buf ; sector_t sector ; unsigned int data_size ; unsigned short sector_size ; char const *disk_name ; }; typedef void integrity_gen_fn(struct blk_integrity_exchg * ); typedef int integrity_vrfy_fn(struct blk_integrity_exchg * ); typedef void integrity_set_tag_fn(void * , void * , unsigned int ); typedef void integrity_get_tag_fn(void * , void * , unsigned int ); struct blk_integrity { integrity_gen_fn *generate_fn ; integrity_vrfy_fn *verify_fn ; integrity_set_tag_fn *set_tag_fn ; integrity_get_tag_fn *get_tag_fn ; unsigned short flags ; unsigned short tuple_size ; unsigned short sector_size ; unsigned short tag_size ; char const *name ; struct kobject kobj ; }; struct block_device_operations { int (*open)(struct block_device * , fmode_t ) ; int (*release)(struct gendisk * , fmode_t ) ; int (*locked_ioctl)(struct block_device * , fmode_t , unsigned int , unsigned long ) ; int (*ioctl)(struct block_device * , fmode_t , unsigned int , unsigned long ) ; int (*compat_ioctl)(struct block_device * , fmode_t , unsigned int , unsigned long ) ; int (*direct_access)(struct block_device * , sector_t , void ** , unsigned long * ) ; int (*media_changed)(struct gendisk * ) ; unsigned long long (*set_capacity)(struct gendisk * , unsigned long long ) ; int (*revalidate_disk)(struct gendisk * ) ; int (*getgeo)(struct block_device * , struct hd_geometry * ) ; struct module *owner ; }; struct ipv6_devconf { __s32 forwarding ; __s32 hop_limit ; __s32 mtu6 ; __s32 accept_ra ; __s32 accept_redirects ; __s32 autoconf ; __s32 dad_transmits ; __s32 rtr_solicits ; __s32 rtr_solicit_interval ; __s32 rtr_solicit_delay ; __s32 force_mld_version ; __s32 use_tempaddr ; __s32 temp_valid_lft ; __s32 temp_prefered_lft ; __s32 regen_max_retry ; __s32 max_desync_factor ; __s32 max_addresses ; __s32 accept_ra_defrtr ; __s32 accept_ra_pinfo ; __s32 accept_ra_rtr_pref ; __s32 rtr_probe_interval ; __s32 accept_ra_rt_info_max_plen ; __s32 proxy_ndp ; __s32 accept_source_route ; __s32 optimistic_dad ; __s32 mc_forwarding ; __s32 disable_ipv6 ; __s32 accept_dad ; __s32 force_tllao ; void *sysctl ; }; struct inet_peer { struct inet_peer *avl_left ; struct inet_peer *avl_right ; __be32 v4daddr ; __u32 avl_height ; struct list_head unused ; __u32 dtime ; atomic_t refcnt ; atomic_t rid ; atomic_t ip_id_count ; __u32 tcp_ts ; __u32 tcp_ts_stamp ; }; union __anonunion_u_200 { struct dst_entry dst ; }; struct in_device; struct rtable { union __anonunion_u_200 u ; struct flowi fl ; struct in_device *idev ; int rt_genid ; unsigned int rt_flags ; __u16 rt_type ; __be32 rt_dst ; __be32 rt_src ; int rt_iif ; __be32 rt_gateway ; __be32 rt_spec_dst ; struct inet_peer *peer ; }; struct inet_ehash_bucket { struct hlist_nulls_head chain ; struct hlist_nulls_head twchain ; }; struct inet_bind_hashbucket { spinlock_t lock ; struct hlist_head chain ; }; struct inet_listen_hashbucket { spinlock_t lock ; struct hlist_nulls_head head ; }; struct inet_hashinfo { struct inet_ehash_bucket *ehash ; spinlock_t *ehash_locks ; unsigned int ehash_mask ; unsigned int ehash_locks_mask ; struct inet_bind_hashbucket *bhash ; unsigned int bhash_size ; struct kmem_cache *bind_bucket_cachep ; struct inet_listen_hashbucket listening_hash[32U] ; atomic_t bsockets ; }; struct lc_element { struct hlist_node colision ; struct list_head list ; unsigned int refcnt ; unsigned int lc_index ; unsigned int lc_number ; }; struct lru_cache { struct list_head lru ; struct list_head free ; struct list_head in_use ; struct kmem_cache *lc_cache ; size_t element_size ; size_t element_off ; unsigned int nr_elements ; unsigned int used ; unsigned long hits ; unsigned long misses ; unsigned long starving ; unsigned long dirty ; unsigned long changed ; unsigned long flags ; unsigned int new_number ; struct lc_element *changing_element ; void *lc_private ; char const *name ; struct hlist_head *lc_slot ; struct lc_element **lc_element ; }; struct drbd_conf; struct p_header { u32 magic ; u16 command ; u16 length ; u8 payload[0U] ; }; struct p_data { struct p_header head ; u64 sector ; u64 block_id ; u32 seq_num ; u32 dp_flags ; }; struct p_block_ack { struct p_header head ; u64 sector ; u64 block_id ; u32 blksize ; u32 seq_num ; }; struct p_block_req { struct p_header head ; u64 sector ; u64 block_id ; u32 blksize ; u32 pad ; }; struct p_handshake { struct p_header head ; u32 protocol_min ; u32 feature_flags ; u32 protocol_max ; u32 _pad ; u64 reserverd[7U] ; }; struct p_barrier { struct p_header head ; u32 barrier ; u32 pad ; }; struct p_barrier_ack { struct p_header head ; u32 barrier ; u32 set_size ; }; struct p_rs_param_89 { struct p_header head ; u32 rate ; char verify_alg[64U] ; char csums_alg[64U] ; }; struct p_protocol { struct p_header head ; u32 protocol ; u32 after_sb_0p ; u32 after_sb_1p ; u32 after_sb_2p ; u32 conn_flags ; u32 two_primaries ; char integrity_alg[0U] ; }; struct p_uuids { struct p_header head ; u64 uuid[6U] ; }; struct p_sizes { struct p_header head ; u64 d_size ; u64 u_size ; u64 c_size ; u32 max_segment_size ; u16 queue_order_type ; u16 dds_flags ; }; struct p_state { struct p_header head ; u32 state ; }; struct p_req_state { struct p_header head ; u32 mask ; u32 val ; }; struct p_req_state_reply { struct p_header head ; u32 retcode ; }; union p_polymorph { struct p_header header ; struct p_handshake handshake ; struct p_data data ; struct p_block_ack block_ack ; struct p_barrier barrier ; struct p_barrier_ack barrier_ack ; struct p_rs_param_89 rs_param_89 ; struct p_protocol protocol ; struct p_sizes sizes ; struct p_uuids uuids ; struct p_state state ; struct p_req_state req_state ; struct p_req_state_reply req_state_reply ; struct p_block_req block_req ; }; enum drbd_thread_state { None = 0, Running = 1, Exiting = 2, Restarting = 3 } ; struct drbd_thread { spinlock_t t_lock ; struct task_struct *task ; struct completion stop ; enum drbd_thread_state t_state ; int (*function)(struct drbd_thread * ) ; struct drbd_conf *mdev ; int reset_cpu_mask ; }; struct drbd_work; struct drbd_work { struct list_head list ; int (*cb)(struct drbd_conf * , struct drbd_work * , int ) ; }; struct drbd_tl_epoch; struct drbd_tl_epoch { struct drbd_work w ; struct list_head requests ; struct drbd_tl_epoch *next ; unsigned int br_number ; int n_req ; }; struct drbd_epoch { struct list_head list ; unsigned int barrier_nr ; atomic_t epoch_size ; atomic_t active ; unsigned long flags ; }; struct drbd_epoch_entry { struct drbd_work w ; struct hlist_node colision ; struct drbd_epoch *epoch ; struct drbd_conf *mdev ; struct page *pages ; atomic_t pending_bios ; unsigned int size ; unsigned long flags ; sector_t sector ; u64 block_id ; }; struct drbd_bitmap; struct drbd_work_queue { struct list_head q ; struct semaphore s ; spinlock_t q_lock ; }; struct drbd_socket { struct drbd_work_queue work ; struct mutex mutex ; struct socket *socket ; union p_polymorph sbuf ; union p_polymorph rbuf ; }; struct drbd_md { u64 md_offset ; u64 la_size_sect ; u64 uuid[4U] ; u64 device_uuid ; u32 flags ; u32 md_size_sect ; s32 al_offset ; s32 bm_offset ; }; struct disk_conf { __u64 disk_size ; unsigned char backing_dev[128U] ; int backing_dev_len ; unsigned char meta_dev[128U] ; int meta_dev_len ; int meta_dev_idx ; int on_io_error ; int fencing ; unsigned char use_bmbv : 1 ; unsigned char no_disk_flush : 1 ; unsigned char no_md_flush : 1 ; int max_bio_bvecs ; unsigned char no_disk_barrier : 1 ; unsigned char no_disk_drain : 1 ; }; struct net_conf { unsigned char my_addr[128U] ; int my_addr_len ; unsigned char peer_addr[128U] ; int peer_addr_len ; unsigned char shared_secret[64U] ; int shared_secret_len ; unsigned char cram_hmac_alg[64U] ; int cram_hmac_alg_len ; unsigned char integrity_alg[64U] ; int integrity_alg_len ; int timeout ; int wire_protocol ; int try_connect_int ; int ping_int ; int max_epoch_size ; int max_buffers ; int unplug_watermark ; int sndbuf_size ; int ko_count ; int after_sb_0p ; int after_sb_1p ; int after_sb_2p ; int rr_conflict ; int ping_timeo ; int rcvbuf_size ; unsigned char mind_af : 1 ; unsigned char want_lose : 1 ; unsigned char two_primaries : 1 ; unsigned char always_asbp : 1 ; unsigned char no_cork : 1 ; unsigned char auto_sndbuf_size : 1 ; unsigned char dry_run : 1 ; }; struct syncer_conf { int rate ; int after ; int al_extents ; int dp_volume ; int dp_interval ; int throttle_th ; int hold_off_th ; unsigned char verify_alg[64U] ; int verify_alg_len ; unsigned char cpu_mask[32U] ; int cpu_mask_len ; unsigned char csums_alg[64U] ; int csums_alg_len ; unsigned char use_rle : 1 ; }; struct drbd_backing_dev { struct block_device *backing_bdev ; struct block_device *md_bdev ; struct file *lo_file ; struct file *md_file ; struct drbd_md md ; struct disk_conf dc ; sector_t known_size ; }; struct bm_io_work { struct drbd_work w ; char *why ; int (*io_fn)(struct drbd_conf * ) ; void (*done)(struct drbd_conf * , int ) ; }; enum write_ordering_e { WO_none = 0, WO_drain_io = 1, WO_bdev_flush = 2, WO_bio_barrier = 3 } ; struct drbd_conf { unsigned long flags ; struct net_conf *net_conf ; struct syncer_conf sync_conf ; struct drbd_backing_dev *ldev ; sector_t p_size ; struct request_queue *rq_queue ; struct block_device *this_bdev ; struct gendisk *vdisk ; struct drbd_socket data ; struct drbd_socket meta ; int agreed_pro_version ; unsigned long last_received ; unsigned int ko_count ; struct drbd_work resync_work ; struct drbd_work unplug_work ; struct drbd_work md_sync_work ; struct drbd_work delay_probe_work ; struct drbd_work uuid_work ; struct timer_list resync_timer ; struct timer_list md_sync_timer ; struct timer_list delay_probe_timer ; union drbd_state new_state_tmp ; union drbd_state state ; wait_queue_head_t misc_wait ; wait_queue_head_t state_wait ; unsigned int send_cnt ; unsigned int recv_cnt ; unsigned int read_cnt ; unsigned int writ_cnt ; unsigned int al_writ_cnt ; unsigned int bm_writ_cnt ; atomic_t ap_bio_cnt ; atomic_t ap_pending_cnt ; atomic_t rs_pending_cnt ; atomic_t unacked_cnt ; atomic_t local_cnt ; atomic_t net_cnt ; spinlock_t req_lock ; struct drbd_tl_epoch *unused_spare_tle ; struct drbd_tl_epoch *newest_tle ; struct drbd_tl_epoch *oldest_tle ; struct list_head out_of_sequence_requests ; struct hlist_head *tl_hash ; unsigned int tl_hash_s ; unsigned long rs_total ; unsigned long rs_failed ; unsigned long rs_start ; unsigned long rs_paused ; unsigned long rs_mark_left ; unsigned long rs_mark_time ; unsigned long rs_same_csum ; sector_t ov_start_sector ; sector_t ov_position ; sector_t ov_last_oos_start ; sector_t ov_last_oos_size ; unsigned long ov_left ; struct crypto_hash *csums_tfm ; struct crypto_hash *verify_tfm ; struct drbd_thread receiver ; struct drbd_thread worker ; struct drbd_thread asender ; struct drbd_bitmap *bitmap ; unsigned long bm_resync_fo ; struct lru_cache *resync ; unsigned int resync_locked ; unsigned int resync_wenr ; int open_cnt ; u64 *p_uuid ; struct drbd_epoch *current_epoch ; spinlock_t epoch_lock ; unsigned int epochs ; enum write_ordering_e write_ordering ; struct list_head active_ee ; struct list_head sync_ee ; struct list_head done_ee ; struct list_head read_ee ; struct list_head net_ee ; struct hlist_head *ee_hash ; unsigned int ee_hash_s ; struct drbd_epoch_entry *last_write_w_barrier ; int next_barrier_nr ; struct hlist_head *app_reads_hash ; struct list_head resync_reads ; atomic_t pp_in_use ; wait_queue_head_t ee_wait ; struct page *md_io_page ; struct page *md_io_tmpp ; struct mutex md_io_mutex ; spinlock_t al_lock ; wait_queue_head_t al_wait ; struct lru_cache *act_log ; unsigned int al_tr_number ; int al_tr_cycle ; int al_tr_pos ; struct crypto_hash *cram_hmac_tfm ; struct crypto_hash *integrity_w_tfm ; struct crypto_hash *integrity_r_tfm ; void *int_dig_out ; void *int_dig_in ; void *int_dig_vv ; wait_queue_head_t seq_wait ; atomic_t packet_seq ; unsigned int peer_seq ; spinlock_t peer_seq_lock ; unsigned int minor ; unsigned long comm_bm_set ; cpumask_var_t cpu_mask ; struct bm_io_work bm_io_work ; u64 ed_uuid ; struct mutex state_mutex ; char congestion_reason ; struct list_head delay_probes ; int data_delay ; unsigned int delay_seq ; struct timeval dps_time ; unsigned int dp_volume_last ; int c_sync_rate ; atomic_t new_c_uuid ; }; enum chg_state_flags { CS_HARD = 1, CS_VERBOSE = 2, CS_WAIT_COMPLETE = 4, CS_SERIALIZE = 8, CS_ORDERED = 12 } ; struct drbd_bitmap { struct page **bm_pages ; spinlock_t bm_lock ; unsigned long bm_set ; unsigned long bm_bits ; size_t bm_words ; size_t bm_number_of_pages ; sector_t bm_dev_capacity ; struct mutex bm_change ; atomic_t bm_async_io ; wait_queue_head_t bm_io_wait ; unsigned long bm_flags ; char *bm_why ; struct task_struct *bm_task ; }; typedef int ldv_func_ret_type___2; enum hrtimer_restart; union proc_op { int (*proc_get_link)(struct inode * , struct path * ) ; int (*proc_read)(struct task_struct * , char * ) ; int (*proc_show)(struct seq_file * , struct pid_namespace * , struct pid * , struct task_struct * ) ; }; struct proc_inode { struct pid *pid ; int fd ; union proc_op op ; struct proc_dir_entry *pde ; struct ctl_table_header *sysctl ; struct ctl_table *sysctl_entry ; struct inode vfs_inode ; }; enum drbd_role { R_UNKNOWN = 0, R_PRIMARY = 1, R_SECONDARY = 2, R_MASK = 3 } ; enum drbd_conns { C_STANDALONE = 0, C_DISCONNECTING = 1, C_UNCONNECTED = 2, C_TIMEOUT = 3, C_BROKEN_PIPE = 4, C_NETWORK_FAILURE = 5, C_PROTOCOL_ERROR = 6, C_TEAR_DOWN = 7, C_WF_CONNECTION = 8, C_WF_REPORT_PARAMS = 9, C_CONNECTED = 10, C_STARTING_SYNC_S = 11, C_STARTING_SYNC_T = 12, C_WF_BITMAP_S = 13, C_WF_BITMAP_T = 14, C_WF_SYNC_UUID = 15, C_SYNC_SOURCE = 16, C_SYNC_TARGET = 17, C_VERIFY_S = 18, C_VERIFY_T = 19, C_PAUSED_SYNC_S = 20, C_PAUSED_SYNC_T = 21, C_MASK = 31 } ; struct bm_extent { int rs_left ; int rs_failed ; unsigned long flags ; struct lc_element lce ; }; enum hrtimer_restart; struct taskstats { __u16 version ; __u32 ac_exitcode ; __u8 ac_flag ; __u8 ac_nice ; __u64 cpu_count ; __u64 cpu_delay_total ; __u64 blkio_count ; __u64 blkio_delay_total ; __u64 swapin_count ; __u64 swapin_delay_total ; __u64 cpu_run_real_total ; __u64 cpu_run_virtual_total ; char ac_comm[32U] ; __u8 ac_sched ; __u8 ac_pad[3U] ; __u32 ac_uid ; __u32 ac_gid ; __u32 ac_pid ; __u32 ac_ppid ; __u32 ac_btime ; __u64 ac_etime ; __u64 ac_utime ; __u64 ac_stime ; __u64 ac_minflt ; __u64 ac_majflt ; __u64 coremem ; __u64 virtmem ; __u64 hiwater_rss ; __u64 hiwater_vm ; __u64 read_char ; __u64 write_char ; __u64 read_syscalls ; __u64 write_syscalls ; __u64 read_bytes ; __u64 write_bytes ; __u64 cancelled_write_bytes ; __u64 nvcsw ; __u64 nivcsw ; __u64 ac_utimescaled ; __u64 ac_stimescaled ; __u64 cpu_scaled_run_real_total ; __u64 freepages_count ; __u64 freepages_delay_total ; }; struct cgroupfs_root; struct cgroup; struct css_id; struct cgroup_subsys_state { struct cgroup *cgroup ; atomic_t refcnt ; unsigned long flags ; struct css_id *id ; }; struct cgroup { unsigned long flags ; atomic_t count ; struct list_head sibling ; struct list_head children ; struct cgroup *parent ; struct dentry *dentry ; struct cgroup_subsys_state *subsys[64U] ; struct cgroupfs_root *root ; struct cgroup *top_cgroup ; struct list_head css_sets ; struct list_head release_list ; struct list_head pidlists ; struct mutex pidlist_mutex ; struct rcu_head rcu_head ; struct list_head event_list ; spinlock_t event_list_lock ; }; struct css_set { atomic_t refcount ; struct hlist_node hlist ; struct list_head tasks ; struct list_head cg_links ; struct cgroup_subsys_state *subsys[64U] ; struct rcu_head rcu_head ; }; enum drbd_packets { P_DATA = 0, P_DATA_REPLY = 1, P_RS_DATA_REPLY = 2, P_BARRIER = 3, P_BITMAP = 4, P_BECOME_SYNC_TARGET = 5, P_BECOME_SYNC_SOURCE = 6, P_UNPLUG_REMOTE = 7, P_DATA_REQUEST = 8, P_RS_DATA_REQUEST = 9, P_SYNC_PARAM = 10, P_PROTOCOL = 11, P_UUIDS = 12, P_SIZES = 13, P_STATE = 14, P_SYNC_UUID = 15, P_AUTH_CHALLENGE = 16, P_AUTH_RESPONSE = 17, P_STATE_CHG_REQ = 18, P_PING = 19, P_PING_ACK = 20, P_RECV_ACK = 21, P_WRITE_ACK = 22, P_RS_WRITE_ACK = 23, P_DISCARD_ACK = 24, P_NEG_ACK = 25, P_NEG_DREPLY = 26, P_NEG_RS_DREPLY = 27, P_BARRIER_ACK = 28, P_STATE_CHG_REPLY = 29, P_OV_REQUEST = 30, P_OV_REPLY = 31, P_OV_RESULT = 32, P_CSUM_RS_REQUEST = 33, P_RS_IS_IN_SYNC = 34, P_SYNC_PARAM89 = 35, P_COMPRESSED_BITMAP = 36, P_DELAY_PROBE = 39, P_MAX_CMD = 40, P_MAY_IGNORE = 256, P_MAX_OPT_CMD = 257, P_HAND_SHAKE_M = 65521, P_HAND_SHAKE_S = 65522, P_HAND_SHAKE = 65534 } ; struct drbd_request { struct drbd_work w ; struct drbd_conf *mdev ; struct bio *private_bio ; struct hlist_node colision ; sector_t sector ; unsigned int size ; unsigned int epoch ; struct list_head tl_requests ; struct bio *master_bio ; unsigned long rq_state ; int seq_num ; unsigned long start_time ; }; struct drbd_wq_barrier { struct drbd_work w ; struct completion done ; }; struct digest_info { int digest_size ; void *digest ; }; struct drbd_md_io { struct drbd_conf *mdev ; struct completion event ; int error ; }; enum drbd_req_event { created = 0, to_be_send = 1, to_be_submitted = 2, queue_for_net_write = 3, queue_for_net_read = 4, send_canceled = 5, send_failed = 6, handed_over_to_network = 7, connection_lost_while_pending = 8, recv_acked_by_peer = 9, write_acked_by_peer = 10, write_acked_by_peer_and_sis = 11, conflict_discarded_by_peer = 12, neg_acked = 13, barrier_acked = 14, data_received = 15, read_completed_with_error = 16, read_ahead_completed_with_error = 17, write_completed_with_error = 18, completed_ok = 19, nothing = 20 } ; struct bio_and_error { struct bio *bio ; int error ; }; enum hrtimer_restart; struct kvec { void *iov_base ; size_t iov_len ; }; struct in_addr { __be32 s_addr ; }; struct sockaddr_in { sa_family_t sin_family ; __be16 sin_port ; struct in_addr sin_addr ; unsigned char __pad[8U] ; }; struct sockaddr_in6 { unsigned short sin6_family ; __be16 sin6_port ; __be32 sin6_flowinfo ; struct in6_addr sin6_addr ; __u32 sin6_scope_id ; }; enum drbd_fencing_p { FP_DONT_CARE = 0, FP_RESOURCE = 1, FP_STONITH = 2 } ; enum drbd_after_sb_p { ASB_DISCONNECT = 0, ASB_DISCARD_YOUNGER_PRI = 1, ASB_DISCARD_OLDER_PRI = 2, ASB_DISCARD_ZERO_CHG = 3, ASB_DISCARD_LEAST_CHG = 4, ASB_DISCARD_LOCAL = 5, ASB_DISCARD_REMOTE = 6, ASB_CONSENSUS = 7, ASB_DISCARD_SECONDARY = 8, ASB_CALL_HELPER = 9, ASB_VIOLENTLY = 10 } ; enum drbd_state_ret_codes { SS_CW_NO_NEED = 4, SS_CW_SUCCESS = 3, SS_NOTHING_TO_DO = 2, SS_SUCCESS = 1, SS_UNKNOWN_ERROR = 0, SS_TWO_PRIMARIES = -1, SS_NO_UP_TO_DATE_DISK = -2, SS_NO_LOCAL_DISK = -4, SS_NO_REMOTE_DISK = -5, SS_CONNECTED_OUTDATES = -6, SS_PRIMARY_NOP = -7, SS_RESYNC_RUNNING = -8, SS_ALREADY_STANDALONE = -9, SS_CW_FAILED_BY_PEER = -10, SS_IS_DISKLESS = -11, SS_DEVICE_IN_USE = -12, SS_NO_NET_CONFIG = -13, SS_NO_VERIFY_ALG = -14, SS_NEED_CONNECTION = -15, SS_LOWER_THAN_OUTDATED = -16, SS_NOT_SUPPORTED = -17, SS_IN_TRANSIENT_STATE = -18, SS_CONCURRENT_ST_CHG = -19, SS_AFTER_LAST_ERROR = -20 } ; struct bm_xfer_ctx { unsigned long bm_bits ; unsigned long bm_words ; unsigned long bit_offset ; unsigned long word_offset ; unsigned int packets[2U] ; unsigned int bytes[2U] ; }; struct p_rs_uuid { struct p_header head ; u64 uuid ; }; enum drbd_bitmap_code { RLE_VLI_Bits = 2 } ; struct p_compressed_bm { struct p_header head ; u8 encoding ; u8 code[0U] ; }; struct p_delay_probe { struct p_header head ; u32 seq_num ; u32 offset ; }; struct delay_probe { struct list_head list ; unsigned int seq_num ; struct timeval time ; }; enum epoch_event { EV_PUT = 0, EV_GOT_BARRIER_NR = 1, EV_BARRIER_DONE = 2, EV_BECAME_LAST = 3, EV_CLEANUP = 32 } ; enum dds_flags { DDSF_FORCED = 1, DDSF_NO_RESYNC = 2 } ; enum determine_dev_size { dev_size_error = -1, unchanged = 0, shrunk = 1, grew = 2 } ; struct bitstream_cursor { u8 *b ; unsigned int bit ; }; struct bitstream { struct bitstream_cursor cur ; unsigned char *buf ; size_t buf_len ; unsigned int pad_bits ; }; struct flush_work { struct drbd_work w ; struct drbd_epoch *epoch ; }; enum finish_epoch { FE_STILL_LIVE = 0, FE_DESTROYED = 1, FE_RECYCLED = 2 } ; enum receive_bitmap_ret { OK = 0, DONE = 1, FAILED = 2 } ; typedef int (*drbd_cmd_handler_f)(struct drbd_conf * , struct p_header * ); typedef struct drbd_request *req_validator_fn(struct drbd_conf * , u64 , sector_t ); struct asender_cmd { size_t pkt_size ; int (*process)(struct drbd_conf * , struct p_header * ) ; }; enum hrtimer_restart; enum bio_rw_flags { BIO_RW = 0, BIO_RW_FAILFAST_DEV = 1, BIO_RW_FAILFAST_TRANSPORT = 2, BIO_RW_FAILFAST_DRIVER = 3, BIO_RW_AHEAD = 4, BIO_RW_BARRIER = 5, BIO_RW_SYNCIO = 6, BIO_RW_UNPLUG = 7, BIO_RW_META = 8, BIO_RW_DISCARD = 9, BIO_RW_NOIDLE = 10 } ; struct bio_pair { struct bio bio1 ; struct bio bio2 ; struct bio_vec bv1 ; struct bio_vec bv2 ; struct bio_integrity_payload bip1 ; struct bio_integrity_payload bip2 ; struct bio_vec iv1 ; struct bio_vec iv2 ; atomic_t cnt ; int error ; }; enum hrtimer_restart; struct __anonstruct_updates_202 { u32 pos ; u32 extent ; }; struct al_transaction { u32 magic ; u32 tr_number ; struct __anonstruct_updates_202 updates[62U] ; u32 xor_sum ; }; struct update_odbm_work { struct drbd_work w ; unsigned int enr ; }; struct update_al_work { struct drbd_work w ; struct lc_element *al_ext ; struct completion event ; unsigned int enr ; unsigned int old_enr ; }; struct drbd_atodb_wait { atomic_t count ; struct completion io_done ; struct drbd_conf *mdev ; int error ; }; struct notifier_block { int (*notifier_call)(struct notifier_block * , unsigned long , void * ) ; struct notifier_block *next ; int priority ; }; enum hrtimer_restart; typedef unsigned int pao_T_____3; typedef unsigned int pao_T_____4; typedef unsigned int pao_T_____5; typedef unsigned int pao_T_____6; enum sock_shutdown_cmd { SHUT_RD = 0, SHUT_WR = 1, SHUT_RDWR = 2 } ; enum drbd_io_error_p { EP_PASS_ON = 0, EP_CALL_HELPER = 1, EP_DETACH = 2 } ; struct after_state_chg_work { struct drbd_work w ; union drbd_state os ; union drbd_state ns ; enum chg_state_flags flags ; struct completion *done ; }; enum ldv_29558 { OK___0 = 0, FAILED___0 = 1, DONE___0 = 2 } ; struct meta_data_on_disk { u64 la_size ; u64 uuid[4U] ; u64 device_uuid ; u64 reserved_u64_1 ; u32 flags ; u32 magic ; u32 md_size_sect ; u32 al_offset ; u32 al_nr_extents ; u32 bm_offset ; u32 bm_bytes_per_bit ; u32 reserved_u32[4U] ; }; struct fault_random_state { unsigned long state ; unsigned long count ; }; typedef __u32 __le32; typedef __u64 __le64; enum hrtimer_restart; struct subprocess_info; enum umh_wait { UMH_NO_WAIT = -1, UMH_WAIT_EXEC = 0, UMH_WAIT_PROC = 1 } ; enum kobject_action { KOBJ_ADD = 0, KOBJ_REMOVE = 1, KOBJ_CHANGE = 2, KOBJ_MOVE = 3, KOBJ_ONLINE = 4, KOBJ_OFFLINE = 5, KOBJ_MAX = 6 } ; struct cb_id { __u32 idx ; __u32 val ; }; struct cn_msg { struct cb_id id ; __u32 seq ; __u32 ack ; __u16 len ; __u16 flags ; __u8 data[0U] ; }; struct netlink_skb_parms { struct ucred creds ; __u32 pid ; __u32 dst_group ; kernel_cap_t eff_cap ; __u32 loginuid ; __u32 sessionid ; __u32 sid ; }; enum drbd_ret_codes { ERR_CODE_BASE = 100, NO_ERROR = 101, ERR_LOCAL_ADDR = 102, ERR_PEER_ADDR = 103, ERR_OPEN_DISK = 104, ERR_OPEN_MD_DISK = 105, ERR_DISK_NOT_BDEV = 107, ERR_MD_NOT_BDEV = 108, ERR_DISK_TO_SMALL = 111, ERR_MD_DISK_TO_SMALL = 112, ERR_BDCLAIM_DISK = 114, ERR_BDCLAIM_MD_DISK = 115, ERR_MD_IDX_INVALID = 116, ERR_IO_MD_DISK = 118, ERR_MD_INVALID = 119, ERR_AUTH_ALG = 120, ERR_AUTH_ALG_ND = 121, ERR_NOMEM = 122, ERR_DISCARD = 123, ERR_DISK_CONFIGURED = 124, ERR_NET_CONFIGURED = 125, ERR_MANDATORY_TAG = 126, ERR_MINOR_INVALID = 127, ERR_INTR = 129, ERR_RESIZE_RESYNC = 130, ERR_NO_PRIMARY = 131, ERR_SYNC_AFTER = 132, ERR_SYNC_AFTER_CYCLE = 133, ERR_PAUSE_IS_SET = 134, ERR_PAUSE_IS_CLEAR = 135, ERR_PACKET_NR = 137, ERR_NO_DISK = 138, ERR_NOT_PROTO_C = 139, ERR_NOMEM_BITMAP = 140, ERR_INTEGRITY_ALG = 141, ERR_INTEGRITY_ALG_ND = 142, ERR_CPU_MASK_PARSE = 143, ERR_CSUMS_ALG = 144, ERR_CSUMS_ALG_ND = 145, ERR_VERIFY_ALG = 146, ERR_VERIFY_ALG_ND = 147, ERR_CSUMS_RESYNC_RUNNING = 148, ERR_VERIFY_RUNNING = 149, ERR_DATA_NOT_CURRENT = 150, ERR_CONNECTED = 151, ERR_PERM = 152, ERR_NEED_APV_93 = 153, AFTER_LAST_ERR_CODE = 154 } ; struct drbd_nl_cfg_req { int packet_type ; unsigned int drbd_minor ; int flags ; unsigned short tag_list[] ; }; struct drbd_nl_cfg_reply { int packet_type ; unsigned int minor ; int ret_code ; unsigned short tag_list[] ; }; struct primary { unsigned char primary_force : 1 ; }; struct resize { __u64 resize_size ; unsigned char resize_force : 1 ; unsigned char no_resync : 1 ; }; struct get_state { int state_i ; }; struct start_ov { __u64 start_sector ; }; struct new_c_uuid { unsigned char clear_bm : 1 ; }; enum drbd_tags { T_primary_force = 32769, T_disk_size = 16386, T_backing_dev = 57347, T_meta_dev = 57348, T_meta_dev_idx = 8197, T_on_io_error = 6, T_fencing = 7, T_use_bmbv = 32805, T_no_disk_flush = 32821, T_no_md_flush = 32822, T_max_bio_bvecs = 56, T_no_disk_barrier = 32825, T_no_disk_drain = 32826, T_my_addr = 57352, T_peer_addr = 57353, T_shared_secret = 49162, T_cram_hmac_alg = 49163, T_integrity_alg = 49196, T_timeout = 14, T_wire_protocol = 8207, T_try_connect_int = 16, T_ping_int = 17, T_max_epoch_size = 18, T_max_buffers = 19, T_unplug_watermark = 20, T_sndbuf_size = 21, T_ko_count = 22, T_after_sb_0p = 24, T_after_sb_1p = 25, T_after_sb_2p = 26, T_rr_conflict = 39, T_ping_timeo = 40, T_rcvbuf_size = 67, T_mind_af = 41020, T_want_lose = 32795, T_two_primaries = 32796, T_always_asbp = 32809, T_no_cork = 32829, T_auto_sndbuf_size = 41022, T_dry_run = 41030, T_resize_size = 16413, T_resize_force = 32836, T_no_resync = 41029, T_rate = 30, T_after = 31, T_al_extents = 32, T_dp_volume = 71, T_dp_interval = 72, T_throttle_th = 73, T_hold_off_th = 74, T_verify_alg = 49204, T_cpu_mask = 49203, T_csums_alg = 49216, T_use_rle = 32833, T_state_i = 33, T_uuids = 49186, T_uuids_flags = 35, T_use_degraded = 32804, T_helper = 49190, T_sync_progress = 43, T_dump_ee_reason = 49197, T_seen_digest = 49198, T_calc_digest = 49199, T_ee_sector = 16432, T_ee_block_id = 16433, T_ee_data = 49202, T_start_sector = 16450, T_clear_bm = 41023 } ; struct tag { char const *name ; int type_n_flags ; int max_len ; }; struct cn_handler_struct { int (*function)(struct drbd_conf * , struct drbd_nl_cfg_req * , struct drbd_nl_cfg_reply * ) ; int reply_body_size ; }; long ldv__builtin_expect(long exp , long c ) ; __inline static void set_bit(unsigned int nr , unsigned long volatile *addr ) { { __asm__ volatile (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; bts %1,%0": "+m" (*((long volatile *)addr)): "Ir" (nr): "memory"); return; } } __inline static void __set_bit(int nr , unsigned long volatile *addr ) { { __asm__ volatile ("bts %1,%0": "+m" (*((long volatile *)addr)): "Ir" (nr): "memory"); return; } } __inline static void clear_bit(int nr , unsigned long volatile *addr ) { { __asm__ volatile (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; btr %1,%0": "+m" (*((long volatile *)addr)): "Ir" (nr)); return; } } __inline static void __clear_bit(int nr , unsigned long volatile *addr ) { { __asm__ volatile ("btr %1,%0": "+m" (*((long volatile *)addr)): "Ir" (nr)); return; } } __inline static int __test_and_set_bit(int nr , unsigned long volatile *addr ) { int oldbit ; { __asm__ ("bts %2,%1\n\tsbb %0,%0": "=r" (oldbit), "+m" (*((long volatile *)addr)): "Ir" (nr)); return (oldbit); } } __inline static int __test_and_clear_bit(int nr , unsigned long volatile *addr ) { int oldbit ; { __asm__ volatile ("btr %2,%1\n\tsbb %0,%0": "=r" (oldbit), "+m" (*((long volatile *)addr)): "Ir" (nr)); return (oldbit); } } __inline static int constant_test_bit(unsigned int nr , unsigned long const volatile *addr ) { { return ((int )(*((unsigned long *)addr + (unsigned long )(nr / 64U)) >> ((int )nr & 63)) & 1); } } __inline static int variable_test_bit(int nr , unsigned long const volatile *addr ) { int oldbit ; { __asm__ volatile ("bt %2,%1\n\tsbb %0,%0": "=r" (oldbit): "m" (*((unsigned long *)addr)), "Ir" (nr)); return (oldbit); } } extern unsigned long hweight64(__u64 ) ; __inline static unsigned long hweight_long(unsigned long w ) { unsigned long tmp ; { tmp = hweight64((__u64 )w); return (tmp); } } extern unsigned long find_next_bit(unsigned long const * , unsigned long , unsigned long ) ; extern unsigned long find_next_zero_bit(unsigned long const * , unsigned long , unsigned long ) ; extern void warn_slowpath_null(char const * , int const ) ; extern void __might_sleep(char const * , int , int ) ; extern int printk(char const * , ...) ; extern int __printk_ratelimit(char const * ) ; extern void __bad_percpu_size(void) ; extern struct task_struct *current_task ; __inline static struct task_struct *get_current(void) { struct task_struct *pfo_ret__ ; { switch (8UL) { case 1UL: __asm__ ("movb %%gs:%P1,%0": "=q" (pfo_ret__): "p" (& current_task)); goto ldv_1905; case 2UL: __asm__ ("movw %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& current_task)); goto ldv_1905; case 4UL: __asm__ ("movl %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& current_task)); goto ldv_1905; case 8UL: __asm__ ("movq %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& current_task)); goto ldv_1905; default: __bad_percpu_size(); } ldv_1905: ; return (pfo_ret__); } } extern void *memset(void * , int , size_t ) ; __inline static int get_order(unsigned long size ) { int order ; { size = (size - 1UL) >> 11; order = -1; ldv_4325: size = size >> 1; order = order + 1; if (size != 0UL) { goto ldv_4325; } else { } return (order); } } __inline static int atomic_read(atomic_t const *v ) { { return ((int )v->counter); } } __inline static void atomic_set(atomic_t *v , int i ) { { v->counter = i; return; } } __inline static void atomic_inc(atomic_t *v ) { { __asm__ volatile (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; incl %0": "+m" (v->counter)); return; } } __inline static int atomic_dec_and_test(atomic_t *v ) { unsigned char c ; { __asm__ volatile (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; decl %0; sete %1": "+m" (v->counter), "=qm" (c): : "memory"); return ((unsigned int )c != 0U); } } extern void lockdep_rcu_dereference(char const * , int const ) ; extern void __mutex_init(struct mutex * , char const * , struct lock_class_key * ) ; extern int mutex_trylock(struct mutex * ) ; int ldv_mutex_trylock_4(struct mutex *ldv_func_arg1 ) ; extern void mutex_unlock(struct mutex * ) ; void ldv_mutex_unlock_2(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_3(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_6(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_8(struct mutex *ldv_func_arg1 ) ; extern void mutex_lock(struct mutex * ) ; void ldv_mutex_lock_1(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_5(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_7(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_bm_change_of_drbd_bitmap(struct mutex *lock ) ; int ldv_mutex_trylock_bm_change_of_drbd_bitmap(struct mutex *lock ) ; void ldv_mutex_unlock_bm_change_of_drbd_bitmap(struct mutex *lock ) ; void ldv_mutex_lock_md_io_mutex_of_drbd_conf(struct mutex *lock ) ; void ldv_mutex_unlock_md_io_mutex_of_drbd_conf(struct mutex *lock ) ; void ldv_mutex_lock_mutex_of_drbd_socket(struct mutex *lock ) ; void ldv_mutex_unlock_mutex_of_drbd_socket(struct mutex *lock ) ; extern unsigned long kernel_stack ; __inline static struct thread_info *current_thread_info(void) { struct thread_info *ti ; unsigned long pfo_ret__ ; { switch (8UL) { case 1UL: __asm__ ("movb %%gs:%P1,%0": "=q" (pfo_ret__): "p" (& kernel_stack)); goto ldv_5787; case 2UL: __asm__ ("movw %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& kernel_stack)); goto ldv_5787; case 4UL: __asm__ ("movl %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& kernel_stack)); goto ldv_5787; case 8UL: __asm__ ("movq %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& kernel_stack)); goto ldv_5787; default: __bad_percpu_size(); } ldv_5787: ti = (struct thread_info *)(pfo_ret__ - 8152UL); return (ti); } } extern void __raw_spin_lock_init(raw_spinlock_t * , char const * , struct lock_class_key * ) ; extern void _raw_spin_lock_irq(raw_spinlock_t * ) ; extern unsigned long _raw_spin_lock_irqsave(raw_spinlock_t * ) ; extern void _raw_spin_unlock_irq(raw_spinlock_t * ) ; extern void _raw_spin_unlock_irqrestore(raw_spinlock_t * , unsigned long ) ; extern void _raw_read_lock(rwlock_t * ) ; extern void _raw_read_unlock(rwlock_t * ) ; __inline static raw_spinlock_t *spinlock_check(spinlock_t *lock ) { { return (& lock->ldv_5575.rlock); } } __inline static void spin_lock_irq(spinlock_t *lock ) { { _raw_spin_lock_irq(& lock->ldv_5575.rlock); return; } } __inline static void spin_unlock_irq(spinlock_t *lock ) { { _raw_spin_unlock_irq(& lock->ldv_5575.rlock); return; } } __inline static void spin_unlock_irqrestore(spinlock_t *lock , unsigned long flags ) { { _raw_spin_unlock_irqrestore(& lock->ldv_5575.rlock, flags); return; } } extern void *vmalloc(unsigned long ) ; extern void vfree(void const * ) ; extern unsigned long volatile jiffies ; extern void __init_waitqueue_head(wait_queue_head_t * , struct lock_class_key * ) ; extern void __wake_up(wait_queue_head_t * , unsigned int , int , void * ) ; extern void prepare_to_wait(wait_queue_head_t * , wait_queue_t * , int ) ; extern void finish_wait(wait_queue_head_t * , wait_queue_t * ) ; extern int autoremove_wake_function(wait_queue_t * , unsigned int , int , void * ) ; extern struct page *alloc_pages_current(gfp_t , unsigned int ) ; __inline static struct page *alloc_pages(gfp_t gfp_mask , unsigned int order ) { struct page *tmp ; { tmp = alloc_pages_current(gfp_mask, order); return (tmp); } } extern unsigned long __get_free_pages(gfp_t , unsigned int ) ; extern void __free_pages(struct page * , unsigned int ) ; __inline static char const *kobject_name(struct kobject const *kobj ) { { return ((char const *)kobj->name); } } extern int debug_lockdep_rcu_enabled(void) ; __inline static int rcu_read_lock_sched_held(void) { { return (1); } } __inline static void rcu_read_lock_sched_notrace(void) { { return; } } extern int ___ratelimit(struct ratelimit_state * , char const * ) ; extern void kfree(void const * ) ; extern struct tracepoint __tracepoint_kmalloc ; __inline static void trace_kmalloc(unsigned long call_site , void const *ptr , size_t bytes_req , size_t bytes_alloc , gfp_t gfp_flags ) { void **it_func ; int tmp ; int tmp___0 ; void **_________p1 ; long tmp___1 ; { tmp___1 = ldv__builtin_expect(__tracepoint_kmalloc.state != 0, 0L); if (tmp___1 != 0L) { rcu_read_lock_sched_notrace(); tmp = debug_lockdep_rcu_enabled(); if (tmp != 0) { tmp___0 = rcu_read_lock_sched_held(); if (tmp___0 == 0) { lockdep_rcu_dereference("include/trace/events/kmem.h", 87); } else { } } else { } _________p1 = *((void ** volatile *)(& __tracepoint_kmalloc.funcs)); it_func = _________p1; if ((unsigned long )it_func != (unsigned long )((void **)0)) { ldv_13476: (*((void (*)(unsigned long , void const * , size_t , size_t , gfp_t ))*it_func))(call_site, ptr, bytes_req, bytes_alloc, gfp_flags); it_func = it_func + 1; if ((unsigned long )*it_func != (unsigned long )((void *)0)) { goto ldv_13476; } else { } } else { } rcu_read_lock_sched_notrace(); } else { } return; } } __inline static void kmemleak_alloc(void const *ptr , size_t size , int min_count , gfp_t gfp ) { { return; } } extern struct kmem_cache kmalloc_caches[22U] ; __inline static int kmalloc_index(size_t size ) { { if (size == 0UL) { return (0); } else { } if (size <= 8UL) { return (3); } else { } if (size > 64UL && size <= 96UL) { return (1); } else { } if (size > 128UL && size <= 192UL) { return (2); } else { } if (size <= 8UL) { return (3); } else { } if (size <= 16UL) { return (4); } else { } if (size <= 32UL) { return (5); } else { } if (size <= 64UL) { return (6); } else { } if (size <= 128UL) { return (7); } else { } if (size <= 256UL) { return (8); } else { } if (size <= 512UL) { return (9); } else { } if (size <= 1024UL) { return (10); } else { } if (size <= 2048UL) { return (11); } else { } if (size <= 4096UL) { return (12); } else { } if (size <= 8192UL) { return (13); } else { } if (size <= 16384UL) { return (14); } else { } if (size <= 32768UL) { return (15); } else { } if (size <= 65536UL) { return (16); } else { } if (size <= 131072UL) { return (17); } else { } if (size <= 262144UL) { return (18); } else { } if (size <= 524288UL) { return (19); } else { } if (size <= 1048576UL) { return (20); } else { } if (size <= 2097152UL) { return (21); } else { } return (-1); } } __inline static struct kmem_cache *kmalloc_slab(size_t size ) { int index ; int tmp ; { tmp = kmalloc_index(size); index = tmp; if (index == 0) { return (0); } else { } return ((struct kmem_cache *)(& kmalloc_caches) + (unsigned long )index); } } extern void *__kmalloc(size_t , gfp_t ) ; extern void *kmem_cache_alloc_notrace(struct kmem_cache * , gfp_t ) ; __inline static void *kmalloc_large(size_t size , gfp_t flags ) { unsigned int order ; int tmp ; void *ret ; unsigned long tmp___0 ; { tmp = get_order(size); order = (unsigned int )tmp; tmp___0 = __get_free_pages(flags | 16384U, order); ret = (void *)tmp___0; kmemleak_alloc((void const *)ret, size, 1, flags); trace_kmalloc((unsigned long )((void *)0), (void const *)ret, size, 4096UL << (int )order, flags); return (ret); } } __inline static void *kmalloc(size_t size , gfp_t flags ) { void *ret ; void *tmp ; struct kmem_cache *s ; struct kmem_cache *tmp___0 ; void *tmp___1 ; { if (0) { if (size > 8192UL) { tmp = kmalloc_large(size, flags); return (tmp); } else { } if ((flags & 1U) == 0U) { tmp___0 = kmalloc_slab(size); s = tmp___0; if ((unsigned long )s == (unsigned long )((struct kmem_cache *)0)) { return (16); } else { } ret = kmem_cache_alloc_notrace(s, flags); trace_kmalloc((unsigned long )((void *)0), (void const *)ret, size, (size_t )s->size, flags); return (ret); } else { } } else { } tmp___1 = __kmalloc(size, flags); return (tmp___1); } } __inline static void *kzalloc(size_t size , gfp_t flags ) { void *tmp ; { tmp = kmalloc(size, flags | 32768U); return (tmp); } } __inline static char const *dev_name(struct device const *dev ) { char const *tmp ; { tmp = kobject_name(& dev->kobj); return (tmp); } } extern char const *dev_driver_string(struct device const * ) ; __inline static void *lowmem_page_address(struct page *page ) { { return ((void *)(((unsigned long )(((long )page + 24189255811072L) / 56L) << 12) + 0xffff880000000000UL)); } } extern void submit_bio(int , struct bio * ) ; extern void schedule(void) ; extern int _cond_resched(void) ; __inline static void pagefault_disable(void) { struct thread_info *tmp ; { tmp = current_thread_info(); tmp->preempt_count = tmp->preempt_count + 1; __asm__ volatile ("": : : "memory"); return; } } __inline static void pagefault_enable(void) { struct thread_info *tmp ; { __asm__ volatile ("": : : "memory"); tmp = current_thread_info(); tmp->preempt_count = tmp->preempt_count + -1; __asm__ volatile ("": : : "memory"); return; } } __inline static void *kmap_atomic(struct page *page , enum km_type idx ) { void *tmp ; { pagefault_disable(); tmp = lowmem_page_address(page); return (tmp); } } extern struct bio *bio_alloc(gfp_t , int ) ; extern void bio_put(struct bio * ) ; extern void bio_endio(struct bio * , int ) ; extern int bio_add_page(struct bio * , struct page * , unsigned int , unsigned int ) ; __inline static struct request_queue *bdev_get_queue(struct block_device *bdev ) { { return ((bdev->bd_disk)->queue); } } extern int blkdev_issue_flush(struct block_device * , gfp_t , sector_t * , unsigned long ) ; int enable_faults ; int fault_rate ; unsigned int _drbd_insert_fault(struct drbd_conf *mdev , unsigned int type ) ; __inline static int drbd_insert_fault(struct drbd_conf *mdev , unsigned int type ) { unsigned int tmp ; int tmp___0 ; { if (fault_rate != 0 && (enable_faults >> (int )type) & 1) { tmp = _drbd_insert_fault(mdev, type); if (tmp != 0U) { tmp___0 = 1; } else { tmp___0 = 0; } } else { tmp___0 = 0; } return (tmp___0); } } struct ratelimit_state drbd_ratelimit_state ; int __drbd_set_state(struct drbd_conf *mdev , union drbd_state ns , enum chg_state_flags flags , struct completion *done ) ; int drbd_bm_init(struct drbd_conf *mdev ) ; int drbd_bm_resize(struct drbd_conf *mdev , sector_t capacity , int set_new_bits ) ; void drbd_bm_cleanup(struct drbd_conf *mdev ) ; void drbd_bm_set_all(struct drbd_conf *mdev ) ; void drbd_bm_clear_all(struct drbd_conf *mdev ) ; int drbd_bm_set_bits(struct drbd_conf *mdev , unsigned long const s , unsigned long const e ) ; int drbd_bm_clear_bits(struct drbd_conf *mdev , unsigned long const s , unsigned long const e ) ; void _drbd_bm_set_bits(struct drbd_conf *mdev , unsigned long const s , unsigned long const e ) ; int drbd_bm_test_bit(struct drbd_conf *mdev , unsigned long const bitnr ) ; int drbd_bm_e_weight(struct drbd_conf *mdev , unsigned long enr ) ; int drbd_bm_write_sect(struct drbd_conf *mdev , unsigned long enr ) ; int drbd_bm_read(struct drbd_conf *mdev ) ; int drbd_bm_write(struct drbd_conf *mdev ) ; unsigned long drbd_bm_ALe_set_all(struct drbd_conf *mdev , unsigned long al_enr ) ; size_t drbd_bm_words(struct drbd_conf *mdev ) ; unsigned long drbd_bm_bits(struct drbd_conf *mdev ) ; sector_t drbd_bm_capacity(struct drbd_conf *mdev ) ; unsigned long drbd_bm_find_next(struct drbd_conf *mdev , unsigned long bm_fo ) ; unsigned long _drbd_bm_find_next(struct drbd_conf *mdev , unsigned long bm_fo ) ; unsigned long _drbd_bm_find_next_zero(struct drbd_conf *mdev , unsigned long bm_fo ) ; unsigned long drbd_bm_total_weight(struct drbd_conf *mdev ) ; void drbd_bm_merge_lel(struct drbd_conf *mdev , size_t offset , size_t number , unsigned long *buffer ) ; void drbd_bm_get_lel(struct drbd_conf *mdev , size_t offset , size_t number , unsigned long *buffer ) ; void drbd_bm_lock(struct drbd_conf *mdev , char *why ) ; void drbd_bm_unlock(struct drbd_conf *mdev ) ; int drbd_bm_count_bits(struct drbd_conf *mdev , unsigned long const s , unsigned long const e ) ; rwlock_t global_state_lock ; char *ppsize(char *buf , unsigned long long size ) ; int drbd_md_sync_page_io(struct drbd_conf *mdev , struct drbd_backing_dev *bdev , sector_t sector , int rw ) ; __inline static int _drbd_set_state(struct drbd_conf *mdev , union drbd_state ns , enum chg_state_flags flags , struct completion *done ) { int rv ; { _raw_read_lock(& global_state_lock); rv = __drbd_set_state(mdev, ns, flags, done); _raw_read_unlock(& global_state_lock); return (rv); } } __inline static void __drbd_chk_io_error_(struct drbd_conf *mdev , int forcedetach , char const *where ) { char const *tmp ; char const *tmp___0 ; int tmp___1 ; union drbd_state __ns ; char const *tmp___2 ; char const *tmp___3 ; { switch ((mdev->ldev)->dc.on_io_error) { case 0: ; if (forcedetach == 0) { tmp___1 = __printk_ratelimit("__drbd_chk_io_error_"); if (tmp___1 != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Local IO failed in %s.Passing error on...\n", tmp___0, tmp, where); } else { } goto ldv_41680; } else { } case 2: ; case 1: ; if ((int )mdev->state.ldv_33381.disk > 2) { __ns.i = mdev->state.i; __ns.ldv_33381.disk = 2U; _drbd_set_state(mdev, __ns, CS_HARD, 0); tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Local IO failed in %s.Detaching...\n", tmp___3, tmp___2, where); } else { } goto ldv_41680; } ldv_41680: ; return; } } __inline static void drbd_chk_io_error_(struct drbd_conf *mdev , int error , int forcedetach , char const *where ) { unsigned long flags ; raw_spinlock_t *tmp ; { if (error != 0) { tmp = spinlock_check(& mdev->req_lock); flags = _raw_spin_lock_irqsave(tmp); __drbd_chk_io_error_(mdev, forcedetach, where); spin_unlock_irqrestore(& mdev->req_lock, flags); } else { } return; } } __inline static sector_t drbd_md_last_sector(struct drbd_backing_dev *bdev ) { { switch (bdev->dc.meta_dev_idx) { case -1: ; case -3: ; return ((sector_t )(bdev->md.md_offset + 7ULL)); case -2: ; default: ; return ((sector_t )(bdev->md.md_offset + (u64 )bdev->md.md_size_sect)); } } } __inline static void put_ldev(struct drbd_conf *mdev ) { int tmp ; char const *tmp___0 ; char const *tmp___1 ; int tmp___2 ; { tmp = atomic_dec_and_test(& mdev->local_cnt); if (tmp != 0) { __wake_up(& mdev->misc_wait, 3U, 1, 0); } else { } tmp___2 = atomic_read((atomic_t const *)(& mdev->local_cnt)); if (tmp___2 < 0) { tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( atomic_read(&mdev->local_cnt) >= 0 ) in %s:%d\n", tmp___1, tmp___0, (char *)"/work/ldvuser/novikov/inst/current/envs/linux/linux/drivers/block/drbd/drbd_int.h", 2067); } else { } return; } } __inline static int _get_ldev_if_state(struct drbd_conf *mdev , enum drbd_disk_state mins ) { int io_allowed ; { atomic_inc(& mdev->local_cnt); io_allowed = (unsigned int )mdev->state.ldv_33381.disk >= (unsigned int )mins; if (io_allowed == 0) { put_ldev(mdev); } else { } return (io_allowed); } } __inline static void drbd_blk_run_queue(struct request_queue *q ) { { if ((unsigned long )q != (unsigned long )((struct request_queue *)0) && (unsigned long )q->unplug_fn != (unsigned long )((unplug_fn *)0)) { (*(q->unplug_fn))(q); } else { } return; } } __inline static void drbd_md_flush(struct drbd_conf *mdev ) { int r ; int tmp ; char const *tmp___0 ; char const *tmp___1 ; { tmp = constant_test_bit(16U, (unsigned long const volatile *)(& mdev->flags)); if (tmp != 0) { return; } else { } r = blkdev_issue_flush((mdev->ldev)->md_bdev, 208U, 0, 1UL); if (r != 0) { set_bit(16U, (unsigned long volatile *)(& mdev->flags)); tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: meta data flush failed with status %d, disabling md-flushes\n", tmp___1, tmp___0, r); } else { } return; } } static int __bm_change_bits_to(struct drbd_conf *mdev , unsigned long const s , unsigned long e , int val , enum km_type const km ) ; static int bm_is_locked(struct drbd_bitmap *b ) { int tmp ; { tmp = constant_test_bit(0U, (unsigned long const volatile *)(& b->bm_flags)); return (tmp); } } static void __bm_print_lock_info(struct drbd_conf *mdev , char const *func ) { struct drbd_bitmap *b ; int tmp ; struct task_struct *tmp___3 ; char *tmp___4 ; struct task_struct *tmp___5 ; char *tmp___6 ; struct task_struct *tmp___7 ; char *tmp___8 ; struct task_struct *tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; { b = mdev->bitmap; tmp = ___ratelimit(& drbd_ratelimit_state, "__bm_print_lock_info"); if (tmp == 0) { return; } else { } tmp___9 = get_current(); if ((unsigned long )tmp___9 != (unsigned long )mdev->receiver.task) { tmp___7 = get_current(); if ((unsigned long )tmp___7 != (unsigned long )mdev->asender.task) { tmp___5 = get_current(); if ((unsigned long )tmp___5 != (unsigned long )mdev->worker.task) { tmp___3 = get_current(); tmp___4 = (char *)(& tmp___3->comm); } else { tmp___4 = (char *)"worker"; } tmp___6 = tmp___4; } else { tmp___6 = (char *)"asender"; } tmp___8 = tmp___6; } else { tmp___8 = (char *)"receiver"; } tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: FIXME %s in %s, bitmap locked for \'%s\' by %s\n", tmp___11, tmp___10, tmp___8, func, (unsigned long )b->bm_why != (unsigned long )((char *)0) ? b->bm_why : (char *)"?", (unsigned long )b->bm_task != (unsigned long )mdev->receiver.task ? ((unsigned long )b->bm_task != (unsigned long )mdev->asender.task ? ((unsigned long )b->bm_task == (unsigned long )mdev->worker.task ? (char *)"worker" : (char *)"?") : (char *)"asender") : (char *)"receiver"); return; } } void drbd_bm_lock(struct drbd_conf *mdev , char *why ) { struct drbd_bitmap *b ; int trylock_failed ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; struct task_struct *tmp___5 ; char *tmp___6 ; struct task_struct *tmp___7 ; char *tmp___8 ; struct task_struct *tmp___9 ; char *tmp___10 ; struct task_struct *tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; char const *tmp___14 ; char const *tmp___15 ; int tmp___16 ; { b = mdev->bitmap; if ((unsigned long )b == (unsigned long )((struct drbd_bitmap *)0)) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: FIXME no bitmap in drbd_bm_lock!?\n", tmp___0, tmp); return; } else { } tmp___1 = ldv_mutex_trylock_4(& b->bm_change); trylock_failed = tmp___1 == 0; if (trylock_failed != 0) { tmp___11 = get_current(); if ((unsigned long )tmp___11 != (unsigned long )mdev->receiver.task) { tmp___9 = get_current(); if ((unsigned long )tmp___9 != (unsigned long )mdev->asender.task) { tmp___7 = get_current(); if ((unsigned long )tmp___7 != (unsigned long )mdev->worker.task) { tmp___5 = get_current(); tmp___6 = (char *)(& tmp___5->comm); } else { tmp___6 = (char *)"worker"; } tmp___8 = tmp___6; } else { tmp___8 = (char *)"asender"; } tmp___10 = tmp___8; } else { tmp___10 = (char *)"receiver"; } tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: %s going to \'%s\' but bitmap already locked for \'%s\' by %s\n", tmp___13, tmp___12, tmp___10, why, (unsigned long )b->bm_why != (unsigned long )((char *)0) ? b->bm_why : (char *)"?", (unsigned long )b->bm_task != (unsigned long )mdev->receiver.task ? ((unsigned long )b->bm_task != (unsigned long )mdev->asender.task ? ((unsigned long )b->bm_task == (unsigned long )mdev->worker.task ? (char *)"worker" : (char *)"?") : (char *)"asender") : (char *)"receiver"); ldv_mutex_lock_5(& b->bm_change); } else { } tmp___16 = __test_and_set_bit(0, (unsigned long volatile *)(& b->bm_flags)); if (tmp___16 != 0) { tmp___14 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___15 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: FIXME bitmap already locked in bm_lock\n", tmp___15, tmp___14); } else { } b->bm_why = why; b->bm_task = get_current(); return; } } void drbd_bm_unlock(struct drbd_conf *mdev ) { struct drbd_bitmap *b ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; int tmp___3 ; { b = mdev->bitmap; if ((unsigned long )b == (unsigned long )((struct drbd_bitmap *)0)) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: FIXME no bitmap in drbd_bm_unlock!?\n", tmp___0, tmp); return; } else { } tmp___3 = __test_and_clear_bit(0, (unsigned long volatile *)(& (mdev->bitmap)->bm_flags)); if (tmp___3 == 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: FIXME bitmap not locked in bm_unlock\n", tmp___2, tmp___1); } else { } b->bm_why = 0; b->bm_task = 0; ldv_mutex_unlock_6(& b->bm_change); return; } } static unsigned long *__bm_map_paddr(struct drbd_bitmap *b , unsigned long offset , enum km_type const km ) { struct page *page ; unsigned long page_nr ; long tmp ; void *tmp___0 ; { page_nr = offset >> 9; tmp = ldv__builtin_expect(b->bm_number_of_pages <= page_nr, 0L); if (tmp != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared"), "i" (204), "i" (12UL)); ldv_41957: ; goto ldv_41957; } else { } page = *(b->bm_pages + page_nr); tmp___0 = kmap_atomic(page, km); return ((unsigned long *)tmp___0); } } static unsigned long *bm_map_paddr(struct drbd_bitmap *b , unsigned long offset ) { unsigned long *tmp ; { tmp = __bm_map_paddr(b, offset, KM_IRQ1); return (tmp); } } static void __bm_unmap(unsigned long *p_addr , enum km_type const km ) { { pagefault_enable(); return; } } static void bm_unmap(unsigned long *p_addr ) { { return; } } static void bm_free_pages(struct page **pages , unsigned long number ) { unsigned long i ; { if ((unsigned long )pages == (unsigned long )((struct page **)0)) { return; } else { } i = 0UL; goto ldv_41976; ldv_41975: ; if ((unsigned long )*(pages + i) == (unsigned long )((struct page *)0)) { printk("<1>drbd: bm_free_pages tried to free a NULL pointer; i=%lu n=%lu\n", i, number); goto ldv_41974; } else { } __free_pages(*(pages + i), 0U); *(pages + i) = 0; ldv_41974: i = i + 1UL; ldv_41976: ; if (i < number) { goto ldv_41975; } else { } return; } } static void bm_vk_free(void *ptr , int v ) { { if (v != 0) { vfree((void const *)ptr); } else { kfree((void const *)ptr); } return; } } static struct page **bm_realloc_pages(struct drbd_bitmap *b , unsigned long want ) { struct page **old_pages ; struct page **new_pages ; struct page *page ; unsigned int i ; unsigned int bytes ; unsigned int vmalloced ; unsigned long have ; long tmp ; long tmp___0 ; long tmp___1 ; long tmp___2 ; void *tmp___3 ; void *tmp___4 ; { old_pages = b->bm_pages; vmalloced = 0U; have = b->bm_number_of_pages; tmp = ldv__builtin_expect(have == 0UL, 0L); if (tmp != 0L) { tmp___0 = ldv__builtin_expect((unsigned long )old_pages != (unsigned long )((struct page **)0), 0L); if (tmp___0 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared"), "i" (280), "i" (12UL)); ldv_41993: ; goto ldv_41993; } else { } } else { } tmp___1 = ldv__builtin_expect(have != 0UL, 0L); if (tmp___1 != 0L) { tmp___2 = ldv__builtin_expect((unsigned long )old_pages == (unsigned long )((struct page **)0), 0L); if (tmp___2 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared"), "i" (281), "i" (12UL)); ldv_41994: ; goto ldv_41994; } else { } } else { } if (have == want) { return (old_pages); } else { } bytes = (unsigned int )want * 8U; tmp___3 = kmalloc((size_t )bytes, 208U); new_pages = (struct page **)tmp___3; if ((unsigned long )new_pages == (unsigned long )((struct page **)0)) { tmp___4 = vmalloc((unsigned long )bytes); new_pages = (struct page **)tmp___4; if ((unsigned long )new_pages == (unsigned long )((struct page **)0)) { return (0); } else { } vmalloced = 1U; } else { } memset((void *)new_pages, 0, (size_t )bytes); if (want >= have) { i = 0U; goto ldv_41996; ldv_41995: *(new_pages + (unsigned long )i) = *(old_pages + (unsigned long )i); i = i + 1U; ldv_41996: ; if ((unsigned long )i < have) { goto ldv_41995; } else { } goto ldv_41999; ldv_41998: page = alloc_pages(131282U, 0U); if ((unsigned long )page == (unsigned long )((struct page *)0)) { bm_free_pages(new_pages + have, (unsigned long )i - have); bm_vk_free((void *)new_pages, (int )vmalloced); return (0); } else { } *(new_pages + (unsigned long )i) = page; i = i + 1U; ldv_41999: ; if ((unsigned long )i < want) { goto ldv_41998; } else { } } else { i = 0U; goto ldv_42002; ldv_42001: *(new_pages + (unsigned long )i) = *(old_pages + (unsigned long )i); i = i + 1U; ldv_42002: ; if ((unsigned long )i < want) { goto ldv_42001; } else { } } if (vmalloced != 0U) { set_bit(2U, (unsigned long volatile *)(& b->bm_flags)); } else { clear_bit(2, (unsigned long volatile *)(& b->bm_flags)); } return (new_pages); } } int drbd_bm_init(struct drbd_conf *mdev ) { struct drbd_bitmap *b ; int __ret_warn_on ; long tmp ; void *tmp___0 ; struct lock_class_key __key ; struct lock_class_key __key___0 ; struct lock_class_key __key___1 ; { b = mdev->bitmap; __ret_warn_on = (unsigned long )b != (unsigned long )((struct drbd_bitmap *)0); tmp = ldv__builtin_expect(__ret_warn_on != 0, 0L); if (tmp != 0L) { warn_slowpath_null("/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 336); } else { } ldv__builtin_expect(__ret_warn_on != 0, 0L); tmp___0 = kzalloc(376UL, 208U); b = (struct drbd_bitmap *)tmp___0; if ((unsigned long )b == (unsigned long )((struct drbd_bitmap *)0)) { return (-12); } else { } spinlock_check(& b->bm_lock); __raw_spin_lock_init(& b->bm_lock.ldv_5575.rlock, "&(&b->bm_lock)->rlock", & __key); __mutex_init(& b->bm_change, "&b->bm_change", & __key___0); __init_waitqueue_head(& b->bm_io_wait, & __key___1); mdev->bitmap = b; return (0); } } sector_t drbd_bm_capacity(struct drbd_conf *mdev ) { int _b ; char const *tmp ; char const *tmp___0 ; { _b = (unsigned long )mdev->bitmap == (unsigned long )((struct drbd_bitmap *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "drbd_bm_capacity", (char *)"!mdev->bitmap", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 351); } else { } if (_b != 0) { return (0UL); } else { } return ((mdev->bitmap)->bm_dev_capacity); } } void drbd_bm_cleanup(struct drbd_conf *mdev ) { int _b ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; { _b = (unsigned long )mdev->bitmap == (unsigned long )((struct drbd_bitmap *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "drbd_bm_cleanup", (char *)"!mdev->bitmap", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 359); } else { } if (_b != 0) { return; } else { } bm_free_pages((mdev->bitmap)->bm_pages, (mdev->bitmap)->bm_number_of_pages); tmp___1 = constant_test_bit(2U, (unsigned long const volatile *)(& (mdev->bitmap)->bm_flags)); bm_vk_free((void *)(mdev->bitmap)->bm_pages, tmp___1); kfree((void const *)mdev->bitmap); mdev->bitmap = 0; return; } } static int bm_clear_surplus(struct drbd_bitmap *b ) { unsigned long mask ; size_t w ; int cleared ; unsigned long *p_addr ; unsigned long *bm ; unsigned long tmp ; unsigned long tmp___0 ; { mask = (1UL << ((int )b->bm_bits & 63)) - 1UL; w = b->bm_bits >> 6; cleared = 0; p_addr = bm_map_paddr(b, w); bm = p_addr + (w & 511UL); if (b->bm_words > w) { tmp = hweight_long(*bm & ~ mask); cleared = (int )tmp; *bm = *bm & mask; w = w + (size_t )1; bm = bm + 1; } else { } if (b->bm_words > w) { tmp___0 = hweight_long(*bm); cleared = (int )((unsigned int )tmp___0 + (unsigned int )cleared); *bm = 0UL; } else { } bm_unmap(p_addr); return (cleared); } } static void bm_set_surplus(struct drbd_bitmap *b ) { unsigned long mask ; size_t w ; unsigned long *p_addr ; unsigned long *bm ; { mask = (1UL << ((int )b->bm_bits & 63)) - 1UL; w = b->bm_bits >> 6; p_addr = bm_map_paddr(b, w); bm = p_addr + (w & 511UL); if (b->bm_words > w) { *bm = *bm | ~ mask; bm = bm + 1; w = w + (size_t )1; } else { } if (b->bm_words > w) { *bm = 0xffffffffffffffffUL; } else { } bm_unmap(p_addr); return; } } static unsigned long __bm_count_bits(struct drbd_bitmap *b , int const swap_endian ) { unsigned long *p_addr ; unsigned long *bm ; unsigned long offset ; unsigned long bits ; unsigned long i ; unsigned long do_now ; size_t __min1 ; size_t __min2 ; unsigned long *tmp ; unsigned long tmp___0 ; unsigned long tmp___1 ; { offset = 0UL; bits = 0UL; goto ldv_42058; ldv_42057: __min1 = b->bm_words - offset; __min2 = 512UL; do_now = __min1 < __min2 ? __min1 : __min2; i = do_now; p_addr = __bm_map_paddr(b, offset, KM_USER0); bm = p_addr + (offset & 511UL); goto ldv_42054; ldv_42053: tmp = bm; bm = bm + 1; tmp___0 = hweight_long(*tmp); bits = tmp___0 + bits; ldv_42054: tmp___1 = i; i = i - 1UL; if (tmp___1 != 0UL) { goto ldv_42053; } else { } __bm_unmap(p_addr, KM_USER0); offset = offset + do_now; __might_sleep("/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 432, 0); _cond_resched(); ldv_42058: ; if (b->bm_words > offset) { goto ldv_42057; } else { } return (bits); } } static unsigned long bm_count_bits(struct drbd_bitmap *b ) { unsigned long tmp ; { tmp = __bm_count_bits(b, 0); return (tmp); } } static unsigned long bm_count_bits_swap_endian(struct drbd_bitmap *b ) { unsigned long tmp ; { tmp = __bm_count_bits(b, 1); return (tmp); } } static void bm_memset(struct drbd_bitmap *b , size_t offset , int c , size_t len ) { unsigned long *p_addr ; unsigned long *bm ; size_t do_now ; size_t end ; size_t __min1 ; size_t __min2 ; { end = offset + len; if (b->bm_words < end) { printk("<1>drbd: bm_memset end > bm_words\n"); return; } else { } goto ldv_42081; ldv_42080: __min1 = (offset + 512UL) & 0xfffffffffffffe00UL; __min2 = end; do_now = (__min1 < __min2 ? __min1 : __min2) - offset; p_addr = bm_map_paddr(b, offset); bm = p_addr + (offset & 511UL); if ((unsigned long )(bm + do_now) > (unsigned long )(p_addr + 512UL)) { printk("<1>drbd: BUG BUG BUG! p_addr:%p bm:%p do_now:%d\n", p_addr, bm, (int )do_now); goto ldv_42079; } else { } memset((void *)bm, c, do_now * 8UL); bm_unmap(p_addr); offset = offset + do_now; ldv_42081: ; if (offset < end) { goto ldv_42080; } else { } ldv_42079: ; return; } } int drbd_bm_resize(struct drbd_conf *mdev , sector_t capacity , int set_new_bits ) { struct drbd_bitmap *b ; unsigned long bits ; unsigned long words ; unsigned long owords ; unsigned long obits ; unsigned long *p_addr ; unsigned long *bm ; unsigned long want ; unsigned long have ; unsigned long onpages ; struct page **npages ; struct page **opages ; int err ; int growing ; int opages_vmalloced ; int _b ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; unsigned long tmp___3 ; unsigned long tmp___4 ; size_t tmp___5 ; sector_t tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; int tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; int tmp___12 ; char const *tmp___13 ; char const *tmp___14 ; { b = mdev->bitmap; opages = 0; err = 0; _b = (unsigned long )b == (unsigned long )((struct drbd_bitmap *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "drbd_bm_resize", (char *)"!b", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 495); } else { } if (_b != 0) { return (-12); } else { } drbd_bm_lock(mdev, (char *)"resize"); tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: drbd_bm_resize called with capacity == %llu\n", tmp___2, tmp___1, (unsigned long long )capacity); if (b->bm_dev_capacity == capacity) { goto out; } else { } opages_vmalloced = constant_test_bit(2U, (unsigned long const volatile *)(& b->bm_flags)); if (capacity == 0UL) { spin_lock_irq(& b->bm_lock); opages = b->bm_pages; onpages = b->bm_number_of_pages; owords = b->bm_words; b->bm_pages = 0; tmp___6 = 0UL; b->bm_dev_capacity = tmp___6; tmp___5 = tmp___6; b->bm_words = tmp___5; tmp___4 = tmp___5; b->bm_bits = tmp___4; tmp___3 = tmp___4; b->bm_set = tmp___3; b->bm_number_of_pages = tmp___3; spin_unlock_irq(& b->bm_lock); bm_free_pages(opages, onpages); bm_vk_free((void *)opages, opages_vmalloced); goto out; } else { } bits = (capacity + 7UL) >> 3; words = (bits + 63UL) >> 6; tmp___9 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___9 != 0) { if (((unsigned long long )(mdev->ldev)->md.md_size_sect - 72ULL) << 12 < (unsigned long long )bits) { tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( (u64)bits <= (((u64)mdev->ldev->md.md_size_sect-MD_BM_OFFSET) << 12) ) in %s:%d\n", tmp___8, tmp___7, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 533); } else { } put_ldev(mdev); } else { } want = ((words + 1UL) * 8UL + 4095UL) >> 12; have = b->bm_number_of_pages; if (want == have) { if ((unsigned long )b->bm_pages == (unsigned long )((struct page **)0)) { tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( b->bm_pages != NULL ) in %s:%d\n", tmp___11, tmp___10, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 541); } else { } npages = b->bm_pages; } else { tmp___12 = drbd_insert_fault(mdev, 7U); if (tmp___12 != 0) { npages = 0; } else { npages = bm_realloc_pages(b, want); } } if ((unsigned long )npages == (unsigned long )((struct page **)0)) { err = -12; goto out; } else { } spin_lock_irq(& b->bm_lock); opages = b->bm_pages; owords = b->bm_words; obits = b->bm_bits; growing = bits > obits; if (((unsigned long )opages != (unsigned long )((struct page **)0) && growing != 0) && set_new_bits != 0) { bm_set_surplus(b); } else { } b->bm_pages = npages; b->bm_number_of_pages = want; b->bm_bits = bits; b->bm_words = words; b->bm_dev_capacity = capacity; if (growing != 0) { if (set_new_bits != 0) { bm_memset(b, owords, 255, words - owords); b->bm_set = b->bm_set + (bits - obits); } else { bm_memset(b, owords, 0, words - owords); } } else { } if (want < have) { bm_free_pages(opages + want, have - want); } else { } p_addr = bm_map_paddr(b, words); bm = p_addr + (words & 511UL); *bm = 2205418087UL; bm_unmap(p_addr); bm_clear_surplus(b); spin_unlock_irq(& b->bm_lock); if ((unsigned long )opages != (unsigned long )npages) { bm_vk_free((void *)opages, opages_vmalloced); } else { } if (growing == 0) { b->bm_set = bm_count_bits(b); } else { } tmp___13 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___14 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: resync bitmap: bits=%lu words=%lu\n", tmp___14, tmp___13, bits, words); out: drbd_bm_unlock(mdev); return (err); } } static unsigned long _drbd_bm_total_weight(struct drbd_conf *mdev ) { struct drbd_bitmap *b ; unsigned long s ; unsigned long flags ; int _b ; char const *tmp ; char const *tmp___0 ; int _b___0 ; char const *tmp___1 ; char const *tmp___2 ; raw_spinlock_t *tmp___3 ; { b = mdev->bitmap; _b = (unsigned long )b == (unsigned long )((struct drbd_bitmap *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "_drbd_bm_total_weight", (char *)"!b", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 617); } else { } if (_b != 0) { return (0UL); } else { } _b___0 = (unsigned long )b->bm_pages == (unsigned long )((struct page **)0); if (_b___0 != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___2, tmp___1, "_drbd_bm_total_weight", (char *)"!b->bm_pages", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 618); } else { } if (_b___0 != 0) { return (0UL); } else { } tmp___3 = spinlock_check(& b->bm_lock); flags = _raw_spin_lock_irqsave(tmp___3); s = b->bm_set; spin_unlock_irqrestore(& b->bm_lock, flags); return (s); } } unsigned long drbd_bm_total_weight(struct drbd_conf *mdev ) { unsigned long s ; int tmp ; { tmp = _get_ldev_if_state(mdev, D_NEGOTIATING); if (tmp == 0) { return (0UL); } else { } s = _drbd_bm_total_weight(mdev); put_ldev(mdev); return (s); } } size_t drbd_bm_words(struct drbd_conf *mdev ) { struct drbd_bitmap *b ; int _b ; char const *tmp ; char const *tmp___0 ; int _b___0 ; char const *tmp___1 ; char const *tmp___2 ; { b = mdev->bitmap; _b = (unsigned long )b == (unsigned long )((struct drbd_bitmap *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "drbd_bm_words", (char *)"!b", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 641); } else { } if (_b != 0) { return (0UL); } else { } _b___0 = (unsigned long )b->bm_pages == (unsigned long )((struct page **)0); if (_b___0 != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___2, tmp___1, "drbd_bm_words", (char *)"!b->bm_pages", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 642); } else { } if (_b___0 != 0) { return (0UL); } else { } return (b->bm_words); } } unsigned long drbd_bm_bits(struct drbd_conf *mdev ) { struct drbd_bitmap *b ; int _b ; char const *tmp ; char const *tmp___0 ; { b = mdev->bitmap; _b = (unsigned long )b == (unsigned long )((struct drbd_bitmap *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "drbd_bm_bits", (char *)"!b", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 650); } else { } if (_b != 0) { return (0UL); } else { } return (b->bm_bits); } } void drbd_bm_merge_lel(struct drbd_conf *mdev , size_t offset , size_t number , unsigned long *buffer ) { struct drbd_bitmap *b ; unsigned long *p_addr ; unsigned long *bm ; unsigned long word ; unsigned long bits ; size_t end ; size_t do_now ; int _b ; char const *tmp ; char const *tmp___0 ; int _b___0 ; char const *tmp___1 ; char const *tmp___2 ; int __ret_warn_on ; long tmp___3 ; int __ret_warn_on___0 ; long tmp___4 ; size_t __min1 ; size_t __min2 ; unsigned long *tmp___5 ; unsigned long *tmp___6 ; unsigned long tmp___7 ; size_t tmp___8 ; int tmp___9 ; { b = mdev->bitmap; end = offset + number; _b = (unsigned long )b == (unsigned long )((struct drbd_bitmap *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "drbd_bm_merge_lel", (char *)"!b", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 670); } else { } if (_b != 0) { return; } else { } _b___0 = (unsigned long )b->bm_pages == (unsigned long )((struct page **)0); if (_b___0 != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___2, tmp___1, "drbd_bm_merge_lel", (char *)"!b->bm_pages", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 671); } else { } if (_b___0 != 0) { return; } else { } if (number == 0UL) { return; } else { } __ret_warn_on = b->bm_words <= offset; tmp___3 = ldv__builtin_expect(__ret_warn_on != 0, 0L); if (tmp___3 != 0L) { warn_slowpath_null("/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 674); } else { } ldv__builtin_expect(__ret_warn_on != 0, 0L); __ret_warn_on___0 = b->bm_words < end; tmp___4 = ldv__builtin_expect(__ret_warn_on___0 != 0, 0L); if (tmp___4 != 0L) { warn_slowpath_null("/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 675); } else { } ldv__builtin_expect(__ret_warn_on___0 != 0, 0L); spin_lock_irq(& b->bm_lock); goto ldv_42169; ldv_42168: __min1 = (offset + 512UL) & 0xfffffffffffffe00UL; __min2 = end; do_now = (__min1 < __min2 ? __min1 : __min2) - offset; p_addr = bm_map_paddr(b, offset); bm = p_addr + (offset & 511UL); offset = offset + do_now; goto ldv_42166; ldv_42165: bits = hweight_long(*bm); tmp___5 = buffer; buffer = buffer + 1; word = (unsigned long )((unsigned long long )*bm | (unsigned long long )*tmp___5); tmp___6 = bm; bm = bm + 1; *tmp___6 = word; tmp___7 = hweight_long(word); b->bm_set = b->bm_set + (tmp___7 - bits); ldv_42166: tmp___8 = do_now; do_now = do_now - (size_t )1; if (tmp___8 != 0UL) { goto ldv_42165; } else { } bm_unmap(p_addr); ldv_42169: ; if (offset < end) { goto ldv_42168; } else { } if (b->bm_words == end) { tmp___9 = bm_clear_surplus(b); b->bm_set = b->bm_set - (unsigned long )tmp___9; } else { } spin_unlock_irq(& b->bm_lock); return; } } void drbd_bm_get_lel(struct drbd_conf *mdev , size_t offset , size_t number , unsigned long *buffer ) { struct drbd_bitmap *b ; unsigned long *p_addr ; unsigned long *bm ; size_t end ; size_t do_now ; int _b ; char const *tmp ; char const *tmp___0 ; int _b___0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; size_t __min1 ; size_t __min2 ; unsigned long *tmp___5 ; unsigned long *tmp___6 ; size_t tmp___7 ; { b = mdev->bitmap; end = offset + number; _b = (unsigned long )b == (unsigned long )((struct drbd_bitmap *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "drbd_bm_get_lel", (char *)"!b", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 714); } else { } if (_b != 0) { return; } else { } _b___0 = (unsigned long )b->bm_pages == (unsigned long )((struct page **)0); if (_b___0 != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___2, tmp___1, "drbd_bm_get_lel", (char *)"!b->bm_pages", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 715); } else { } if (_b___0 != 0) { return; } else { } spin_lock_irq(& b->bm_lock); if ((b->bm_words <= offset || b->bm_words < end) || number == 0UL) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: offset=%lu number=%lu bm_words=%lu\n", tmp___4, tmp___3, offset, number, b->bm_words); } else { goto ldv_42194; ldv_42193: __min1 = (offset + 512UL) & 0xfffffffffffffe00UL; __min2 = end; do_now = (__min1 < __min2 ? __min1 : __min2) - offset; p_addr = bm_map_paddr(b, offset); bm = p_addr + (offset & 511UL); offset = offset + do_now; goto ldv_42191; ldv_42190: tmp___5 = buffer; buffer = buffer + 1; tmp___6 = bm; bm = bm + 1; *tmp___5 = *tmp___6; ldv_42191: tmp___7 = do_now; do_now = do_now - (size_t )1; if (tmp___7 != 0UL) { goto ldv_42190; } else { } bm_unmap(p_addr); ldv_42194: ; if (offset < end) { goto ldv_42193; } else { } } spin_unlock_irq(& b->bm_lock); return; } } void drbd_bm_set_all(struct drbd_conf *mdev ) { struct drbd_bitmap *b ; int _b ; char const *tmp ; char const *tmp___0 ; int _b___0 ; char const *tmp___1 ; char const *tmp___2 ; { b = mdev->bitmap; _b = (unsigned long )b == (unsigned long )((struct drbd_bitmap *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "drbd_bm_set_all", (char *)"!b", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 743); } else { } if (_b != 0) { return; } else { } _b___0 = (unsigned long )b->bm_pages == (unsigned long )((struct page **)0); if (_b___0 != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___2, tmp___1, "drbd_bm_set_all", (char *)"!b->bm_pages", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 744); } else { } if (_b___0 != 0) { return; } else { } spin_lock_irq(& b->bm_lock); bm_memset(b, 0UL, 255, b->bm_words); bm_clear_surplus(b); b->bm_set = b->bm_bits; spin_unlock_irq(& b->bm_lock); return; } } void drbd_bm_clear_all(struct drbd_conf *mdev ) { struct drbd_bitmap *b ; int _b ; char const *tmp ; char const *tmp___0 ; int _b___0 ; char const *tmp___1 ; char const *tmp___2 ; { b = mdev->bitmap; _b = (unsigned long )b == (unsigned long )((struct drbd_bitmap *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "drbd_bm_clear_all", (char *)"!b", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 757); } else { } if (_b != 0) { return; } else { } _b___0 = (unsigned long )b->bm_pages == (unsigned long )((struct page **)0); if (_b___0 != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___2, tmp___1, "drbd_bm_clear_all", (char *)"!b->bm_pages", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 758); } else { } if (_b___0 != 0) { return; } else { } spin_lock_irq(& b->bm_lock); bm_memset(b, 0UL, 0, b->bm_words); b->bm_set = 0UL; spin_unlock_irq(& b->bm_lock); return; } } static void bm_async_io_complete(struct bio *bio , int error ) { struct drbd_bitmap *b ; int uptodate ; int tmp ; { b = (struct drbd_bitmap *)bio->bi_private; uptodate = (int )bio->bi_flags & 1; if (error == 0 && uptodate == 0) { error = -5; } else { } if (error != 0) { __set_bit(1, (unsigned long volatile *)(& b->bm_flags)); } else { } tmp = atomic_dec_and_test(& b->bm_async_io); if (tmp != 0) { __wake_up(& b->bm_io_wait, 3U, 1, 0); } else { } bio_put(bio); return; } } static void bm_page_io_async(struct drbd_conf *mdev , struct drbd_bitmap *b , int page_nr , int rw ) { struct bio *bio ; struct bio *tmp ; unsigned int len ; sector_t on_disk_sector ; unsigned int __min1 ; unsigned int __min2 ; sector_t tmp___0 ; int tmp___1 ; { tmp = bio_alloc(208U, 1); bio = tmp; on_disk_sector = (sector_t )((mdev->ldev)->md.md_offset + (u64 )(mdev->ldev)->md.bm_offset); on_disk_sector = ((unsigned long )page_nr << 3) + on_disk_sector; __min1 = 4096U; tmp___0 = drbd_md_last_sector(mdev->ldev); __min2 = (((unsigned int )tmp___0 - (unsigned int )on_disk_sector) + 1U) << 9U; len = __min1 < __min2 ? __min1 : __min2; bio->bi_bdev = (mdev->ldev)->md_bdev; bio->bi_sector = on_disk_sector; bio_add_page(bio, *(b->bm_pages + (unsigned long )page_nr), len, 0U); bio->bi_private = (void *)b; bio->bi_end_io = & bm_async_io_complete; tmp___1 = drbd_insert_fault(mdev, rw & 1 ? 0U : 1U); if (tmp___1 != 0) { bio->bi_rw = bio->bi_rw | (unsigned long )rw; bio_endio(bio, -5); } else { submit_bio(rw, bio); } return; } } static int bm_rw(struct drbd_conf *mdev , int rw ) { struct drbd_bitmap *b ; int bm_words ; int num_pages ; int i ; unsigned long now ; char ppb[10U] ; int err ; int __ret_warn_on ; int tmp ; long tmp___0 ; size_t tmp___1 ; struct request_queue *tmp___2 ; int tmp___3 ; wait_queue_t __wait ; struct task_struct *tmp___4 ; int tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; int tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; char *tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; { b = mdev->bitmap; err = 0; tmp = bm_is_locked(b); __ret_warn_on = tmp == 0; tmp___0 = ldv__builtin_expect(__ret_warn_on != 0, 0L); if (tmp___0 != 0L) { warn_slowpath_null("/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 863); } else { } ldv__builtin_expect(__ret_warn_on != 0, 0L); tmp___1 = drbd_bm_words(mdev); bm_words = (int )tmp___1; num_pages = (int )((((unsigned long )bm_words + 512UL) * 8UL - 1UL) >> 12); now = jiffies; atomic_set(& b->bm_async_io, num_pages); __clear_bit(1, (unsigned long volatile *)(& b->bm_flags)); i = 0; goto ldv_42246; ldv_42245: bm_page_io_async(mdev, b, i, rw); i = i + 1; ldv_42246: ; if (i < num_pages) { goto ldv_42245; } else { } tmp___2 = bdev_get_queue((mdev->ldev)->md_bdev); drbd_blk_run_queue(tmp___2); tmp___3 = atomic_read((atomic_t const *)(& b->bm_async_io)); if (tmp___3 == 0) { goto ldv_42248; } else { } tmp___4 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___4; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_42251: prepare_to_wait(& b->bm_io_wait, & __wait, 2); tmp___5 = atomic_read((atomic_t const *)(& b->bm_async_io)); if (tmp___5 == 0) { goto ldv_42250; } else { } schedule(); goto ldv_42251; ldv_42250: finish_wait(& b->bm_io_wait, & __wait); ldv_42248: tmp___8 = constant_test_bit(1U, (unsigned long const volatile *)(& b->bm_flags)); if (tmp___8 != 0) { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: we had at least one MD IO ERROR during bitmap IO\n", tmp___7, tmp___6); drbd_chk_io_error_(mdev, 1, 1, "bm_rw"); err = -5; } else { } now = jiffies; if (rw == 1) { drbd_md_flush(mdev); } else { b->bm_set = bm_count_bits_swap_endian(b); tmp___9 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___10 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: recounting of set bits took additional %lu jiffies\n", tmp___10, tmp___9, (unsigned long )jiffies - now); } now = b->bm_set; tmp___11 = ppsize((char *)(& ppb), (unsigned long long )(now << 2)); tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: %s (%lu bits) marked out-of-sync by on disk bit-map.\n", tmp___13, tmp___12, tmp___11, now); return (err); } } int drbd_bm_read(struct drbd_conf *mdev ) { int tmp ; { tmp = bm_rw(mdev, 0); return (tmp); } } int drbd_bm_write(struct drbd_conf *mdev ) { int tmp ; { tmp = bm_rw(mdev, 1); return (tmp); } } int drbd_bm_write_sect(struct drbd_conf *mdev , unsigned long enr ) { sector_t on_disk_sector ; int bm_words ; int num_words ; int offset ; int err ; size_t tmp ; int _min1 ; int _min2 ; void *tmp___0 ; void *tmp___1 ; int i ; char const *tmp___2 ; char const *tmp___3 ; int tmp___4 ; { on_disk_sector = (sector_t )(((mdev->ldev)->md.md_offset + (unsigned long long )enr) + (unsigned long long )(mdev->ldev)->md.bm_offset); err = 0; ldv_mutex_lock_7(& mdev->md_io_mutex); tmp = drbd_bm_words(mdev); bm_words = (int )tmp; offset = (int )(enr << 6); _min1 = 64; _min2 = bm_words - offset; num_words = _min1 < _min2 ? _min1 : _min2; if (num_words <= 63) { tmp___0 = lowmem_page_address(mdev->md_io_page); memset(tmp___0, 0, 512UL); } else { } tmp___1 = lowmem_page_address(mdev->md_io_page); drbd_bm_get_lel(mdev, (size_t )offset, (size_t )num_words, (unsigned long *)tmp___1); tmp___4 = drbd_md_sync_page_io(mdev, mdev->ldev, on_disk_sector, 1); if (tmp___4 == 0) { err = -5; tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: IO ERROR writing bitmap sector %lu (meta-disk sector %llus)\n", tmp___3, tmp___2, enr, (unsigned long long )on_disk_sector); drbd_chk_io_error_(mdev, 1, 1, "drbd_bm_write_sect"); i = 0; goto ldv_42274; ldv_42273: drbd_bm_ALe_set_all(mdev, enr * 4UL + (unsigned long )i); i = i + 1; ldv_42274: ; if (i <= 3) { goto ldv_42273; } else { } } else { } mdev->bm_writ_cnt = mdev->bm_writ_cnt + 1U; ldv_mutex_unlock_8(& mdev->md_io_mutex); return (err); } } static unsigned long __bm_find_next(struct drbd_conf *mdev , unsigned long bm_fo , int const find_zero_bit , enum km_type const km ) { struct drbd_bitmap *b ; unsigned long i ; unsigned long *p_addr ; unsigned long bit_offset ; char const *tmp ; char const *tmp___0 ; unsigned long offset ; { b = mdev->bitmap; i = 0xffffffffffffffffUL; if (b->bm_bits < bm_fo) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: bm_fo=%lu bm_bits=%lu\n", tmp___0, tmp, bm_fo, b->bm_bits); } else { goto ldv_42290; ldv_42289: bit_offset = bm_fo & 0xffffffffffff8000UL; offset = bit_offset >> 6; p_addr = __bm_map_paddr(b, offset, km); if ((int )find_zero_bit != 0) { i = find_next_zero_bit((unsigned long const *)p_addr, 32768UL, bm_fo & 32767UL); } else { i = find_next_bit((unsigned long const *)p_addr, 32768UL, bm_fo & 32767UL); } __bm_unmap(p_addr, km); if (i <= 32767UL) { i = bit_offset + i; if (b->bm_bits <= i) { goto ldv_42287; } else { } goto found; } else { } bm_fo = bit_offset + 32768UL; ldv_42290: ; if (b->bm_bits > bm_fo) { goto ldv_42289; } else { } ldv_42287: i = 0xffffffffffffffffUL; } found: ; return (i); } } static unsigned long bm_find_next(struct drbd_conf *mdev , unsigned long bm_fo , int const find_zero_bit ) { struct drbd_bitmap *b ; unsigned long i ; int _b ; char const *tmp ; char const *tmp___0 ; int _b___0 ; char const *tmp___1 ; char const *tmp___2 ; int tmp___3 ; { b = mdev->bitmap; i = 0xffffffffffffffffUL; _b = (unsigned long )b == (unsigned long )((struct drbd_bitmap *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "bm_find_next", (char *)"!b", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 1018); } else { } if (_b != 0) { return (i); } else { } _b___0 = (unsigned long )b->bm_pages == (unsigned long )((struct page **)0); if (_b___0 != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___2, tmp___1, "bm_find_next", (char *)"!b->bm_pages", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 1019); } else { } if (_b___0 != 0) { return (i); } else { } spin_lock_irq(& b->bm_lock); tmp___3 = bm_is_locked(b); if (tmp___3 != 0) { __bm_print_lock_info(mdev, "bm_find_next"); } else { } i = __bm_find_next(mdev, bm_fo, find_zero_bit, KM_IRQ1); spin_unlock_irq(& b->bm_lock); return (i); } } unsigned long drbd_bm_find_next(struct drbd_conf *mdev , unsigned long bm_fo ) { unsigned long tmp ; { tmp = bm_find_next(mdev, bm_fo, 0); return (tmp); } } unsigned long _drbd_bm_find_next(struct drbd_conf *mdev , unsigned long bm_fo ) { unsigned long tmp ; { tmp = __bm_find_next(mdev, bm_fo, 0, KM_USER1); return (tmp); } } unsigned long _drbd_bm_find_next_zero(struct drbd_conf *mdev , unsigned long bm_fo ) { unsigned long tmp ; { tmp = __bm_find_next(mdev, bm_fo, 1, KM_USER1); return (tmp); } } static int __bm_change_bits_to(struct drbd_conf *mdev , unsigned long const s , unsigned long e , int val , enum km_type const km ) { struct drbd_bitmap *b ; unsigned long *p_addr ; unsigned long bitnr ; unsigned long last_page_nr ; int c ; char const *tmp ; char const *tmp___0 ; unsigned long offset ; unsigned long page_nr ; int tmp___1 ; int tmp___2 ; { b = mdev->bitmap; p_addr = 0; last_page_nr = 0xffffffffffffffffUL; c = 0; if (b->bm_bits <= e) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT FAILED: bit_s=%lu bit_e=%lu bm_bits=%lu\n", tmp___0, tmp, s, e, b->bm_bits); e = b->bm_bits != 0UL ? b->bm_bits - 1UL : 0UL; } else { } bitnr = s; goto ldv_42330; ldv_42329: offset = bitnr >> 6; page_nr = offset >> 9; if (page_nr != last_page_nr) { if ((unsigned long )p_addr != (unsigned long )((unsigned long *)0)) { __bm_unmap(p_addr, km); } else { } p_addr = __bm_map_paddr(b, offset, km); last_page_nr = page_nr; } else { } if (val != 0) { tmp___1 = __test_and_set_bit((int )bitnr & 32767, (unsigned long volatile *)p_addr); c = (tmp___1 == 0) + c; } else { tmp___2 = __test_and_clear_bit((int )bitnr & 32767, (unsigned long volatile *)p_addr); c = c - (tmp___2 != 0); } bitnr = bitnr + 1UL; ldv_42330: ; if (bitnr <= e) { goto ldv_42329; } else { } if ((unsigned long )p_addr != (unsigned long )((unsigned long *)0)) { __bm_unmap(p_addr, km); } else { } b->bm_set = b->bm_set + (unsigned long )c; return (c); } } static int bm_change_bits_to(struct drbd_conf *mdev , unsigned long const s , unsigned long const e , int val ) { unsigned long flags ; struct drbd_bitmap *b ; int c ; int _b ; char const *tmp ; char const *tmp___0 ; int _b___0 ; char const *tmp___1 ; char const *tmp___2 ; raw_spinlock_t *tmp___3 ; int tmp___4 ; { b = mdev->bitmap; c = 0; _b = (unsigned long )b == (unsigned long )((struct drbd_bitmap *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "bm_change_bits_to", (char *)"!b", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 1109); } else { } if (_b != 0) { return (1); } else { } _b___0 = (unsigned long )b->bm_pages == (unsigned long )((struct page **)0); if (_b___0 != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___2, tmp___1, "bm_change_bits_to", (char *)"!b->bm_pages", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 1110); } else { } if (_b___0 != 0) { return (0); } else { } tmp___3 = spinlock_check(& b->bm_lock); flags = _raw_spin_lock_irqsave(tmp___3); tmp___4 = bm_is_locked(b); if (tmp___4 != 0) { __bm_print_lock_info(mdev, "bm_change_bits_to"); } else { } c = __bm_change_bits_to(mdev, s, e, val, KM_IRQ1); spin_unlock_irqrestore(& b->bm_lock, flags); return (c); } } int drbd_bm_set_bits(struct drbd_conf *mdev , unsigned long const s , unsigned long const e ) { int tmp ; { tmp = bm_change_bits_to(mdev, s, e, 1); return (tmp); } } int drbd_bm_clear_bits(struct drbd_conf *mdev , unsigned long const s , unsigned long const e ) { int tmp ; { tmp = bm_change_bits_to(mdev, s, e, 0); return (- tmp); } } __inline static void bm_set_full_words_within_one_page(struct drbd_bitmap *b , int page_nr , int first_word , int last_word ) { int i ; int bits ; unsigned long *paddr ; void *tmp ; unsigned long tmp___0 ; { tmp = kmap_atomic(*(b->bm_pages + (unsigned long )page_nr), KM_USER0); paddr = (unsigned long *)tmp; i = first_word; goto ldv_42369; ldv_42368: tmp___0 = hweight_long(*(paddr + (unsigned long )i)); bits = (int )tmp___0; *(paddr + (unsigned long )i) = 0xffffffffffffffffUL; b->bm_set = b->bm_set + (unsigned long )(64 - bits); i = i + 1; ldv_42369: ; if (i < last_word) { goto ldv_42368; } else { } pagefault_enable(); return; } } void _drbd_bm_set_bits(struct drbd_conf *mdev , unsigned long const s , unsigned long const e ) { unsigned long sl ; unsigned long el ; int first_page ; int last_page ; int page_nr ; int first_word ; int last_word ; { sl = ((unsigned long )s + 63UL) & 0xffffffffffffffc0UL; el = ((unsigned long )e + 1UL) & 0xffffffffffffffc0UL; if ((unsigned long )e - (unsigned long )s <= 192UL) { __bm_change_bits_to(mdev, s, e, 1, KM_USER0); return; } else { } if (sl != 0UL) { __bm_change_bits_to(mdev, s, sl - 1UL, 1, KM_USER0); } else { } first_page = (int )(sl >> 15); last_page = (int )(el >> 15); first_word = (int )(sl >> 6) & 511; last_word = 512; page_nr = first_page; goto ldv_42385; ldv_42384: bm_set_full_words_within_one_page(mdev->bitmap, page_nr, first_word, last_word); __might_sleep("/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 1195, 0); _cond_resched(); first_word = 0; page_nr = page_nr + 1; ldv_42385: ; if (page_nr < last_page) { goto ldv_42384; } else { } last_word = (int )(el >> 6) & 511; bm_set_full_words_within_one_page(mdev->bitmap, last_page, first_word, last_word); if (el <= (unsigned long )e) { __bm_change_bits_to(mdev, el, e, 1, KM_USER0); } else { } return; } } int drbd_bm_test_bit(struct drbd_conf *mdev , unsigned long const bitnr ) { unsigned long flags ; struct drbd_bitmap *b ; unsigned long *p_addr ; int i ; int _b ; char const *tmp ; char const *tmp___0 ; int _b___0 ; char const *tmp___1 ; char const *tmp___2 ; raw_spinlock_t *tmp___3 ; int tmp___4 ; unsigned long offset ; int tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; { b = mdev->bitmap; _b = (unsigned long )b == (unsigned long )((struct drbd_bitmap *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "drbd_bm_test_bit", (char *)"!b", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 1226); } else { } if (_b != 0) { return (0); } else { } _b___0 = (unsigned long )b->bm_pages == (unsigned long )((struct page **)0); if (_b___0 != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___2, tmp___1, "drbd_bm_test_bit", (char *)"!b->bm_pages", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 1227); } else { } if (_b___0 != 0) { return (0); } else { } tmp___3 = spinlock_check(& b->bm_lock); flags = _raw_spin_lock_irqsave(tmp___3); tmp___4 = bm_is_locked(b); if (tmp___4 != 0) { __bm_print_lock_info(mdev, "drbd_bm_test_bit"); } else { } if (b->bm_bits > (unsigned long )bitnr) { offset = bitnr >> 6; p_addr = bm_map_paddr(b, offset); tmp___5 = variable_test_bit((int )bitnr & 32767, (unsigned long const volatile *)p_addr); i = tmp___5 != 0; bm_unmap(p_addr); } else if (b->bm_bits == (unsigned long )bitnr) { i = -1; } else { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: bitnr=%lu > bm_bits=%lu\n", tmp___7, tmp___6, bitnr, b->bm_bits); i = 0; } spin_unlock_irqrestore(& b->bm_lock, flags); return (i); } } int drbd_bm_count_bits(struct drbd_conf *mdev , unsigned long const s , unsigned long const e ) { unsigned long flags ; struct drbd_bitmap *b ; unsigned long *p_addr ; unsigned long page_nr ; unsigned long bitnr ; int c ; size_t w ; int _b ; char const *tmp ; char const *tmp___0 ; int _b___0 ; char const *tmp___1 ; char const *tmp___2 ; raw_spinlock_t *tmp___3 ; int tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; int tmp___7 ; int _b___1 ; char const *tmp___8 ; char const *tmp___9 ; { b = mdev->bitmap; p_addr = 0; page_nr = 0xffffffffffffffffUL; c = 0; _b = (unsigned long )b == (unsigned long )((struct drbd_bitmap *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "drbd_bm_count_bits", (char *)"!b", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 1262); } else { } if (_b != 0) { return (1); } else { } _b___0 = (unsigned long )b->bm_pages == (unsigned long )((struct page **)0); if (_b___0 != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___2, tmp___1, "drbd_bm_count_bits", (char *)"!b->bm_pages", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 1263); } else { } if (_b___0 != 0) { return (1); } else { } tmp___3 = spinlock_check(& b->bm_lock); flags = _raw_spin_lock_irqsave(tmp___3); tmp___4 = bm_is_locked(b); if (tmp___4 != 0) { __bm_print_lock_info(mdev, "drbd_bm_count_bits"); } else { } bitnr = s; goto ldv_42427; ldv_42426: w = bitnr >> 6; if (w >> 9 != page_nr) { page_nr = w >> 9; if ((unsigned long )p_addr != (unsigned long )((unsigned long *)0)) { bm_unmap(p_addr); } else { } p_addr = bm_map_paddr(b, w); } else { } _b___1 = b->bm_bits <= bitnr; if (_b___1 != 0) { tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___9, tmp___8, "drbd_bm_count_bits", (char *)"bitnr >= b->bm_bits", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 1276); } else { } if (_b___1 != 0) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: bitnr=%lu bm_bits=%lu\n", tmp___6, tmp___5, bitnr, b->bm_bits); } else { tmp___7 = variable_test_bit((int )((unsigned int )bitnr - ((unsigned int )page_nr << 15U)), (unsigned long const volatile *)p_addr); c = (tmp___7 != 0) + c; } bitnr = bitnr + 1UL; ldv_42427: ; if (bitnr <= (unsigned long )e) { goto ldv_42426; } else { } if ((unsigned long )p_addr != (unsigned long )((unsigned long *)0)) { bm_unmap(p_addr); } else { } spin_unlock_irqrestore(& b->bm_lock, flags); return (c); } } int drbd_bm_e_weight(struct drbd_conf *mdev , unsigned long enr ) { struct drbd_bitmap *b ; int count ; int s ; int e ; unsigned long flags ; unsigned long *p_addr ; unsigned long *bm ; int _b ; char const *tmp ; char const *tmp___0 ; int _b___0 ; char const *tmp___1 ; char const *tmp___2 ; raw_spinlock_t *tmp___3 ; int tmp___4 ; unsigned long _min1 ; size_t _min2 ; int n ; unsigned long *tmp___5 ; unsigned long tmp___6 ; int tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; { b = mdev->bitmap; _b = (unsigned long )b == (unsigned long )((struct drbd_bitmap *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "drbd_bm_e_weight", (char *)"!b", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 1310); } else { } if (_b != 0) { return (0); } else { } _b___0 = (unsigned long )b->bm_pages == (unsigned long )((struct page **)0); if (_b___0 != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___2, tmp___1, "drbd_bm_e_weight", (char *)"!b->bm_pages", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 1311); } else { } if (_b___0 != 0) { return (0); } else { } tmp___3 = spinlock_check(& b->bm_lock); flags = _raw_spin_lock_irqsave(tmp___3); tmp___4 = bm_is_locked(b); if (tmp___4 != 0) { __bm_print_lock_info(mdev, "drbd_bm_e_weight"); } else { } s = (int )(enr << 6); _min1 = (enr + 1UL) << 6; _min2 = b->bm_words; e = (int )(_min1 < _min2 ? _min1 : _min2); count = 0; if ((size_t )s < b->bm_words) { n = e - s; p_addr = bm_map_paddr(b, (unsigned long )s); bm = p_addr + ((unsigned long )s & 511UL); goto ldv_42453; ldv_42452: tmp___5 = bm; bm = bm + 1; tmp___6 = hweight_long(*tmp___5); count = (int )((unsigned int )tmp___6 + (unsigned int )count); ldv_42453: tmp___7 = n; n = n - 1; if (tmp___7 != 0) { goto ldv_42452; } else { } bm_unmap(p_addr); } else { tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: start offset (%d) too large in drbd_bm_e_weight\n", tmp___9, tmp___8, s); } spin_unlock_irqrestore(& b->bm_lock, flags); return (count); } } unsigned long drbd_bm_ALe_set_all(struct drbd_conf *mdev , unsigned long al_enr ) { struct drbd_bitmap *b ; unsigned long *p_addr ; unsigned long *bm ; unsigned long weight ; int count ; int s ; int e ; int i ; int do_now ; int _b ; char const *tmp ; char const *tmp___0 ; int _b___0 ; char const *tmp___1 ; char const *tmp___2 ; int tmp___3 ; size_t __min1 ; size_t __min2 ; char const *tmp___4 ; char const *tmp___5 ; unsigned long tmp___6 ; int tmp___7 ; int tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; { b = mdev->bitmap; _b = (unsigned long )b == (unsigned long )((struct drbd_bitmap *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "drbd_bm_ALe_set_all", (char *)"!b", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 1341); } else { } if (_b != 0) { return (0UL); } else { } _b___0 = (unsigned long )b->bm_pages == (unsigned long )((struct page **)0); if (_b___0 != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___2, tmp___1, "drbd_bm_ALe_set_all", (char *)"!b->bm_pages", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 1342); } else { } if (_b___0 != 0) { return (0UL); } else { } spin_lock_irq(& b->bm_lock); tmp___3 = bm_is_locked(b); if (tmp___3 != 0) { __bm_print_lock_info(mdev, "drbd_bm_ALe_set_all"); } else { } weight = b->bm_set; s = (int )((unsigned int )al_enr * 16U); __min1 = (size_t )(s + 16); __min2 = b->bm_words; e = (int )(__min1 < __min2 ? __min1 : __min2); if ((e + -1) >> 9 != s >> 9) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( (e-1) >> (PAGE_SHIFT - LN2_BPL + 3) == s >> (PAGE_SHIFT - LN2_BPL + 3) ) in %s:%d\n", tmp___5, tmp___4, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_bitmap.c.prepared", 1353); } else { } count = 0; if ((size_t )s < b->bm_words) { do_now = e - s; i = do_now; p_addr = bm_map_paddr(b, (unsigned long )s); bm = p_addr + ((unsigned long )s & 511UL); goto ldv_42477; ldv_42476: tmp___6 = hweight_long(*bm); count = (int )((unsigned int )tmp___6 + (unsigned int )count); *bm = 0xffffffffffffffffUL; bm = bm + 1; ldv_42477: tmp___7 = i; i = i - 1; if (tmp___7 != 0) { goto ldv_42476; } else { } bm_unmap(p_addr); b->bm_set = b->bm_set + (unsigned long )(do_now * 64 - count); if ((size_t )e == b->bm_words) { tmp___8 = bm_clear_surplus(b); b->bm_set = b->bm_set - (unsigned long )tmp___8; } else { } } else { tmp___9 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___10 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: start offset (%d) too large in drbd_bm_ALe_set_all\n", tmp___10, tmp___9, s); } weight = b->bm_set - weight; spin_unlock_irq(& b->bm_lock); return (weight); } } void ldv_mutex_lock_1(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_2(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_3(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } int ldv_mutex_trylock_4(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___2 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_bm_change_of_drbd_bitmap(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_lock_5(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_bm_change_of_drbd_bitmap(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_6(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_bm_change_of_drbd_bitmap(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_7(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_md_io_mutex_of_drbd_conf(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_8(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_md_io_mutex_of_drbd_conf(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_18(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_19(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_17(struct mutex *ldv_func_arg1 ) ; extern struct module __this_module ; __inline static struct proc_inode *PROC_I(struct inode const *inode ) { struct inode const *__mptr ; { __mptr = inode; return ((struct proc_inode *)__mptr + 0xffffffffffffffd0UL); } } __inline static struct proc_dir_entry *PDE(struct inode const *inode ) { struct proc_inode *tmp ; { tmp = PROC_I(inode); return (tmp->pde); } } extern ssize_t seq_read(struct file * , char * , size_t , loff_t * ) ; extern loff_t seq_lseek(struct file * , loff_t , int ) ; extern int seq_printf(struct seq_file * , char const * , ...) ; extern int single_open(struct file * , int (*)(struct seq_file * , void * ) , void * ) ; extern int single_release(struct inode * , struct file * ) ; char const *drbd_buildtag(void) ; char const *drbd_conn_str(enum drbd_conns s ) ; char const *drbd_role_str(enum drbd_role s ) ; char const *drbd_disk_str(enum drbd_disk_state s ) ; extern size_t lc_seq_printf_stats(struct seq_file * , struct lru_cache * ) ; extern void lc_seq_dump_details(struct seq_file * , struct lru_cache * , char * , void (*)(struct seq_file * , struct lc_element * ) ) ; unsigned int minor_count ; struct drbd_conf **minor_table ; __inline static struct drbd_conf *minor_to_mdev(unsigned int minor ) { struct drbd_conf *mdev ; { mdev = minor < minor_count ? *(minor_table + (unsigned long )minor) : 0; return (mdev); } } int proc_details ; struct proc_dir_entry *drbd_proc ; struct file_operations const drbd_proc_fops ; __inline static void drbd_get_syncer_progress(struct drbd_conf *mdev , unsigned long *bits_left , unsigned int *per_mil_done ) { unsigned long tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; unsigned long tmp___3 ; { tmp = drbd_bm_total_weight(mdev); *bits_left = tmp - mdev->rs_failed; if (*bits_left > mdev->rs_total) { __asm__ volatile ("": : : "memory"); tmp___0 = drbd_conn_str((enum drbd_conns )mdev->state.ldv_33381.conn); tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: cs:%s rs_left=%lu > rs_total=%lu (rs_failed %lu)\n", tmp___2, tmp___1, tmp___0, *bits_left, mdev->rs_total, mdev->rs_failed); *per_mil_done = 0U; } else { tmp___3 = 1000UL - ((*bits_left >> 10) * 1000UL) / ((mdev->rs_total >> 10) + 1UL); *per_mil_done = (unsigned int )tmp___3; } return; } } static int drbd_proc_open(struct inode *inode , struct file *file ) ; struct file_operations const drbd_proc_fops = {& __this_module, & seq_lseek, & seq_read, 0, 0, 0, 0, 0, 0, 0, 0, 0, & drbd_proc_open, 0, & single_release, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static void drbd_syncer_progress(struct drbd_conf *mdev , struct seq_file *seq ) { unsigned long db ; unsigned long dt ; unsigned long dbdt ; unsigned long rt ; unsigned long rs_left ; unsigned int res ; int i ; int x ; int y ; { drbd_get_syncer_progress(mdev, & rs_left, & res); x = (int )(res / 50U); y = 20 - x; seq_printf(seq, "\t["); i = 1; goto ldv_41945; ldv_41944: seq_printf(seq, "="); i = i + 1; ldv_41945: ; if (i < x) { goto ldv_41944; } else { } seq_printf(seq, ">"); i = 0; goto ldv_41948; ldv_41947: seq_printf(seq, "."); i = i + 1; ldv_41948: ; if (i < y) { goto ldv_41947; } else { } seq_printf(seq, "] "); seq_printf(seq, "sync\'ed:%3u.%u%% ", res / 10U, res % 10U); if (mdev->rs_total > 1048576UL) { seq_printf(seq, "(%lu/%lu)M", (rs_left >> 10) << 2, (mdev->rs_total >> 10) << 2); } else { seq_printf(seq, "(%lu/%lu)K", rs_left << 2, mdev->rs_total << 2); } if ((unsigned int )*((unsigned short *)mdev + 994UL) == 272U) { seq_printf(seq, " queue_delay: %d.%d ms\n\t", mdev->data_delay / 1000, (mdev->data_delay % 1000) / 100); } else if ((unsigned int )*((unsigned short *)mdev + 994UL) == 256U) { seq_printf(seq, " delay_probe: %u\n\t", mdev->delay_seq); } else { } dt = ((unsigned long )jiffies - mdev->rs_mark_time) / 250UL; if (dt > 20UL) { seq_printf(seq, "stalled\n"); return; } else { } if (dt == 0UL) { dt = dt + 1UL; } else { } db = mdev->rs_mark_left - rs_left; rt = ((rs_left / (db / 100UL + 1UL)) * dt) / 100UL; seq_printf(seq, "finish: %lu:%02lu:%02lu", rt / 3600UL, (rt % 3600UL) / 60UL, rt % 60UL); dbdt = db / dt << 2; if (dbdt > 1000UL) { seq_printf(seq, " speed: %ld,%03ld", dbdt / 1000UL, dbdt % 1000UL); } else { seq_printf(seq, " speed: %ld", dbdt); } dt = (((unsigned long )jiffies - mdev->rs_start) - mdev->rs_paused) / 250UL; if (dt == 0UL) { dt = 1UL; } else { } db = mdev->rs_total - rs_left; dbdt = db / dt << 2; if (dbdt > 1000UL) { seq_printf(seq, " (%ld,%03ld)", dbdt / 1000UL, dbdt % 1000UL); } else { seq_printf(seq, " (%ld)", dbdt); } if ((unsigned int )*((unsigned short *)mdev + 994UL) == 272U) { if (mdev->c_sync_rate > 1000) { seq_printf(seq, " want: %d,%03d", mdev->c_sync_rate / 1000, mdev->c_sync_rate % 1000); } else { seq_printf(seq, " want: %d", mdev->c_sync_rate); } } else { } seq_printf(seq, " K/sec\n"); return; } } static void resync_dump_detail(struct seq_file *seq , struct lc_element *e ) { struct bm_extent *bme ; struct lc_element const *__mptr ; { __mptr = (struct lc_element const *)e; bme = (struct bm_extent *)__mptr + 0xfffffffffffffff0UL; seq_printf(seq, "%5d %s %s\n", bme->rs_left, (char *)"---------", (int )bme->flags & 1 ? (char *)"LOCKED" : (char *)"------"); return; } } static int drbd_seq_show(struct seq_file *seq , void *v ) { int i ; int hole ; char const *sn ; struct drbd_conf *mdev ; char write_ordering_chars[4U] ; char const *tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; unsigned long tmp___9 ; int tmp___10 ; { hole = 0; write_ordering_chars[0] = 110; write_ordering_chars[1] = 100; write_ordering_chars[2] = 102; write_ordering_chars[3] = 98; tmp = drbd_buildtag(); seq_printf(seq, "version: 8.3.7 (api:%d/proto:%d-%d)\n%s\n", 88, 86, 93, tmp); i = 0; goto ldv_41968; ldv_41967: mdev = minor_to_mdev((unsigned int )i); if ((unsigned long )mdev == (unsigned long )((struct drbd_conf *)0)) { hole = 1; goto ldv_41966; } else { } if (hole != 0) { hole = 0; seq_printf(seq, "\n"); } else { } sn = drbd_conn_str((enum drbd_conns )mdev->state.ldv_33381.conn); if (((unsigned int )*((unsigned short *)mdev + 994UL) == 0U && (unsigned int )*((unsigned char *)mdev + 1989UL) == 0U) && (unsigned int )*((unsigned char *)mdev + 1988UL) == 2U) { seq_printf(seq, "%2d: cs:Unconfigured\n", i); } else { tmp___0 = atomic_read((atomic_t const *)(& mdev->ap_bio_cnt)); tmp___1 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); tmp___2 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); tmp___3 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); tmp___4 = atomic_read((atomic_t const *)(& mdev->local_cnt)); tmp___5 = drbd_disk_str((enum drbd_disk_state )mdev->state.ldv_33381.pdsk); tmp___6 = drbd_disk_str((enum drbd_disk_state )mdev->state.ldv_33381.disk); tmp___7 = drbd_role_str((enum drbd_role )mdev->state.ldv_33381.peer); tmp___8 = drbd_role_str((enum drbd_role )mdev->state.ldv_33381.role); seq_printf(seq, "%2d: cs:%s ro:%s/%s ds:%s/%s %c %c%c%c%c%c\n ns:%u nr:%u dw:%u dr:%u al:%u bm:%u lo:%d pe:%d ua:%d ap:%d ep:%d wo:%c", i, sn, tmp___8, tmp___7, tmp___6, tmp___5, (unsigned long )mdev->net_conf != (unsigned long )((struct net_conf *)0) ? (mdev->net_conf)->wire_protocol + 64 : 32, (unsigned int )*((unsigned char *)mdev + 1990UL) != 0U ? 115 : 114, (unsigned int )*((unsigned char *)mdev + 1990UL) != 0U ? 97 : 45, (unsigned int )*((unsigned char *)mdev + 1990UL) != 0U ? 112 : 45, (unsigned int )*((unsigned char *)mdev + 1990UL) != 0U ? 117 : 45, (int )mdev->congestion_reason != 0 ? (int )mdev->congestion_reason : 45, mdev->send_cnt / 2U, mdev->recv_cnt / 2U, mdev->writ_cnt / 2U, mdev->read_cnt / 2U, mdev->al_writ_cnt, mdev->bm_writ_cnt, tmp___4, tmp___2 + tmp___3, tmp___1, tmp___0, mdev->epochs, (int )write_ordering_chars[(unsigned int )mdev->write_ordering]); tmp___9 = drbd_bm_total_weight(mdev); seq_printf(seq, " oos:%lu\n", tmp___9 << 2); } if ((unsigned int )*((unsigned short *)mdev + 994UL) == 256U || (unsigned int )*((unsigned short *)mdev + 994UL) == 272U) { drbd_syncer_progress(mdev, seq); } else { } if ((unsigned int )*((unsigned short *)mdev + 994UL) == 288U || (unsigned int )*((unsigned short *)mdev + 994UL) == 304U) { seq_printf(seq, "\t%3d%% %lu/%lu\n", (int )((mdev->rs_total - mdev->ov_left) / (mdev->rs_total / 100UL + 1UL)), mdev->rs_total - mdev->ov_left, mdev->rs_total); } else { } if (proc_details > 0) { tmp___10 = _get_ldev_if_state(mdev, D_FAILED); if (tmp___10 != 0) { lc_seq_printf_stats(seq, mdev->resync); lc_seq_printf_stats(seq, mdev->act_log); put_ldev(mdev); } else { } } else { } if (proc_details > 1) { if ((unsigned long )mdev->resync != (unsigned long )((struct lru_cache *)0)) { lc_seq_dump_details(seq, mdev->resync, (char *)"rs_left", & resync_dump_detail); } else { } } else { } ldv_41966: i = i + 1; ldv_41968: ; if ((unsigned int )i < minor_count) { goto ldv_41967; } else { } return (0); } } static int drbd_proc_open(struct inode *inode , struct file *file ) { struct proc_dir_entry *tmp ; int tmp___0 ; { tmp = PDE((struct inode const *)inode); tmp___0 = single_open(file, & drbd_seq_show, tmp->data); return (tmp___0); } } void ldv_check_final_state(void) ; extern void ldv_check_return_value(int ) ; void ldv_initialize(void) ; extern void ldv_handler_precall(void) ; extern int nondet_int(void) ; int LDV_IN_INTERRUPT ; int main(void) { struct inode *var_group1 ; struct file *var_group2 ; int res_drbd_proc_open_3 ; int ldv_s_drbd_proc_fops_file_operations ; int tmp ; int tmp___0 ; { ldv_s_drbd_proc_fops_file_operations = 0; LDV_IN_INTERRUPT = 1; ldv_initialize(); goto ldv_41999; ldv_41998: tmp = nondet_int(); switch (tmp) { case 0: ; if (ldv_s_drbd_proc_fops_file_operations == 0) { ldv_handler_precall(); res_drbd_proc_open_3 = drbd_proc_open(var_group1, var_group2); ldv_check_return_value(res_drbd_proc_open_3); if (res_drbd_proc_open_3 != 0) { goto ldv_module_exit; } else { } ldv_s_drbd_proc_fops_file_operations = 0; } else { } goto ldv_41996; default: ; goto ldv_41996; } ldv_41996: ; ldv_41999: tmp___0 = nondet_int(); if (tmp___0 != 0 || ldv_s_drbd_proc_fops_file_operations != 0) { goto ldv_41998; } else { } ldv_module_exit: ; ldv_check_final_state(); return 0; } } void ldv_mutex_lock_17(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_18(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_19(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void __builtin_prefetch(void const * , ...) ; __inline static int test_and_set_bit(int nr , unsigned long volatile *addr ) { int oldbit ; { __asm__ volatile (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; bts %2,%1\n\tsbb %0,%0": "=r" (oldbit), "+m" (*((long volatile *)addr)): "Ir" (nr): "memory"); return (oldbit); } } __inline static int test_and_clear_bit(int nr , unsigned long volatile *addr ) { int oldbit ; { __asm__ volatile (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; btr %2,%1\n\tsbb %0,%0": "=r" (oldbit), "+m" (*((long volatile *)addr)): "Ir" (nr): "memory"); return (oldbit); } } extern int sprintf(char * , char const * , ...) ; extern int memcmp(void const * , void const * , size_t ) ; __inline static void *ERR_PTR(long error ) { { return ((void *)error); } } __inline static void INIT_LIST_HEAD(struct list_head *list ) { { list->next = list; list->prev = list; return; } } extern void __list_add(struct list_head * , struct list_head * , struct list_head * ) ; __inline static void list_add(struct list_head *new , struct list_head *head ) { { __list_add(new, head, head->next); return; } } __inline static void list_add_tail(struct list_head *new , struct list_head *head ) { { __list_add(new, head->prev, head); return; } } __inline static void __list_del(struct list_head *prev , struct list_head *next ) { { next->prev = prev; prev->next = next; return; } } extern void list_del(struct list_head * ) ; __inline static void list_del_init(struct list_head *entry ) { { __list_del(entry->prev, entry->next); INIT_LIST_HEAD(entry); return; } } __inline static int list_empty(struct list_head const *head ) { { return ((unsigned long )((struct list_head const *)head->next) == (unsigned long )head); } } __inline static void __list_splice(struct list_head const *list , struct list_head *prev , struct list_head *next ) { struct list_head *first ; struct list_head *last ; { first = list->next; last = list->prev; first->prev = prev; prev->next = first; last->next = next; next->prev = last; return; } } __inline static void list_splice_init(struct list_head *list , struct list_head *head ) { int tmp ; { tmp = list_empty((struct list_head const *)list); if (tmp == 0) { __list_splice((struct list_head const *)list, head, head->next); INIT_LIST_HEAD(list); } else { } return; } } __inline static void atomic_dec(atomic_t *v ) { { __asm__ volatile (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; decl %0": "+m" (v->counter)); return; } } extern void lockdep_init_map(struct lockdep_map * , char const * , struct lock_class_key * , int ) ; void ldv_mutex_unlock_24(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_25(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_27(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_29(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_31(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_33(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_23(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_26(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_28(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_30(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_32(struct mutex *ldv_func_arg1 ) ; extern void _raw_write_lock_irq(rwlock_t * ) ; extern void _raw_write_unlock_irq(rwlock_t * ) ; extern int mod_timer(struct timer_list * , unsigned long ) ; extern void complete(struct completion * ) ; extern void get_random_bytes(void * , int ) ; __inline static void trace_kmalloc___0(unsigned long call_site , void const *ptr , size_t bytes_req , size_t bytes_alloc , gfp_t gfp_flags ) { void **it_func ; int tmp ; int tmp___0 ; void **_________p1 ; long tmp___1 ; { tmp___1 = ldv__builtin_expect(__tracepoint_kmalloc.state != 0, 0L); if (tmp___1 != 0L) { rcu_read_lock_sched_notrace(); tmp = debug_lockdep_rcu_enabled(); if (tmp != 0) { tmp___0 = rcu_read_lock_sched_held(); if (tmp___0 == 0) { lockdep_rcu_dereference("include/trace/events/kmem.h", 87); } else { } } else { } _________p1 = *((void ** volatile *)(& __tracepoint_kmalloc.funcs)); it_func = _________p1; if ((unsigned long )it_func != (unsigned long )((void **)0)) { ldv_13362: (*((void (*)(unsigned long , void const * , size_t , size_t , gfp_t ))*it_func))(call_site, ptr, bytes_req, bytes_alloc, gfp_flags); it_func = it_func + 1; if ((unsigned long )*it_func != (unsigned long )((void *)0)) { goto ldv_13362; } else { } } else { } rcu_read_lock_sched_notrace(); } else { } return; } } __inline static void *kmalloc_large___0(size_t size , gfp_t flags ) { unsigned int order ; int tmp ; void *ret ; unsigned long tmp___0 ; { tmp = get_order(size); order = (unsigned int )tmp; tmp___0 = __get_free_pages(flags | 16384U, order); ret = (void *)tmp___0; kmemleak_alloc((void const *)ret, size, 1, flags); trace_kmalloc___0((unsigned long )((void *)0), (void const *)ret, size, 4096UL << (int )order, flags); return (ret); } } __inline static void *kmalloc___0(size_t size , gfp_t flags ) { void *ret ; void *tmp ; struct kmem_cache *s ; struct kmem_cache *tmp___0 ; void *tmp___1 ; { if (0) { if (size > 8192UL) { tmp = kmalloc_large___0(size, flags); return (tmp); } else { } if ((flags & 1U) == 0U) { tmp___0 = kmalloc_slab(size); s = tmp___0; if ((unsigned long )s == (unsigned long )((struct kmem_cache *)0)) { return (16); } else { } ret = kmem_cache_alloc_notrace(s, flags); trace_kmalloc___0((unsigned long )((void *)0), (void const *)ret, size, (size_t )s->size, flags); return (ret); } else { } } else { } tmp___1 = __kmalloc(size, flags); return (tmp___1); } } __inline static void sema_init(struct semaphore *sem , int val ) { struct lock_class_key __key ; struct semaphore __constr_expr_0 ; { __constr_expr_0.lock.ldv_5575.rlock.raw_lock.slock = 0U; __constr_expr_0.lock.ldv_5575.rlock.magic = 3735899821U; __constr_expr_0.lock.ldv_5575.rlock.owner_cpu = 4294967295U; __constr_expr_0.lock.ldv_5575.rlock.owner = 0xffffffffffffffffUL; __constr_expr_0.lock.ldv_5575.rlock.dep_map.key = 0; __constr_expr_0.lock.ldv_5575.rlock.dep_map.class_cache = 0; __constr_expr_0.lock.ldv_5575.rlock.dep_map.name = "(*sem).lock"; __constr_expr_0.lock.ldv_5575.rlock.dep_map.cpu = 0; __constr_expr_0.lock.ldv_5575.rlock.dep_map.ip = 0UL; __constr_expr_0.count = (unsigned int )val; __constr_expr_0.wait_list.next = & sem->wait_list; __constr_expr_0.wait_list.prev = & sem->wait_list; *sem = __constr_expr_0; lockdep_init_map(& sem->lock.ldv_5575.ldv_5574.dep_map, "semaphore->lock", & __key, 0); return; } } extern int down_interruptible(struct semaphore * ) ; extern int down_trylock(struct semaphore * ) ; extern void up(struct semaphore * ) ; __inline static int PageTail(struct page *page ) { int tmp ; { tmp = constant_test_bit(15U, (unsigned long const volatile *)(& page->flags)); return (tmp); } } __inline static struct page *compound_head(struct page *page ) { int tmp ; long tmp___0 ; { tmp = PageTail(page); tmp___0 = ldv__builtin_expect(tmp != 0, 0L); if (tmp___0 != 0L) { return (page->ldv_12090.first_page); } else { } return (page); } } __inline static int page_count(struct page *page ) { struct page *tmp ; int tmp___0 ; { tmp = compound_head(page); tmp___0 = atomic_read((atomic_t const *)(& tmp->_count)); return (tmp___0); } } __inline static void sg_assign_page(struct scatterlist *sg , struct page *page ) { unsigned long page_link ; long tmp ; long tmp___0 ; long tmp___1 ; { page_link = sg->page_link & 3UL; tmp = ldv__builtin_expect(((unsigned long )page & 3UL) != 0UL, 0L); if (tmp != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/scatterlist.h"), "i" (63), "i" (12UL)); ldv_17290: ; goto ldv_17290; } else { } tmp___0 = ldv__builtin_expect(sg->sg_magic != 2271560481UL, 0L); if (tmp___0 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/scatterlist.h"), "i" (65), "i" (12UL)); ldv_17291: ; goto ldv_17291; } else { } tmp___1 = ldv__builtin_expect((long )((int )sg->page_link) & 1L, 0L); if (tmp___1 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/scatterlist.h"), "i" (66), "i" (12UL)); ldv_17292: ; goto ldv_17292; } else { } sg->page_link = page_link | (unsigned long )page; return; } } __inline static void sg_set_page(struct scatterlist *sg , struct page *page , unsigned int len , unsigned int offset ) { { sg_assign_page(sg, page); sg->offset = offset; sg->length = len; return; } } extern void sg_init_table(struct scatterlist * , unsigned int ) ; extern long schedule_timeout(long ) ; extern void flush_signals(struct task_struct * ) ; extern void force_sig(int , struct task_struct * ) ; extern int sock_setsockopt(struct socket * , int , int , char * , unsigned int ) ; __inline static struct crypto_tfm *crypto_hash_tfm(struct crypto_hash *tfm ) { { return (& tfm->base); } } __inline static struct hash_tfm *crypto_hash_crt(struct crypto_hash *tfm ) { struct crypto_tfm *tmp ; { tmp = crypto_hash_tfm(tfm); return (& tmp->crt_u.hash); } } __inline static unsigned int crypto_hash_digestsize(struct crypto_hash *tfm ) { struct hash_tfm *tmp ; { tmp = crypto_hash_crt(tfm); return (tmp->digestsize); } } __inline static int crypto_hash_init(struct hash_desc *desc ) { struct hash_tfm *tmp ; int tmp___0 ; { tmp = crypto_hash_crt(desc->tfm); tmp___0 = (*(tmp->init))(desc); return (tmp___0); } } __inline static int crypto_hash_update(struct hash_desc *desc , struct scatterlist *sg , unsigned int nbytes ) { struct hash_tfm *tmp ; int tmp___0 ; { tmp = crypto_hash_crt(desc->tfm); tmp___0 = (*(tmp->update))(desc, sg, nbytes); return (tmp___0); } } __inline static int crypto_hash_final(struct hash_desc *desc , u8 *out ) { struct hash_tfm *tmp ; int tmp___0 ; { tmp = crypto_hash_crt(desc->tfm); tmp___0 = (*(tmp->final))(desc, out); return (tmp___0); } } extern void mempool_free(void * , mempool_t * ) ; __inline static unsigned int queue_max_segment_size(struct request_queue *q ) { { return (q->limits.max_segment_size); } } __inline static enum drbd_thread_state get_t_state(struct drbd_thread *thi ) { { __asm__ volatile ("": : : "memory"); return (thi->t_state); } } __inline static unsigned int mdev_to_minor(struct drbd_conf *mdev ) { { return (mdev->minor); } } __inline static int drbd_get_data_sock(struct drbd_conf *mdev ) { long tmp ; { ldv_mutex_lock_23(& mdev->data.mutex); tmp = ldv__builtin_expect((unsigned long )mdev->data.socket == (unsigned long )((struct socket *)0), 0L); if (tmp != 0L) { ldv_mutex_unlock_24(& mdev->data.mutex); return (0); } else { } return (1); } } __inline static void drbd_put_data_sock(struct drbd_conf *mdev ) { { ldv_mutex_unlock_25(& mdev->data.mutex); return; } } void drbd_force_state(struct drbd_conf *mdev , union drbd_state mask , union drbd_state val ) ; void _drbd_thread_stop(struct drbd_thread *thi , int restart , int wait ) ; void drbd_thread_current_set_cpu(struct drbd_conf *mdev ) ; int drbd_send_sync_uuid(struct drbd_conf *mdev , u64 val ) ; int _drbd_send_cmd(struct drbd_conf *mdev , struct socket *sock , enum drbd_packets cmd , struct p_header *h , size_t size , unsigned int msg_flags ) ; int drbd_send_cmd(struct drbd_conf *mdev , int use_data_socket , enum drbd_packets cmd , struct p_header *h , size_t size ) ; int drbd_send_ack(struct drbd_conf *mdev , enum drbd_packets cmd , struct drbd_epoch_entry *e ) ; int drbd_send_ack_ex(struct drbd_conf *mdev , enum drbd_packets cmd , sector_t sector , int blksize , u64 block_id ) ; int drbd_send_block(struct drbd_conf *mdev , enum drbd_packets cmd , struct drbd_epoch_entry *e ) ; int drbd_send_dblock(struct drbd_conf *mdev , struct drbd_request *req ) ; int drbd_send_drequest(struct drbd_conf *mdev , int cmd , sector_t sector , int size , u64 block_id ) ; int drbd_send_drequest_csum(struct drbd_conf *mdev , sector_t sector , int size , void *digest , int digest_size , enum drbd_packets cmd ) ; int drbd_send_ov_request(struct drbd_conf *mdev , sector_t sector , int size ) ; void drbd_mdev_cleanup(struct drbd_conf *mdev ) ; void drbd_md_sync(struct drbd_conf *mdev ) ; void drbd_uuid_set(struct drbd_conf *mdev , int idx , u64 val ) ; void _drbd_uuid_set(struct drbd_conf *mdev , int idx , u64 val ) ; void drbd_uuid_set_bm(struct drbd_conf *mdev , u64 val ) ; void drbd_queue_bitmap_io(struct drbd_conf *mdev , int (*io_fn)(struct drbd_conf * ) , void (*done)(struct drbd_conf * , int ) , char *why ) ; mempool_t *drbd_request_mempool ; rwlock_t global_state_lock ; int drbd_khelper(struct drbd_conf *mdev , char *cmd ) ; int drbd_worker(struct drbd_thread *thi ) ; int drbd_alter_sa(struct drbd_conf *mdev , int na ) ; void drbd_start_resync(struct drbd_conf *mdev , enum drbd_conns side ) ; void resume_next_sg(struct drbd_conf *mdev ) ; void suspend_other_sg(struct drbd_conf *mdev ) ; int drbd_resync_finished(struct drbd_conf *mdev ) ; void drbd_ov_oos_found(struct drbd_conf *mdev , sector_t sector , int size ) ; __inline static void ov_oos_print(struct drbd_conf *mdev ) { char const *tmp ; char const *tmp___0 ; { if (mdev->ov_last_oos_size != 0UL) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Out of sync: start=%llu, size=%lu (sectors)\n", tmp___0, tmp, (unsigned long long )mdev->ov_last_oos_start, mdev->ov_last_oos_size); } else { } mdev->ov_last_oos_size = 0UL; return; } } void drbd_csum_bio(struct drbd_conf *mdev , struct crypto_hash *tfm , struct bio *bio , void *digest ) ; void drbd_csum_ee(struct drbd_conf *mdev , struct crypto_hash *tfm , struct drbd_epoch_entry *e , void *digest ) ; int w_read_retry_remote(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) ; int w_e_end_data_req(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) ; int w_e_end_rsdata_req(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) ; int w_e_end_csum_rs_req(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) ; int w_e_end_ov_reply(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) ; int w_e_end_ov_req(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) ; int w_ov_finished(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) ; int w_resync_inactive(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) ; int w_io_error(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) ; int w_send_write_hint(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) ; int w_make_resync_request(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) ; int w_send_dblock(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) ; int w_send_barrier(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) ; int w_send_read_req(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) ; int w_prev_work_done(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) ; int w_e_reissue(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) ; void resync_timer_fn(unsigned long data ) ; int drbd_submit_ee(struct drbd_conf *mdev , struct drbd_epoch_entry *e , unsigned int const rw , int const fault_type ) ; struct drbd_epoch_entry *drbd_alloc_ee(struct drbd_conf *mdev , u64 id , sector_t sector , unsigned int data_size , gfp_t gfp_mask ) ; void drbd_free_ee(struct drbd_conf *mdev , struct drbd_epoch_entry *e ) ; __inline static int drbd_setsockopt(struct socket *sock , int level , int optname , char *optval , int optlen ) { int err ; { if (level == 1) { err = sock_setsockopt(sock, level, optname, optval, (unsigned int )optlen); } else { err = (*((sock->ops)->setsockopt))(sock, level, optname, optval, (unsigned int )optlen); } return (err); } } __inline static void drbd_tcp_cork(struct socket *sock ) { int val ; { val = 1; drbd_setsockopt(sock, 6, 3, (char *)(& val), 4); return; } } __inline static void drbd_tcp_uncork(struct socket *sock ) { int val ; { val = 0; drbd_setsockopt(sock, 6, 3, (char *)(& val), 4); return; } } void drbd_bump_write_ordering(struct drbd_conf *mdev , enum write_ordering_e wo ) ; void drbd_al_complete_io(struct drbd_conf *mdev , sector_t sector ) ; void drbd_rs_complete_io(struct drbd_conf *mdev , sector_t sector ) ; int drbd_try_rs_begin_io(struct drbd_conf *mdev , sector_t sector ) ; void drbd_rs_cancel_all(struct drbd_conf *mdev ) ; int drbd_rs_del_all(struct drbd_conf *mdev ) ; void drbd_rs_failed_io(struct drbd_conf *mdev , sector_t sector , int size ) ; void __drbd_set_in_sync(struct drbd_conf *mdev , sector_t sector , int size , char const *file , unsigned int const line ) ; void __drbd_set_out_of_sync(struct drbd_conf *mdev , sector_t sector , int size , char const *file , unsigned int const line ) ; __inline static struct page *page_chain_next(struct page *page ) { { return ((struct page *)page->ldv_12090.ldv_12087.private); } } __inline static int drbd_ee_has_active_page(struct drbd_epoch_entry *e ) { struct page *page ; int tmp ; struct page *tmp___0 ; { page = e->pages; goto ldv_42332; ldv_42331: tmp = page_count(page); if (tmp > 1) { return (1); } else { } page = page_chain_next(page); ldv_42332: ; if ((unsigned long )page != (unsigned long )((struct page *)0)) { tmp___0 = page_chain_next(page); __builtin_prefetch((void const *)tmp___0); if (1 != 0) { goto ldv_42331; } else { goto ldv_42333; } } else { } ldv_42333: ; return (0); } } __inline static void drbd_state_lock(struct drbd_conf *mdev ) { int tmp ; wait_queue_t __wait ; struct task_struct *tmp___0 ; int tmp___1 ; { tmp = test_and_set_bit(9, (unsigned long volatile *)(& mdev->flags)); if (tmp == 0) { goto ldv_42337; } else { } tmp___0 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___0; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_42340: prepare_to_wait(& mdev->misc_wait, & __wait, 2); tmp___1 = test_and_set_bit(9, (unsigned long volatile *)(& mdev->flags)); if (tmp___1 == 0) { goto ldv_42339; } else { } schedule(); goto ldv_42340; ldv_42339: finish_wait(& mdev->misc_wait, & __wait); ldv_42337: ; return; } } __inline static void drbd_state_unlock(struct drbd_conf *mdev ) { { clear_bit(9, (unsigned long volatile *)(& mdev->flags)); __wake_up(& mdev->misc_wait, 3U, 1, 0); return; } } __inline static void __drbd_chk_io_error____0(struct drbd_conf *mdev , int forcedetach , char const *where ) { char const *tmp ; char const *tmp___0 ; int tmp___1 ; union drbd_state __ns ; char const *tmp___2 ; char const *tmp___3 ; { switch ((mdev->ldev)->dc.on_io_error) { case 0: ; if (forcedetach == 0) { tmp___1 = __printk_ratelimit("__drbd_chk_io_error_"); if (tmp___1 != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Local IO failed in %s.Passing error on...\n", tmp___0, tmp, where); } else { } goto ldv_42363; } else { } case 2: ; case 1: ; if ((int )mdev->state.ldv_33381.disk > 2) { __ns.i = mdev->state.i; __ns.ldv_33381.disk = 2U; _drbd_set_state(mdev, __ns, CS_HARD, 0); tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Local IO failed in %s.Detaching...\n", tmp___3, tmp___2, where); } else { } goto ldv_42363; } ldv_42363: ; return; } } __inline static sector_t drbd_get_capacity(struct block_device *bdev ) { { return ((unsigned long )bdev != (unsigned long )((struct block_device *)0) ? (sector_t )((bdev->bd_inode)->i_size >> 9) : 0UL); } } __inline static void drbd_queue_work(struct drbd_work_queue *q , struct drbd_work *w ) { unsigned long flags ; raw_spinlock_t *tmp ; { tmp = spinlock_check(& q->q_lock); flags = _raw_spin_lock_irqsave(tmp); list_add_tail(& w->list, & q->q); up(& q->s); spin_unlock_irqrestore(& q->q_lock, flags); return; } } __inline static void wake_asender(struct drbd_conf *mdev ) { int tmp ; { tmp = constant_test_bit(1U, (unsigned long const volatile *)(& mdev->flags)); if (tmp != 0) { force_sig(24, mdev->asender.task); } else { } return; } } __inline static void request_ping(struct drbd_conf *mdev ) { { set_bit(2U, (unsigned long volatile *)(& mdev->flags)); wake_asender(mdev); return; } } __inline static int drbd_send_short_cmd(struct drbd_conf *mdev , enum drbd_packets cmd ) { struct p_header h ; int tmp ; { tmp = drbd_send_cmd(mdev, 1, cmd, & h, 8UL); return (tmp); } } __inline static void drbd_thread_stop(struct drbd_thread *thi ) { { _drbd_thread_stop(thi, 0, 1); return; } } __inline static void inc_rs_pending(struct drbd_conf *mdev ) { { atomic_inc(& mdev->rs_pending_cnt); return; } } __inline static void drbd_kick_lo(struct drbd_conf *mdev ) { struct request_queue *tmp ; int tmp___0 ; { tmp___0 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___0 != 0) { tmp = bdev_get_queue((mdev->ldev)->backing_bdev); drbd_blk_run_queue(tmp); put_ldev(mdev); } else { } return; } } void drbd_md_io_complete(struct bio *bio , int error ) ; void drbd_endio_sec(struct bio *bio , int error ) ; void drbd_endio_pri(struct bio *bio , int error ) ; __inline static void drbd_req_free(struct drbd_request *req ) { { mempool_free((void *)req, drbd_request_mempool); return; } } void __req_mod(struct drbd_request *req , enum drbd_req_event what , struct bio_and_error *m ) ; void complete_master_bio(struct drbd_conf *mdev , struct bio_and_error *m ) ; __inline static void _req_mod(struct drbd_request *req , enum drbd_req_event what ) { struct drbd_conf *mdev ; struct bio_and_error m ; { mdev = req->mdev; __req_mod(req, what, & m); if ((unsigned long )m.bio != (unsigned long )((struct bio *)0)) { complete_master_bio(mdev, & m); } else { } return; } } __inline static void req_mod(struct drbd_request *req , enum drbd_req_event what ) { struct drbd_conf *mdev ; struct bio_and_error m ; { mdev = req->mdev; spin_lock_irq(& mdev->req_lock); __req_mod(req, what, & m); spin_unlock_irq(& mdev->req_lock); if ((unsigned long )m.bio != (unsigned long )((struct bio *)0)) { complete_master_bio(mdev, & m); } else { } return; } } static int w_make_ov_request(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) ; void drbd_md_io_complete(struct bio *bio , int error ) { struct drbd_md_io *md_io ; { md_io = (struct drbd_md_io *)bio->bi_private; md_io->error = error; complete(& md_io->event); return; } } void drbd_endio_read_sec_final(struct drbd_epoch_entry *e ) { unsigned long flags ; struct drbd_conf *mdev ; char const *tmp ; char const *tmp___0 ; raw_spinlock_t *tmp___1 ; int tmp___2 ; int tmp___3 ; { flags = 0UL; mdev = e->mdev; if (e->block_id == 0ULL) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( e->block_id != ID_VACANT ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_worker.c.prepared", 131); } else { } tmp___1 = spinlock_check(& mdev->req_lock); flags = _raw_spin_lock_irqsave(tmp___1); mdev->read_cnt = mdev->read_cnt + (e->size >> 9); list_del(& e->w.list); tmp___2 = list_empty((struct list_head const *)(& mdev->read_ee)); if (tmp___2 != 0) { __wake_up(& mdev->ee_wait, 3U, 1, 0); } else { } tmp___3 = constant_test_bit(4U, (unsigned long const volatile *)(& e->flags)); if (tmp___3 != 0) { __drbd_chk_io_error____0(mdev, 0, "drbd_endio_read_sec_final"); } else { } spin_unlock_irqrestore(& mdev->req_lock, flags); drbd_queue_work(& mdev->data.work, & e->w); put_ldev(mdev); return; } } static int is_failed_barrier(int ee_flags ) { { return ((ee_flags & 28) == 20); } } static void drbd_endio_write_sec_final(struct drbd_epoch_entry *e ) { unsigned long flags ; struct drbd_conf *mdev ; sector_t e_sector ; int do_wake ; int is_syncer_req ; int do_al_complete_io ; raw_spinlock_t *tmp ; int tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; raw_spinlock_t *tmp___3 ; int tmp___4 ; int tmp___5 ; int tmp___6 ; { flags = 0UL; mdev = e->mdev; tmp___0 = is_failed_barrier((int )e->flags); if (tmp___0 != 0) { drbd_bump_write_ordering(mdev, WO_bdev_flush); tmp = spinlock_check(& mdev->req_lock); flags = _raw_spin_lock_irqsave(tmp); list_del(& e->w.list); e->flags = e->flags | 8UL; e->w.cb = & w_e_reissue; spin_unlock_irqrestore(& mdev->req_lock, flags); drbd_queue_work(& mdev->data.work, & e->w); return; } else { } if (e->block_id == 0ULL) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( e->block_id != ID_VACANT ) in %s:%d\n", tmp___2, tmp___1, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_worker.c.prepared", 178); } else { } e_sector = e->sector; do_al_complete_io = (int )e->flags & 1; is_syncer_req = e->block_id == 0xffffffffffffffffULL; tmp___3 = spinlock_check(& mdev->req_lock); flags = _raw_spin_lock_irqsave(tmp___3); mdev->writ_cnt = mdev->writ_cnt + (e->size >> 9); list_del(& e->w.list); list_add_tail(& e->w.list, & mdev->done_ee); if (is_syncer_req != 0) { tmp___4 = list_empty((struct list_head const *)(& mdev->sync_ee)); do_wake = tmp___4; } else { tmp___5 = list_empty((struct list_head const *)(& mdev->active_ee)); do_wake = tmp___5; } tmp___6 = constant_test_bit(4U, (unsigned long const volatile *)(& e->flags)); if (tmp___6 != 0) { __drbd_chk_io_error____0(mdev, 0, "drbd_endio_write_sec_final"); } else { } spin_unlock_irqrestore(& mdev->req_lock, flags); if (is_syncer_req != 0) { drbd_rs_complete_io(mdev, e_sector); } else { } if (do_wake != 0) { __wake_up(& mdev->ee_wait, 3U, 1, 0); } else { } if (do_al_complete_io != 0) { drbd_al_complete_io(mdev, e_sector); } else { } wake_asender(mdev); put_ldev(mdev); return; } } void drbd_endio_sec(struct bio *bio , int error ) { struct drbd_epoch_entry *e ; struct drbd_conf *mdev ; int uptodate ; int is_write ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; int tmp___3 ; { e = (struct drbd_epoch_entry *)bio->bi_private; mdev = e->mdev; uptodate = (int )bio->bi_flags & 1; is_write = (int )bio->bi_rw & 1; if (error != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: %s: error=%d s=%llus\n", tmp___0, tmp, is_write != 0 ? (char *)"write" : (char *)"read", error, (unsigned long long )e->sector); } else { } if (error == 0 && uptodate == 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: %s: setting error to -EIO s=%llus\n", tmp___2, tmp___1, is_write != 0 ? (char *)"write" : (char *)"read", (unsigned long long )e->sector); error = -5; } else { } if (error != 0) { set_bit(4U, (unsigned long volatile *)(& e->flags)); } else { } bio_put(bio); tmp___3 = atomic_dec_and_test(& e->pending_bios); if (tmp___3 != 0) { if (is_write != 0) { drbd_endio_write_sec_final(e); } else { drbd_endio_read_sec_final(e); } } else { } return; } } void drbd_endio_pri(struct bio *bio , int error ) { unsigned long flags ; struct drbd_request *req ; struct drbd_conf *mdev ; struct bio_and_error m ; enum drbd_req_event what ; int uptodate ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; long tmp___3 ; void *tmp___4 ; raw_spinlock_t *tmp___5 ; { req = (struct drbd_request *)bio->bi_private; mdev = req->mdev; uptodate = (int )bio->bi_flags & 1; if (error != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: p %s: error=%d\n", tmp___0, tmp, (int )bio->bi_rw & 1 ? (char *)"write" : (char *)"read", error); } else { } if (error == 0 && uptodate == 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: p %s: setting error to -EIO\n", tmp___2, tmp___1, (int )bio->bi_rw & 1 ? (char *)"write" : (char *)"read"); error = -5; } else { } tmp___3 = ldv__builtin_expect(error != 0, 0L); if (tmp___3 != 0L) { what = (int )bio->bi_rw & 1 ? write_completed_with_error : ((bio->bi_rw & 3UL) == 2UL ? read_completed_with_error : read_ahead_completed_with_error); } else { what = completed_ok; } bio_put(req->private_bio); tmp___4 = ERR_PTR((long )error); req->private_bio = (struct bio *)tmp___4; tmp___5 = spinlock_check(& mdev->req_lock); flags = _raw_spin_lock_irqsave(tmp___5); __req_mod(req, what, & m); spin_unlock_irqrestore(& mdev->req_lock, flags); if ((unsigned long )m.bio != (unsigned long )((struct bio *)0)) { complete_master_bio(mdev, & m); } else { } return; } } int w_io_error(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { struct drbd_request *req ; struct drbd_work const *__mptr ; { __mptr = (struct drbd_work const *)w; req = (struct drbd_request *)__mptr; drbd_req_free(req); return (1); } } int w_read_retry_remote(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { struct drbd_request *req ; struct drbd_work const *__mptr ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; { __mptr = (struct drbd_work const *)w; req = (struct drbd_request *)__mptr; spin_lock_irq(& mdev->req_lock); if ((cancel != 0 || (int )mdev->state.ldv_33381.conn <= 9) || (int )mdev->state.ldv_33381.pdsk <= 4) { _req_mod(req, send_canceled); spin_unlock_irq(& mdev->req_lock); tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: WE ARE LOST. Local IO failure, no peer.\n", tmp___0, tmp); return (1); } else { } spin_unlock_irq(& mdev->req_lock); tmp___1 = w_send_read_req(mdev, w, 0); return (tmp___1); } } int w_resync_inactive(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { int _b ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; { _b = cancel != 0; if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "w_resync_inactive", (char *)"cancel", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_worker.c.prepared", 337); } else { } if (_b != 0) { return (1); } else { } tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: resync inactive, but callback triggered??\n", tmp___2, tmp___1); return (1); } } void drbd_csum_ee(struct drbd_conf *mdev , struct crypto_hash *tfm , struct drbd_epoch_entry *e , void *digest ) { struct hash_desc desc ; struct scatterlist sg ; struct page *page ; struct page *tmp ; unsigned int len ; { page = e->pages; desc.tfm = tfm; desc.flags = 0U; sg_init_table(& sg, 1U); crypto_hash_init(& desc); goto ldv_42825; ldv_42824: sg_set_page(& sg, page, 4096U, 0U); crypto_hash_update(& desc, & sg, sg.length); page = tmp; ldv_42825: tmp = page_chain_next(page); if ((unsigned long )tmp != (unsigned long )((struct page *)0)) { goto ldv_42824; } else { } len = e->size & 4095U; sg_set_page(& sg, page, len != 0U ? len : 4096U, 0U); crypto_hash_update(& desc, & sg, sg.length); crypto_hash_final(& desc, (u8 *)digest); return; } } void drbd_csum_bio(struct drbd_conf *mdev , struct crypto_hash *tfm , struct bio *bio , void *digest ) { struct hash_desc desc ; struct scatterlist sg ; struct bio_vec *bvec ; int i ; { desc.tfm = tfm; desc.flags = 0U; sg_init_table(& sg, 1U); crypto_hash_init(& desc); bvec = bio->bi_io_vec; i = 0; goto ldv_42838; ldv_42837: sg_set_page(& sg, bvec->bv_page, bvec->bv_len, bvec->bv_offset); crypto_hash_update(& desc, & sg, sg.length); bvec = bvec + 1; i = i + 1; ldv_42838: ; if ((int )bio->bi_vcnt > i) { goto ldv_42837; } else { } crypto_hash_final(& desc, (u8 *)digest); return; } } static int w_e_send_csum(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { struct drbd_epoch_entry *e ; struct drbd_work const *__mptr ; int digest_size ; void *digest ; int ok ; char const *tmp ; char const *tmp___0 ; long tmp___1 ; unsigned int tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; long tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; long tmp___8 ; { __mptr = (struct drbd_work const *)w; e = (struct drbd_epoch_entry *)__mptr; if (e->block_id != 2205466966ULL) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( e->block_id == DRBD_MAGIC + 0xbeef ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_worker.c.prepared", 396); } else { } tmp___1 = ldv__builtin_expect(cancel != 0, 0L); if (tmp___1 != 0L) { drbd_free_ee(mdev, e); return (1); } else { } tmp___5 = ldv__builtin_expect((e->flags & 16UL) == 0UL, 1L); if (tmp___5 != 0L) { tmp___2 = crypto_hash_digestsize(mdev->csums_tfm); digest_size = (int )tmp___2; digest = kmalloc___0((size_t )digest_size, 16U); if ((unsigned long )digest != (unsigned long )((void *)0)) { drbd_csum_ee(mdev, mdev->csums_tfm, e, digest); inc_rs_pending(mdev); ok = drbd_send_drequest_csum(mdev, e->sector, (int )e->size, digest, digest_size, P_CSUM_RS_REQUEST); kfree((void const *)digest); } else { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: kmalloc() of digest failed.\n", tmp___4, tmp___3); ok = 0; } } else { ok = 1; } drbd_free_ee(mdev, e); tmp___8 = ldv__builtin_expect(ok == 0, 0L); if (tmp___8 != 0L) { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: drbd_send_drequest(..., csum) failed\n", tmp___7, tmp___6); } else { } return (ok); } } static int read_for_csum(struct drbd_conf *mdev , sector_t sector , int size ) { struct drbd_epoch_entry *e ; int tmp ; int tmp___0 ; { tmp = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp == 0) { return (0); } else { } e = drbd_alloc_ee(mdev, 2205466966ULL, sector, (unsigned int )size, 514U); if ((unsigned long )e == (unsigned long )((struct drbd_epoch_entry *)0)) { goto fail; } else { } spin_lock_irq(& mdev->req_lock); list_add(& e->w.list, & mdev->read_ee); spin_unlock_irq(& mdev->req_lock); e->w.cb = & w_e_send_csum; tmp___0 = drbd_submit_ee(mdev, e, 0U, 3); if (tmp___0 == 0) { return (1); } else { } drbd_free_ee(mdev, e); fail: put_ldev(mdev); return (2); } } void resync_timer_fn(unsigned long data ) { unsigned long flags ; struct drbd_conf *mdev ; int queue ; raw_spinlock_t *tmp ; int tmp___0 ; long tmp___1 ; int tmp___2 ; { mdev = (struct drbd_conf *)data; tmp = spinlock_check(& mdev->req_lock); flags = _raw_spin_lock_irqsave(tmp); tmp___0 = test_and_clear_bit(3, (unsigned long volatile *)(& mdev->flags)); tmp___1 = ldv__builtin_expect(tmp___0 == 0, 1L); if (tmp___1 != 0L) { queue = 1; if ((unsigned int )*((unsigned short *)mdev + 994UL) == 288U) { mdev->resync_work.cb = & w_make_ov_request; } else { mdev->resync_work.cb = & w_make_resync_request; } } else { queue = 0; mdev->resync_work.cb = & w_resync_inactive; } spin_unlock_irqrestore(& mdev->req_lock, flags); tmp___2 = list_empty((struct list_head const *)(& mdev->resync_work.list)); if (tmp___2 != 0 && queue != 0) { drbd_queue_work(& mdev->data.work, & mdev->resync_work); } else { } return; } } static int calc_resync_rate(struct drbd_conf *mdev ) { int d ; int td ; int hd ; int cr ; { d = mdev->data_delay / 1000; td = mdev->sync_conf.throttle_th * 100; hd = mdev->sync_conf.hold_off_th * 100; cr = mdev->sync_conf.rate; return (d > td ? (d < hd ? ((td - d) * cr) / (hd - td) + cr : 0) : cr); } } int w_make_resync_request(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { unsigned long bit ; sector_t sector ; sector_t capacity ; sector_t tmp ; int max_segment_size ; int number ; int i ; int size ; int pe ; int mx ; int align ; int queued ; int sndbuf ; long tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; long tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; int tmp___9 ; unsigned int tmp___10 ; int tmp___11 ; int tmp___12 ; long tmp___13 ; int tmp___14 ; int tmp___15 ; char const *tmp___16 ; char const *tmp___17 ; int tmp___18 ; char const *tmp___19 ; char const *tmp___20 ; int tmp___21 ; int tmp___22 ; unsigned long tmp___23 ; { tmp = drbd_get_capacity(mdev->this_bdev); capacity = tmp; tmp___0 = ldv__builtin_expect(cancel != 0, 0L); if (tmp___0 != 0L) { return (1); } else { } tmp___3 = ldv__builtin_expect((int )mdev->state.ldv_33381.conn <= 9, 0L); if (tmp___3 != 0L) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Confused in w_make_resync_request()! cstate < Connected", tmp___2, tmp___1); return (0); } else { } if ((unsigned int )*((unsigned short *)mdev + 994UL) != 272U) { tmp___4 = drbd_conn_str((enum drbd_conns )mdev->state.ldv_33381.conn); tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s in w_make_resync_request\n", tmp___6, tmp___5, tmp___4); } else { } tmp___9 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___9 == 0) { tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Disk broke down during resync!\n", tmp___8, tmp___7); mdev->resync_work.cb = & w_resync_inactive; return (1); } else { } if (mdev->agreed_pro_version <= 93) { tmp___10 = queue_max_segment_size(mdev->rq_queue); max_segment_size = (int )tmp___10; } else { max_segment_size = 32768; } mdev->c_sync_rate = calc_resync_rate(mdev); number = (mdev->c_sync_rate * 25) / 1000; pe = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); ldv_mutex_lock_26(& mdev->data.mutex); if ((unsigned long )mdev->data.socket != (unsigned long )((struct socket *)0)) { mx = (int )((unsigned long )((mdev->data.socket)->sk)->sk_rcvbuf / 32UL); } else { mx = 1; } ldv_mutex_unlock_27(& mdev->data.mutex); if (number > mx) { mx = number; } else { } if (pe + number > mx) { number = mx - pe; } else { } i = 0; goto ldv_42902; ldv_42901: ldv_mutex_lock_28(& mdev->data.mutex); if ((unsigned long )mdev->data.socket != (unsigned long )((struct socket *)0)) { queued = ((mdev->data.socket)->sk)->sk_wmem_queued; sndbuf = ((mdev->data.socket)->sk)->sk_sndbuf; } else { queued = 1; sndbuf = 0; } ldv_mutex_unlock_29(& mdev->data.mutex); if (sndbuf / 2 < queued) { goto requeue; } else { } next_sector: size = 4096; bit = drbd_bm_find_next(mdev, mdev->bm_resync_fo); if (bit == 0xffffffffffffffffUL) { mdev->bm_resync_fo = drbd_bm_bits(mdev); mdev->resync_work.cb = & w_resync_inactive; put_ldev(mdev); return (1); } else { } sector = bit << 3; tmp___11 = drbd_try_rs_begin_io(mdev, sector); if (tmp___11 != 0) { mdev->bm_resync_fo = bit; goto requeue; } else { } mdev->bm_resync_fo = bit + 1UL; tmp___12 = drbd_bm_test_bit(mdev, bit); tmp___13 = ldv__builtin_expect(tmp___12 == 0, 0L); if (tmp___13 != 0L) { drbd_rs_complete_io(mdev, sector); goto next_sector; } else { } align = 1; ldv_42894: ; if (size + 4096 > max_segment_size) { goto ldv_42893; } else { } if (((sector_t )((1 << (align + 3)) + -1) & sector) != 0UL) { goto ldv_42893; } else { } if (((bit + 1UL) & 4095UL) == 0UL) { goto ldv_42893; } else { } tmp___14 = drbd_bm_test_bit(mdev, bit + 1UL); if (tmp___14 != 1) { goto ldv_42893; } else { } bit = bit + 1UL; size = size + 4096; if (4096 << align <= size) { align = align + 1; } else { } i = i + 1; goto ldv_42894; ldv_42893: ; if (size > 4096) { mdev->bm_resync_fo = bit + 1UL; } else { } if ((sector_t )(size >> 9) + sector > capacity) { size = (int )((capacity - sector) << 9); } else { } if (mdev->agreed_pro_version > 88 && (unsigned long )mdev->csums_tfm != (unsigned long )((struct crypto_hash *)0)) { tmp___15 = read_for_csum(mdev, sector, size); switch (tmp___15) { case 0: put_ldev(mdev); return (0); case 2: drbd_rs_complete_io(mdev, sector); mdev->bm_resync_fo = sector >> 3; goto requeue; } } else { inc_rs_pending(mdev); tmp___22 = drbd_send_drequest(mdev, 9, sector, size, 0xffffffffffffffffULL); if (tmp___22 == 0) { tmp___16 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___17 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: drbd_send_drequest() failed, aborting...\n", tmp___17, tmp___16); atomic_dec(& mdev->rs_pending_cnt); tmp___21 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); if (tmp___21 < 0) { tmp___18 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); tmp___19 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___20 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: rs_pending_cnt = %d < 0 !\n", tmp___20, tmp___19, "w_make_resync_request", 650, tmp___18); } else { } put_ldev(mdev); return (0); } else { } } i = i + 1; ldv_42902: ; if (i < number) { goto ldv_42901; } else { } tmp___23 = drbd_bm_bits(mdev); if (mdev->bm_resync_fo >= tmp___23) { mdev->resync_work.cb = & w_resync_inactive; put_ldev(mdev); return (1); } else { } requeue: mod_timer(& mdev->resync_timer, (unsigned long )jiffies + 25UL); put_ldev(mdev); return (1); } } static int w_make_ov_request(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { int number ; int i ; int size ; sector_t sector ; sector_t capacity ; sector_t tmp ; long tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; long tmp___3 ; int tmp___4 ; int tmp___5 ; int tmp___6 ; int tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; int tmp___10 ; int tmp___11 ; { tmp = drbd_get_capacity(mdev->this_bdev); capacity = tmp; tmp___0 = ldv__builtin_expect(cancel != 0, 0L); if (tmp___0 != 0L) { return (1); } else { } tmp___3 = ldv__builtin_expect((int )mdev->state.ldv_33381.conn <= 9, 0L); if (tmp___3 != 0L) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Confused in w_make_ov_request()! cstate < Connected", tmp___2, tmp___1); return (0); } else { } number = (mdev->sync_conf.rate * 25) / 1000; tmp___4 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); if (tmp___4 > number) { goto requeue; } else { } tmp___5 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); number = number - tmp___5; sector = mdev->ov_position; i = 0; goto ldv_42920; ldv_42919: ; if (sector >= capacity) { mdev->resync_work.cb = & w_resync_inactive; return (1); } else { } size = 4096; tmp___6 = drbd_try_rs_begin_io(mdev, sector); if (tmp___6 != 0) { mdev->ov_position = sector; goto requeue; } else { } if ((sector_t )(size >> 9) + sector > capacity) { size = (int )((capacity - sector) << 9); } else { } inc_rs_pending(mdev); tmp___11 = drbd_send_ov_request(mdev, sector, size); if (tmp___11 == 0) { atomic_dec(& mdev->rs_pending_cnt); tmp___10 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); if (tmp___10 < 0) { tmp___7 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: rs_pending_cnt = %d < 0 !\n", tmp___9, tmp___8, "w_make_ov_request", 714, tmp___7); } else { } return (0); } else { } sector = sector + 8UL; i = i + 1; ldv_42920: ; if (i < number) { goto ldv_42919; } else { } mdev->ov_position = sector; requeue: mod_timer(& mdev->resync_timer, (unsigned long )jiffies + 25UL); return (1); } } int w_ov_finished(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { { kfree((void const *)w); ov_oos_print(mdev); drbd_resync_finished(mdev); return (1); } } static int w_resync_finished(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { { kfree((void const *)w); drbd_resync_finished(mdev); return (1); } } int drbd_resync_finished(struct drbd_conf *mdev ) { unsigned long db ; unsigned long dt ; unsigned long dbdt ; unsigned long n_oos ; union drbd_state os ; union drbd_state ns ; struct drbd_work *w ; char *khelper_cmd ; struct task_struct *tmp ; void *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; int tmp___3 ; int tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; unsigned long s ; unsigned long t ; int ratio ; char const *tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; char const *tmp___14 ; int i ; char const *tmp___15 ; char const *tmp___16 ; int i___0 ; char const *tmp___17 ; char const *tmp___18 ; int tmp___19 ; { khelper_cmd = 0; tmp___3 = drbd_rs_del_all(mdev); if (tmp___3 != 0) { drbd_kick_lo(mdev); tmp = get_current(); tmp->state = 1L; schedule_timeout(25L); tmp___0 = kmalloc___0(24UL, 32U); w = (struct drbd_work *)tmp___0; if ((unsigned long )w != (unsigned long )((struct drbd_work *)0)) { w->cb = & w_resync_finished; drbd_queue_work(& mdev->data.work, w); return (1); } else { } tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Warn failed to drbd_rs_del_all() and to kmalloc(w).\n", tmp___2, tmp___1); } else { } dt = (((unsigned long )jiffies - mdev->rs_start) - mdev->rs_paused) / 250UL; if (dt == 0UL) { dt = 1UL; } else { } db = mdev->rs_total; dbdt = db / dt << 2; mdev->rs_paused = mdev->rs_paused / 250UL; tmp___4 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___4 == 0) { goto out; } else { } spin_lock_irq(& mdev->req_lock); os = mdev->state; if ((int )os.ldv_33381.conn <= 10) { goto out_unlock; } else { } ns = os; ns.ldv_33381.conn = 10U; tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: %s done (total %lu sec; paused %lu sec; %lu K/sec)\n", tmp___6, tmp___5, (unsigned int )*((unsigned short *)(& os) + 0UL) == 288U || (unsigned int )*((unsigned short *)(& os) + 0UL) == 304U ? (char *)"Online verify " : (char *)"Resync", mdev->rs_paused + dt, mdev->rs_paused, dbdt); n_oos = drbd_bm_total_weight(mdev); if ((unsigned int )*((unsigned short *)(& os) + 0UL) == 288U || (unsigned int )*((unsigned short *)(& os) + 0UL) == 304U) { if (n_oos != 0UL) { tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: Online verify found %lu %dk block out of sync!\n", tmp___8, tmp___7, n_oos, 4); khelper_cmd = (char *)"out-of-sync"; } else { if (mdev->rs_failed != n_oos) { tmp___9 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___10 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( (n_oos - mdev->rs_failed) == 0 ) in %s:%d\n", tmp___10, tmp___9, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_worker.c.prepared", 809); } else { } if ((unsigned int )*((unsigned short *)(& os) + 0UL) == 272U || (unsigned int )*((unsigned short *)(& os) + 0UL) == 336U) { khelper_cmd = (char *)"after-resync-target"; } else { } if ((unsigned long )mdev->csums_tfm != (unsigned long )((struct crypto_hash *)0) && mdev->rs_total != 0UL) { s = mdev->rs_same_csum; t = mdev->rs_total; ratio = t != 0UL ? (t <= 99999UL ? (int const )((s * 100UL) / t) : (int const )(s / (t / 100UL))) : 0; tmp___11 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___12 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: %u %% had equal check sums, eliminated: %luK; transferred %luK total %luK\n", tmp___12, tmp___11, ratio, mdev->rs_same_csum << 2, (mdev->rs_total - mdev->rs_same_csum) << 2, mdev->rs_total << 2); } else { } } } else { } if (mdev->rs_failed != 0UL) { tmp___13 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___14 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: %lu failed blocks\n", tmp___14, tmp___13, mdev->rs_failed); if ((unsigned int )*((unsigned short *)(& os) + 0UL) == 272U || (unsigned int )*((unsigned short *)(& os) + 0UL) == 336U) { ns.ldv_33381.disk = 4U; ns.ldv_33381.pdsk = 8U; } else { ns.ldv_33381.disk = 8U; ns.ldv_33381.pdsk = 4U; } } else { ns.ldv_33381.disk = 8U; ns.ldv_33381.pdsk = 8U; if ((unsigned int )*((unsigned short *)(& os) + 0UL) == 272U || (unsigned int )*((unsigned short *)(& os) + 0UL) == 336U) { if ((unsigned long )mdev->p_uuid != (unsigned long )((u64 *)0)) { i = 1; goto ldv_42950; ldv_42949: _drbd_uuid_set(mdev, i, *(mdev->p_uuid + (unsigned long )i)); i = i + 1; ldv_42950: ; if (i <= 3) { goto ldv_42949; } else { } drbd_uuid_set(mdev, 1, (mdev->ldev)->md.uuid[0]); _drbd_uuid_set(mdev, 0, *(mdev->p_uuid)); } else { tmp___15 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___16 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: mdev->p_uuid is NULL! BUG\n", tmp___16, tmp___15); } } else { } drbd_uuid_set_bm(mdev, 0ULL); if ((unsigned long )mdev->p_uuid != (unsigned long )((u64 *)0)) { i___0 = 0; goto ldv_42954; ldv_42953: *(mdev->p_uuid + (unsigned long )i___0) = (mdev->ldev)->md.uuid[i___0]; i___0 = i___0 + 1; ldv_42954: ; if (i___0 <= 3) { goto ldv_42953; } else { } } else { } } _drbd_set_state(mdev, ns, CS_VERBOSE, 0); out_unlock: spin_unlock_irq(& mdev->req_lock); put_ldev(mdev); out: mdev->rs_total = 0UL; mdev->rs_failed = 0UL; mdev->rs_paused = 0UL; mdev->ov_start_sector = 0UL; tmp___19 = test_and_clear_bit(13, (unsigned long volatile *)(& mdev->flags)); if (tmp___19 != 0) { tmp___17 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___18 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Writing the whole bitmap, due to failed kmalloc\n", tmp___18, tmp___17); drbd_queue_bitmap_io(mdev, & drbd_bm_write, 0, (char *)"write from resync_finished"); } else { } if ((unsigned long )khelper_cmd != (unsigned long )((char *)0)) { drbd_khelper(mdev, khelper_cmd); } else { } return (1); } } static void move_to_net_ee_or_free(struct drbd_conf *mdev , struct drbd_epoch_entry *e ) { int tmp ; { tmp = drbd_ee_has_active_page(e); if (tmp != 0) { spin_lock_irq(& mdev->req_lock); list_add_tail(& e->w.list, & mdev->net_ee); spin_unlock_irq(& mdev->req_lock); } else { drbd_free_ee(mdev, e); } return; } } int w_e_end_data_req(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { struct drbd_epoch_entry *e ; struct drbd_work const *__mptr ; int ok ; int tmp ; char const *tmp___0 ; char const *tmp___1 ; int tmp___2 ; long tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; int tmp___6 ; long tmp___7 ; int tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; int tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; long tmp___14 ; { __mptr = (struct drbd_work const *)w; e = (struct drbd_epoch_entry *)__mptr; tmp___3 = ldv__builtin_expect(cancel != 0, 0L); if (tmp___3 != 0L) { drbd_free_ee(mdev, e); atomic_dec(& mdev->unacked_cnt); tmp___2 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); if (tmp___2 < 0) { tmp = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: unacked_cnt = %d < 0 !\n", tmp___1, tmp___0, "w_e_end_data_req", 912, tmp); } else { } return (1); } else { } tmp___7 = ldv__builtin_expect((e->flags & 16UL) == 0UL, 1L); if (tmp___7 != 0L) { ok = drbd_send_block(mdev, P_DATA_REPLY, e); } else { tmp___6 = ___ratelimit(& drbd_ratelimit_state, "w_e_end_data_req"); if (tmp___6 != 0) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Sending NegDReply. sector=%llus.\n", tmp___5, tmp___4, (unsigned long long )e->sector); } else { } ok = drbd_send_ack(mdev, P_NEG_DREPLY, e); } atomic_dec(& mdev->unacked_cnt); tmp___11 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); if (tmp___11 < 0) { tmp___8 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); tmp___9 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___10 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: unacked_cnt = %d < 0 !\n", tmp___10, tmp___9, "w_e_end_data_req", 926, tmp___8); } else { } move_to_net_ee_or_free(mdev, e); tmp___14 = ldv__builtin_expect(ok == 0, 0L); if (tmp___14 != 0L) { tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: drbd_send_block() failed\n", tmp___13, tmp___12); } else { } return (ok); } } int w_e_end_rsdata_req(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { struct drbd_epoch_entry *e ; struct drbd_work const *__mptr ; int ok ; int tmp ; char const *tmp___0 ; char const *tmp___1 ; int tmp___2 ; long tmp___3 ; int tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; int tmp___7 ; long tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; int tmp___11 ; long tmp___12 ; int tmp___13 ; char const *tmp___14 ; char const *tmp___15 ; int tmp___16 ; char const *tmp___17 ; char const *tmp___18 ; long tmp___19 ; { __mptr = (struct drbd_work const *)w; e = (struct drbd_epoch_entry *)__mptr; tmp___3 = ldv__builtin_expect(cancel != 0, 0L); if (tmp___3 != 0L) { drbd_free_ee(mdev, e); atomic_dec(& mdev->unacked_cnt); tmp___2 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); if (tmp___2 < 0) { tmp = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: unacked_cnt = %d < 0 !\n", tmp___1, tmp___0, "w_e_end_rsdata_req", 948, tmp); } else { } return (1); } else { } tmp___4 = _get_ldev_if_state(mdev, D_FAILED); if (tmp___4 != 0) { drbd_rs_complete_io(mdev, e->sector); put_ldev(mdev); } else { } tmp___12 = ldv__builtin_expect((e->flags & 16UL) == 0UL, 1L); if (tmp___12 != 0L) { tmp___8 = ldv__builtin_expect((int )mdev->state.ldv_33381.pdsk > 3, 1L); if (tmp___8 != 0L) { inc_rs_pending(mdev); ok = drbd_send_block(mdev, P_RS_DATA_REPLY, e); } else { tmp___7 = ___ratelimit(& drbd_ratelimit_state, "w_e_end_rsdata_req"); if (tmp___7 != 0) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Not sending RSDataReply, partner DISKLESS!\n", tmp___6, tmp___5); } else { } ok = 1; } } else { tmp___11 = ___ratelimit(& drbd_ratelimit_state, "w_e_end_rsdata_req"); if (tmp___11 != 0) { tmp___9 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___10 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Sending NegRSDReply. sector %llus.\n", tmp___10, tmp___9, (unsigned long long )e->sector); } else { } ok = drbd_send_ack(mdev, P_NEG_RS_DREPLY, e); drbd_rs_failed_io(mdev, e->sector, (int )e->size); } atomic_dec(& mdev->unacked_cnt); tmp___16 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); if (tmp___16 < 0) { tmp___13 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); tmp___14 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___15 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: unacked_cnt = %d < 0 !\n", tmp___15, tmp___14, "w_e_end_rsdata_req", 978, tmp___13); } else { } move_to_net_ee_or_free(mdev, e); tmp___19 = ldv__builtin_expect(ok == 0, 0L); if (tmp___19 != 0L) { tmp___17 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___18 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: drbd_send_block() failed\n", tmp___18, tmp___17); } else { } return (ok); } } int w_e_end_csum_rs_req(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { struct drbd_epoch_entry *e ; struct drbd_work const *__mptr ; struct digest_info *di ; int digest_size ; void *digest ; int ok ; int eq ; int tmp ; char const *tmp___0 ; char const *tmp___1 ; int tmp___2 ; long tmp___3 ; unsigned int tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; int tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; int tmp___10 ; long tmp___11 ; int tmp___12 ; char const *tmp___13 ; char const *tmp___14 ; int tmp___15 ; char const *tmp___16 ; char const *tmp___17 ; long tmp___18 ; { __mptr = (struct drbd_work const *)w; e = (struct drbd_epoch_entry *)__mptr; digest = 0; eq = 0; tmp___3 = ldv__builtin_expect(cancel != 0, 0L); if (tmp___3 != 0L) { drbd_free_ee(mdev, e); atomic_dec(& mdev->unacked_cnt); tmp___2 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); if (tmp___2 < 0) { tmp = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: unacked_cnt = %d < 0 !\n", tmp___1, tmp___0, "w_e_end_csum_rs_req", 997, tmp); } else { } return (1); } else { } drbd_rs_complete_io(mdev, e->sector); di = (struct digest_info *)e->block_id; tmp___11 = ldv__builtin_expect((e->flags & 16UL) == 0UL, 1L); if (tmp___11 != 0L) { if ((unsigned long )mdev->csums_tfm != (unsigned long )((struct crypto_hash *)0)) { tmp___4 = crypto_hash_digestsize(mdev->csums_tfm); digest_size = (int )tmp___4; if (di->digest_size != digest_size) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( digest_size == di->digest_size ) in %s:%d\n", tmp___6, tmp___5, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_worker.c.prepared", 1011); } else { } digest = kmalloc___0((size_t )digest_size, 16U); } else { } if ((unsigned long )digest != (unsigned long )((void *)0)) { drbd_csum_ee(mdev, mdev->csums_tfm, e, digest); tmp___7 = memcmp((void const *)digest, (void const *)di->digest, (size_t )digest_size); eq = tmp___7 == 0; kfree((void const *)digest); } else { } if (eq != 0) { __drbd_set_in_sync(mdev, e->sector, (int )e->size, "/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_worker.c.prepared", 1021U); mdev->rs_same_csum = mdev->rs_same_csum + (unsigned long )(e->size >> 12); ok = drbd_send_ack(mdev, P_RS_IS_IN_SYNC, e); } else { inc_rs_pending(mdev); e->block_id = 0xffffffffffffffffULL; ok = drbd_send_block(mdev, P_RS_DATA_REPLY, e); } } else { ok = drbd_send_ack(mdev, P_NEG_RS_DREPLY, e); tmp___10 = ___ratelimit(& drbd_ratelimit_state, "w_e_end_csum_rs_req"); if (tmp___10 != 0) { tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Sending NegDReply. I guess it gets messy.\n", tmp___9, tmp___8); } else { } } atomic_dec(& mdev->unacked_cnt); tmp___15 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); if (tmp___15 < 0) { tmp___12 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); tmp___13 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___14 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: unacked_cnt = %d < 0 !\n", tmp___14, tmp___13, "w_e_end_csum_rs_req", 1036, tmp___12); } else { } kfree((void const *)di); move_to_net_ee_or_free(mdev, e); tmp___18 = ldv__builtin_expect(ok == 0, 0L); if (tmp___18 != 0L) { tmp___16 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___17 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: drbd_send_block/ack() failed\n", tmp___17, tmp___16); } else { } return (ok); } } int w_e_end_ov_req(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { struct drbd_epoch_entry *e ; struct drbd_work const *__mptr ; int digest_size ; void *digest ; int ok ; long tmp ; long tmp___0 ; unsigned int tmp___1 ; int tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; int tmp___5 ; int tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; int tmp___9 ; { __mptr = (struct drbd_work const *)w; e = (struct drbd_epoch_entry *)__mptr; ok = 1; tmp = ldv__builtin_expect(cancel != 0, 0L); if (tmp != 0L) { goto out; } else { } tmp___0 = ldv__builtin_expect((e->flags & 16UL) != 0UL, 0L); if (tmp___0 != 0L) { goto out; } else { } tmp___1 = crypto_hash_digestsize(mdev->verify_tfm); digest_size = (int )tmp___1; digest = kmalloc___0((size_t )digest_size, 16U); if ((unsigned long )digest != (unsigned long )((void *)0)) { drbd_csum_ee(mdev, mdev->verify_tfm, e, digest); inc_rs_pending(mdev); ok = drbd_send_drequest_csum(mdev, e->sector, (int )e->size, digest, digest_size, P_OV_REPLY); if (ok == 0) { atomic_dec(& mdev->rs_pending_cnt); tmp___5 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); if (tmp___5 < 0) { tmp___2 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: rs_pending_cnt = %d < 0 !\n", tmp___4, tmp___3, "w_e_end_ov_req", 1069, tmp___2); } else { } } else { } kfree((void const *)digest); } else { } out: drbd_free_ee(mdev, e); atomic_dec(& mdev->unacked_cnt); tmp___9 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); if (tmp___9 < 0) { tmp___6 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: unacked_cnt = %d < 0 !\n", tmp___8, tmp___7, "w_e_end_ov_req", 1076, tmp___6); } else { } return (ok); } } void drbd_ov_oos_found(struct drbd_conf *mdev , sector_t sector , int size ) { { if (mdev->ov_last_oos_start + mdev->ov_last_oos_size == sector) { mdev->ov_last_oos_size = mdev->ov_last_oos_size + (sector_t )(size >> 9); } else { mdev->ov_last_oos_start = sector; mdev->ov_last_oos_size = (sector_t )(size >> 9); } __drbd_set_out_of_sync(mdev, sector, size, "/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_worker.c.prepared", 1089U); set_bit(13U, (unsigned long volatile *)(& mdev->flags)); return; } } int w_e_end_ov_reply(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { struct drbd_epoch_entry *e ; struct drbd_work const *__mptr ; struct digest_info *di ; int digest_size ; void *digest ; int ok ; int eq ; int tmp ; char const *tmp___0 ; char const *tmp___1 ; int tmp___2 ; long tmp___3 ; unsigned int tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; int tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; int tmp___10 ; long tmp___11 ; int tmp___12 ; char const *tmp___13 ; char const *tmp___14 ; int tmp___15 ; { __mptr = (struct drbd_work const *)w; e = (struct drbd_epoch_entry *)__mptr; eq = 0; tmp___3 = ldv__builtin_expect(cancel != 0, 0L); if (tmp___3 != 0L) { drbd_free_ee(mdev, e); atomic_dec(& mdev->unacked_cnt); tmp___2 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); if (tmp___2 < 0) { tmp = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: unacked_cnt = %d < 0 !\n", tmp___1, tmp___0, "w_e_end_ov_reply", 1103, tmp); } else { } return (1); } else { } drbd_rs_complete_io(mdev, e->sector); di = (struct digest_info *)e->block_id; tmp___11 = ldv__builtin_expect((e->flags & 16UL) == 0UL, 1L); if (tmp___11 != 0L) { tmp___4 = crypto_hash_digestsize(mdev->verify_tfm); digest_size = (int )tmp___4; digest = kmalloc___0((size_t )digest_size, 16U); if ((unsigned long )digest != (unsigned long )((void *)0)) { drbd_csum_ee(mdev, mdev->verify_tfm, e, digest); if (di->digest_size != digest_size) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( digest_size == di->digest_size ) in %s:%d\n", tmp___6, tmp___5, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_worker.c.prepared", 1119); } else { } tmp___7 = memcmp((void const *)digest, (void const *)di->digest, (size_t )digest_size); eq = tmp___7 == 0; kfree((void const *)digest); } else { } } else { ok = drbd_send_ack(mdev, P_NEG_RS_DREPLY, e); tmp___10 = ___ratelimit(& drbd_ratelimit_state, "w_e_end_ov_reply"); if (tmp___10 != 0) { tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Sending NegDReply. I guess it gets messy.\n", tmp___9, tmp___8); } else { } } atomic_dec(& mdev->unacked_cnt); tmp___15 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); if (tmp___15 < 0) { tmp___12 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); tmp___13 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___14 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: unacked_cnt = %d < 0 !\n", tmp___14, tmp___13, "w_e_end_ov_reply", 1129, tmp___12); } else { } kfree((void const *)di); if (eq == 0) { drbd_ov_oos_found(mdev, e->sector, (int )e->size); } else { ov_oos_print(mdev); } ok = drbd_send_ack_ex(mdev, P_OV_RESULT, e->sector, (int )e->size, eq != 0 ? 4711ULL : 4712ULL); drbd_free_ee(mdev, e); mdev->ov_left = mdev->ov_left - 1UL; if (mdev->ov_left == 0UL) { ov_oos_print(mdev); drbd_resync_finished(mdev); } else { } return (ok); } } int w_prev_work_done(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { struct drbd_wq_barrier *b ; struct drbd_work const *__mptr ; { __mptr = (struct drbd_work const *)w; b = (struct drbd_wq_barrier *)__mptr; complete(& b->done); return (1); } } int w_send_barrier(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { struct drbd_tl_epoch *b ; struct drbd_work const *__mptr ; struct p_barrier *p ; int ok ; int tmp ; { __mptr = (struct drbd_work const *)w; b = (struct drbd_tl_epoch *)__mptr; p = & mdev->data.sbuf.barrier; ok = 1; spin_lock_irq(& mdev->req_lock); if ((unsigned long )w->cb != (unsigned long )(& w_send_barrier) || (int )mdev->state.ldv_33381.conn <= 9) { cancel = 1; } else { } spin_unlock_irq(& mdev->req_lock); if (cancel != 0) { return (1); } else { } tmp = drbd_get_data_sock(mdev); if (tmp == 0) { return (0); } else { } p->barrier = b->br_number; ok = _drbd_send_cmd(mdev, mdev->data.socket, P_BARRIER, (struct p_header *)p, 16UL, 0U); drbd_put_data_sock(mdev); return (ok); } } int w_send_write_hint(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { int tmp ; { if (cancel != 0) { return (1); } else { } tmp = drbd_send_short_cmd(mdev, P_UNPLUG_REMOTE); return (tmp); } } int w_send_dblock(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { struct drbd_request *req ; struct drbd_work const *__mptr ; int ok ; long tmp ; { __mptr = (struct drbd_work const *)w; req = (struct drbd_request *)__mptr; tmp = ldv__builtin_expect(cancel != 0, 0L); if (tmp != 0L) { req_mod(req, send_canceled); return (1); } else { } ok = drbd_send_dblock(mdev, req); req_mod(req, ok != 0 ? handed_over_to_network : send_failed); return (ok); } } int w_send_read_req(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { struct drbd_request *req ; struct drbd_work const *__mptr ; int ok ; long tmp ; union drbd_state val ; union drbd_state mask ; { __mptr = (struct drbd_work const *)w; req = (struct drbd_request *)__mptr; tmp = ldv__builtin_expect(cancel != 0, 0L); if (tmp != 0L) { req_mod(req, send_canceled); return (1); } else { } ok = drbd_send_drequest(mdev, 8, req->sector, (int )req->size, (u64 )req); if (ok == 0) { if ((int )mdev->state.ldv_33381.conn > 9) { val.i = 0U; val.ldv_33381.conn = 5U; mask.i = 0U; mask.ldv_33381.conn = 31U; drbd_force_state(mdev, mask, val); } else { } } else { } req_mod(req, ok != 0 ? handed_over_to_network : send_failed); return (ok); } } static int _drbd_may_sync_now(struct drbd_conf *mdev ) { struct drbd_conf *odev ; int _b ; char const *tmp ; char const *tmp___0 ; { odev = mdev; ldv_43108: ; if (odev->sync_conf.after == -1) { return (1); } else { } odev = minor_to_mdev((unsigned int )odev->sync_conf.after); _b = (unsigned long )odev == (unsigned long )((struct drbd_conf *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "_drbd_may_sync_now", (char *)"!odev", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_worker.c.prepared", 1256); } else { } if (_b != 0) { return (1); } else { } if (((((int )odev->state.ldv_33381.conn > 15 && (int )odev->state.ldv_33381.conn <= 21) || (unsigned int )*((unsigned char *)odev + 1990UL) != 0U) || (unsigned int )*((unsigned char *)odev + 1990UL) != 0U) || (unsigned int )*((unsigned char *)odev + 1990UL) != 0U) { return (0); } else { } goto ldv_43108; } } static int _drbd_pause_after(struct drbd_conf *mdev ) { struct drbd_conf *odev ; int i ; int rv ; union drbd_state __ns ; int tmp ; int tmp___0 ; { rv = 0; i = 0; goto ldv_43119; ldv_43118: odev = minor_to_mdev((unsigned int )i); if ((unsigned long )odev == (unsigned long )((struct drbd_conf *)0)) { goto ldv_43115; } else { } if ((unsigned int )*((unsigned short *)odev + 994UL) == 0U && (unsigned int )*((unsigned char *)odev + 1989UL) == 0U) { goto ldv_43115; } else { } tmp___0 = _drbd_may_sync_now(odev); if (tmp___0 == 0) { __ns.i = odev->state.i; __ns.ldv_33381.aftr_isp = 1U; tmp = __drbd_set_state(odev, __ns, CS_HARD, 0); rv = (tmp != 2) | rv; } else { } ldv_43115: i = i + 1; ldv_43119: ; if ((unsigned int )i < minor_count) { goto ldv_43118; } else { } return (rv); } } static int _drbd_resume_next(struct drbd_conf *mdev ) { struct drbd_conf *odev ; int i ; int rv ; union drbd_state __ns ; int tmp ; int tmp___0 ; { rv = 0; i = 0; goto ldv_43131; ldv_43130: odev = minor_to_mdev((unsigned int )i); if ((unsigned long )odev == (unsigned long )((struct drbd_conf *)0)) { goto ldv_43127; } else { } if ((unsigned int )*((unsigned short *)odev + 994UL) == 0U && (unsigned int )*((unsigned char *)odev + 1989UL) == 0U) { goto ldv_43127; } else { } if ((unsigned int )*((unsigned char *)odev + 1990UL) != 0U) { tmp___0 = _drbd_may_sync_now(odev); if (tmp___0 != 0) { __ns.i = odev->state.i; __ns.ldv_33381.aftr_isp = 0U; tmp = __drbd_set_state(odev, __ns, CS_HARD, 0); rv = (tmp != 2) | rv; } else { } } else { } ldv_43127: i = i + 1; ldv_43131: ; if ((unsigned int )i < minor_count) { goto ldv_43130; } else { } return (rv); } } void resume_next_sg(struct drbd_conf *mdev ) { { _raw_write_lock_irq(& global_state_lock); _drbd_resume_next(mdev); _raw_write_unlock_irq(& global_state_lock); return; } } void suspend_other_sg(struct drbd_conf *mdev ) { { _raw_write_lock_irq(& global_state_lock); _drbd_pause_after(mdev); _raw_write_unlock_irq(& global_state_lock); return; } } static int sync_after_error(struct drbd_conf *mdev , int o_minor ) { struct drbd_conf *odev ; struct drbd_conf *tmp ; { if (o_minor == -1) { return (101); } else { } if (o_minor < -1) { return (132); } else { tmp = minor_to_mdev((unsigned int )o_minor); if ((unsigned long )tmp == (unsigned long )((struct drbd_conf *)0)) { return (132); } else { } } odev = minor_to_mdev((unsigned int )o_minor); ldv_43144: ; if ((unsigned long )odev == (unsigned long )mdev) { return (133); } else { } if (odev->sync_conf.after == -1) { return (101); } else { } odev = minor_to_mdev((unsigned int )odev->sync_conf.after); goto ldv_43144; } } int drbd_alter_sa(struct drbd_conf *mdev , int na ) { int changes ; int retcode ; int tmp ; { _raw_write_lock_irq(& global_state_lock); retcode = sync_after_error(mdev, na); if (retcode == 101) { mdev->sync_conf.after = na; ldv_43151: changes = _drbd_pause_after(mdev); tmp = _drbd_resume_next(mdev); changes = tmp | changes; if (changes != 0) { goto ldv_43151; } else { } } else { } _raw_write_unlock_irq(& global_state_lock); return (retcode); } } static void ping_peer(struct drbd_conf *mdev ) { int tmp ; wait_queue_t __wait ; struct task_struct *tmp___0 ; int tmp___1 ; { clear_bit(26, (unsigned long volatile *)(& mdev->flags)); request_ping(mdev); tmp = constant_test_bit(26U, (unsigned long const volatile *)(& mdev->flags)); if (tmp != 0 || (int )mdev->state.ldv_33381.conn <= 9) { goto ldv_43156; } else { } tmp___0 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___0; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_43159: prepare_to_wait(& mdev->misc_wait, & __wait, 2); tmp___1 = constant_test_bit(26U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___1 != 0 || (int )mdev->state.ldv_33381.conn <= 9) { goto ldv_43158; } else { } schedule(); goto ldv_43159; ldv_43158: finish_wait(& mdev->misc_wait, & __wait); ldv_43156: ; return; } } void drbd_start_resync(struct drbd_conf *mdev , enum drbd_conns side ) { union drbd_state ns ; int r ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; union drbd_state val ; union drbd_state mask ; int tmp___3 ; u64 uuid ; char const *tmp___4 ; char const *tmp___5 ; int tmp___6 ; unsigned long tmp___7 ; unsigned long tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; { if ((int )mdev->state.ldv_33381.conn > 15) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Resync already running!\n", tmp___0, tmp); return; } else { } drbd_rs_cancel_all(mdev); if ((unsigned int )side == 17U) { r = drbd_khelper(mdev, (char *)"before-resync-target"); r = (r >> 8) & 255; if (r > 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: before-resync-target handler returned %d, dropping connection.\n", tmp___2, tmp___1, r); val.i = 0U; val.ldv_33381.conn = 1U; mask.i = 0U; mask.ldv_33381.conn = 31U; drbd_force_state(mdev, mask, val); return; } else { } } else { } drbd_state_lock(mdev); tmp___3 = _get_ldev_if_state(mdev, D_NEGOTIATING); if (tmp___3 == 0) { drbd_state_unlock(mdev); return; } else { } if ((unsigned int )side == 17U) { mdev->bm_resync_fo = 0UL; } else { get_random_bytes((void *)(& uuid), 8); drbd_uuid_set(mdev, 1, uuid); drbd_send_sync_uuid(mdev, uuid); if ((unsigned int )*((unsigned char *)mdev + 1989UL) != 16U) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->state.disk == D_UP_TO_DATE ) in %s:%d\n", tmp___5, tmp___4, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_worker.c.prepared", 1432); } else { } } _raw_write_lock_irq(& global_state_lock); ns = mdev->state; tmp___6 = _drbd_may_sync_now(mdev); ns.ldv_33381.aftr_isp = tmp___6 == 0; ns.ldv_33381.conn = (unsigned char )side; if ((unsigned int )side == 17U) { ns.ldv_33381.disk = 4U; } else { ns.ldv_33381.pdsk = 4U; } r = __drbd_set_state(mdev, ns, CS_VERBOSE, 0); ns = mdev->state; if ((int )ns.ldv_33381.conn <= 9) { r = 0; } else { } if (r == 1) { tmp___7 = drbd_bm_total_weight(mdev); mdev->rs_mark_left = tmp___7; mdev->rs_total = tmp___7; mdev->rs_failed = 0UL; mdev->rs_paused = 0UL; tmp___8 = jiffies; mdev->rs_mark_time = tmp___8; mdev->rs_start = tmp___8; mdev->rs_same_csum = 0UL; _drbd_pause_after(mdev); } else { } _raw_write_unlock_irq(& global_state_lock); put_ldev(mdev); if (r == 1) { tmp___9 = drbd_conn_str((enum drbd_conns )ns.ldv_33381.conn); tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Began resync as %s (will sync %lu KB [%lu bits set]).\n", tmp___11, tmp___10, tmp___9, mdev->rs_total << 2, mdev->rs_total); if (mdev->rs_total == 0UL) { ping_peer(mdev); drbd_resync_finished(mdev); } else { } if ((unsigned int )*((unsigned short *)(& ns) + 0UL) == 272U) { mod_timer(& mdev->resync_timer, jiffies); } else { } drbd_md_sync(mdev); } else { } drbd_state_unlock(mdev); return; } } int drbd_worker(struct drbd_thread *thi ) { struct drbd_conf *mdev ; struct drbd_work *w ; struct list_head work_list ; int intr ; int i ; unsigned int tmp ; struct task_struct *tmp___0 ; int tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; struct task_struct *tmp___4 ; int _b ; enum drbd_thread_state tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; enum drbd_thread_state tmp___8 ; int _b___0 ; int tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; struct list_head const *__mptr ; union drbd_state val ; union drbd_state mask ; int tmp___12 ; enum drbd_thread_state tmp___13 ; char const *tmp___14 ; char const *tmp___15 ; int tmp___16 ; char const *tmp___17 ; char const *tmp___18 ; int tmp___19 ; struct list_head const *__mptr___0 ; int tmp___20 ; int tmp___21 ; char const *tmp___22 ; char const *tmp___23 ; char const *tmp___24 ; char const *tmp___25 ; { mdev = thi->mdev; w = 0; work_list.next = & work_list; work_list.prev = & work_list; intr = 0; tmp = mdev_to_minor(mdev); tmp___0 = get_current(); sprintf((char *)(& tmp___0->comm), "drbd%d_worker", tmp); goto ldv_43182; ldv_43192: drbd_thread_current_set_cpu(mdev); tmp___1 = down_trylock(& mdev->data.work.s); if (tmp___1 != 0) { ldv_mutex_lock_30(& mdev->data.mutex); if ((unsigned long )mdev->data.socket != (unsigned long )((struct socket *)0) && (unsigned int )*((unsigned char *)mdev->net_conf + 528UL) == 0U) { drbd_tcp_uncork(mdev->data.socket); } else { } ldv_mutex_unlock_31(& mdev->data.mutex); intr = down_interruptible(& mdev->data.work.s); ldv_mutex_lock_32(& mdev->data.mutex); if ((unsigned long )mdev->data.socket != (unsigned long )((struct socket *)0) && (unsigned int )*((unsigned char *)mdev->net_conf + 528UL) == 0U) { drbd_tcp_cork(mdev->data.socket); } else { } ldv_mutex_unlock_33(& mdev->data.mutex); } else { } if (intr != 0) { if (intr != -4) { tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( intr == -EINTR ) in %s:%d\n", tmp___3, tmp___2, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_worker.c.prepared", 1517); } else { } tmp___4 = get_current(); flush_signals(tmp___4); tmp___5 = get_t_state(thi); _b = (unsigned int )tmp___5 == 1U; if (_b != 0) { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___7, tmp___6, "drbd_worker", (char *)"get_t_state(thi) == Running", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_worker.c.prepared", 1519); } else { } if (_b != 0) { goto ldv_43182; } else { } goto ldv_43183; } else { } tmp___8 = get_t_state(thi); if ((unsigned int )tmp___8 != 1U) { goto ldv_43183; } else { } w = 0; spin_lock_irq(& mdev->data.work.q_lock); tmp___9 = list_empty((struct list_head const *)(& mdev->data.work.q)); _b___0 = tmp___9 != 0; if (_b___0 != 0) { tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___11, tmp___10, "drbd_worker", (char *)"list_empty(&mdev->data.work.q)", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_worker.c.prepared", 1532); } else { } if (_b___0 != 0) { spin_unlock_irq(& mdev->data.work.q_lock); goto ldv_43182; } else { } __mptr = (struct list_head const *)mdev->data.work.q.next; w = (struct drbd_work *)__mptr; list_del_init(& w->list); spin_unlock_irq(& mdev->data.work.q_lock); tmp___12 = (*(w->cb))(mdev, w, (int )mdev->state.ldv_33381.conn <= 9); if (tmp___12 == 0) { if ((int )mdev->state.ldv_33381.conn > 9) { val.i = 0U; val.ldv_33381.conn = 5U; mask.i = 0U; mask.ldv_33381.conn = 31U; drbd_force_state(mdev, mask, val); } else { } } else { } ldv_43182: tmp___13 = get_t_state(thi); if ((unsigned int )tmp___13 == 1U) { goto ldv_43192; } else { } ldv_43183: tmp___16 = constant_test_bit(23U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___16 == 0) { tmp___14 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___15 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( test_bit(DEVICE_DYING, &mdev->flags) ) in %s:%d\n", tmp___15, tmp___14, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_worker.c.prepared", 1558); } else { } tmp___19 = constant_test_bit(22U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___19 == 0) { tmp___17 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___18 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( test_bit(CONFIG_PENDING, &mdev->flags) ) in %s:%d\n", tmp___18, tmp___17, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_worker.c.prepared", 1559); } else { } spin_lock_irq(& mdev->data.work.q_lock); i = 0; goto ldv_43199; ldv_43198: list_splice_init(& mdev->data.work.q, & work_list); spin_unlock_irq(& mdev->data.work.q_lock); goto ldv_43196; ldv_43195: __mptr___0 = (struct list_head const *)work_list.next; w = (struct drbd_work *)__mptr___0; list_del_init(& w->list); (*(w->cb))(mdev, w, 1); i = i + 1; ldv_43196: tmp___20 = list_empty((struct list_head const *)(& work_list)); if (tmp___20 == 0) { goto ldv_43195; } else { } spin_lock_irq(& mdev->data.work.q_lock); ldv_43199: tmp___21 = list_empty((struct list_head const *)(& mdev->data.work.q)); if (tmp___21 == 0) { goto ldv_43198; } else { } sema_init(& mdev->data.work.s, 0); spin_unlock_irq(& mdev->data.work.q_lock); if ((unsigned int )*((unsigned char *)mdev + 1989UL) != 0U || (unsigned int )*((unsigned short *)mdev + 994UL) != 0U) { tmp___22 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___23 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->state.disk == D_DISKLESS && mdev->state.conn == C_STANDALONE ) in %s:%d\n", tmp___23, tmp___22, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_worker.c.prepared", 1584); } else { } drbd_thread_stop(& mdev->receiver); drbd_mdev_cleanup(mdev); tmp___24 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___25 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: worker terminated\n", tmp___25, tmp___24); clear_bit(23, (unsigned long volatile *)(& mdev->flags)); clear_bit(22, (unsigned long volatile *)(& mdev->flags)); __wake_up(& mdev->state_wait, 3U, 1, 0); return (0); } } void ldv_mutex_lock_23(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_24(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_25(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_26(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_27(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_28(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_29(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_30(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_31(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_32(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_33(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void *memcpy(void * , void const * , unsigned long ) ; __inline static __u32 __arch_swab32(__u32 val ) { { __asm__ ("bswapl %0": "=r" (val): "0" (val)); return (val); } } __inline static __u64 __arch_swab64(__u64 val ) { { __asm__ ("bswapq %0": "=r" (val): "0" (val)); return (val); } } __inline static __u16 __fswab16(__u16 val ) { { return ((__u16 )((int )((short )((int )val << 8)) | (int )((short )((int )val >> 8)))); } } __inline static __u32 __fswab32(__u32 val ) { __u32 tmp ; { tmp = __arch_swab32(val); return (tmp); } } __inline static __u64 __fswab64(__u64 val ) { __u64 tmp ; { tmp = __arch_swab64(val); return (tmp); } } extern void dump_stack(void) ; extern unsigned long __phys_addr(unsigned long ) ; extern void __cmpxchg_wrong_size(void) ; extern void *memcpy(void * , void const * , size_t ) ; extern size_t strlen(char const * ) ; extern char *strcpy(char * , char const * ) ; extern int strcmp(char const * , char const * ) ; __inline static long PTR_ERR(void const *ptr ) { { return ((long )ptr); } } __inline static long IS_ERR(void const *ptr ) { long tmp ; { tmp = ldv__builtin_expect((unsigned long )ptr > 0xfffffffffffff000UL, 0L); return (tmp); } } __inline static void list_move(struct list_head *list , struct list_head *head ) { { __list_del(list->prev, list->next); list_add(list, head); return; } } __inline static void INIT_HLIST_NODE(struct hlist_node *h ) { { h->next = 0; h->pprev = 0; return; } } __inline static int hlist_unhashed(struct hlist_node const *h ) { { return ((unsigned long )h->pprev == (unsigned long )((struct hlist_node **/* const */)0)); } } __inline static int hlist_empty(struct hlist_head const *h ) { { return ((unsigned long )h->first == (unsigned long )((struct hlist_node */* const */)0)); } } __inline static void __hlist_del(struct hlist_node *n ) { struct hlist_node *next ; struct hlist_node **pprev ; { next = n->next; pprev = n->pprev; *pprev = next; if ((unsigned long )next != (unsigned long )((struct hlist_node *)0)) { next->pprev = pprev; } else { } return; } } __inline static void hlist_del_init(struct hlist_node *n ) { int tmp ; { tmp = hlist_unhashed((struct hlist_node const *)n); if (tmp == 0) { __hlist_del(n); INIT_HLIST_NODE(n); } else { } return; } } __inline static void hlist_add_head(struct hlist_node *n , struct hlist_head *h ) { struct hlist_node *first ; { first = h->first; n->next = first; if ((unsigned long )first != (unsigned long )((struct hlist_node *)0)) { first->pprev = & n->next; } else { } h->first = n; n->pprev = & h->first; return; } } __inline static void atomic_add(int i , atomic_t *v ) { { __asm__ volatile (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; addl %1,%0": "+m" (v->counter): "ir" (i)); return; } } __inline static void atomic_sub(int i , atomic_t *v ) { { __asm__ volatile (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; subl %1,%0": "+m" (v->counter): "ir" (i)); return; } } __inline static int atomic_cmpxchg(atomic_t *v , int old , int new ) { int volatile __ret ; int volatile __old ; int volatile __new ; { __old = old; __new = new; switch (4UL) { case 1UL: __asm__ volatile (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; cmpxchgb %b1,%2": "=a" (__ret): "q" (__new), "m" (*((long volatile *)(& v->counter))), "0" (__old): "memory"); goto ldv_5177; case 2UL: __asm__ volatile (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; cmpxchgw %w1,%2": "=a" (__ret): "r" (__new), "m" (*((long volatile *)(& v->counter))), "0" (__old): "memory"); goto ldv_5177; case 4UL: __asm__ volatile (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; cmpxchgl %k1,%2": "=a" (__ret): "r" (__new), "m" (*((long volatile *)(& v->counter))), "0" (__old): "memory"); goto ldv_5177; case 8UL: __asm__ volatile (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; cmpxchgq %1,%2": "=a" (__ret): "r" (__new), "m" (*((long volatile *)(& v->counter))), "0" (__old): "memory"); goto ldv_5177; default: __cmpxchg_wrong_size(); } ldv_5177: ; return ((int )__ret); } } __inline static int atomic_add_unless(atomic_t *v , int a , int u ) { int c ; int old ; long tmp ; long tmp___0 ; { c = atomic_read((atomic_t const *)v); ldv_5203: tmp = ldv__builtin_expect(c == u, 0L); if (tmp != 0L) { goto ldv_5202; } else { } old = atomic_cmpxchg(v, c, c + a); tmp___0 = ldv__builtin_expect(old == c, 1L); if (tmp___0 != 0L) { goto ldv_5202; } else { } c = old; goto ldv_5203; ldv_5202: ; return (c != u); } } void ldv_mutex_unlock_46(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_47(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_49(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_50(struct mutex *ldv_func_arg1 ) ; extern int mutex_lock_interruptible(struct mutex * ) ; int ldv_mutex_lock_interruptible_48(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_45(struct mutex *ldv_func_arg1 ) ; int ldv_mutex_lock_interruptible_mutex_of_drbd_socket(struct mutex *lock ) ; __inline static struct thread_info *current_thread_info___0(void) { struct thread_info *ti ; unsigned long pfo_ret__ ; { switch (8UL) { case 1UL: __asm__ ("movb %%gs:%P1,%0": "=q" (pfo_ret__): "p" (& kernel_stack)); goto ldv_5810; case 2UL: __asm__ ("movw %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& kernel_stack)); goto ldv_5810; case 4UL: __asm__ ("movl %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& kernel_stack)); goto ldv_5810; case 8UL: __asm__ ("movq %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& kernel_stack)); goto ldv_5810; default: __bad_percpu_size(); } ldv_5810: ti = (struct thread_info *)(pfo_ret__ - 8152UL); return (ti); } } __inline static int test_ti_thread_flag(struct thread_info *ti , int flag ) { int tmp ; { tmp = variable_test_bit(flag, (unsigned long const volatile *)(& ti->flags)); return (tmp); } } extern void _raw_spin_lock(raw_spinlock_t * ) ; extern void _raw_spin_unlock(raw_spinlock_t * ) ; __inline static void spin_lock(spinlock_t *lock ) { { _raw_spin_lock(& lock->ldv_5575.rlock); return; } } __inline static void spin_unlock(spinlock_t *lock ) { { _raw_spin_unlock(& lock->ldv_5575.rlock); return; } } extern void do_gettimeofday(struct timeval * ) ; extern int del_timer_sync(struct timer_list * ) ; __inline static void init_completion(struct completion *x ) { struct lock_class_key __key ; { x->done = 0U; __init_waitqueue_head(& x->wait, & __key); return; } } extern void wait_for_completion(struct completion * ) ; extern void free_pages(unsigned long , unsigned int ) ; extern u32 random32(void) ; extern int sock_create_kern(int , int , int , struct socket ** ) ; extern int sock_create_lite(int , int , int , struct socket ** ) ; extern void sock_release(struct socket * ) ; extern int sock_recvmsg(struct socket * , struct msghdr * , size_t , int ) ; __inline static void trace_kmalloc___1(unsigned long call_site , void const *ptr , size_t bytes_req , size_t bytes_alloc , gfp_t gfp_flags ) { void **it_func ; int tmp ; int tmp___0 ; void **_________p1 ; long tmp___1 ; { tmp___1 = ldv__builtin_expect(__tracepoint_kmalloc.state != 0, 0L); if (tmp___1 != 0L) { rcu_read_lock_sched_notrace(); tmp = debug_lockdep_rcu_enabled(); if (tmp != 0) { tmp___0 = rcu_read_lock_sched_held(); if (tmp___0 == 0) { lockdep_rcu_dereference("include/trace/events/kmem.h", 87); } else { } } else { } _________p1 = *((void ** volatile *)(& __tracepoint_kmalloc.funcs)); it_func = _________p1; if ((unsigned long )it_func != (unsigned long )((void **)0)) { ldv_13490: (*((void (*)(unsigned long , void const * , size_t , size_t , gfp_t ))*it_func))(call_site, ptr, bytes_req, bytes_alloc, gfp_flags); it_func = it_func + 1; if ((unsigned long )*it_func != (unsigned long )((void *)0)) { goto ldv_13490; } else { } } else { } rcu_read_lock_sched_notrace(); } else { } return; } } __inline static void *kmalloc_large___1(size_t size , gfp_t flags ) { unsigned int order ; int tmp ; void *ret ; unsigned long tmp___0 ; { tmp = get_order(size); order = (unsigned int )tmp; tmp___0 = __get_free_pages(flags | 16384U, order); ret = (void *)tmp___0; kmemleak_alloc((void const *)ret, size, 1, flags); trace_kmalloc___1((unsigned long )((void *)0), (void const *)ret, size, 4096UL << (int )order, flags); return (ret); } } __inline static void *kmalloc___1(size_t size , gfp_t flags ) { void *ret ; void *tmp ; struct kmem_cache *s ; struct kmem_cache *tmp___0 ; void *tmp___1 ; { if (0) { if (size > 8192UL) { tmp = kmalloc_large___1(size, flags); return (tmp); } else { } if ((flags & 1U) == 0U) { tmp___0 = kmalloc_slab(size); s = tmp___0; if ((unsigned long )s == (unsigned long )((struct kmem_cache *)0)) { return (16); } else { } ret = kmem_cache_alloc_notrace(s, flags); trace_kmalloc___1((unsigned long )((void *)0), (void const *)ret, size, (size_t )s->size, flags); return (ret); } else { } } else { } tmp___1 = __kmalloc(size, flags); return (tmp___1); } } extern void put_page(struct page * ) ; __inline static void sg_assign_page___0(struct scatterlist *sg , struct page *page ) { unsigned long page_link ; long tmp ; long tmp___0 ; long tmp___1 ; { page_link = sg->page_link & 3UL; tmp = ldv__builtin_expect(((unsigned long )page & 3UL) != 0UL, 0L); if (tmp != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/scatterlist.h"), "i" (63), "i" (12UL)); ldv_17260: ; goto ldv_17260; } else { } tmp___0 = ldv__builtin_expect(sg->sg_magic != 2271560481UL, 0L); if (tmp___0 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/scatterlist.h"), "i" (65), "i" (12UL)); ldv_17261: ; goto ldv_17261; } else { } tmp___1 = ldv__builtin_expect((long )((int )sg->page_link) & 1L, 0L); if (tmp___1 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/scatterlist.h"), "i" (66), "i" (12UL)); ldv_17262: ; goto ldv_17262; } else { } sg->page_link = page_link | (unsigned long )page; return; } } __inline static void sg_set_page___0(struct scatterlist *sg , struct page *page , unsigned int len , unsigned int offset ) { { sg_assign_page___0(sg, page); sg->offset = offset; sg->length = len; return; } } __inline static void sg_set_buf(struct scatterlist *sg , void const *buf , unsigned int buflen ) { unsigned long tmp ; { tmp = __phys_addr((unsigned long )buf); sg_set_page___0(sg, 0xffffea0000000000UL + (tmp >> 12), buflen, (unsigned int )((long )buf) & 4095U); return; } } __inline static int test_tsk_thread_flag(struct task_struct *tsk , int flag ) { int tmp ; { tmp = test_ti_thread_flag((struct thread_info *)tsk->stack, flag); return (tmp); } } __inline static int signal_pending(struct task_struct *p ) { int tmp ; long tmp___0 ; { tmp = test_tsk_thread_flag(p, 2); tmp___0 = ldv__builtin_expect(tmp != 0, 0L); return ((int )tmp___0); } } char const *drbd_set_st_err_str(enum drbd_state_ret_codes err ) ; extern struct crypto_tfm *crypto_alloc_base(char const * , u32 , u32 ) ; __inline static void crypto_free_tfm(struct crypto_tfm *tfm ) { { return; } } __inline static u32 crypto_tfm_alg_type(struct crypto_tfm *tfm ) { { return ((tfm->__crt_alg)->cra_flags & 15U); } } __inline static struct crypto_hash *__crypto_hash_cast(struct crypto_tfm *tfm ) { { return ((struct crypto_hash *)tfm); } } __inline static struct crypto_hash *crypto_alloc_hash(char const *alg_name , u32 type , u32 mask ) { struct crypto_tfm *tmp ; struct crypto_hash *tmp___0 ; { type = type & 4294967280U; mask = mask & 4294967280U; type = type | 8U; mask = mask | 14U; tmp = crypto_alloc_base(alg_name, type, mask); tmp___0 = __crypto_hash_cast(tmp); return (tmp___0); } } __inline static void crypto_free_hash(struct crypto_hash *tfm ) { struct crypto_tfm *tmp ; { tmp = crypto_hash_tfm(tfm); crypto_free_tfm(tmp); return; } } __inline static int crypto_hash_digest(struct hash_desc *desc , struct scatterlist *sg , unsigned int nbytes , u8 *out ) { struct hash_tfm *tmp ; int tmp___0 ; { tmp = crypto_hash_crt(desc->tfm); tmp___0 = (*(tmp->digest))(desc, sg, nbytes, out); return (tmp___0); } } __inline static int crypto_hash_setkey(struct crypto_hash *hash , u8 const *key , unsigned int keylen ) { struct hash_tfm *tmp ; int tmp___0 ; { tmp = crypto_hash_crt(hash); tmp___0 = (*(tmp->setkey))(hash, key, keylen); return (tmp___0); } } __inline static void set_capacity(struct gendisk *disk , sector_t size ) { { disk->part0.nr_sects = size; return; } } __inline static void *kmap(struct page *page ) { void *tmp ; { __might_sleep("include/linux/highmem.h", 60, 0); tmp = lowmem_page_address(page); return (tmp); } } __inline static void kunmap(struct page *page ) { { return; } } extern void *mempool_alloc(mempool_t * , gfp_t ) ; extern void generic_make_request(struct bio * ) ; __inline static char const *cmdname(enum drbd_packets cmd ) { char const *cmdnames[41U] ; { cmdnames[0] = "Data"; cmdnames[1] = "DataReply"; cmdnames[2] = "RSDataReply"; cmdnames[3] = "Barrier"; cmdnames[4] = "ReportBitMap"; cmdnames[5] = "BecomeSyncTarget"; cmdnames[6] = "BecomeSyncSource"; cmdnames[7] = "UnplugRemote"; cmdnames[8] = "DataRequest"; cmdnames[9] = "RSDataRequest"; cmdnames[10] = "SyncParam"; cmdnames[11] = "ReportProtocol"; cmdnames[12] = "ReportUUIDs"; cmdnames[13] = "ReportSizes"; cmdnames[14] = "ReportState"; cmdnames[15] = "ReportSyncUUID"; cmdnames[16] = "AuthChallenge"; cmdnames[17] = "AuthResponse"; cmdnames[18] = "StateChgRequest"; cmdnames[19] = "Ping"; cmdnames[20] = "PingAck"; cmdnames[21] = "RecvAck"; cmdnames[22] = "WriteAck"; cmdnames[23] = "RSWriteAck"; cmdnames[24] = "DiscardAck"; cmdnames[25] = "NegAck"; cmdnames[26] = "NegDReply"; cmdnames[27] = "NegRSDReply"; cmdnames[28] = "BarrierAck"; cmdnames[29] = "StateChgReply"; cmdnames[30] = "OVRequest"; cmdnames[31] = "OVReply"; cmdnames[32] = "OVResult"; cmdnames[33] = "CsumRSRequest"; cmdnames[34] = "CsumRSIsInSync"; cmdnames[35] = "SyncParam89"; cmdnames[36] = "CBitmap"; cmdnames[37] = 0; cmdnames[38] = 0; cmdnames[39] = "DelayProbe"; cmdnames[40] = 0; if ((unsigned int )cmd == 65521U) { return ("HandShakeM"); } else { } if ((unsigned int )cmd == 65522U) { return ("HandShakeS"); } else { } if ((unsigned int )cmd == 65534U) { return ("HandShake"); } else { } if ((unsigned int )cmd > 39U) { return ("Unknown"); } else { } return (cmdnames[(unsigned int )cmd]); } } void INFO_bm_xfer_stats(struct drbd_conf *mdev , char const *direction , struct bm_xfer_ctx *c ) ; __inline static void bm_xfer_ctx_bit_to_word_offset(struct bm_xfer_ctx *c ) { { c->word_offset = c->bit_offset >> 6; return; } } __inline static enum drbd_bitmap_code DCBP_get_code(struct p_compressed_bm *p ) { { return ((enum drbd_bitmap_code )((int )p->encoding & 15)); } } __inline static int DCBP_get_start(struct p_compressed_bm *p ) { { return ((int )((signed char )p->encoding) < 0); } } __inline static int DCBP_get_pad_bits(struct p_compressed_bm *p ) { { return (((int )p->encoding >> 4) & 7); } } int drbd_change_state(struct drbd_conf *mdev , enum chg_state_flags f , union drbd_state mask , union drbd_state val ) ; int _drbd_request_state(struct drbd_conf *mdev , union drbd_state mask , union drbd_state val , enum chg_state_flags f ) ; int drbd_thread_start(struct drbd_thread *thi ) ; void tl_release(struct drbd_conf *mdev , unsigned int barrier_nr , unsigned int set_size ) ; void tl_clear(struct drbd_conf *mdev ) ; void drbd_free_sock(struct drbd_conf *mdev ) ; int drbd_send_protocol(struct drbd_conf *mdev ) ; int drbd_send_uuids(struct drbd_conf *mdev ) ; int drbd_send_sizes(struct drbd_conf *mdev , int trigger_reply , enum dds_flags flags ) ; int drbd_send_state(struct drbd_conf *mdev ) ; int drbd_send_cmd2(struct drbd_conf *mdev , enum drbd_packets cmd , char *data , size_t size ) ; int drbd_send_sync_param(struct drbd_conf *mdev , struct syncer_conf *sc ) ; int drbd_send_b_ack(struct drbd_conf *mdev , u32 barrier_nr , u32 set_size ) ; int drbd_send_ack_rp(struct drbd_conf *mdev , enum drbd_packets cmd , struct p_block_req *rp ) ; int drbd_send_ack_dp(struct drbd_conf *mdev , enum drbd_packets cmd , struct p_data *dp ) ; int drbd_send_bitmap(struct drbd_conf *mdev ) ; int drbd_send_sr_reply(struct drbd_conf *mdev , int retcode ) ; void drbd_uuid_new_current(struct drbd_conf *mdev ) ; int drbd_bmio_set_n_write(struct drbd_conf *mdev ) ; int drbd_bmio_clear_n_write(struct drbd_conf *mdev ) ; int drbd_bitmap_io(struct drbd_conf *mdev , int (*io_fn)(struct drbd_conf * ) , char *why ) ; mempool_t *drbd_ee_mempool ; struct page *drbd_pp_pool ; spinlock_t drbd_pp_lock ; int drbd_pp_vacant ; wait_queue_head_t drbd_pp_wait ; sector_t drbd_new_dev_size(struct drbd_conf *mdev , struct drbd_backing_dev *bdev , int assume_peer_has_space ) ; enum determine_dev_size drbd_determin_dev_size(struct drbd_conf *mdev , enum dds_flags flags ) ; void resync_after_online_grow(struct drbd_conf *mdev ) ; void drbd_setup_queue_param(struct drbd_conf *mdev , unsigned int max_seg_s ) ; int drbd_set_role(struct drbd_conf *mdev , enum drbd_role new_role , int force ) ; enum drbd_disk_state drbd_try_outdate_peer(struct drbd_conf *mdev ) ; int drbd_release_ee(struct drbd_conf *mdev , struct list_head *list ) ; void drbd_wait_ee_list_empty(struct drbd_conf *mdev , struct list_head *head ) ; void _drbd_wait_ee_list_empty(struct drbd_conf *mdev , struct list_head *head ) ; void drbd_flush_workqueue(struct drbd_conf *mdev ) ; __inline static void drbd_tcp_nodelay(struct socket *sock ) { int val ; { val = 1; drbd_setsockopt(sock, 6, 1, (char *)(& val), 4); return; } } __inline static void drbd_tcp_quickack(struct socket *sock ) { int val ; { val = 1; drbd_setsockopt(sock, 6, 12, (char *)(& val), 4); return; } } void drbd_al_begin_io(struct drbd_conf *mdev , sector_t sector ) ; int drbd_rs_begin_io(struct drbd_conf *mdev , sector_t sector ) ; void drbd_bcast_ee(struct drbd_conf *mdev , char const *reason , int const dgs , char const *seen_hash , char const *calc_hash , struct drbd_epoch_entry const *e ) ; __inline static int drbd_ee_has_active_page___0(struct drbd_epoch_entry *e ) { struct page *page ; int tmp ; struct page *tmp___0 ; { page = e->pages; goto ldv_42589; ldv_42588: tmp = page_count(page); if (tmp > 1) { return (1); } else { } page = page_chain_next(page); ldv_42589: ; if ((unsigned long )page != (unsigned long )((struct page *)0)) { tmp___0 = page_chain_next(page); __builtin_prefetch((void const *)tmp___0); if (1 != 0) { goto ldv_42588; } else { goto ldv_42590; } } else { } ldv_42590: ; return (0); } } __inline static int drbd_request_state(struct drbd_conf *mdev , union drbd_state mask , union drbd_state val ) { int tmp ; { tmp = _drbd_request_state(mdev, mask, val, 14); return (tmp); } } __inline static sector_t drbd_md_first_sector(struct drbd_backing_dev *bdev ) { { switch (bdev->dc.meta_dev_idx) { case -1: ; case -3: ; return ((sector_t )(bdev->md.md_offset + (u64 )bdev->md.bm_offset)); case -2: ; default: ; return ((sector_t )bdev->md.md_offset); } } } __inline static sector_t drbd_get_max_capacity(struct drbd_backing_dev *bdev ) { sector_t s ; sector_t __min1 ; sector_t __min2 ; sector_t tmp___0 ; sector_t tmp___1 ; sector_t __min1___0 ; sector_t __min2___0 ; sector_t tmp___2 ; sector_t __min1___1 ; sector_t __min2___1 ; sector_t __min1___2 ; sector_t __min2___2 ; sector_t tmp___3 ; { switch (bdev->dc.meta_dev_idx) { case -1: ; case -3: tmp___1 = drbd_get_capacity(bdev->backing_bdev); if (tmp___1 != 0UL) { __min1 = 34359738368UL; tmp___0 = drbd_md_first_sector(bdev); __min2 = tmp___0; s = __min1 < __min2 ? __min1 : __min2; } else { s = 0UL; } goto ldv_42661; case -2: __min1___0 = 34359738368UL; tmp___2 = drbd_get_capacity(bdev->backing_bdev); __min2___0 = tmp___2; s = __min1___0 < __min2___0 ? __min1___0 : __min2___0; __min1___1 = s; __min2___1 = (unsigned long )(bdev->md.md_size_sect - (u32 )bdev->md.bm_offset) << 15; s = __min1___1 < __min2___1 ? __min1___1 : __min2___1; goto ldv_42661; default: __min1___2 = 8587575296UL; tmp___3 = drbd_get_capacity(bdev->backing_bdev); __min2___2 = tmp___3; s = __min1___2 < __min2___2 ? __min1___2 : __min2___2; } ldv_42661: ; return (s); } } __inline static void drbd_queue_work_front(struct drbd_work_queue *q , struct drbd_work *w ) { unsigned long flags ; raw_spinlock_t *tmp ; { tmp = spinlock_check(& q->q_lock); flags = _raw_spin_lock_irqsave(tmp); list_add(& w->list, & q->q); up(& q->s); spin_unlock_irqrestore(& q->q_lock, flags); return; } } __inline static int drbd_send_ping(struct drbd_conf *mdev ) { struct p_header h ; int tmp ; { tmp = drbd_send_cmd(mdev, 0, P_PING, & h, 8UL); return (tmp); } } __inline static int drbd_send_ping_ack(struct drbd_conf *mdev ) { struct p_header h ; int tmp ; { tmp = drbd_send_cmd(mdev, 0, P_PING_ACK, & h, 8UL); return (tmp); } } __inline static void inc_unacked(struct drbd_conf *mdev ) { { atomic_inc(& mdev->unacked_cnt); return; } } __inline static void put_net_conf(struct drbd_conf *mdev ) { int tmp ; { tmp = atomic_dec_and_test(& mdev->net_cnt); if (tmp != 0) { __wake_up(& mdev->misc_wait, 3U, 1, 0); } else { } return; } } __inline static int get_net_conf(struct drbd_conf *mdev ) { int have_net_conf ; { atomic_inc(& mdev->net_cnt); have_net_conf = (int )mdev->state.ldv_33381.conn > 1; if (have_net_conf == 0) { put_net_conf(mdev); } else { } return (have_net_conf); } } __inline static void drbd_set_ed_uuid(struct drbd_conf *mdev , u64 val ) { { mdev->ed_uuid = val; return; } } __inline static int seq_cmp(u32 a , u32 b ) { { return ((int )a - (int )b); } } __inline static void update_peer_seq(struct drbd_conf *mdev , unsigned int new_seq ) { unsigned int m ; int tmp ; { spin_lock(& mdev->peer_seq_lock); tmp = seq_cmp(mdev->peer_seq, new_seq); m = tmp > 0 ? mdev->peer_seq : new_seq; mdev->peer_seq = m; spin_unlock(& mdev->peer_seq_lock); if (m == new_seq) { __wake_up(& mdev->seq_wait, 3U, 1, 0); } else { } return; } } __inline static void drbd_set_my_capacity(struct drbd_conf *mdev , sector_t size ) { { set_capacity(mdev->vdisk, size); ((mdev->this_bdev)->bd_inode)->i_size = (long long )size << 9; return; } } __inline static void drbd_generic_make_request(struct drbd_conf *mdev , int fault_type , struct bio *bio ) { unsigned int tmp ; int tmp___0 ; { if ((unsigned long )bio->bi_bdev == (unsigned long )((struct block_device *)0)) { tmp = mdev_to_minor(mdev); printk("<3>drbd%d: drbd_generic_make_request: bio->bi_bdev == NULL\n", tmp); dump_stack(); bio_endio(bio, -19); return; } else { } tmp___0 = drbd_insert_fault(mdev, (unsigned int )fault_type); if (tmp___0 != 0) { bio_endio(bio, -5); } else { generic_make_request(bio); } return; } } __inline static int drbd_crypto_is_hash(struct crypto_tfm *tfm ) { u32 tmp ; { tmp = crypto_tfm_alg_type(tfm); return ((tmp & 14U) == 8U); } } __inline static struct hlist_head *ee_hash_slot(struct drbd_conf *mdev , sector_t sector ) { long tmp ; { tmp = ldv__builtin_expect(mdev->ee_hash_s == 0U, 0L); if (tmp != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/inst/current/envs/linux/linux/drivers/block/drbd/drbd_req.h"), "i" (207), "i" (12UL)); ldv_42922: ; goto ldv_42922; } else { } return (mdev->ee_hash + (unsigned long )((unsigned int )(sector >> 6) % mdev->ee_hash_s)); } } __inline static struct hlist_head *tl_hash_slot(struct drbd_conf *mdev , sector_t sector ) { long tmp ; { tmp = ldv__builtin_expect(mdev->tl_hash_s == 0U, 0L); if (tmp != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/inst/current/envs/linux/linux/drivers/block/drbd/drbd_req.h"), "i" (216), "i" (12UL)); ldv_42927: ; goto ldv_42927; } else { } return (mdev->tl_hash + (unsigned long )((unsigned int )(sector >> 6) % mdev->tl_hash_s)); } } static struct hlist_head *ar_hash_slot(struct drbd_conf *mdev , sector_t sector ) { { return (mdev->app_reads_hash + (unsigned long )((unsigned int )sector % 15U)); } } __inline static struct drbd_request *_ar_id_to_req(struct drbd_conf *mdev , u64 id , sector_t sector ) { struct hlist_head *slot ; struct hlist_head *tmp ; struct hlist_node *n ; struct drbd_request *req ; char const *tmp___0 ; char const *tmp___1 ; struct hlist_node const *__mptr ; { tmp = ar_hash_slot(mdev, sector); slot = tmp; n = slot->first; goto ldv_42945; ldv_42944: ; if ((unsigned long )req == (unsigned long )id) { if (req->sector != sector) { tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( req->sector == sector ) in %s:%d\n", tmp___1, tmp___0, (char *)"/work/ldvuser/novikov/inst/current/envs/linux/linux/drivers/block/drbd/drbd_req.h", 239); } else { } return (req); } else { } n = n->next; ldv_42945: ; if ((unsigned long )n != (unsigned long )((struct hlist_node *)0)) { __builtin_prefetch((void const *)n->next); if (1 != 0) { __mptr = (struct hlist_node const *)n; req = (struct drbd_request *)__mptr + 0xffffffffffffffd8UL; if (1 != 0) { goto ldv_42944; } else { goto ldv_42946; } } else { goto ldv_42946; } } else { } ldv_42946: ; return (0); } } __inline static int overlaps(sector_t s1 , int l1 , sector_t s2 , int l2 ) { { return ((sector_t )(l1 >> 9) + s1 > s2 && (sector_t )(l2 >> 9) + s2 > s1); } } __inline static int vli_decode_bits(u64 *out , u64 const in ) { u64 adj ; { adj = 1ULL; if (((unsigned long long )in & 1ULL) == 0ULL) { *out = (((unsigned long long )in & 3ULL) >> 1) + adj; return (2); } else { } adj = adj + 2ULL; if (((unsigned long long )in & 3ULL) == 1ULL) { *out = (((unsigned long long )in & 7ULL) >> 2) + adj; return (3); } else { } adj = adj + 2ULL; if (((unsigned long long )in & 7ULL) == 3ULL) { *out = (((unsigned long long )in & 31ULL) >> 3) + adj; return (5); } else { } adj = adj + 4ULL; if (((unsigned long long )in & 15ULL) == 7ULL) { *out = (((unsigned long long )in & 127ULL) >> 4) + adj; return (7); } else { } adj = adj + 8ULL; if (((unsigned long long )in & 31ULL) == 15ULL) { *out = (((unsigned long long )in & 1023ULL) >> 5) + adj; return (10); } else { } adj = adj + 32ULL; if (((unsigned long long )in & 63ULL) == 31ULL) { *out = (((unsigned long long )in & 16383ULL) >> 6) + adj; return (14); } else { } adj = adj + 256ULL; if (((unsigned long long )in & 255ULL) == 63ULL) { *out = (((unsigned long long )in & 2097151ULL) >> 8) + adj; return (21); } else { } adj = adj + 8192ULL; if (((unsigned long long )in & 255ULL) == 127ULL) { *out = (((unsigned long long )in & 536870911ULL) >> 8) + adj; return (29); } else { } adj = adj + 2097152ULL; if (((unsigned long long )in & 255ULL) == 191ULL) { *out = (((unsigned long long )in & 4398046511103ULL) >> 8) + adj; return (42); } else { } adj = adj + 17179869184ULL; if (((unsigned long long )in & 255ULL) == 255ULL) { *out = ((unsigned long long )in >> 8) + adj; return (64); } else { } adj = adj + 72057594037927936ULL; __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/inst/current/envs/linux/linux/drivers/block/drbd/drbd_vli.h"), "i" (162), "i" (12UL)); ldv_42992: ; goto ldv_42992; } } __inline static void bitstream_cursor_reset(struct bitstream_cursor *cur , void *s ) { { cur->b = (u8 *)s; cur->bit = 0U; return; } } __inline static void bitstream_cursor_advance(struct bitstream_cursor *cur , unsigned int bits ) { { bits = cur->bit + bits; cur->b = cur->b + (unsigned long )(bits >> 3); cur->bit = bits & 7U; return; } } __inline static void bitstream_init(struct bitstream *bs , void *s , size_t len , unsigned int pad_bits ) { { bs->buf = (unsigned char *)s; bs->buf_len = len; bs->pad_bits = pad_bits; bitstream_cursor_reset(& bs->cur, (void *)bs->buf); return; } } __inline static int bitstream_get_bits(struct bitstream *bs , u64 *out , int bits ) { u64 val ; unsigned int n ; size_t __len ; void *__ret ; { if (bits > 64) { return (-22); } else { } if ((unsigned long )((long )(bs->cur.b + (unsigned long )((((bs->cur.bit + bs->pad_bits) + (unsigned int )bits) - 1U) >> 3)) - (long )bs->buf) >= bs->buf_len) { bits = (int )(((((unsigned int )bs->buf_len + ((unsigned int )((long )bs->buf) - (unsigned int )((long )bs->cur.b))) << 3U) - bs->cur.bit) - bs->pad_bits); } else { } if (bits == 0) { *out = 0ULL; return (0); } else { } val = 0ULL; n = ((bs->cur.bit + (unsigned int )bits) + 7U) >> 3; if (n != 0U) { __len = (size_t )(n - 1U); __ret = memcpy((void *)(& val), (void const *)bs->cur.b + 1U, __len); val = val << (int )(8U - bs->cur.bit); } else { } val = (u64 )((int )*(bs->cur.b) >> (int )bs->cur.bit) | val; val = (0xffffffffffffffffULL >> (64 - bits)) & val; bitstream_cursor_advance(& bs->cur, (unsigned int )bits); *out = val; return (bits); } } static int drbd_do_handshake(struct drbd_conf *mdev ) ; static int drbd_do_auth(struct drbd_conf *mdev ) ; static enum finish_epoch drbd_may_finish_epoch(struct drbd_conf *mdev , struct drbd_epoch *epoch , enum epoch_event ev ) ; static int e_end_block(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) ; static struct drbd_epoch *previous_epoch(struct drbd_conf *mdev , struct drbd_epoch *epoch ) { struct drbd_epoch *prev ; struct list_head const *__mptr ; { spin_lock(& mdev->epoch_lock); __mptr = (struct list_head const *)epoch->list.prev; prev = (struct drbd_epoch *)__mptr; if ((unsigned long )prev == (unsigned long )epoch || (unsigned long )mdev->current_epoch == (unsigned long )prev) { prev = 0; } else { } spin_unlock(& mdev->epoch_lock); return (prev); } } static struct page *page_chain_del(struct page **head , int n ) { struct page *page ; struct page *tmp ; long tmp___0 ; long tmp___1 ; { tmp___0 = ldv__builtin_expect(n == 0, 0L); if (tmp___0 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared"), "i" (137), "i" (12UL)); ldv_43082: ; goto ldv_43082; } else { } tmp___1 = ldv__builtin_expect((unsigned long )head == (unsigned long )((struct page **)0), 0L); if (tmp___1 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared"), "i" (138), "i" (12UL)); ldv_43083: ; goto ldv_43083; } else { } page = *head; goto ldv_43086; ldv_43085: tmp = page_chain_next(page); n = n - 1; if (n == 0) { goto ldv_43084; } else { } if ((unsigned long )tmp == (unsigned long )((struct page *)0)) { return (0); } else { } page = tmp; ldv_43086: ; if ((unsigned long )page != (unsigned long )((struct page *)0)) { goto ldv_43085; } else { } ldv_43084: page->ldv_12090.ldv_12087.private = 0UL; page = *head; *head = tmp; return (page); } } static struct page *page_chain_tail(struct page *page , int *len ) { struct page *tmp ; int i ; { i = 1; goto ldv_43094; ldv_43093: i = i + 1; page = tmp; ldv_43094: tmp = page_chain_next(page); if ((unsigned long )tmp != (unsigned long )((struct page *)0)) { goto ldv_43093; } else { } if ((unsigned long )len != (unsigned long )((int *)0)) { *len = i; } else { } return (page); } } static int page_chain_free(struct page *page ) { struct page *tmp ; int i ; { i = 0; goto ldv_43103; ldv_43102: put_page(page); i = i + 1; page = tmp; ldv_43103: ; if ((unsigned long )page != (unsigned long )((struct page *)0)) { tmp = page_chain_next(page); if (1 != 0) { goto ldv_43102; } else { goto ldv_43104; } } else { } ldv_43104: ; return (i); } } static void page_chain_add(struct page **head , struct page *chain_first , struct page *chain_last ) { struct page *tmp ; long tmp___0 ; { tmp = page_chain_tail(chain_first, 0); tmp___0 = ldv__builtin_expect((unsigned long )tmp != (unsigned long )chain_last, 0L); if (tmp___0 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared"), "i" (190), "i" (12UL)); ldv_43111: ; goto ldv_43111; } else { } chain_last->ldv_12090.ldv_12087.private = (unsigned long )*head; *head = chain_first; return; } } static struct page *drbd_pp_first_pages_or_try_alloc(struct drbd_conf *mdev , int number ) { struct page *page ; struct page *tmp ; int i ; { page = 0; tmp = 0; i = 0; if (drbd_pp_vacant >= number) { spin_lock(& drbd_pp_lock); page = page_chain_del(& drbd_pp_pool, number); if ((unsigned long )page != (unsigned long )((struct page *)0)) { drbd_pp_vacant = drbd_pp_vacant - number; } else { } spin_unlock(& drbd_pp_lock); if ((unsigned long )page != (unsigned long )((struct page *)0)) { return (page); } else { } } else { } i = 0; goto ldv_43121; ldv_43120: tmp = alloc_pages(514U, 0U); if ((unsigned long )tmp == (unsigned long )((struct page *)0)) { goto ldv_43119; } else { } tmp->ldv_12090.ldv_12087.private = (unsigned long )page; page = tmp; i = i + 1; ldv_43121: ; if (i < number) { goto ldv_43120; } else { } ldv_43119: ; if (i == number) { return (page); } else { } if ((unsigned long )page != (unsigned long )((struct page *)0)) { tmp = page_chain_tail(page, 0); spin_lock(& drbd_pp_lock); page_chain_add(& drbd_pp_pool, page, tmp); drbd_pp_vacant = drbd_pp_vacant + i; spin_unlock(& drbd_pp_lock); } else { } return (0); } } static void maybe_kick_lo(struct drbd_conf *mdev ) { int tmp ; { tmp = atomic_read((atomic_t const *)(& mdev->local_cnt)); if (tmp >= (mdev->net_conf)->unplug_watermark) { drbd_kick_lo(mdev); } else { } return; } } static void reclaim_net_ee(struct drbd_conf *mdev , struct list_head *to_be_freed ) { struct drbd_epoch_entry *e ; struct list_head *le ; struct list_head *tle ; struct list_head const *__mptr ; int tmp ; { le = mdev->net_ee.next; tle = le->next; goto ldv_43136; ldv_43135: __mptr = (struct list_head const *)le; e = (struct drbd_epoch_entry *)__mptr; tmp = drbd_ee_has_active_page___0(e); if (tmp != 0) { goto ldv_43134; } else { } list_move(le, to_be_freed); le = tle; tle = le->next; ldv_43136: ; if ((unsigned long )(& mdev->net_ee) != (unsigned long )le) { goto ldv_43135; } else { } ldv_43134: ; return; } } static void drbd_kick_lo_and_reclaim_net(struct drbd_conf *mdev ) { struct list_head reclaimed ; struct drbd_epoch_entry *e ; struct drbd_epoch_entry *t ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; { reclaimed.next = & reclaimed; reclaimed.prev = & reclaimed; maybe_kick_lo(mdev); spin_lock_irq(& mdev->req_lock); reclaim_net_ee(mdev, & reclaimed); spin_unlock_irq(& mdev->req_lock); __mptr = (struct list_head const *)reclaimed.next; e = (struct drbd_epoch_entry *)__mptr; __mptr___0 = (struct list_head const *)e->w.list.next; t = (struct drbd_epoch_entry *)__mptr___0; goto ldv_43150; ldv_43149: drbd_free_ee(mdev, e); e = t; __mptr___1 = (struct list_head const *)t->w.list.next; t = (struct drbd_epoch_entry *)__mptr___1; ldv_43150: ; if ((unsigned long )(& e->w.list) != (unsigned long )(& reclaimed)) { goto ldv_43149; } else { } return; } } static struct page *drbd_pp_alloc(struct drbd_conf *mdev , unsigned int number , bool retry ) { struct page *page ; wait_queue_t wait ; struct task_struct *tmp ; int tmp___0 ; int tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; struct task_struct *tmp___4 ; int tmp___5 ; { page = 0; tmp = get_current(); wait.flags = 0U; wait.private = (void *)tmp; wait.func = & autoremove_wake_function; wait.task_list.next = & wait.task_list; wait.task_list.prev = & wait.task_list; tmp___0 = atomic_read((atomic_t const *)(& mdev->pp_in_use)); if (tmp___0 < (mdev->net_conf)->max_buffers) { page = drbd_pp_first_pages_or_try_alloc(mdev, (int )number); } else { } goto ldv_43161; ldv_43160: prepare_to_wait(& drbd_pp_wait, & wait, 1); drbd_kick_lo_and_reclaim_net(mdev); tmp___1 = atomic_read((atomic_t const *)(& mdev->pp_in_use)); if (tmp___1 < (mdev->net_conf)->max_buffers) { page = drbd_pp_first_pages_or_try_alloc(mdev, (int )number); if ((unsigned long )page != (unsigned long )((struct page *)0)) { goto ldv_43159; } else { } } else { } if (! retry) { goto ldv_43159; } else { } tmp___4 = get_current(); tmp___5 = signal_pending(tmp___4); if (tmp___5 != 0) { tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: drbd_pp_alloc interrupted!\n", tmp___3, tmp___2); goto ldv_43159; } else { } schedule(); ldv_43161: ; if ((unsigned long )page == (unsigned long )((struct page *)0)) { goto ldv_43160; } else { } ldv_43159: finish_wait(& drbd_pp_wait, & wait); if ((unsigned long )page != (unsigned long )((struct page *)0)) { atomic_add((int )number, & mdev->pp_in_use); } else { } return (page); } } static void drbd_pp_free(struct drbd_conf *mdev , struct page *page ) { int i ; struct page *tmp ; char const *tmp___0 ; char const *tmp___1 ; { if ((unsigned long )drbd_pp_vacant > (unsigned long )minor_count * 8UL) { i = page_chain_free(page); } else { tmp = page_chain_tail(page, & i); spin_lock(& drbd_pp_lock); page_chain_add(& drbd_pp_pool, page, tmp); drbd_pp_vacant = drbd_pp_vacant + i; spin_unlock(& drbd_pp_lock); } atomic_sub(i, & mdev->pp_in_use); i = atomic_read((atomic_t const *)(& mdev->pp_in_use)); if (i < 0) { tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: ASSERTION FAILED: pp_in_use: %d < 0\n", tmp___1, tmp___0, i); } else { } __wake_up(& drbd_pp_wait, 3U, 1, 0); return; } } struct drbd_epoch_entry *drbd_alloc_ee(struct drbd_conf *mdev , u64 id , sector_t sector , unsigned int data_size , gfp_t gfp_mask ) { struct drbd_epoch_entry *e ; struct page *page ; unsigned int nr_pages ; int tmp ; void *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; { nr_pages = (unsigned int )(((unsigned long )data_size + 4095UL) >> 12); tmp = drbd_insert_fault(mdev, 8U); if (tmp != 0) { return (0); } else { } tmp___0 = mempool_alloc(drbd_ee_mempool, gfp_mask & 4294967293U); e = (struct drbd_epoch_entry *)tmp___0; if ((unsigned long )e == (unsigned long )((struct drbd_epoch_entry *)0)) { if ((gfp_mask & 512U) == 0U) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: alloc_ee: Allocation of an EE failed\n", tmp___2, tmp___1); } else { } return (0); } else { } page = drbd_pp_alloc(mdev, nr_pages, (gfp_mask & 16U) != 0U); if ((unsigned long )page == (unsigned long )((struct page *)0)) { goto fail; } else { } INIT_HLIST_NODE(& e->colision); e->epoch = 0; e->mdev = mdev; e->pages = page; atomic_set(& e->pending_bios, 0); e->size = data_size; e->flags = 0UL; e->sector = sector; e->sector = sector; e->block_id = id; return (e); fail: mempool_free((void *)e, drbd_ee_mempool); return (0); } } void drbd_free_ee(struct drbd_conf *mdev , struct drbd_epoch_entry *e ) { char const *tmp ; char const *tmp___0 ; int tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; int tmp___4 ; { drbd_pp_free(mdev, e->pages); tmp___1 = atomic_read((atomic_t const *)(& e->pending_bios)); if (tmp___1 != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( atomic_read(&e->pending_bios) == 0 ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 418); } else { } tmp___4 = hlist_unhashed((struct hlist_node const *)(& e->colision)); if (tmp___4 == 0) { tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( hlist_unhashed(&e->colision) ) in %s:%d\n", tmp___3, tmp___2, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 419); } else { } mempool_free((void *)e, drbd_ee_mempool); return; } } int drbd_release_ee(struct drbd_conf *mdev , struct list_head *list ) { struct list_head work_list ; struct drbd_epoch_entry *e ; struct drbd_epoch_entry *t ; int count ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; { work_list.next = & work_list; work_list.prev = & work_list; count = 0; spin_lock_irq(& mdev->req_lock); list_splice_init(list, & work_list); spin_unlock_irq(& mdev->req_lock); __mptr = (struct list_head const *)work_list.next; e = (struct drbd_epoch_entry *)__mptr; __mptr___0 = (struct list_head const *)e->w.list.next; t = (struct drbd_epoch_entry *)__mptr___0; goto ldv_43198; ldv_43197: drbd_free_ee(mdev, e); count = count + 1; e = t; __mptr___1 = (struct list_head const *)t->w.list.next; t = (struct drbd_epoch_entry *)__mptr___1; ldv_43198: ; if ((unsigned long )(& e->w.list) != (unsigned long )(& work_list)) { goto ldv_43197; } else { } return (count); } } static int drbd_process_done_ee(struct drbd_conf *mdev ) { struct list_head work_list ; struct list_head reclaimed ; struct drbd_epoch_entry *e ; struct drbd_epoch_entry *t ; int ok ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; struct list_head const *__mptr___2 ; struct list_head const *__mptr___3 ; int tmp ; struct list_head const *__mptr___4 ; { work_list.next = & work_list; work_list.prev = & work_list; reclaimed.next = & reclaimed; reclaimed.prev = & reclaimed; ok = (int )mdev->state.ldv_33381.conn > 8; spin_lock_irq(& mdev->req_lock); reclaim_net_ee(mdev, & reclaimed); list_splice_init(& mdev->done_ee, & work_list); spin_unlock_irq(& mdev->req_lock); __mptr = (struct list_head const *)reclaimed.next; e = (struct drbd_epoch_entry *)__mptr; __mptr___0 = (struct list_head const *)e->w.list.next; t = (struct drbd_epoch_entry *)__mptr___0; goto ldv_43215; ldv_43214: drbd_free_ee(mdev, e); e = t; __mptr___1 = (struct list_head const *)t->w.list.next; t = (struct drbd_epoch_entry *)__mptr___1; ldv_43215: ; if ((unsigned long )(& e->w.list) != (unsigned long )(& reclaimed)) { goto ldv_43214; } else { } __mptr___2 = (struct list_head const *)work_list.next; e = (struct drbd_epoch_entry *)__mptr___2; __mptr___3 = (struct list_head const *)e->w.list.next; t = (struct drbd_epoch_entry *)__mptr___3; goto ldv_43224; ldv_43223: tmp = (*(e->w.cb))(mdev, & e->w, ok == 0); ok = tmp != 0 && ok != 0; drbd_free_ee(mdev, e); e = t; __mptr___4 = (struct list_head const *)t->w.list.next; t = (struct drbd_epoch_entry *)__mptr___4; ldv_43224: ; if ((unsigned long )(& e->w.list) != (unsigned long )(& work_list)) { goto ldv_43223; } else { } __wake_up(& mdev->ee_wait, 3U, 1, 0); return (ok); } } void _drbd_wait_ee_list_empty(struct drbd_conf *mdev , struct list_head *head ) { wait_queue_t wait ; struct task_struct *tmp ; int tmp___0 ; { tmp = get_current(); wait.flags = 0U; wait.private = (void *)tmp; wait.func = & autoremove_wake_function; wait.task_list.next = & wait.task_list; wait.task_list.prev = & wait.task_list; goto ldv_43232; ldv_43231: prepare_to_wait(& mdev->ee_wait, & wait, 2); spin_unlock_irq(& mdev->req_lock); drbd_kick_lo(mdev); schedule(); finish_wait(& mdev->ee_wait, & wait); spin_lock_irq(& mdev->req_lock); ldv_43232: tmp___0 = list_empty((struct list_head const *)head); if (tmp___0 == 0) { goto ldv_43231; } else { } return; } } void drbd_wait_ee_list_empty(struct drbd_conf *mdev , struct list_head *head ) { { spin_lock_irq(& mdev->req_lock); _drbd_wait_ee_list_empty(mdev, head); spin_unlock_irq(& mdev->req_lock); return; } } static int drbd_accept(struct drbd_conf *mdev , char const **what , struct socket *sock , struct socket **newsock ) { struct sock *sk ; int err ; { sk = sock->sk; err = 0; *what = "listen"; err = (*((sock->ops)->listen))(sock, 5); if (err < 0) { goto out; } else { } *what = "sock_create_lite"; err = sock_create_lite((int )sk->__sk_common.skc_family, (int )sk->sk_type, (int )sk->sk_protocol, newsock); if (err < 0) { goto out; } else { } *what = "accept"; err = (*((sock->ops)->accept))(sock, *newsock, 0); if (err < 0) { sock_release(*newsock); *newsock = 0; goto out; } else { } (*newsock)->ops = sock->ops; out: ; return (err); } } static int drbd_recv_short(struct drbd_conf *mdev , struct socket *sock , void *buf , size_t size , int flags ) { mm_segment_t oldfs ; struct kvec iov ; struct msghdr msg ; int rv ; struct thread_info *tmp ; struct thread_info *tmp___0 ; mm_segment_t __constr_expr_0 ; struct thread_info *tmp___1 ; { iov.iov_base = buf; iov.iov_len = size; msg.msg_name = 0; msg.msg_namelen = 0; msg.msg_iov = (struct iovec *)(& iov); msg.msg_iovlen = 1UL; msg.msg_control = 0; msg.msg_controllen = 0UL; msg.msg_flags = flags != 0 ? (unsigned int )flags : 16640U; tmp = current_thread_info___0(); oldfs = tmp->addr_limit; tmp___0 = current_thread_info___0(); __constr_expr_0.seg = 0xffffffffffffffffUL; tmp___0->addr_limit = __constr_expr_0; rv = sock_recvmsg(sock, & msg, size, (int )msg.msg_flags); tmp___1 = current_thread_info___0(); tmp___1->addr_limit = oldfs; return (rv); } } static int drbd_recv(struct drbd_conf *mdev , void *buf , size_t size ) { mm_segment_t oldfs ; struct kvec iov ; struct msghdr msg ; int rv ; struct thread_info *tmp ; struct thread_info *tmp___0 ; mm_segment_t __constr_expr_0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; struct thread_info *tmp___7 ; union drbd_state val ; union drbd_state mask ; { iov.iov_base = buf; iov.iov_len = size; msg.msg_name = 0; msg.msg_namelen = 0; msg.msg_iov = (struct iovec *)(& iov); msg.msg_iovlen = 1UL; msg.msg_control = 0; msg.msg_controllen = 0UL; msg.msg_flags = 16640U; tmp = current_thread_info___0(); oldfs = tmp->addr_limit; tmp___0 = current_thread_info___0(); __constr_expr_0.seg = 0xffffffffffffffffUL; tmp___0->addr_limit = __constr_expr_0; ldv_43270: rv = sock_recvmsg(mdev->data.socket, & msg, size, (int )msg.msg_flags); if ((size_t )rv == size) { goto ldv_43269; } else { } if (rv < 0) { if (rv == -104) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: sock was reset by peer\n", tmp___2, tmp___1); } else if (rv != -512) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: sock_recvmsg returned %d\n", tmp___4, tmp___3, rv); } else { } goto ldv_43269; } else if (rv == 0) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: sock was shut down by peer\n", tmp___6, tmp___5); goto ldv_43269; } else { goto ldv_43269; } goto ldv_43270; ldv_43269: tmp___7 = current_thread_info___0(); tmp___7->addr_limit = oldfs; if ((size_t )rv != size) { val.i = 0U; val.ldv_33381.conn = 4U; mask.i = 0U; mask.ldv_33381.conn = 31U; drbd_force_state(mdev, mask, val); } else { } return (rv); } } static struct socket *drbd_try_connect(struct drbd_conf *mdev ) { char const *what ; struct socket *sock ; struct sockaddr_in6 src_in6 ; int err ; int disconnect_on_error ; int tmp ; long tmp___0 ; size_t __len ; int __min1 ; int __min2 ; void *__ret ; char const *tmp___1 ; char const *tmp___2 ; union drbd_state val ; union drbd_state mask ; { disconnect_on_error = 1; tmp = get_net_conf(mdev); if (tmp == 0) { return (0); } else { } what = "sock_create_kern"; err = sock_create_kern((int )((struct sockaddr *)(& (mdev->net_conf)->my_addr))->sa_family, 1, 6, & sock); if (err < 0) { sock = 0; goto out; } else { } tmp___0 = (long )((mdev->net_conf)->try_connect_int * 250); (sock->sk)->sk_sndtimeo = tmp___0; (sock->sk)->sk_rcvtimeo = tmp___0; __min1 = (mdev->net_conf)->my_addr_len; __min2 = 28; __len = (size_t )(__min1 < __min2 ? __min1 : __min2); __ret = memcpy((void *)(& src_in6), (void const *)(& (mdev->net_conf)->my_addr), __len); if ((unsigned int )((struct sockaddr *)(& (mdev->net_conf)->my_addr))->sa_family == 10U) { src_in6.sin6_port = 0U; } else { ((struct sockaddr_in *)(& src_in6))->sin_port = 0U; } what = "bind before connect"; err = (*((sock->ops)->bind))(sock, (struct sockaddr *)(& src_in6), (mdev->net_conf)->my_addr_len); if (err < 0) { goto out; } else { } disconnect_on_error = 0; what = "connect"; err = (*((sock->ops)->connect))(sock, (struct sockaddr *)(& (mdev->net_conf)->peer_addr), (mdev->net_conf)->peer_addr_len, 0); out: ; if (err < 0) { if ((unsigned long )sock != (unsigned long )((struct socket *)0)) { sock_release(sock); sock = 0; } else { } switch (- err) { case 110: ; case 11: ; case 115: ; case 4: ; case 512: ; case 111: ; case 101: ; case 112: ; case 113: disconnect_on_error = 0; goto ldv_43302; default: tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s failed, err = %d\n", tmp___2, tmp___1, what, err); } ldv_43302: ; if (disconnect_on_error != 0) { val.i = 0U; val.ldv_33381.conn = 1U; mask.i = 0U; mask.ldv_33381.conn = 31U; drbd_force_state(mdev, mask, val); } else { } } else { } put_net_conf(mdev); return (sock); } } static struct socket *drbd_wait_for_connect(struct drbd_conf *mdev ) { int timeo ; int err ; struct socket *s_estab ; struct socket *s_listen ; char const *what ; int tmp ; u32 tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; union drbd_state val ; union drbd_state mask ; { s_estab = 0; tmp = get_net_conf(mdev); if (tmp == 0) { return (0); } else { } what = "sock_create_kern"; err = sock_create_kern((int )((struct sockaddr *)(& (mdev->net_conf)->my_addr))->sa_family, 1, 6, & s_listen); if (err != 0) { s_listen = 0; goto out; } else { } timeo = (mdev->net_conf)->try_connect_int * 250; tmp___0 = random32(); timeo = ((int )tmp___0 & 1 ? timeo / 7 : - timeo / 7) + timeo; (s_listen->sk)->__sk_common.skc_reuse = 1U; (s_listen->sk)->sk_rcvtimeo = (long )timeo; (s_listen->sk)->sk_sndtimeo = (long )timeo; what = "bind before listen"; err = (*((s_listen->ops)->bind))(s_listen, (struct sockaddr *)(& (mdev->net_conf)->my_addr), (mdev->net_conf)->my_addr_len); if (err < 0) { goto out; } else { } err = drbd_accept(mdev, & what, s_listen, & s_estab); out: ; if ((unsigned long )s_listen != (unsigned long )((struct socket *)0)) { sock_release(s_listen); } else { } if (err < 0) { if ((err != -11 && err != -4) && err != -512) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s failed, err = %d\n", tmp___2, tmp___1, what, err); val.i = 0U; val.ldv_33381.conn = 1U; mask.i = 0U; mask.ldv_33381.conn = 31U; drbd_force_state(mdev, mask, val); } else { } } else { } put_net_conf(mdev); return (s_estab); } } static int drbd_send_fp(struct drbd_conf *mdev , struct socket *sock , enum drbd_packets cmd ) { struct p_header *h ; int tmp ; { h = & mdev->data.sbuf.header; tmp = _drbd_send_cmd(mdev, sock, cmd, h, 8UL, 0U); return (tmp); } } static enum drbd_packets drbd_recv_fp(struct drbd_conf *mdev , struct socket *sock ) { struct p_header *h ; int rr ; __u16 tmp ; { h = & mdev->data.sbuf.header; rr = drbd_recv_short(mdev, sock, (void *)h, 8UL, 0); if (rr == 8 && h->magic == 1728214147U) { tmp = __fswab16((int )h->command); return ((enum drbd_packets )tmp); } else { } return (65535); } } static int drbd_socket_okay(struct drbd_conf *mdev , struct socket **sock ) { int rr ; char tb[4U] ; { if ((unsigned long )*sock == (unsigned long )((struct socket *)0)) { return (0); } else { } rr = drbd_recv_short(mdev, *sock, (void *)(& tb), 4UL, 66); if (rr > 0 || rr == -11) { return (1); } else { sock_release(*sock); *sock = 0; return (0); } } } static int drbd_connect(struct drbd_conf *mdev ) { struct socket *s ; struct socket *sock ; struct socket *msock ; int try ; int h ; int ok ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; int tmp___3 ; union drbd_state val ; union drbd_state mask ; int tmp___4 ; struct task_struct *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; struct task_struct *tmp___8 ; int tmp___9 ; enum drbd_packets tmp___10 ; char const *tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; char const *tmp___14 ; char const *tmp___15 ; char const *tmp___16 ; u32 tmp___17 ; struct task_struct *tmp___18 ; enum drbd_thread_state tmp___19 ; struct task_struct *tmp___20 ; int tmp___21 ; int tmp___22 ; long tmp___23 ; char const *tmp___24 ; char const *tmp___25 ; int tmp___26 ; char const *tmp___27 ; char const *tmp___28 ; char const *tmp___29 ; char const *tmp___30 ; union drbd_state val___0 ; union drbd_state mask___0 ; int tmp___31 ; int tmp___32 ; { if ((unsigned long )mdev->data.socket != (unsigned long )((struct socket *)0)) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( !mdev->data.socket ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 791); } else { } tmp___3 = test_and_clear_bit(0, (unsigned long volatile *)(& mdev->flags)); if (tmp___3 != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: CREATE_BARRIER flag was set in drbd_connect - now cleared!\n", tmp___2, tmp___1); } else { } val.i = 0U; val.ldv_33381.conn = 8U; mask.i = 0U; mask.ldv_33381.conn = 31U; tmp___4 = drbd_request_state(mdev, mask, val); if (tmp___4 <= 0) { return (-2); } else { } clear_bit(7, (unsigned long volatile *)(& mdev->flags)); sock = 0; msock = 0; ldv_43361: try = 0; ldv_43353: s = drbd_try_connect(mdev); if ((unsigned long )s != (unsigned long )((struct socket *)0)) { goto ldv_43352; } else { try = try + 1; if (try > 2) { goto ldv_43352; } else { } } tmp___5 = get_current(); tmp___5->state = 1L; schedule_timeout(25L); goto ldv_43353; ldv_43352: ; if ((unsigned long )s != (unsigned long )((struct socket *)0)) { if ((unsigned long )sock == (unsigned long )((struct socket *)0)) { drbd_send_fp(mdev, s, P_HAND_SHAKE_S); sock = s; s = 0; } else if ((unsigned long )msock == (unsigned long )((struct socket *)0)) { drbd_send_fp(mdev, s, P_HAND_SHAKE_M); msock = s; s = 0; } else { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Logic error in drbd_connect()\n", tmp___7, tmp___6); goto out_release_sockets; } } else { } if ((unsigned long )sock != (unsigned long )((struct socket *)0) && (unsigned long )msock != (unsigned long )((struct socket *)0)) { tmp___8 = get_current(); tmp___8->state = 1L; schedule_timeout(25L); ok = drbd_socket_okay(mdev, & sock); tmp___9 = drbd_socket_okay(mdev, & msock); ok = tmp___9 != 0 && ok != 0; if (ok != 0) { goto ldv_43355; } else { } } else { } retry: s = drbd_wait_for_connect(mdev); if ((unsigned long )s != (unsigned long )((struct socket *)0)) { tmp___10 = drbd_recv_fp(mdev, s); try = (int )tmp___10; drbd_socket_okay(mdev, & sock); drbd_socket_okay(mdev, & msock); switch (try) { case 65522: ; if ((unsigned long )sock != (unsigned long )((struct socket *)0)) { tmp___11 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___12 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: initial packet S crossed\n", tmp___12, tmp___11); sock_release(sock); } else { } sock = s; goto ldv_43358; case 65521: ; if ((unsigned long )msock != (unsigned long )((struct socket *)0)) { tmp___13 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___14 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: initial packet M crossed\n", tmp___14, tmp___13); sock_release(msock); } else { } msock = s; set_bit(7U, (unsigned long volatile *)(& mdev->flags)); goto ldv_43358; default: tmp___15 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___16 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Error receiving initial packet\n", tmp___16, tmp___15); sock_release(s); tmp___17 = random32(); if ((int )tmp___17 & 1) { goto retry; } else { } } ldv_43358: ; } else { } if ((int )mdev->state.ldv_33381.conn <= 1) { goto out_release_sockets; } else { } tmp___20 = get_current(); tmp___21 = signal_pending(tmp___20); if (tmp___21 != 0) { tmp___18 = get_current(); flush_signals(tmp___18); __asm__ volatile ("": : : "memory"); tmp___19 = get_t_state(& mdev->receiver); if ((unsigned int )tmp___19 == 2U) { goto out_release_sockets; } else { } } else { } if ((unsigned long )sock != (unsigned long )((struct socket *)0) && (unsigned long )msock != (unsigned long )((struct socket *)0)) { ok = drbd_socket_okay(mdev, & sock); tmp___22 = drbd_socket_okay(mdev, & msock); ok = tmp___22 != 0 && ok != 0; if (ok != 0) { goto ldv_43355; } else { } } else { } goto ldv_43361; ldv_43355: (msock->sk)->__sk_common.skc_reuse = 1U; (sock->sk)->__sk_common.skc_reuse = 1U; (sock->sk)->sk_allocation = 16U; (msock->sk)->sk_allocation = 16U; (sock->sk)->sk_priority = 4U; (msock->sk)->sk_priority = 6U; if ((mdev->net_conf)->sndbuf_size != 0) { (sock->sk)->sk_sndbuf = (mdev->net_conf)->sndbuf_size; (sock->sk)->sk_userlocks = (unsigned char )((unsigned int )(sock->sk)->sk_userlocks | 1U); } else { } if ((mdev->net_conf)->rcvbuf_size != 0) { (sock->sk)->sk_rcvbuf = (mdev->net_conf)->rcvbuf_size; (sock->sk)->sk_userlocks = (unsigned char )((unsigned int )(sock->sk)->sk_userlocks | 2U); } else { } tmp___23 = (long )(((mdev->net_conf)->ping_timeo * 1000) / 10); (sock->sk)->sk_rcvtimeo = tmp___23; (sock->sk)->sk_sndtimeo = tmp___23; (msock->sk)->sk_sndtimeo = (long )(((mdev->net_conf)->timeout * 250) / 10); (msock->sk)->sk_rcvtimeo = (long )((mdev->net_conf)->ping_int * 250); drbd_tcp_nodelay(sock); drbd_tcp_nodelay(msock); mdev->data.socket = sock; mdev->meta.socket = msock; mdev->last_received = jiffies; if ((unsigned long )mdev->asender.task != (unsigned long )((struct task_struct *)0)) { tmp___24 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___25 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->asender.task == NULL ) in %s:%d\n", tmp___25, tmp___24, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 925); } else { } h = drbd_do_handshake(mdev); if (h <= 0) { return (h); } else { } if ((unsigned long )mdev->cram_hmac_tfm != (unsigned long )((struct crypto_hash *)0)) { tmp___26 = drbd_do_auth(mdev); switch (tmp___26) { case -1: tmp___27 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___28 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Authentication of peer failed\n", tmp___28, tmp___27); return (-1); case 0: tmp___29 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___30 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Authentication of peer failed, trying again.\n", tmp___30, tmp___29); return (0); } } else { } val___0.i = 0U; val___0.ldv_33381.conn = 9U; mask___0.i = 0U; mask___0.ldv_33381.conn = 31U; tmp___31 = drbd_request_state(mdev, mask___0, val___0); if (tmp___31 <= 0) { return (0); } else { } (sock->sk)->sk_sndtimeo = (long )(((mdev->net_conf)->timeout * 250) / 10); (sock->sk)->sk_rcvtimeo = 9223372036854775807L; atomic_set(& mdev->packet_seq, 0); mdev->peer_seq = 0U; drbd_thread_start(& mdev->asender); tmp___32 = drbd_send_protocol(mdev); if (tmp___32 == 0) { return (-1); } else { } drbd_send_sync_param(mdev, & mdev->sync_conf); drbd_send_sizes(mdev, 0, 0); drbd_send_uuids(mdev); drbd_send_state(mdev); clear_bit(8, (unsigned long volatile *)(& mdev->flags)); clear_bit(24, (unsigned long volatile *)(& mdev->flags)); return (1); out_release_sockets: ; if ((unsigned long )sock != (unsigned long )((struct socket *)0)) { sock_release(sock); } else { } if ((unsigned long )msock != (unsigned long )((struct socket *)0)) { sock_release(msock); } else { } return (-1); } } static int drbd_recv_header(struct drbd_conf *mdev , struct p_header *h ) { int r ; char const *tmp ; char const *tmp___0 ; long tmp___1 ; __u16 tmp___2 ; __u16 tmp___3 ; __u32 tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; long tmp___7 ; { r = drbd_recv(mdev, (void *)h, 8UL); tmp___1 = ldv__builtin_expect(r != 8, 0L); if (tmp___1 != 0L) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: short read expecting header on sock: r=%d\n", tmp___0, tmp, r); return (0); } else { } tmp___2 = __fswab16((int )h->command); h->command = tmp___2; tmp___3 = __fswab16((int )h->length); h->length = tmp___3; tmp___7 = ldv__builtin_expect(h->magic != 1728214147U, 0L); if (tmp___7 != 0L) { tmp___4 = __fswab32(h->magic); tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: magic?? on data m: 0x%lx c: %d l: %d\n", tmp___6, tmp___5, (long )tmp___4, (int )h->command, (int )h->length); return (0); } else { } mdev->last_received = jiffies; return (1); } } static enum finish_epoch drbd_flush_after_epoch(struct drbd_conf *mdev , struct drbd_epoch *epoch ) { int rv ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; enum finish_epoch tmp___2 ; { if ((unsigned int )mdev->write_ordering > 1U) { tmp___1 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___1 != 0) { rv = blkdev_issue_flush((mdev->ldev)->backing_bdev, 208U, 0, 1UL); if (rv != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: local disk flush failed with status %d\n", tmp___0, tmp, rv); drbd_bump_write_ordering(mdev, WO_drain_io); } else { } put_ldev(mdev); } else { } } else { } tmp___2 = drbd_may_finish_epoch(mdev, epoch, EV_BARRIER_DONE); return (tmp___2); } } static int w_flush(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { struct flush_work *fw ; struct drbd_epoch *epoch ; int tmp ; { fw = (struct flush_work *)w; epoch = fw->epoch; kfree((void const *)w); tmp = test_and_set_bit(0, (unsigned long volatile *)(& epoch->flags)); if (tmp == 0) { drbd_flush_after_epoch(mdev, epoch); } else { } drbd_may_finish_epoch(mdev, epoch, (int )mdev->state.ldv_33381.conn <= 9 ? EV_CLEANUP : EV_PUT); return (1); } } static enum finish_epoch drbd_may_finish_epoch(struct drbd_conf *mdev , struct drbd_epoch *epoch , enum epoch_event ev ) { int finish ; int epoch_size ; struct drbd_epoch *next_epoch ; int schedule_flush ; enum finish_epoch rv ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; int tmp___5 ; int tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; int tmp___9 ; struct list_head const *__mptr ; struct flush_work *fw ; void *tmp___10 ; char const *tmp___11 ; char const *tmp___12 ; { schedule_flush = 0; rv = FE_STILL_LIVE; spin_lock(& mdev->epoch_lock); ldv_43407: next_epoch = 0; finish = 0; epoch_size = atomic_read((atomic_t const *)(& epoch->epoch_size)); switch ((unsigned int )ev & 4294967263U) { case 0U: atomic_dec(& epoch->active); goto ldv_43396; case 1U: set_bit(3U, (unsigned long volatile *)(& epoch->flags)); tmp = constant_test_bit(2U, (unsigned long const volatile *)(& epoch->flags)); if (((tmp != 0 && epoch_size == 1) && (unsigned int )mdev->write_ordering != 3U) && (unsigned long )mdev->current_epoch == (unsigned long )epoch) { clear_bit(2, (unsigned long volatile *)(& epoch->flags)); } else { } goto ldv_43396; case 2U: set_bit(1U, (unsigned long volatile *)(& epoch->flags)); goto ldv_43396; case 3U: ; goto ldv_43396; } ldv_43396: ; if (epoch_size != 0) { tmp___3 = atomic_read((atomic_t const *)(& epoch->active)); if (tmp___3 == 0) { tmp___4 = constant_test_bit(3U, (unsigned long const volatile *)(& epoch->flags)); if (tmp___4 != 0) { if ((unsigned long )epoch->list.prev == (unsigned long )(& (mdev->current_epoch)->list)) { tmp___5 = constant_test_bit(4U, (unsigned long const volatile *)(& epoch->flags)); if (tmp___5 == 0) { tmp___1 = constant_test_bit(1U, (unsigned long const volatile *)(& epoch->flags)); if (tmp___1 != 0 || (unsigned int )mdev->write_ordering == 0U) { finish = 1; set_bit(4U, (unsigned long volatile *)(& epoch->flags)); } else if (epoch_size == 1) { tmp___2 = constant_test_bit(2U, (unsigned long const volatile *)(& epoch->flags)); if (tmp___2 != 0) { finish = 1; set_bit(4U, (unsigned long volatile *)(& epoch->flags)); } else { goto _L; } } else _L: /* CIL Label */ if (((unsigned int )ev & 32U) != 0U) { finish = 1; set_bit(4U, (unsigned long volatile *)(& epoch->flags)); } else { tmp___0 = constant_test_bit(0U, (unsigned long const volatile *)(& epoch->flags)); if (tmp___0 == 0 && (unsigned int )mdev->write_ordering == 3U) { atomic_inc(& epoch->active); schedule_flush = 1; } else { } } } else { } } else { } } else { } } else { } } else { } if (finish != 0) { if (((unsigned int )ev & 32U) == 0U) { spin_unlock(& mdev->epoch_lock); drbd_send_b_ack(mdev, epoch->barrier_nr, (u32 )epoch_size); spin_lock(& mdev->epoch_lock); } else { } atomic_dec(& mdev->unacked_cnt); tmp___9 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); if (tmp___9 < 0) { tmp___6 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: unacked_cnt = %d < 0 !\n", tmp___8, tmp___7, "drbd_may_finish_epoch", 1100, tmp___6); } else { } if ((unsigned long )mdev->current_epoch != (unsigned long )epoch) { __mptr = (struct list_head const *)epoch->list.next; next_epoch = (struct drbd_epoch *)__mptr; list_del(& epoch->list); ev = (enum epoch_event )(((unsigned int )ev & 32U) | 3U); mdev->epochs = mdev->epochs - 1U; kfree((void const *)epoch); if ((unsigned int )rv == 0U) { rv = FE_DESTROYED; } else { } } else { epoch->flags = 0UL; atomic_set(& epoch->epoch_size, 0); if ((unsigned int )rv == 0U) { rv = FE_RECYCLED; } else { } } } else { } if ((unsigned long )next_epoch == (unsigned long )((struct drbd_epoch *)0)) { goto ldv_43406; } else { } epoch = next_epoch; goto ldv_43407; ldv_43406: spin_unlock(& mdev->epoch_lock); if (schedule_flush != 0) { tmp___10 = kmalloc___1(32UL, 32U); fw = (struct flush_work *)tmp___10; if ((unsigned long )fw != (unsigned long )((struct flush_work *)0)) { fw->w.cb = & w_flush; fw->epoch = epoch; drbd_queue_work(& mdev->data.work, & fw->w); } else { tmp___11 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___12 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Could not kmalloc a flush_work obj\n", tmp___12, tmp___11); set_bit(0U, (unsigned long volatile *)(& epoch->flags)); drbd_may_finish_epoch(mdev, epoch, EV_BARRIER_DONE); drbd_may_finish_epoch(mdev, epoch, EV_PUT); } } else { } return (rv); } } void drbd_bump_write_ordering(struct drbd_conf *mdev , enum write_ordering_e wo ) { enum write_ordering_e pwo ; char *write_ordering_str[4U] ; enum write_ordering_e _min1 ; enum write_ordering_e _min2 ; char const *tmp ; char const *tmp___0 ; { write_ordering_str[0] = (char *)"none"; write_ordering_str[1] = (char *)"drain"; write_ordering_str[2] = (char *)"flush"; write_ordering_str[3] = (char *)"barrier"; pwo = mdev->write_ordering; _min1 = pwo; _min2 = wo; wo = (enum write_ordering_e )((unsigned int )_min1 < (unsigned int )_min2 ? (unsigned int )_min1 : (unsigned int )_min2); if ((unsigned int )wo == 3U && (unsigned int )*((unsigned char *)mdev->ldev + 396UL) != 0U) { wo = WO_bdev_flush; } else { } if ((unsigned int )wo == 2U && (unsigned int )*((unsigned char *)mdev->ldev + 388UL) != 0U) { wo = WO_drain_io; } else { } if ((unsigned int )wo == 1U && (unsigned int )*((unsigned char *)mdev->ldev + 396UL) != 0U) { wo = WO_none; } else { } mdev->write_ordering = wo; if ((unsigned int )mdev->write_ordering != (unsigned int )pwo || (unsigned int )wo == 3U) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Method to ensure write ordering: %s\n", tmp___0, tmp, write_ordering_str[(unsigned int )mdev->write_ordering]); } else { } return; } } int drbd_submit_ee(struct drbd_conf *mdev , struct drbd_epoch_entry *e , unsigned int const rw , int const fault_type ) { struct bio *bios ; struct bio *bio ; struct page *page ; sector_t sector ; unsigned int ds ; unsigned int n_bios ; unsigned int nr_pages ; int tmp ; int tmp___0 ; wait_queue_t __wait ; struct task_struct *tmp___1 ; int tmp___2 ; int tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; unsigned int len ; unsigned int __min1 ; unsigned int __min2 ; long tmp___6 ; int tmp___7 ; struct page *tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; char const *tmp___12 ; { bios = 0; page = e->pages; sector = e->sector; ds = e->size; n_bios = 0U; nr_pages = (unsigned int )(((unsigned long )ds + 4095UL) >> 12); tmp___3 = atomic_read((atomic_t const *)(& mdev->new_c_uuid)); if (tmp___3 != 0) { tmp = atomic_add_unless(& mdev->new_c_uuid, -1, 1); if (tmp != 0) { drbd_uuid_new_current(mdev); drbd_md_sync(mdev); atomic_dec(& mdev->new_c_uuid); __wake_up(& mdev->misc_wait, 3U, 1, 0); } else { } tmp___0 = atomic_read((atomic_t const *)(& mdev->new_c_uuid)); if (tmp___0 == 0) { goto ldv_43431; } else { } tmp___1 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___1; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_43434: prepare_to_wait(& mdev->misc_wait, & __wait, 2); tmp___2 = atomic_read((atomic_t const *)(& mdev->new_c_uuid)); if (tmp___2 == 0) { goto ldv_43433; } else { } schedule(); goto ldv_43434; ldv_43433: finish_wait(& mdev->misc_wait, & __wait); ldv_43431: ; } else { } next_bio: bio = bio_alloc(16U, (int )nr_pages); if ((unsigned long )bio == (unsigned long )((struct bio *)0)) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: submit_ee: Allocation of a bio failed\n", tmp___5, tmp___4); goto fail; } else { } bio->bi_sector = sector; bio->bi_bdev = (mdev->ldev)->backing_bdev; bio->bi_rw = (unsigned long )rw; bio->bi_private = (void *)e; bio->bi_end_io = & drbd_endio_sec; bio->bi_next = bios; bios = bio; n_bios = n_bios + 1U; goto ldv_43444; ldv_43443: __min1 = ds; __min2 = 4096U; len = __min1 < __min2 ? __min1 : __min2; tmp___7 = bio_add_page(bio, page, len, 0U); if (tmp___7 == 0) { tmp___6 = ldv__builtin_expect((unsigned int )bio->bi_vcnt == 0U, 0L); if (tmp___6 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared"), "i" (1231), "i" (12UL)); ldv_43442: ; goto ldv_43442; } else { } goto next_bio; } else { } ds = ds - len; sector = (sector_t )(len >> 9) + sector; nr_pages = nr_pages - 1U; page = page_chain_next(page); ldv_43444: ; if ((unsigned long )page != (unsigned long )((struct page *)0)) { tmp___8 = page_chain_next(page); __builtin_prefetch((void const *)tmp___8); if (1 != 0) { goto ldv_43443; } else { goto ldv_43445; } } else { } ldv_43445: ; if ((unsigned long )page != (unsigned long )((struct page *)0)) { tmp___9 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___10 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( page == NULL ) in %s:%d\n", tmp___10, tmp___9, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1238); } else { } if (ds != 0U) { tmp___11 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___12 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( ds == 0 ) in %s:%d\n", tmp___12, tmp___11, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1239); } else { } atomic_set(& e->pending_bios, (int )n_bios); ldv_43446: bio = bios; bios = bios->bi_next; bio->bi_next = 0; if ((unsigned long )bios != (unsigned long )((struct bio *)0)) { bio->bi_rw = bio->bi_rw & 0xffffffffffffff7fUL; } else { } drbd_generic_make_request(mdev, fault_type, bio); if ((unsigned long )bios != (unsigned long )((struct bio *)0) && (unsigned long )bios->bi_next != (unsigned long )((struct bio *)0)) { bios->bi_rw = bios->bi_rw & 0xffffffffffffffdfUL; } else { } if ((unsigned long )bios != (unsigned long )((struct bio *)0)) { goto ldv_43446; } else { } maybe_kick_lo(mdev); return (0); fail: ; goto ldv_43449; ldv_43448: bio = bios; bios = bios->bi_next; bio_put(bio); ldv_43449: ; if ((unsigned long )bios != (unsigned long )((struct bio *)0)) { goto ldv_43448; } else { } return (-12); } } int w_e_reissue(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { struct drbd_epoch_entry *e ; char const *tmp ; char const *tmp___0 ; struct drbd_epoch *tmp___1 ; int tmp___2 ; { e = (struct drbd_epoch_entry *)w; tmp___1 = previous_epoch(mdev, e->epoch); if ((unsigned long )tmp___1 != (unsigned long )((struct drbd_epoch *)0)) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Write ordering was not enforced (one time event)\n", tmp___0, tmp); } else { } e->w.cb = & e_end_block; tmp___2 = drbd_submit_ee(mdev, e, 1U, 4); if (tmp___2 != 0) { e->w.cb = & w_e_reissue; drbd_queue_work(& mdev->data.work, & e->w); } else { } return (1); } } static int receive_Barrier(struct drbd_conf *mdev , struct p_header *h ) { int rv ; int issue_flush ; struct p_barrier *p ; struct drbd_epoch *epoch ; int _b ; char const *tmp ; char const *tmp___0 ; int _b___0 ; char const *tmp___1 ; char const *tmp___2 ; enum finish_epoch tmp___3 ; enum finish_epoch tmp___4 ; void *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; int tmp___8 ; enum finish_epoch tmp___9 ; int tmp___10 ; { p = (struct p_barrier *)h; _b = (unsigned int )h->length != 8U; if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "receive_Barrier", (char *)"h->length != (sizeof(*p)-sizeof(*h))", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1312); } else { } if (_b != 0) { return (0); } else { } rv = drbd_recv(mdev, (void *)(& h->payload), (size_t )h->length); _b___0 = (int )h->length != rv; if (_b___0 != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___2, tmp___1, "receive_Barrier", (char *)"rv != h->length", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1315); } else { } if (_b___0 != 0) { return (0); } else { } inc_unacked(mdev); if ((mdev->net_conf)->wire_protocol != 3) { drbd_kick_lo(mdev); } else { } (mdev->current_epoch)->barrier_nr = p->barrier; tmp___3 = drbd_may_finish_epoch(mdev, mdev->current_epoch, EV_GOT_BARRIER_NR); rv = (int )tmp___3; switch ((unsigned int )mdev->write_ordering) { case 3U: ; case 0U: ; if (rv == 2) { return (1); } else { } goto ldv_43472; case 2U: ; case 1U: ; if (rv == 0) { set_bit(0U, (unsigned long volatile *)(& (mdev->current_epoch)->flags)); drbd_wait_ee_list_empty(mdev, & mdev->active_ee); tmp___4 = drbd_flush_after_epoch(mdev, mdev->current_epoch); rv = (int )tmp___4; } else { } if (rv == 2) { return (1); } else { } goto ldv_43472; } ldv_43472: tmp___5 = kmalloc___1(40UL, 16U); epoch = (struct drbd_epoch *)tmp___5; if ((unsigned long )epoch == (unsigned long )((struct drbd_epoch *)0)) { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Allocation of an epoch failed, slowing down\n", tmp___7, tmp___6); tmp___8 = test_and_set_bit(0, (unsigned long volatile *)(& (mdev->current_epoch)->flags)); issue_flush = tmp___8 == 0; drbd_wait_ee_list_empty(mdev, & mdev->active_ee); if (issue_flush != 0) { tmp___9 = drbd_flush_after_epoch(mdev, mdev->current_epoch); rv = (int )tmp___9; if (rv == 2) { return (1); } else { } } else { } drbd_wait_ee_list_empty(mdev, & mdev->done_ee); return (1); } else { } epoch->flags = 0UL; atomic_set(& epoch->epoch_size, 0); atomic_set(& epoch->active, 0); spin_lock(& mdev->epoch_lock); tmp___10 = atomic_read((atomic_t const *)(& (mdev->current_epoch)->epoch_size)); if (tmp___10 != 0) { list_add(& epoch->list, & (mdev->current_epoch)->list); mdev->current_epoch = epoch; mdev->epochs = mdev->epochs + 1U; } else { kfree((void const *)epoch); } spin_unlock(& mdev->epoch_lock); return (1); } } static struct drbd_epoch_entry *read_in_block(struct drbd_conf *mdev , u64 id , sector_t sector , int data_size ) { sector_t capacity ; sector_t tmp ; struct drbd_epoch_entry *e ; struct page *page ; int dgs ; int ds ; int rr ; void *dig_in ; void *dig_vv ; unsigned long *data ; unsigned int tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; int _b ; char const *tmp___3 ; char const *tmp___4 ; int _b___0 ; char const *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; unsigned int len ; int __min1 ; int __min2 ; void *tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; int tmp___12 ; char const *tmp___13 ; char const *tmp___14 ; struct page *tmp___15 ; char const *tmp___16 ; char const *tmp___17 ; int tmp___18 ; { tmp = drbd_get_capacity(mdev->this_bdev); capacity = tmp; dig_in = mdev->int_dig_in; dig_vv = mdev->int_dig_vv; if (mdev->agreed_pro_version > 86 && (unsigned long )mdev->integrity_r_tfm != (unsigned long )((struct crypto_hash *)0)) { tmp___0 = crypto_hash_digestsize(mdev->integrity_r_tfm); dgs = (int )tmp___0; } else { dgs = 0; } if (dgs != 0) { rr = drbd_recv(mdev, dig_in, (size_t )dgs); if (rr != dgs) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: short read receiving data digest: read %d expected %d\n", tmp___2, tmp___1, rr, dgs); return (0); } else { } } else { } data_size = data_size - dgs; _b = (data_size & 511) != 0; if (_b != 0) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___4, tmp___3, "read_in_block", (char *)"data_size & 0x1ff", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1416); } else { } if (_b != 0) { return (0); } else { } _b___0 = (unsigned int )data_size > 32768U; if (_b___0 != 0) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___6, tmp___5, "read_in_block", (char *)"data_size > DRBD_MAX_SEGMENT_SIZE", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1417); } else { } if (_b___0 != 0) { return (0); } else { } if ((sector_t )(data_size >> 9) + sector > capacity) { tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: capacity: %llus < sector: %llus + size: %u\n", tmp___8, tmp___7, (unsigned long long )capacity, (unsigned long long )sector, data_size); return (0); } else { } e = drbd_alloc_ee(mdev, id, sector, (unsigned int )data_size, 16U); if ((unsigned long )e == (unsigned long )((struct drbd_epoch_entry *)0)) { return (0); } else { } ds = data_size; page = e->pages; goto ldv_43501; ldv_43500: __min1 = ds; __min2 = 4096; len = (unsigned int )(__min1 < __min2 ? __min1 : __min2); tmp___9 = kmap(page); data = (unsigned long *)tmp___9; rr = drbd_recv(mdev, (void *)data, (size_t )len); tmp___12 = drbd_insert_fault(mdev, 9U); if (tmp___12 != 0) { tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Fault injection: Corrupting data on receive\n", tmp___11, tmp___10); *data = ~ *data; } else { } kunmap(page); if ((unsigned int )rr != len) { drbd_free_ee(mdev, e); tmp___13 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___14 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: short read receiving data: read %d expected %d\n", tmp___14, tmp___13, rr, len); return (0); } else { } ds = ds - rr; page = page_chain_next(page); ldv_43501: ; if ((unsigned long )page != (unsigned long )((struct page *)0)) { tmp___15 = page_chain_next(page); __builtin_prefetch((void const *)tmp___15); if (1 != 0) { goto ldv_43500; } else { goto ldv_43502; } } else { } ldv_43502: ; if (dgs != 0) { drbd_csum_ee(mdev, mdev->integrity_r_tfm, e, dig_vv); tmp___18 = memcmp((void const *)dig_in, (void const *)dig_vv, (size_t )dgs); if (tmp___18 != 0) { tmp___16 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___17 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Digest integrity check FAILED.\n", tmp___17, tmp___16); drbd_bcast_ee(mdev, "digest failed", dgs, (char const *)dig_in, (char const *)dig_vv, (struct drbd_epoch_entry const *)e); drbd_free_ee(mdev, e); return (0); } else { } } else { } mdev->recv_cnt = mdev->recv_cnt + (unsigned int )(data_size >> 9); return (e); } } static int drbd_drain_block(struct drbd_conf *mdev , int data_size ) { struct page *page ; int rr ; int rv ; void *data ; int __min1 ; int __min2 ; int __min1___0 ; int __min2___0 ; char const *tmp ; char const *tmp___0 ; int __min1___1 ; int __min2___1 ; { rv = 1; if (data_size == 0) { return (1); } else { } page = drbd_pp_alloc(mdev, 1U, 1); data = kmap(page); goto ldv_43522; ldv_43521: __min1 = data_size; __min2 = 4096; rr = drbd_recv(mdev, data, (size_t )(__min1 < __min2 ? __min1 : __min2)); __min1___1 = data_size; __min2___1 = 4096; if ((__min1___1 < __min2___1 ? __min1___1 : __min2___1) != rr) { rv = 0; __min1___0 = data_size; __min2___0 = 4096; tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: short read receiving data: read %d expected %d\n", tmp___0, tmp, rr, __min1___0 < __min2___0 ? __min1___0 : __min2___0); goto ldv_43520; } else { } data_size = data_size - rr; ldv_43522: ; if (data_size != 0) { goto ldv_43521; } else { } ldv_43520: kunmap(page); drbd_pp_free(mdev, page); return (rv); } } static int recv_dless_read(struct drbd_conf *mdev , struct drbd_request *req , sector_t sector , int data_size ) { struct bio_vec *bvec ; struct bio *bio ; int dgs ; int rr ; int i ; int expect ; void *dig_in ; void *dig_vv ; unsigned int tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; int __min1 ; int __min2 ; void *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; int tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; { dig_in = mdev->int_dig_in; dig_vv = mdev->int_dig_vv; if (mdev->agreed_pro_version > 86 && (unsigned long )mdev->integrity_r_tfm != (unsigned long )((struct crypto_hash *)0)) { tmp = crypto_hash_digestsize(mdev->integrity_r_tfm); dgs = (int )tmp; } else { dgs = 0; } if (dgs != 0) { rr = drbd_recv(mdev, dig_in, (size_t )dgs); if (rr != dgs) { tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: short read receiving data reply digest: read %d expected %d\n", tmp___1, tmp___0, rr, dgs); return (0); } else { } } else { } data_size = data_size - dgs; mdev->recv_cnt = mdev->recv_cnt + (unsigned int )(data_size >> 9); bio = req->master_bio; if (bio->bi_sector != sector) { tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( sector == bio->bi_sector ) in %s:%d\n", tmp___3, tmp___2, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1527); } else { } bvec = bio->bi_io_vec + (unsigned long )bio->bi_idx; i = (int )bio->bi_idx; goto ldv_43541; ldv_43540: __min1 = data_size; __min2 = (int )bvec->bv_len; expect = __min1 < __min2 ? __min1 : __min2; tmp___4 = kmap(bvec->bv_page); rr = drbd_recv(mdev, tmp___4 + (unsigned long )bvec->bv_offset, (size_t )expect); kunmap(bvec->bv_page); if (rr != expect) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: short read receiving data reply: read %d expected %d\n", tmp___6, tmp___5, rr, expect); return (0); } else { } data_size = data_size - rr; bvec = bvec + 1; i = i + 1; ldv_43541: ; if ((int )bio->bi_vcnt > i) { goto ldv_43540; } else { } if (dgs != 0) { drbd_csum_bio(mdev, mdev->integrity_r_tfm, bio, dig_vv); tmp___9 = memcmp((void const *)dig_in, (void const *)dig_vv, (size_t )dgs); if (tmp___9 != 0) { tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Digest integrity check FAILED. Broken NICs?\n", tmp___8, tmp___7); return (0); } else { } } else { } if (data_size != 0) { tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( data_size == 0 ) in %s:%d\n", tmp___11, tmp___10, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1552); } else { } return (1); } } static int e_end_resync_block(struct drbd_conf *mdev , struct drbd_work *w , int unused ) { struct drbd_epoch_entry *e ; sector_t sector ; int ok ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; long tmp___2 ; int tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; int tmp___6 ; { e = (struct drbd_epoch_entry *)w; sector = e->sector; tmp___1 = hlist_unhashed((struct hlist_node const *)(& e->colision)); if (tmp___1 == 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( hlist_unhashed(&e->colision) ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1564); } else { } tmp___2 = ldv__builtin_expect((e->flags & 16UL) == 0UL, 1L); if (tmp___2 != 0L) { __drbd_set_in_sync(mdev, sector, (int )e->size, "/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1567U); ok = drbd_send_ack(mdev, P_RS_WRITE_ACK, e); } else { drbd_rs_failed_io(mdev, sector, (int )e->size); ok = drbd_send_ack(mdev, P_NEG_ACK, e); } atomic_dec(& mdev->unacked_cnt); tmp___6 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); if (tmp___6 < 0) { tmp___3 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: unacked_cnt = %d < 0 !\n", tmp___5, tmp___4, "e_end_resync_block", 1575, tmp___3); } else { } return (ok); } } static int recv_resync_read(struct drbd_conf *mdev , sector_t sector , int data_size ) { struct drbd_epoch_entry *e ; int tmp ; char const *tmp___0 ; char const *tmp___1 ; int tmp___2 ; int tmp___3 ; { e = read_in_block(mdev, 0xffffffffffffffffULL, sector, data_size); if ((unsigned long )e == (unsigned long )((struct drbd_epoch_entry *)0)) { goto fail; } else { } atomic_dec(& mdev->rs_pending_cnt); tmp___2 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); if (tmp___2 < 0) { tmp = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: rs_pending_cnt = %d < 0 !\n", tmp___1, tmp___0, "recv_resync_read", 1588, tmp); } else { } inc_unacked(mdev); e->w.cb = & e_end_resync_block; spin_lock_irq(& mdev->req_lock); list_add(& e->w.list, & mdev->sync_ee); spin_unlock_irq(& mdev->req_lock); tmp___3 = drbd_submit_ee(mdev, e, 1U, 2); if (tmp___3 == 0) { return (1); } else { } drbd_free_ee(mdev, e); fail: put_ldev(mdev); return (0); } } static int receive_DataReply(struct drbd_conf *mdev , struct p_header *h ) { struct drbd_request *req ; sector_t sector ; unsigned int header_size ; unsigned int data_size ; int ok ; struct p_data *p ; int _b ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; __u64 tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; long tmp___5 ; { p = (struct p_data *)h; header_size = 24U; data_size = (unsigned int )h->length - header_size; _b = data_size == 0U; if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "receive_DataReply", (char *)"data_size == 0", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1620); } else { } if (_b != 0) { return (0); } else { } tmp___1 = drbd_recv(mdev, (void *)(& h->payload), (size_t )header_size); if ((unsigned int )tmp___1 != header_size) { return (0); } else { } tmp___2 = __fswab64(p->sector); sector = (sector_t )tmp___2; spin_lock_irq(& mdev->req_lock); req = _ar_id_to_req(mdev, p->block_id, sector); spin_unlock_irq(& mdev->req_lock); tmp___5 = ldv__builtin_expect((unsigned long )req == (unsigned long )((struct drbd_request *)0), 0L); if (tmp___5 != 0L) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Got a corrupt block_id/sector pair(1).\n", tmp___4, tmp___3); return (0); } else { } ok = recv_dless_read(mdev, req, sector, (int )data_size); if (ok != 0) { req_mod(req, data_received); } else { } return (ok); } } static int receive_RSDataReply(struct drbd_conf *mdev , struct p_header *h ) { sector_t sector ; unsigned int header_size ; unsigned int data_size ; int ok ; struct p_data *p ; int _b ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; __u64 tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; int tmp___7 ; int tmp___8 ; { p = (struct p_data *)h; header_size = 24U; data_size = (unsigned int )h->length - header_size; _b = data_size == 0U; if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "receive_RSDataReply", (char *)"data_size == 0", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1659); } else { } if (_b != 0) { return (0); } else { } tmp___1 = drbd_recv(mdev, (void *)(& h->payload), (size_t )header_size); if ((unsigned int )tmp___1 != header_size) { return (0); } else { } tmp___2 = __fswab64(p->sector); sector = (sector_t )tmp___2; if (p->block_id != 0xffffffffffffffffULL) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( p->block_id == ID_SYNCER ) in %s:%d\n", tmp___4, tmp___3, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1665); } else { } tmp___8 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___8 != 0) { ok = recv_resync_read(mdev, sector, (int )data_size); } else { tmp___7 = ___ratelimit(& drbd_ratelimit_state, "receive_RSDataReply"); if (tmp___7 != 0) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Can not write resync data to local disk.\n", tmp___6, tmp___5); } else { } ok = drbd_drain_block(mdev, (int )data_size); drbd_send_ack_dp(mdev, P_NEG_ACK, p); } return (ok); } } static int e_end_block(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { struct drbd_epoch_entry *e ; sector_t sector ; struct drbd_epoch *epoch ; int ok ; int pcmd ; int tmp ; long tmp___0 ; int tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; int tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; int tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; int tmp___10 ; { e = (struct drbd_epoch_entry *)w; sector = e->sector; ok = 1; if ((e->flags & 4UL) != 0UL) { epoch = previous_epoch(mdev, e->epoch); if ((unsigned long )epoch != (unsigned long )((struct drbd_epoch *)0)) { drbd_may_finish_epoch(mdev, epoch, cancel != 0 ? 34 : EV_BARRIER_DONE); } else { } } else { } if ((mdev->net_conf)->wire_protocol == 3) { tmp___0 = ldv__builtin_expect((e->flags & 16UL) == 0UL, 1L); if (tmp___0 != 0L) { pcmd = ((int )mdev->state.ldv_33381.conn > 15 && (int )mdev->state.ldv_33381.conn <= 21) && (e->flags & 2UL) != 0UL ? 23 : 22; tmp = drbd_send_ack(mdev, (enum drbd_packets )pcmd, e); ok = tmp & ok; if (pcmd == 23) { __drbd_set_in_sync(mdev, sector, (int )e->size, "/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1708U); } else { } } else { ok = drbd_send_ack(mdev, P_NEG_ACK, e); } atomic_dec(& mdev->unacked_cnt); tmp___4 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); if (tmp___4 < 0) { tmp___1 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: unacked_cnt = %d < 0 !\n", tmp___3, tmp___2, "e_end_block", 1714, tmp___1); } else { } } else { } if ((unsigned int )*((unsigned char *)mdev->net_conf + 528UL) != 0U) { spin_lock_irq(& mdev->req_lock); tmp___7 = hlist_unhashed((struct hlist_node const *)(& e->colision)); if (tmp___7 != 0) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( !hlist_unhashed(&e->colision) ) in %s:%d\n", tmp___6, tmp___5, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1720); } else { } hlist_del_init(& e->colision); spin_unlock_irq(& mdev->req_lock); } else { tmp___10 = hlist_unhashed((struct hlist_node const *)(& e->colision)); if (tmp___10 == 0) { tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( hlist_unhashed(&e->colision) ) in %s:%d\n", tmp___9, tmp___8, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1724); } else { } } drbd_may_finish_epoch(mdev, e->epoch, cancel != 0 ? EV_CLEANUP : EV_PUT); return (ok); } } static int e_send_discard_ack(struct drbd_conf *mdev , struct drbd_work *w , int unused ) { struct drbd_epoch_entry *e ; int ok ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; int tmp___3 ; int tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; int tmp___7 ; { e = (struct drbd_epoch_entry *)w; ok = 1; if ((mdev->net_conf)->wire_protocol != 3) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->net_conf->wire_protocol == DRBD_PROT_C ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1737); } else { } ok = drbd_send_ack(mdev, P_DISCARD_ACK, e); spin_lock_irq(& mdev->req_lock); tmp___3 = hlist_unhashed((struct hlist_node const *)(& e->colision)); if (tmp___3 != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( !hlist_unhashed(&e->colision) ) in %s:%d\n", tmp___2, tmp___1, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1741); } else { } hlist_del_init(& e->colision); spin_unlock_irq(& mdev->req_lock); atomic_dec(& mdev->unacked_cnt); tmp___7 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); if (tmp___7 < 0) { tmp___4 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: unacked_cnt = %d < 0 !\n", tmp___6, tmp___5, "e_send_discard_ack", 1745, tmp___4); } else { } return (ok); } } static int drbd_wait_peer_seq(struct drbd_conf *mdev , u32 const packet_seq ) { wait_queue_t wait ; struct task_struct *tmp ; unsigned int p_seq ; long timeout ; int ret ; int tmp___0 ; struct task_struct *tmp___1 ; int tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; { tmp = get_current(); wait.flags = 0U; wait.private = (void *)tmp; wait.func = & autoremove_wake_function; wait.task_list.next = & wait.task_list; wait.task_list.prev = & wait.task_list; ret = 0; spin_lock(& mdev->peer_seq_lock); ldv_43625: prepare_to_wait(& mdev->seq_wait, & wait, 1); tmp___0 = seq_cmp(packet_seq, mdev->peer_seq + 1U); if (tmp___0 <= 0) { goto ldv_43624; } else { } tmp___1 = get_current(); tmp___2 = signal_pending(tmp___1); if (tmp___2 != 0) { ret = -512; goto ldv_43624; } else { } p_seq = mdev->peer_seq; spin_unlock(& mdev->peer_seq_lock); timeout = schedule_timeout(7500L); spin_lock(& mdev->peer_seq_lock); if (timeout == 0L && mdev->peer_seq == p_seq) { ret = -110; tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT FAILED waited 30 seconds for sequence update, forcing reconnect\n", tmp___4, tmp___3); goto ldv_43624; } else { } goto ldv_43625; ldv_43624: finish_wait(& mdev->seq_wait, & wait); if (mdev->peer_seq + 1U == (unsigned int )packet_seq) { mdev->peer_seq = mdev->peer_seq + 1U; } else { } spin_unlock(& mdev->peer_seq_lock); return (ret); } } static int receive_Data(struct drbd_conf *mdev , struct p_header *h ) { sector_t sector ; struct drbd_epoch_entry *e ; struct p_data *p ; int header_size ; int data_size ; int rw ; u32 dp_flags ; int _b ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; int tmp___4 ; __u32 tmp___5 ; int tmp___6 ; int tmp___7 ; __u64 tmp___8 ; struct drbd_epoch *epoch ; struct list_head const *__mptr ; int tmp___9 ; int tmp___10 ; int tmp___11 ; __u32 tmp___12 ; char const *tmp___13 ; char const *tmp___14 ; int size ; int discard ; int tmp___15 ; wait_queue_t wait ; struct task_struct *tmp___16 ; struct drbd_request *i ; struct hlist_node *n ; struct hlist_head *slot ; int first ; char const *tmp___17 ; char const *tmp___18 ; long tmp___19 ; long tmp___20 ; __u32 tmp___21 ; int tmp___22 ; struct hlist_head *tmp___23 ; int have_unacked ; int have_conflict ; struct task_struct *tmp___24 ; struct task_struct *tmp___25 ; char const *tmp___26 ; char const *tmp___27 ; int tmp___28 ; struct hlist_node const *__mptr___0 ; char const *tmp___29 ; char const *tmp___30 ; struct task_struct *tmp___31 ; int tmp___32 ; char const *tmp___33 ; char const *tmp___34 ; char const *tmp___35 ; char const *tmp___36 ; int tmp___37 ; { p = (struct p_data *)h; rw = 1; header_size = 24; data_size = (int )h->length - header_size; _b = data_size == 0; if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "receive_Data", (char *)"data_size == 0", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1816); } else { } if (_b != 0) { return (0); } else { } tmp___1 = drbd_recv(mdev, (void *)(& h->payload), (size_t )header_size); if (tmp___1 != header_size) { return (0); } else { } tmp___7 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___7 == 0) { tmp___4 = ___ratelimit(& drbd_ratelimit_state, "receive_Data"); if (tmp___4 != 0) { tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Can not write mirrored data block to local disk.\n", tmp___3, tmp___2); } else { } spin_lock(& mdev->peer_seq_lock); tmp___5 = __fswab32(p->seq_num); if (mdev->peer_seq + 1U == tmp___5) { mdev->peer_seq = mdev->peer_seq + 1U; } else { } spin_unlock(& mdev->peer_seq_lock); drbd_send_ack_dp(mdev, P_NEG_ACK, p); atomic_inc(& (mdev->current_epoch)->epoch_size); tmp___6 = drbd_drain_block(mdev, data_size); return (tmp___6); } else { } tmp___8 = __fswab64(p->sector); sector = (sector_t )tmp___8; e = read_in_block(mdev, p->block_id, sector, data_size); if ((unsigned long )e == (unsigned long )((struct drbd_epoch_entry *)0)) { put_ldev(mdev); return (0); } else { } e->w.cb = & e_end_block; spin_lock(& mdev->epoch_lock); e->epoch = mdev->current_epoch; atomic_inc(& (e->epoch)->epoch_size); atomic_inc(& (e->epoch)->active); if ((unsigned int )mdev->write_ordering == 3U) { tmp___11 = atomic_read((atomic_t const *)(& (e->epoch)->epoch_size)); if (tmp___11 == 1) { __mptr = (struct list_head const *)(e->epoch)->list.prev; epoch = (struct drbd_epoch *)__mptr; if ((unsigned long )e->epoch == (unsigned long )epoch) { set_bit(2U, (unsigned long volatile *)(& (e->epoch)->flags)); rw = rw | 32; e->flags = e->flags | 4UL; } else { tmp___9 = atomic_read((atomic_t const *)(& epoch->epoch_size)); if (tmp___9 > 1) { set_bit(0U, (unsigned long volatile *)(& epoch->flags)); set_bit(2U, (unsigned long volatile *)(& (e->epoch)->flags)); rw = rw | 32; e->flags = e->flags | 4UL; } else { tmp___10 = constant_test_bit(2U, (unsigned long const volatile *)(& epoch->flags)); if (tmp___10 == 0) { set_bit(0U, (unsigned long volatile *)(& epoch->flags)); set_bit(2U, (unsigned long volatile *)(& (e->epoch)->flags)); rw = rw | 32; e->flags = e->flags | 4UL; } else { } } } } else { } } else { } spin_unlock(& mdev->epoch_lock); tmp___12 = __fswab32(p->dp_flags); dp_flags = tmp___12; if ((int )dp_flags & 1) { tmp___13 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___14 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT FAILED would have submitted barrier request\n", tmp___14, tmp___13); } else { } if ((dp_flags & 2U) != 0U) { rw = rw | 192; } else { } if ((dp_flags & 4U) != 0U) { e->flags = e->flags | 2UL; } else { } if ((unsigned int )*((unsigned char *)mdev->net_conf + 528UL) == 0U) { spin_lock_irq(& mdev->req_lock); } else { size = (int const )e->size; tmp___15 = constant_test_bit(7U, (unsigned long const volatile *)(& mdev->flags)); discard = tmp___15; tmp___16 = get_current(); wait.flags = 0U; wait.private = (void *)tmp___16; wait.func = & autoremove_wake_function; wait.task_list.next = & wait.task_list; wait.task_list.prev = & wait.task_list; if ((mdev->net_conf)->wire_protocol != 3) { tmp___17 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___18 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->net_conf->wire_protocol == DRBD_PROT_C ) in %s:%d\n", tmp___18, tmp___17, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 1900); } else { } tmp___19 = ldv__builtin_expect((unsigned long )mdev->ee_hash == (unsigned long )((struct hlist_head *)0), 0L); if (tmp___19 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared"), "i" (1901), "i" (12UL)); ldv_43650: ; goto ldv_43650; } else { } tmp___20 = ldv__builtin_expect((unsigned long )mdev->tl_hash == (unsigned long )((struct hlist_head *)0), 0L); if (tmp___20 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared"), "i" (1902), "i" (12UL)); ldv_43651: ; goto ldv_43651; } else { } tmp___21 = __fswab32(p->seq_num); tmp___22 = drbd_wait_peer_seq(mdev, tmp___21); if (tmp___22 != 0) { goto out_interrupted; } else { } spin_lock_irq(& mdev->req_lock); tmp___23 = ee_hash_slot(mdev, sector); hlist_add_head(& e->colision, tmp___23); slot = tl_hash_slot(mdev, sector); first = 1; ldv_43663: have_unacked = 0; have_conflict = 0; prepare_to_wait(& mdev->misc_wait, & wait, 1); n = slot->first; goto ldv_43660; ldv_43659: tmp___28 = overlaps(i->sector, (int )i->size, sector, size); if (tmp___28 != 0) { if (first != 0) { tmp___24 = get_current(); tmp___25 = get_current(); tmp___26 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___27 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: %s[%u] Concurrent local write detected!\tnew: %llus +%u; pending: %llus +%u\n", tmp___27, tmp___26, (char *)(& tmp___25->comm), tmp___24->pid, (unsigned long long )sector, size, (unsigned long long )i->sector, i->size); } else { } if ((i->rq_state & 8UL) != 0UL) { have_unacked = have_unacked + 1; } else { } have_conflict = have_conflict + 1; } else { } n = n->next; ldv_43660: ; if ((unsigned long )n != (unsigned long )((struct hlist_node *)0)) { __builtin_prefetch((void const *)n->next); if (1 != 0) { __mptr___0 = (struct hlist_node const *)n; i = (struct drbd_request *)__mptr___0 + 0xffffffffffffffd8UL; if (1 != 0) { goto ldv_43659; } else { goto ldv_43661; } } else { goto ldv_43661; } } else { } ldv_43661: ; if (have_conflict == 0) { goto ldv_43662; } else { } if ((first != 0 && discard != 0) && have_unacked != 0) { tmp___29 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___30 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: Concurrent write! [DISCARD BY FLAG] sec=%llus\n", tmp___30, tmp___29, (unsigned long long )sector); inc_unacked(mdev); e->w.cb = & e_send_discard_ack; list_add_tail(& e->w.list, & mdev->done_ee); spin_unlock_irq(& mdev->req_lock); put_ldev(mdev); wake_asender(mdev); finish_wait(& mdev->misc_wait, & wait); return (1); } else { } tmp___31 = get_current(); tmp___32 = signal_pending(tmp___31); if (tmp___32 != 0) { hlist_del_init(& e->colision); spin_unlock_irq(& mdev->req_lock); finish_wait(& mdev->misc_wait, & wait); goto out_interrupted; } else { } spin_unlock_irq(& mdev->req_lock); if (first != 0) { first = 0; tmp___33 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___34 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: Concurrent write! [W AFTERWARDS] sec=%llus\n", tmp___34, tmp___33, (unsigned long long )sector); } else if (discard != 0) { if (have_unacked != 0) { tmp___35 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___36 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( have_unacked == 0 ) in %s:%d\n", tmp___36, tmp___35, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 2008); } else { } } else { } schedule(); spin_lock_irq(& mdev->req_lock); goto ldv_43663; ldv_43662: finish_wait(& mdev->misc_wait, & wait); } list_add(& e->w.list, & mdev->active_ee); spin_unlock_irq(& mdev->req_lock); switch ((mdev->net_conf)->wire_protocol) { case 3: inc_unacked(mdev); goto ldv_43665; case 2: drbd_send_ack(mdev, P_RECV_ACK, e); goto ldv_43665; case 1: ; goto ldv_43665; } ldv_43665: ; if (*((unsigned int *)mdev + 497UL) == 0U) { __drbd_set_out_of_sync(mdev, e->sector, (int )e->size, "/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 2037U); e->flags = e->flags | 1UL; drbd_al_begin_io(mdev, e->sector); } else { } tmp___37 = drbd_submit_ee(mdev, e, (unsigned int const )rw, 4); if (tmp___37 == 0) { return (1); } else { } out_interrupted: put_ldev(mdev); drbd_free_ee(mdev, e); return (0); } } static int receive_DataRequest(struct drbd_conf *mdev , struct p_header *h ) { sector_t sector ; sector_t capacity ; sector_t tmp ; struct drbd_epoch_entry *e ; struct digest_info *di ; int size ; int digest_size ; unsigned int fault_type ; struct p_block_req *p ; int brps ; int tmp___0 ; __u64 tmp___1 ; __u32 tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; int tmp___9 ; int tmp___10 ; int tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; struct task_struct *tmp___14 ; int tmp___15 ; int tmp___16 ; void *tmp___17 ; int tmp___18 ; char const *tmp___19 ; char const *tmp___20 ; int tmp___21 ; char const *tmp___22 ; char const *tmp___23 ; int tmp___24 ; char const *tmp___25 ; char const *tmp___26 ; struct task_struct *tmp___27 ; int tmp___28 ; int tmp___29 ; char const *tmp___30 ; char const *tmp___31 ; char const *tmp___32 ; char const *tmp___33 ; char const *tmp___34 ; char const *tmp___35 ; char const *tmp___36 ; struct task_struct *tmp___37 ; int tmp___38 ; int tmp___39 ; char const *tmp___40 ; char const *tmp___41 ; char const *tmp___42 ; int tmp___43 ; { tmp = drbd_get_capacity(mdev->this_bdev); capacity = tmp; di = 0; p = (struct p_block_req *)h; brps = 24; tmp___0 = drbd_recv(mdev, (void *)(& h->payload), (size_t )brps); if (tmp___0 != brps) { return (0); } else { } tmp___1 = __fswab64(p->sector); sector = (sector_t )tmp___1; tmp___2 = __fswab32(p->blksize); size = (int )tmp___2; if ((size <= 0 || (size & 511) != 0) || (unsigned int )size > 32768U) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s:%d: sector: %llus, size: %u\n", tmp___4, tmp___3, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 2074, (unsigned long long )sector, size); return (0); } else { } if ((sector_t )(size >> 9) + sector > capacity) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s:%d: sector: %llus, size: %u\n", tmp___6, tmp___5, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 2079, (unsigned long long )sector, size); return (0); } else { } tmp___11 = _get_ldev_if_state(mdev, D_UP_TO_DATE); if (tmp___11 == 0) { tmp___9 = ___ratelimit(& drbd_ratelimit_state, "receive_DataRequest"); if (tmp___9 != 0) { tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Can not satisfy peer\'s read request, no local data.\n", tmp___8, tmp___7); } else { } drbd_send_ack_rp(mdev, (unsigned int )h->command == 8U ? P_NEG_DREPLY : P_NEG_RS_DREPLY, p); tmp___10 = drbd_drain_block(mdev, (int )h->length - brps); return (tmp___10); } else { } e = drbd_alloc_ee(mdev, p->block_id, sector, (unsigned int )size, 16U); if ((unsigned long )e == (unsigned long )((struct drbd_epoch_entry *)0)) { put_ldev(mdev); return (0); } else { } switch ((int )h->command) { case 8: e->w.cb = & w_e_end_data_req; fault_type = 5U; goto ldv_43683; case 9: e->w.cb = & w_e_end_rsdata_req; fault_type = 3U; tmp___16 = drbd_rs_begin_io(mdev, sector); if (tmp___16 == 0) { tmp___14 = get_current(); tmp___15 = signal_pending(tmp___14); if (tmp___15 == 0) { tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( signal_pending(current) ) in %s:%d\n", tmp___13, tmp___12, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 2117); } else { } goto out_free_e; } else { } goto ldv_43683; case 31: ; case 33: fault_type = 3U; digest_size = (int )h->length - brps; tmp___17 = kmalloc___1((unsigned long )digest_size + 16UL, 16U); di = (struct digest_info *)tmp___17; if ((unsigned long )di == (unsigned long )((struct digest_info *)0)) { goto out_free_e; } else { } di->digest_size = digest_size; di->digest = (void *)di + 16U; tmp___18 = drbd_recv(mdev, di->digest, (size_t )digest_size); if (tmp___18 != digest_size) { goto out_free_e; } else { } e->block_id = (unsigned long long )di; if ((unsigned int )h->command == 33U) { if (mdev->agreed_pro_version <= 88) { tmp___19 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___20 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->agreed_pro_version >= 89 ) in %s:%d\n", tmp___20, tmp___19, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 2138); } else { } e->w.cb = & w_e_end_csum_rs_req; } else if ((unsigned int )h->command == 31U) { e->w.cb = & w_e_end_ov_reply; atomic_dec(& mdev->rs_pending_cnt); tmp___24 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); if (tmp___24 < 0) { tmp___21 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); tmp___22 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___23 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: rs_pending_cnt = %d < 0 !\n", tmp___23, tmp___22, "receive_DataRequest", 2142, tmp___21); } else { } goto ldv_43683; } else { } tmp___29 = drbd_rs_begin_io(mdev, sector); if (tmp___29 == 0) { tmp___27 = get_current(); tmp___28 = signal_pending(tmp___27); if (tmp___28 == 0) { tmp___25 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___26 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( signal_pending(current) ) in %s:%d\n", tmp___26, tmp___25, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 2148); } else { } goto out_free_e; } else { } goto ldv_43683; case 30: ; if ((int )mdev->state.ldv_33381.conn > 9 && (unsigned int )*((unsigned short *)mdev + 994UL) != 304U) { tmp___30 = drbd_conn_str((enum drbd_conns )mdev->state.ldv_33381.conn); tmp___31 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___32 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: ASSERT FAILED: got P_OV_REQUEST while being %s\n", tmp___32, tmp___31, tmp___30); } else { } if (mdev->ov_start_sector == 0xffffffffffffffffUL && mdev->agreed_pro_version > 89) { mdev->ov_start_sector = sector; mdev->ov_position = sector; mdev->ov_left = mdev->rs_total - (sector >> 3); tmp___33 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___34 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Online Verify start sector: %llu\n", tmp___34, tmp___33, (unsigned long long )sector); } else { } e->w.cb = & w_e_end_ov_req; fault_type = 3U; tmp___39 = drbd_rs_begin_io(mdev, sector); if (tmp___39 == 0) { tmp___37 = get_current(); tmp___38 = signal_pending(tmp___37); if (tmp___38 == 0) { tmp___35 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___36 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( signal_pending(current) ) in %s:%d\n", tmp___36, tmp___35, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 2176); } else { } goto out_free_e; } else { } goto ldv_43683; default: tmp___40 = cmdname((enum drbd_packets )h->command); tmp___41 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___42 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: unexpected command (%s) in receive_DataRequest\n", tmp___42, tmp___41, tmp___40); fault_type = 10U; } ldv_43683: spin_lock_irq(& mdev->req_lock); list_add(& e->w.list, & mdev->read_ee); spin_unlock_irq(& mdev->req_lock); inc_unacked(mdev); tmp___43 = drbd_submit_ee(mdev, e, 0U, (int const )fault_type); if (tmp___43 == 0) { return (1); } else { } out_free_e: kfree((void const *)di); put_ldev(mdev); drbd_free_ee(mdev, e); return (0); } } static int drbd_asb_recover_0p(struct drbd_conf *mdev ) { int self ; int peer ; int rv ; unsigned long ch_self ; unsigned long ch_peer ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; int tmp___3 ; int tmp___4 ; { rv = -100; self = (int )(mdev->ldev)->md.uuid[1] & 1; peer = (int )*(mdev->p_uuid + 1UL) & 1; ch_peer = (unsigned long )*(mdev->p_uuid + 4UL); ch_self = mdev->comm_bm_set; switch ((mdev->net_conf)->after_sb_0p) { case 7: ; case 8: ; case 9: tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Configuration error.\n", tmp___0, tmp); goto ldv_43704; case 0: ; goto ldv_43704; case 1: ; if (self == 0 && peer == 1) { rv = -1; goto ldv_43704; } else { } if (self == 1 && peer == 0) { rv = 1; goto ldv_43704; } else { } case 2: ; if (self == 0 && peer == 1) { rv = 1; goto ldv_43704; } else { } if (self == 1 && peer == 0) { rv = -1; goto ldv_43704; } else { } tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Discard younger/older primary did not find a decision\nUsing discard-least-changes instead\n", tmp___2, tmp___1); case 3: ; if (ch_peer == 0UL && ch_self == 0UL) { tmp___3 = constant_test_bit(7U, (unsigned long const volatile *)(& mdev->flags)); rv = tmp___3 != 0 ? -1 : 1; goto ldv_43704; } else { if (ch_peer == 0UL) { rv = 1; goto ldv_43704; } else { } if (ch_self == 0UL) { rv = -1; goto ldv_43704; } else { } } if ((mdev->net_conf)->after_sb_0p == 3) { goto ldv_43704; } else { } case 4: ; if (ch_self < ch_peer) { rv = -1; } else if (ch_self > ch_peer) { rv = 1; } else { tmp___4 = constant_test_bit(7U, (unsigned long const volatile *)(& mdev->flags)); rv = tmp___4 != 0 ? -1 : 1; } goto ldv_43704; case 5: rv = -1; goto ldv_43704; case 6: rv = 1; } ldv_43704: ; return (rv); } } static int drbd_asb_recover_1p(struct drbd_conf *mdev ) { int self ; int peer ; int hg ; int rv ; char const *tmp ; char const *tmp___0 ; union drbd_state val ; union drbd_state mask ; char const *tmp___1 ; char const *tmp___2 ; { rv = -100; self = (int )(mdev->ldev)->md.uuid[1] & 1; peer = (int )*(mdev->p_uuid + 1UL) & 1; switch ((mdev->net_conf)->after_sb_1p) { case 1: ; case 2: ; case 4: ; case 5: ; case 6: tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Configuration error.\n", tmp___0, tmp); goto ldv_43724; case 0: ; goto ldv_43724; case 7: hg = drbd_asb_recover_0p(mdev); if (hg == -1 && (unsigned int )*((unsigned char *)mdev + 1988UL) == 2U) { rv = hg; } else { } if (hg == 1 && (unsigned int )*((unsigned char *)mdev + 1988UL) == 1U) { rv = hg; } else { } goto ldv_43724; case 10: rv = drbd_asb_recover_0p(mdev); goto ldv_43724; case 8: ; return ((unsigned int )*((unsigned char *)mdev + 1988UL) == 1U ? 1 : -1); case 9: hg = drbd_asb_recover_0p(mdev); if (hg == -1 && (unsigned int )*((unsigned char *)mdev + 1988UL) == 1U) { self = drbd_set_role(mdev, R_SECONDARY, 0); val.i = 0U; val.ldv_33381.role = 2U; mask.i = 0U; mask.ldv_33381.role = 3U; self = drbd_change_state(mdev, CS_VERBOSE, mask, val); if (self != 1) { drbd_khelper(mdev, (char *)"pri-lost-after-sb"); } else { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Successfully gave up primary role.\n", tmp___2, tmp___1); rv = hg; } } else { rv = hg; } } ldv_43724: ; return (rv); } } static int drbd_asb_recover_2p(struct drbd_conf *mdev ) { int self ; int peer ; int hg ; int rv ; char const *tmp ; char const *tmp___0 ; union drbd_state val ; union drbd_state mask ; char const *tmp___1 ; char const *tmp___2 ; { rv = -100; self = (int )(mdev->ldev)->md.uuid[1] & 1; peer = (int )*(mdev->p_uuid + 1UL) & 1; switch ((mdev->net_conf)->after_sb_2p) { case 1: ; case 2: ; case 4: ; case 5: ; case 6: ; case 7: ; case 8: tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Configuration error.\n", tmp___0, tmp); goto ldv_43748; case 10: rv = drbd_asb_recover_0p(mdev); goto ldv_43748; case 0: ; goto ldv_43748; case 9: hg = drbd_asb_recover_0p(mdev); if (hg == -1) { val.i = 0U; val.ldv_33381.role = 2U; mask.i = 0U; mask.ldv_33381.role = 3U; self = drbd_change_state(mdev, CS_VERBOSE, mask, val); if (self != 1) { drbd_khelper(mdev, (char *)"pri-lost-after-sb"); } else { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Successfully gave up primary role.\n", tmp___2, tmp___1); rv = hg; } } else { rv = hg; } } ldv_43748: ; return (rv); } } static void drbd_uuid_dump(struct drbd_conf *mdev , char *text , u64 *uuid , u64 bits , u64 flags ) { char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; { if ((unsigned long )uuid == (unsigned long )((u64 *)0)) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: %s uuid info vanished while I was looking!\n", tmp___0, tmp, text); return; } else { } tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: %s %016llX:%016llX:%016llX:%016llX bits:%llu flags:%llX\n", tmp___2, tmp___1, text, *uuid, *(uuid + 1UL), *(uuid + 2UL), *(uuid + 3UL), bits, flags); return; } } static int drbd_uuid_compare(struct drbd_conf *mdev , int *rule_nr ) { u64 self ; u64 peer ; int i ; int j ; int rct ; int dc ; char const *tmp ; char const *tmp___0 ; unsigned long tmp___1 ; u64 tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; int tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; unsigned long tmp___12 ; u64 tmp___13 ; { self = (mdev->ldev)->md.uuid[0] & 0xfffffffffffffffeULL; peer = *(mdev->p_uuid) & 0xfffffffffffffffeULL; *rule_nr = 10; if (self == 4ULL && peer == 4ULL) { return (0); } else { } *rule_nr = 20; if ((self == 4ULL || self == 0ULL) && peer != 4ULL) { return (-2); } else { } *rule_nr = 30; if (self != 4ULL && (peer == 4ULL || peer == 0ULL)) { return (2); } else { } if (self == peer) { if (*(mdev->p_uuid + 1UL) == 0ULL && (mdev->ldev)->md.uuid[1] != 0ULL) { if (mdev->agreed_pro_version <= 90) { return (-1001); } else { } if ((((mdev->ldev)->md.uuid[1] ^ *(mdev->p_uuid + 2UL)) & 0xfffffffffffffffeULL) == 0ULL && (((mdev->ldev)->md.uuid[2] ^ *(mdev->p_uuid + 3UL)) & 0xfffffffffffffffeULL) == 0ULL) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: was SyncSource, missed the resync finished event, corrected myself:\n", tmp___0, tmp); drbd_uuid_set_bm(mdev, 0ULL); if ((int )mdev->state.ldv_33381.disk > 2) { tmp___1 = drbd_bm_total_weight(mdev); tmp___2 = (u64 )tmp___1; } else { tmp___2 = 0ULL; } drbd_uuid_dump(mdev, (char *)"self", (u64 *)(& (mdev->ldev)->md.uuid), tmp___2, 0ULL); *rule_nr = 34; } else { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: was SyncSource (peer failed to write sync_uuid)\n", tmp___4, tmp___3); *rule_nr = 36; } return (1); } else { } if ((mdev->ldev)->md.uuid[1] == 0ULL && *(mdev->p_uuid + 1UL) != 0ULL) { if (mdev->agreed_pro_version <= 90) { return (-1001); } else { } if ((((mdev->ldev)->md.uuid[2] ^ *(mdev->p_uuid + 1UL)) & 0xfffffffffffffffeULL) == 0ULL && (((mdev->ldev)->md.uuid[3] ^ *(mdev->p_uuid + 2UL)) & 0xfffffffffffffffeULL) == 0ULL) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: was SyncTarget, peer missed the resync finished event, corrected peer:\n", tmp___6, tmp___5); *(mdev->p_uuid + 3UL) = *(mdev->p_uuid + 2UL); *(mdev->p_uuid + 2UL) = *(mdev->p_uuid + 1UL); *(mdev->p_uuid + 1UL) = 0ULL; drbd_uuid_dump(mdev, (char *)"peer", mdev->p_uuid, *(mdev->p_uuid + 4UL), *(mdev->p_uuid + 5UL)); *rule_nr = 35; } else { tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: was SyncTarget (failed to write sync_uuid)\n", tmp___8, tmp___7); *rule_nr = 37; } return (-1); } else { } tmp___9 = constant_test_bit(12U, (unsigned long const volatile *)(& mdev->flags)); rct = (int )((tmp___9 != 0 ? 1U : 0U) + ((unsigned int )*(mdev->p_uuid + 5UL) & 2U)); *rule_nr = 40; switch (rct) { case 0: ; return (0); case 1: ; return (1); case 2: ; return (-1); case 3: dc = constant_test_bit(7U, (unsigned long const volatile *)(& mdev->flags)); return (dc != 0 ? -1 : 1); } } else { } *rule_nr = 50; peer = *(mdev->p_uuid + 1UL) & 0xfffffffffffffffeULL; if (self == peer) { return (-1); } else { } *rule_nr = 51; peer = *(mdev->p_uuid + 2UL) & 0xfffffffffffffffeULL; if (self == peer) { self = (mdev->ldev)->md.uuid[2] & 0xfffffffffffffffeULL; peer = *(mdev->p_uuid + 3UL) & 0xfffffffffffffffeULL; if (self == peer) { if (mdev->agreed_pro_version <= 90) { return (-1001); } else { } *(mdev->p_uuid + 1UL) = *(mdev->p_uuid + 2UL); *(mdev->p_uuid + 2UL) = *(mdev->p_uuid + 3UL); return (-1); } else { } } else { } *rule_nr = 60; self = (mdev->ldev)->md.uuid[0] & 0xfffffffffffffffeULL; i = 2; goto ldv_43778; ldv_43777: peer = *(mdev->p_uuid + (unsigned long )i) & 0xfffffffffffffffeULL; if (self == peer) { return (-2); } else { } i = i + 1; ldv_43778: ; if (i <= 3) { goto ldv_43777; } else { } *rule_nr = 70; self = (mdev->ldev)->md.uuid[1] & 0xfffffffffffffffeULL; peer = *(mdev->p_uuid) & 0xfffffffffffffffeULL; if (self == peer) { return (1); } else { } *rule_nr = 71; self = (mdev->ldev)->md.uuid[2] & 0xfffffffffffffffeULL; if (self == peer) { self = (mdev->ldev)->md.uuid[3] & 0xfffffffffffffffeULL; peer = *(mdev->p_uuid + 2UL) & 0xfffffffffffffffeULL; if (self == peer) { if (mdev->agreed_pro_version <= 90) { return (-1001); } else { } _drbd_uuid_set(mdev, 1, (mdev->ldev)->md.uuid[2]); _drbd_uuid_set(mdev, 2, (mdev->ldev)->md.uuid[3]); tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Undid last start of resync:\n", tmp___11, tmp___10); if ((int )mdev->state.ldv_33381.disk > 2) { tmp___12 = drbd_bm_total_weight(mdev); tmp___13 = (u64 )tmp___12; } else { tmp___13 = 0ULL; } drbd_uuid_dump(mdev, (char *)"self", (u64 *)(& (mdev->ldev)->md.uuid), tmp___13, 0ULL); return (1); } else { } } else { } *rule_nr = 80; peer = *(mdev->p_uuid) & 0xfffffffffffffffeULL; i = 2; goto ldv_43781; ldv_43780: self = (mdev->ldev)->md.uuid[i] & 0xfffffffffffffffeULL; if (self == peer) { return (2); } else { } i = i + 1; ldv_43781: ; if (i <= 3) { goto ldv_43780; } else { } *rule_nr = 90; self = (mdev->ldev)->md.uuid[1] & 0xfffffffffffffffeULL; peer = *(mdev->p_uuid + 1UL) & 0xfffffffffffffffeULL; if (self == peer && self != 0ULL) { return (100); } else { } *rule_nr = 100; i = 2; goto ldv_43787; ldv_43786: self = (mdev->ldev)->md.uuid[i] & 0xfffffffffffffffeULL; j = 2; goto ldv_43784; ldv_43783: peer = *(mdev->p_uuid + (unsigned long )j) & 0xfffffffffffffffeULL; if (self == peer) { return (-100); } else { } j = j + 1; ldv_43784: ; if (j <= 3) { goto ldv_43783; } else { } i = i + 1; ldv_43787: ; if (i <= 3) { goto ldv_43786; } else { } return (-1000); } } static enum drbd_conns drbd_sync_handshake(struct drbd_conf *mdev , enum drbd_role peer_role , enum drbd_disk_state peer_disk ) { int hg ; int rule_nr ; enum drbd_conns rv ; enum drbd_disk_state mydisk ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; int f ; long __x ; int tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; long __x___0 ; int pcount ; int forced ; char const *tmp___10 ; char const *tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; long __x___1 ; char const *tmp___14 ; char const *tmp___15 ; long __x___2 ; char const *tmp___16 ; char const *tmp___17 ; char const *tmp___18 ; char const *tmp___19 ; char const *tmp___20 ; char const *tmp___21 ; char const *tmp___22 ; char const *tmp___23 ; char const *tmp___24 ; char const *tmp___25 ; long __x___3 ; char const *tmp___26 ; char const *tmp___27 ; char const *tmp___28 ; int tmp___29 ; char const *tmp___30 ; char const *tmp___31 ; int tmp___32 ; long __x___4 ; unsigned long tmp___33 ; char const *tmp___34 ; char const *tmp___35 ; unsigned long tmp___36 ; { rv = C_MASK; mydisk = (enum drbd_disk_state )mdev->state.ldv_33381.disk; if ((unsigned int )mydisk == 3U) { mydisk = (enum drbd_disk_state )mdev->new_state_tmp.ldv_33381.disk; } else { } tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: drbd_sync_handshake:\n", tmp___0, tmp); drbd_uuid_dump(mdev, (char *)"self", (u64 *)(& (mdev->ldev)->md.uuid), (u64 )mdev->comm_bm_set, 0ULL); drbd_uuid_dump(mdev, (char *)"peer", mdev->p_uuid, *(mdev->p_uuid + 4UL), *(mdev->p_uuid + 5UL)); hg = drbd_uuid_compare(mdev, & rule_nr); tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: uuid_compare()=%d by rule %d\n", tmp___2, tmp___1, hg, rule_nr); if (hg == -1000) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: Unrelated data, aborting!\n", tmp___4, tmp___3); return (C_MASK); } else { } if (hg == -1001) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: To resolve this both sides have to support at least protocol\n", tmp___6, tmp___5); return (C_MASK); } else { } if (((unsigned int )mydisk == 4U && (unsigned int )peer_disk > 4U) || ((unsigned int )peer_disk == 4U && (unsigned int )mydisk > 4U)) { if (hg == -100) { tmp___7 = 1; } else { __x = (long )hg; if ((__x < 0L ? - __x : __x) == 2L) { tmp___7 = 1; } else { tmp___7 = 0; } } f = tmp___7; hg = (unsigned int )mydisk > 4U ? 1 : -1; if (f != 0) { hg = hg * 2; } else { } tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Becoming sync %s due to disk states.\n", tmp___9, tmp___8, hg > 0 ? (char *)"source" : (char *)"target"); } else { } __x___0 = (long )hg; if ((__x___0 < 0L ? - __x___0 : __x___0) == 100L) { drbd_khelper(mdev, (char *)"initial-split-brain"); } else { } if (hg == 100 || (hg == -100 && (unsigned int )*((unsigned char *)mdev->net_conf + 528UL) != 0U)) { pcount = ((unsigned int )*((unsigned char *)mdev + 1988UL) == 1U) + ((unsigned int )peer_role == 1U); forced = hg == -100; switch (pcount) { case 0: hg = drbd_asb_recover_0p(mdev); goto ldv_43806; case 1: hg = drbd_asb_recover_1p(mdev); goto ldv_43806; case 2: hg = drbd_asb_recover_2p(mdev); goto ldv_43806; } ldv_43806: __x___1 = (long )hg; if ((__x___1 < 0L ? - __x___1 : __x___1) <= 99L) { tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Split-Brain detected, %d primaries, automatically solved. Sync from %s node\n", tmp___11, tmp___10, pcount, hg < 0 ? (char *)"peer" : (char *)"this"); if (forced != 0) { tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Doing a full sync, since UUIDs where ambiguous.\n", tmp___13, tmp___12); hg = hg * 2; } else { } } else { } } else { } if (hg == -100) { if ((unsigned int )*((unsigned char *)mdev->net_conf + 528UL) != 0U && (*(mdev->p_uuid + 5UL) & 1ULL) == 0ULL) { hg = -1; } else { } if ((unsigned int )*((unsigned char *)mdev->net_conf + 528UL) == 0U && (int )*(mdev->p_uuid + 5UL) & 1) { hg = 1; } else { } __x___2 = (long )hg; if ((__x___2 < 0L ? - __x___2 : __x___2) <= 99L) { tmp___14 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___15 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Split-Brain detected, manually solved. Sync from %s node\n", tmp___15, tmp___14, hg < 0 ? (char *)"peer" : (char *)"this"); } else { } } else { } if (hg == -100) { tmp___16 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___17 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: Split-Brain detected but unresolved, dropping connection!\n", tmp___17, tmp___16); drbd_khelper(mdev, (char *)"split-brain"); return (C_MASK); } else { } if (hg > 0 && (unsigned int )mydisk <= 4U) { tmp___18 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___19 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: I shall become SyncSource, but I am inconsistent!\n", tmp___19, tmp___18); return (C_MASK); } else { } if ((hg < 0 && (unsigned int )*((unsigned char *)mdev + 1988UL) == 1U) && (int )mdev->state.ldv_33381.disk > 6) { switch ((mdev->net_conf)->rr_conflict) { case 9: drbd_khelper(mdev, (char *)"pri-lost"); case 0: tmp___20 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___21 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: I shall become SyncTarget, but I am primary!\n", tmp___21, tmp___20); return (C_MASK); case 10: tmp___22 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___23 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Becoming SyncTarget, violating the stable-dataassumption\n", tmp___23, tmp___22); } } else { } if ((unsigned int )*((unsigned char *)mdev->net_conf + 528UL) != 0U) { goto _L; } else { tmp___29 = constant_test_bit(25U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___29 != 0) { _L: /* CIL Label */ if (hg == 0) { tmp___24 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___25 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: dry-run connect: No resync, would become Connected immediately.\n", tmp___25, tmp___24); } else { __x___3 = (long )hg; tmp___26 = drbd_conn_str(hg > 0 ? C_SYNC_SOURCE : C_SYNC_TARGET); tmp___27 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___28 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: dry-run connect: Would become %s, doing a %s resync.", tmp___28, tmp___27, tmp___26, (__x___3 < 0L ? - __x___3 : __x___3) > 1L ? (char *)"full" : (char *)"bit-map based"); } return (C_MASK); } else { } } __x___4 = (long )hg; if ((__x___4 < 0L ? - __x___4 : __x___4) > 1L) { tmp___30 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___31 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Writing the whole bitmap, full sync required after drbd_sync_handshake.\n", tmp___31, tmp___30); tmp___32 = drbd_bitmap_io(mdev, & drbd_bmio_set_n_write, (char *)"set_n_write from sync_handshake"); if (tmp___32 != 0) { return (C_MASK); } else { } } else { } if (hg > 0) { rv = C_WF_BITMAP_S; } else if (hg < 0) { rv = C_WF_BITMAP_T; } else { rv = C_CONNECTED; tmp___36 = drbd_bm_total_weight(mdev); if (tmp___36 != 0UL) { tmp___33 = drbd_bm_total_weight(mdev); tmp___34 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___35 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: No resync, but %lu bits in bitmap!\n", tmp___35, tmp___34, tmp___33); } else { } } return (rv); } } static int cmp_after_sb(enum drbd_after_sb_p peer , enum drbd_after_sb_p self ) { { if (((unsigned int )peer == 6U && (unsigned int )self == 5U) || ((unsigned int )self == 6U && (unsigned int )peer == 5U)) { return (0); } else { } if ((((unsigned int )peer == 6U || (unsigned int )peer == 5U) || (unsigned int )self == 6U) || (unsigned int )self == 5U) { return (1); } else { } if ((unsigned int )peer == (unsigned int )self) { return (0); } else { } return (1); } } static int receive_protocol(struct drbd_conf *mdev , struct p_header *h ) { struct p_protocol *p ; int header_size ; int data_size ; int p_proto ; int p_after_sb_0p ; int p_after_sb_1p ; int p_after_sb_2p ; int p_want_lose ; int p_two_primaries ; int cf ; char p_integrity_alg[64U] ; unsigned int tmp ; int tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; __u32 tmp___4 ; __u32 tmp___5 ; __u32 tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; int tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; int tmp___14 ; char const *tmp___15 ; char const *tmp___16 ; int tmp___17 ; char const *tmp___18 ; char const *tmp___19 ; char const *tmp___20 ; char const *tmp___21 ; unsigned char *my_alg ; int tmp___22 ; char const *tmp___23 ; char const *tmp___24 ; int tmp___25 ; char const *tmp___26 ; char const *tmp___27 ; union drbd_state val ; union drbd_state mask ; { p = (struct p_protocol *)h; p_integrity_alg[0] = '\000'; tmp = 1U; while (1) { if (tmp >= 64U) { break; } else { } p_integrity_alg[tmp] = (char)0; tmp = tmp + 1U; } header_size = 24; data_size = (int )h->length - header_size; tmp___0 = drbd_recv(mdev, (void *)(& h->payload), (size_t )header_size); if (tmp___0 != header_size) { return (0); } else { } tmp___1 = __fswab32(p->protocol); p_proto = (int )tmp___1; tmp___2 = __fswab32(p->after_sb_0p); p_after_sb_0p = (int )tmp___2; tmp___3 = __fswab32(p->after_sb_1p); p_after_sb_1p = (int )tmp___3; tmp___4 = __fswab32(p->after_sb_2p); p_after_sb_2p = (int )tmp___4; tmp___5 = __fswab32(p->two_primaries); p_two_primaries = (int )tmp___5; tmp___6 = __fswab32(p->conn_flags); cf = (int )tmp___6; p_want_lose = cf & 1; clear_bit(25, (unsigned long volatile *)(& mdev->flags)); if ((cf & 2) != 0) { set_bit(25U, (unsigned long volatile *)(& mdev->flags)); } else { } if ((mdev->net_conf)->wire_protocol != p_proto) { tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: incompatible communication protocols\n", tmp___8, tmp___7); goto disconnect; } else { } tmp___11 = cmp_after_sb((enum drbd_after_sb_p )p_after_sb_0p, (enum drbd_after_sb_p )(mdev->net_conf)->after_sb_0p); if (tmp___11 != 0) { tmp___9 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___10 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: incompatible after-sb-0pri settings\n", tmp___10, tmp___9); goto disconnect; } else { } tmp___14 = cmp_after_sb((enum drbd_after_sb_p )p_after_sb_1p, (enum drbd_after_sb_p )(mdev->net_conf)->after_sb_1p); if (tmp___14 != 0) { tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: incompatible after-sb-1pri settings\n", tmp___13, tmp___12); goto disconnect; } else { } tmp___17 = cmp_after_sb((enum drbd_after_sb_p )p_after_sb_2p, (enum drbd_after_sb_p )(mdev->net_conf)->after_sb_2p); if (tmp___17 != 0) { tmp___15 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___16 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: incompatible after-sb-2pri settings\n", tmp___16, tmp___15); goto disconnect; } else { } if (p_want_lose != 0 && (unsigned int )*((unsigned char *)mdev->net_conf + 528UL) != 0U) { tmp___18 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___19 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: both sides have the \'want_lose\' flag set\n", tmp___19, tmp___18); goto disconnect; } else { } if ((int )(mdev->net_conf)->two_primaries != p_two_primaries) { tmp___20 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___21 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: incompatible setting of the two-primaries options\n", tmp___21, tmp___20); goto disconnect; } else { } if (mdev->agreed_pro_version > 86) { my_alg = (unsigned char *)(& (mdev->net_conf)->integrity_alg); tmp___22 = drbd_recv(mdev, (void *)(& p_integrity_alg), (size_t )data_size); if (tmp___22 != data_size) { return (0); } else { } p_integrity_alg[63] = 0; tmp___25 = strcmp((char const *)(& p_integrity_alg), (char const *)my_alg); if (tmp___25 != 0) { tmp___23 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___24 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: incompatible setting of the data-integrity-alg\n", tmp___24, tmp___23); goto disconnect; } else { } tmp___26 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___27 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: data-integrity-alg: %s\n", tmp___27, tmp___26, (unsigned int )*my_alg != 0U ? my_alg : (unsigned char *)""); } else { } return (1); disconnect: val.i = 0U; val.ldv_33381.conn = 1U; mask.i = 0U; mask.ldv_33381.conn = 31U; drbd_force_state(mdev, mask, val); return (0); } } struct crypto_hash *drbd_crypto_alloc_digest_safe(struct drbd_conf const *mdev , char const *alg , char const *name ) { struct crypto_hash *tfm ; long tmp ; char const *tmp___0 ; char const *tmp___1 ; long tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; void *tmp___5 ; struct crypto_tfm *tmp___6 ; int tmp___7 ; { if ((int )((signed char )*alg) == 0) { return (0); } else { } tfm = crypto_alloc_hash(alg, 0U, 128U); tmp___2 = IS_ERR((void const *)tfm); if (tmp___2 != 0L) { tmp = PTR_ERR((void const *)tfm); tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Can not allocate \"%s\" as %s (reason: %ld)\n", tmp___1, tmp___0, alg, name, tmp); return (tfm); } else { } tmp___6 = crypto_hash_tfm(tfm); tmp___7 = drbd_crypto_is_hash(tmp___6); if (tmp___7 == 0) { crypto_free_hash(tfm); tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: \"%s\" is not a digest (%s)\n", tmp___4, tmp___3, alg, name); tmp___5 = ERR_PTR(-22L); return ((struct crypto_hash *)tmp___5); } else { } return (tfm); } } static int receive_SyncParam(struct drbd_conf *mdev , struct p_header *h ) { int ok ; struct p_rs_param_89 *p ; unsigned int header_size ; unsigned int data_size ; unsigned int exp_max_sz ; struct crypto_hash *verify_tfm ; struct crypto_hash *csums_tfm ; int apv ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; int tmp___3 ; __u32 tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; int tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; char const *tmp___14 ; char const *tmp___15 ; long tmp___16 ; int tmp___17 ; char const *tmp___18 ; char const *tmp___19 ; long tmp___20 ; int tmp___21 ; size_t tmp___22 ; char const *tmp___23 ; char const *tmp___24 ; size_t tmp___25 ; char const *tmp___26 ; char const *tmp___27 ; union drbd_state val ; union drbd_state mask ; { ok = 1; p = (struct p_rs_param_89 *)h; verify_tfm = 0; csums_tfm = 0; apv = mdev->agreed_pro_version; exp_max_sz = apv > 87 ? (apv == 88 ? 76U : 140U) : 12U; if ((unsigned int )h->length > exp_max_sz) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: SyncParam packet too long: received %u, expected <= %u bytes\n", tmp___0, tmp, (int )h->length, exp_max_sz); return (0); } else { } if (apv <= 88) { header_size = 4U; data_size = (unsigned int )h->length - header_size; } else { header_size = 132U; data_size = (unsigned int )h->length - header_size; if (data_size != 0U) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( data_size == 0 ) in %s:%d\n", tmp___2, tmp___1, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 2869); } else { } } memset((void *)(& p->verify_alg), 0, 128UL); tmp___3 = drbd_recv(mdev, (void *)(& h->payload), (size_t )header_size); if ((unsigned int )tmp___3 != header_size) { return (0); } else { } tmp___4 = __fswab32(p->rate); mdev->sync_conf.rate = (int )tmp___4; if (apv > 87) { if (apv == 88) { if (data_size > 64U) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: verify-alg too long, peer wants %u, accepting only %u byte\n", tmp___6, tmp___5, data_size, 64); return (0); } else { } tmp___7 = drbd_recv(mdev, (void *)(& p->verify_alg), (size_t )data_size); if ((unsigned int )tmp___7 != data_size) { return (0); } else { } if ((int )((signed char )p->verify_alg[data_size - 1U]) != 0) { tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( p->verify_alg[data_size-1] == 0 ) in %s:%d\n", tmp___9, tmp___8, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 2894); } else { } p->verify_alg[data_size - 1U] = 0; } else { if ((int )((signed char )p->verify_alg[63]) != 0) { tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( p->verify_alg[SHARED_SECRET_MAX-1] == 0 ) in %s:%d\n", tmp___11, tmp___10, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 2900); } else { } if ((int )((signed char )p->csums_alg[63]) != 0) { tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( p->csums_alg[SHARED_SECRET_MAX-1] == 0 ) in %s:%d\n", tmp___13, tmp___12, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 2901); } else { } p->verify_alg[63] = 0; p->csums_alg[63] = 0; } tmp___17 = strcmp((char const *)(& mdev->sync_conf.verify_alg), (char const *)(& p->verify_alg)); if (tmp___17 != 0) { if ((unsigned int )*((unsigned short *)mdev + 994UL) == 144U) { tmp___14 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___15 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Different verify-alg settings. me=\"%s\" peer=\"%s\"\n", tmp___15, tmp___14, (unsigned char *)(& mdev->sync_conf.verify_alg), (char *)(& p->verify_alg)); goto disconnect; } else { } verify_tfm = drbd_crypto_alloc_digest_safe((struct drbd_conf const *)mdev, (char const *)(& p->verify_alg), "verify-alg"); tmp___16 = IS_ERR((void const *)verify_tfm); if (tmp___16 != 0L) { verify_tfm = 0; goto disconnect; } else { } } else { } if (apv > 88) { tmp___21 = strcmp((char const *)(& mdev->sync_conf.csums_alg), (char const *)(& p->csums_alg)); if (tmp___21 != 0) { if ((unsigned int )*((unsigned short *)mdev + 994UL) == 144U) { tmp___18 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___19 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Different csums-alg settings. me=\"%s\" peer=\"%s\"\n", tmp___19, tmp___18, (unsigned char *)(& mdev->sync_conf.csums_alg), (char *)(& p->csums_alg)); goto disconnect; } else { } csums_tfm = drbd_crypto_alloc_digest_safe((struct drbd_conf const *)mdev, (char const *)(& p->csums_alg), "csums-alg"); tmp___20 = IS_ERR((void const *)csums_tfm); if (tmp___20 != 0L) { csums_tfm = 0; goto disconnect; } else { } } else { } } else { } spin_lock(& mdev->peer_seq_lock); if ((unsigned long )verify_tfm != (unsigned long )((struct crypto_hash *)0)) { strcpy((char *)(& mdev->sync_conf.verify_alg), (char const *)(& p->verify_alg)); tmp___22 = strlen((char const *)(& p->verify_alg)); mdev->sync_conf.verify_alg_len = (int )((unsigned int )tmp___22 + 1U); crypto_free_hash(mdev->verify_tfm); mdev->verify_tfm = verify_tfm; tmp___23 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___24 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: using verify-alg: \"%s\"\n", tmp___24, tmp___23, (char *)(& p->verify_alg)); } else { } if ((unsigned long )csums_tfm != (unsigned long )((struct crypto_hash *)0)) { strcpy((char *)(& mdev->sync_conf.csums_alg), (char const *)(& p->csums_alg)); tmp___25 = strlen((char const *)(& p->csums_alg)); mdev->sync_conf.csums_alg_len = (int )((unsigned int )tmp___25 + 1U); crypto_free_hash(mdev->csums_tfm); mdev->csums_tfm = csums_tfm; tmp___26 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___27 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: using csums-alg: \"%s\"\n", tmp___27, tmp___26, (char *)(& p->csums_alg)); } else { } spin_unlock(& mdev->peer_seq_lock); } else { } return (ok); disconnect: crypto_free_hash(csums_tfm); crypto_free_hash(verify_tfm); val.i = 0U; val.ldv_33381.conn = 1U; mask.i = 0U; mask.ldv_33381.conn = 31U; drbd_force_state(mdev, mask, val); return (0); } } static void drbd_setup_order_type(struct drbd_conf *mdev , int peer ) { { return; } } static void warn_if_differ_considerably(struct drbd_conf *mdev , char const *s , sector_t a , sector_t b ) { sector_t d ; char const *tmp ; char const *tmp___0 ; { if (a == 0UL || b == 0UL) { return; } else { } d = a > b ? a - b : b - a; if (a >> 3 < d || b >> 3 < d) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Considerable difference in %s: %llus vs. %llus\n", tmp___0, tmp, s, (unsigned long long )a, (unsigned long long )b); } else { } return; } } static int receive_sizes(struct drbd_conf *mdev , struct p_header *h ) { struct p_sizes *p ; enum determine_dev_size dd ; unsigned int max_seg_s ; sector_t p_size ; sector_t p_usize ; sector_t my_usize ; int ldsc ; enum dds_flags ddsf ; int _b ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; __u64 tmp___2 ; __u64 tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; union drbd_state val ; union drbd_state mask ; sector_t tmp___6 ; unsigned long _min1 ; sector_t _min2 ; unsigned long tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; union drbd_state val___0 ; union drbd_state mask___0 ; sector_t tmp___12 ; sector_t tmp___13 ; int tmp___14 ; __u16 tmp___15 ; int tmp___16 ; sector_t tmp___17 ; __u32 tmp___18 ; unsigned int tmp___19 ; __u16 tmp___20 ; int tmp___21 ; __u64 tmp___22 ; sector_t tmp___23 ; char const *tmp___24 ; char const *tmp___25 ; int tmp___26 ; { p = (struct p_sizes *)h; dd = 0; ldsc = 0; _b = (unsigned int )h->length != 32U; if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "receive_sizes", (char *)"h->length != (sizeof(*p)-sizeof(*h))", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 2993); } else { } if (_b != 0) { return (0); } else { } tmp___1 = drbd_recv(mdev, (void *)(& h->payload), (size_t )h->length); if (tmp___1 != (int )h->length) { return (0); } else { } tmp___2 = __fswab64(p->d_size); p_size = (sector_t )tmp___2; tmp___3 = __fswab64(p->u_size); p_usize = (sector_t )tmp___3; if (p_size == 0UL && (unsigned int )*((unsigned char *)mdev + 1989UL) == 0U) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: some backing storage is needed\n", tmp___5, tmp___4); val.i = 0U; val.ldv_33381.conn = 1U; mask.i = 0U; mask.ldv_33381.conn = 31U; drbd_force_state(mdev, mask, val); return (0); } else { } mdev->p_size = p_size; tmp___14 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___14 != 0) { tmp___6 = drbd_get_max_capacity(mdev->ldev); warn_if_differ_considerably(mdev, "lower level device sizes", p_size, tmp___6); warn_if_differ_considerably(mdev, "user requested size", p_usize, (sector_t )(mdev->ldev)->dc.disk_size); if ((unsigned int )*((unsigned short *)mdev + 994UL) == 144U) { if ((unsigned long )(mdev->ldev)->dc.disk_size != 0UL) { if (p_usize == 0UL) { tmp___7 = (unsigned long )(mdev->ldev)->dc.disk_size; } else { _min1 = (unsigned long )(mdev->ldev)->dc.disk_size; _min2 = p_usize; tmp___7 = _min1 < _min2 ? _min1 : _min2; } p_usize = tmp___7; } else { p_usize = p_usize; } } else { } my_usize = (sector_t )(mdev->ldev)->dc.disk_size; if ((mdev->ldev)->dc.disk_size != (unsigned long long )p_usize) { (mdev->ldev)->dc.disk_size = (__u64 )p_usize; tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Peer sets u_size to %lu sectors\n", tmp___9, tmp___8, (unsigned long )(mdev->ldev)->dc.disk_size); } else { } tmp___12 = drbd_new_dev_size(mdev, mdev->ldev, 0); tmp___13 = drbd_get_capacity(mdev->this_bdev); if ((tmp___12 < tmp___13 && (int )mdev->state.ldv_33381.disk > 4) && (int )mdev->state.ldv_33381.conn <= 9) { tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: The peer\'s disk size is too small!\n", tmp___11, tmp___10); val___0.i = 0U; val___0.ldv_33381.conn = 1U; mask___0.i = 0U; mask___0.ldv_33381.conn = 31U; drbd_force_state(mdev, mask___0, val___0); (mdev->ldev)->dc.disk_size = (__u64 )my_usize; put_ldev(mdev); return (0); } else { } put_ldev(mdev); } else { } tmp___15 = __fswab16((int )p->dds_flags); ddsf = (enum dds_flags )tmp___15; tmp___16 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___16 != 0) { dd = drbd_determin_dev_size(mdev, ddsf); put_ldev(mdev); if ((int )dd == -1) { return (0); } else { } drbd_md_sync(mdev); } else { drbd_set_my_capacity(mdev, p_size); } tmp___21 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___21 != 0) { tmp___17 = drbd_get_capacity((mdev->ldev)->backing_bdev); if ((mdev->ldev)->known_size != tmp___17) { (mdev->ldev)->known_size = drbd_get_capacity((mdev->ldev)->backing_bdev); ldsc = 1; } else { } if (mdev->agreed_pro_version <= 93) { tmp___18 = __fswab32(p->max_segment_size); max_seg_s = tmp___18; } else { max_seg_s = 32768U; } tmp___19 = queue_max_segment_size(mdev->rq_queue); if (tmp___19 != max_seg_s) { drbd_setup_queue_param(mdev, max_seg_s); } else { } tmp___20 = __fswab16((int )p->queue_order_type); drbd_setup_order_type(mdev, (int )tmp___20); put_ldev(mdev); } else { } if ((int )mdev->state.ldv_33381.conn > 9) { tmp___22 = __fswab64(p->c_size); tmp___23 = drbd_get_capacity(mdev->this_bdev); if (tmp___22 != (unsigned long long )tmp___23 || ldsc != 0) { drbd_send_sizes(mdev, 0, ddsf); } else { } tmp___26 = test_and_clear_bit(24, (unsigned long volatile *)(& mdev->flags)); if (tmp___26 != 0 || ((int )dd == 2 && (unsigned int )*((unsigned short *)mdev + 994UL) == 160U)) { if ((int )mdev->state.ldv_33381.pdsk > 3 && (int )mdev->state.ldv_33381.disk > 3) { if (((unsigned int )ddsf & 2U) != 0U) { tmp___24 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___25 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Resync of new storage suppressed with --assume-clean\n", tmp___25, tmp___24); } else { resync_after_online_grow(mdev); } } else { set_bit(20U, (unsigned long volatile *)(& mdev->flags)); } } else { } } else { } return (1); } } static int receive_uuids(struct drbd_conf *mdev , struct p_header *h ) { struct p_uuids *p ; u64 *p_uuid ; int i ; int _b ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; void *tmp___2 ; __u64 tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; union drbd_state val ; union drbd_state mask ; int skip_initial_sync ; char const *tmp___6 ; char const *tmp___7 ; union drbd_state __ns ; int tmp___8 ; int tmp___9 ; wait_queue_t __wait ; struct task_struct *tmp___10 ; int tmp___11 ; { p = (struct p_uuids *)h; _b = (unsigned int )h->length != 48U; if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "receive_uuids", (char *)"h->length != (sizeof(*p)-sizeof(*h))", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 3106); } else { } if (_b != 0) { return (0); } else { } tmp___1 = drbd_recv(mdev, (void *)(& h->payload), (size_t )h->length); if (tmp___1 != (int )h->length) { return (0); } else { } tmp___2 = kmalloc___1(48UL, 16U); p_uuid = (u64 *)tmp___2; i = 0; goto ldv_43916; ldv_43915: tmp___3 = __fswab64(p->uuid[i]); *(p_uuid + (unsigned long )i) = tmp___3; i = i + 1; ldv_43916: ; if (i <= 5) { goto ldv_43915; } else { } kfree((void const *)mdev->p_uuid); mdev->p_uuid = p_uuid; if ((((int )mdev->state.ldv_33381.conn <= 9 && (int )mdev->state.ldv_33381.disk <= 3) && (unsigned int )*((unsigned char *)mdev + 1988UL) == 1U) && ((mdev->ed_uuid ^ *p_uuid) & 0xfffffffffffffffeULL) != 0ULL) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Can only connect to data with current UUID=%016llX\n", tmp___5, tmp___4, mdev->ed_uuid); val.i = 0U; val.ldv_33381.conn = 1U; mask.i = 0U; mask.ldv_33381.conn = 31U; drbd_force_state(mdev, mask, val); return (0); } else { } tmp___8 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___8 != 0) { skip_initial_sync = (((unsigned int )*((unsigned short *)mdev + 994UL) == 160U && mdev->agreed_pro_version > 89) && (mdev->ldev)->md.uuid[0] == 4ULL) && (*(p_uuid + 5UL) & 8ULL) != 0ULL; if (skip_initial_sync != 0) { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Accepted new current UUID, preparing to skip initial sync\n", tmp___7, tmp___6); drbd_bitmap_io(mdev, & drbd_bmio_clear_n_write, (char *)"clear_n_write from receive_uuids"); _drbd_uuid_set(mdev, 0, *p_uuid); _drbd_uuid_set(mdev, 1, 0ULL); __ns.i = mdev->state.i; __ns.ldv_33381.disk = 8U; __ns.ldv_33381.pdsk = 8U; _drbd_set_state(mdev, __ns, CS_VERBOSE, 0); drbd_md_sync(mdev); } else { } put_ldev(mdev); } else { } tmp___9 = constant_test_bit(9U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___9 == 0) { goto ldv_43925; } else { } tmp___10 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___10; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_43928: prepare_to_wait(& mdev->misc_wait, & __wait, 2); tmp___11 = constant_test_bit(9U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___11 == 0) { goto ldv_43927; } else { } schedule(); goto ldv_43928; ldv_43927: finish_wait(& mdev->misc_wait, & __wait); ldv_43925: ; if ((int )mdev->state.ldv_33381.conn > 9 && (int )mdev->state.ldv_33381.disk <= 3) { drbd_set_ed_uuid(mdev, *p_uuid); } else { } return (1); } } static union drbd_state convert_state(union drbd_state ps ) { union drbd_state ms ; enum drbd_conns c_tab[32U] ; { c_tab[0] = 0; c_tab[1] = C_TEAR_DOWN; c_tab[2] = 0; c_tab[3] = 0; c_tab[4] = 0; c_tab[5] = 0; c_tab[6] = 0; c_tab[7] = 0; c_tab[8] = 0; c_tab[9] = 0; c_tab[10] = C_CONNECTED; c_tab[11] = C_STARTING_SYNC_T; c_tab[12] = C_STARTING_SYNC_S; c_tab[13] = 0; c_tab[14] = 0; c_tab[15] = 0; c_tab[16] = 0; c_tab[17] = 0; c_tab[18] = C_VERIFY_T; c_tab[19] = 0; c_tab[20] = 0; c_tab[21] = 0; c_tab[22] = 0; c_tab[23] = 0; c_tab[24] = 0; c_tab[25] = 0; c_tab[26] = 0; c_tab[27] = 0; c_tab[28] = 0; c_tab[29] = 0; c_tab[30] = 0; c_tab[31] = C_MASK; ms.i = ps.i; ms.ldv_33381.conn = (unsigned char )c_tab[(int )ps.ldv_33381.conn]; ms.ldv_33381.peer = ps.ldv_33381.role; ms.ldv_33381.role = ps.ldv_33381.peer; ms.ldv_33381.pdsk = ps.ldv_33381.disk; ms.ldv_33381.disk = ps.ldv_33381.pdsk; ms.ldv_33381.peer_isp = (unsigned char )((int )ps.ldv_33381.aftr_isp | (int )ps.ldv_33381.user_isp); return (ms); } } static int receive_req_state(struct drbd_conf *mdev , struct p_header *h ) { struct p_req_state *p ; union drbd_state mask ; union drbd_state val ; int rv ; int _b ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; int tmp___4 ; int tmp___5 ; { p = (struct p_req_state *)h; _b = (unsigned int )h->length != 8U; if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "receive_req_state", (char *)"h->length != (sizeof(*p)-sizeof(*h))", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 3194); } else { } if (_b != 0) { return (0); } else { } tmp___1 = drbd_recv(mdev, (void *)(& h->payload), (size_t )h->length); if (tmp___1 != (int )h->length) { return (0); } else { } tmp___2 = __fswab32(p->mask); mask.i = tmp___2; tmp___3 = __fswab32(p->val); val.i = tmp___3; tmp___4 = constant_test_bit(7U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___4 != 0) { tmp___5 = constant_test_bit(9U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___5 != 0) { drbd_send_sr_reply(mdev, -19); return (1); } else { } } else { } mask = convert_state(mask); val = convert_state(val); rv = drbd_change_state(mdev, CS_VERBOSE, mask, val); drbd_send_sr_reply(mdev, rv); drbd_md_sync(mdev); return (1); } } static int receive_state(struct drbd_conf *mdev , struct p_header *h ) { struct p_state *p ; enum drbd_conns nconn ; enum drbd_conns oconn ; union drbd_state ns ; union drbd_state peer_state ; enum drbd_disk_state real_peer_disk ; int rv ; int _b ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; __u32 tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; int cr ; int tmp___6 ; union drbd_state val ; union drbd_state mask ; char const *tmp___7 ; char const *tmp___8 ; int tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; union drbd_state val___0 ; union drbd_state mask___0 ; int tmp___12 ; union drbd_state val___1 ; union drbd_state mask___1 ; { p = (struct p_state *)h; _b = (unsigned int )h->length != 4U; if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "receive_state", (char *)"h->length != (sizeof(*p)-sizeof(*h))", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 3226); } else { } if (_b != 0) { return (0); } else { } tmp___1 = drbd_recv(mdev, (void *)(& h->payload), (size_t )h->length); if (tmp___1 != (int )h->length) { return (0); } else { } tmp___2 = __fswab32(p->state); peer_state.i = tmp___2; real_peer_disk = (enum drbd_disk_state )peer_state.ldv_33381.disk; if ((unsigned int )*((unsigned char *)(& peer_state) + 1UL) == 6U) { real_peer_disk = (*(mdev->p_uuid + 5UL) & 4ULL) != 0ULL ? D_INCONSISTENT : D_CONSISTENT; tmp___3 = drbd_disk_str(real_peer_disk); tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: real peer disk state = %s\n", tmp___5, tmp___4, tmp___3); } else { } spin_lock_irq(& mdev->req_lock); retry: nconn = (enum drbd_conns )mdev->state.ldv_33381.conn; oconn = nconn; spin_unlock_irq(& mdev->req_lock); if ((unsigned int )nconn == 9U) { nconn = C_CONNECTED; } else { } if ((unsigned long )mdev->p_uuid != (unsigned long )((u64 *)0) && (int )peer_state.ldv_33381.disk > 2) { tmp___12 = _get_ldev_if_state(mdev, D_NEGOTIATING); if (tmp___12 != 0) { cr = (unsigned int )oconn <= 9U; cr = ((unsigned int )oconn == 10U && ((unsigned int )*((unsigned char *)(& peer_state) + 1UL) == 6U || (unsigned int )*((unsigned char *)mdev + 1989UL) == 6U)) | cr; tmp___6 = constant_test_bit(15U, (unsigned long const volatile *)(& mdev->flags)); cr = tmp___6 | cr; cr = ((unsigned int )oconn == 10U && ((int )peer_state.ldv_33381.conn > 10 && (int )peer_state.ldv_33381.conn <= 14)) | cr; if (cr != 0) { nconn = drbd_sync_handshake(mdev, (enum drbd_role )peer_state.ldv_33381.role, real_peer_disk); } else { } put_ldev(mdev); if ((unsigned int )nconn == 31U) { nconn = C_CONNECTED; if ((unsigned int )*((unsigned char *)mdev + 1989UL) == 6U) { val.i = 0U; val.ldv_33381.disk = 0U; mask.i = 0U; mask.ldv_33381.disk = 15U; drbd_force_state(mdev, mask, val); } else if ((unsigned int )*((unsigned char *)(& peer_state) + 1UL) == 6U) { tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Disk attach process on the peer node was aborted.\n", tmp___8, tmp___7); peer_state.ldv_33381.disk = 0U; real_peer_disk = D_DISKLESS; } else { tmp___9 = test_and_clear_bit(25, (unsigned long volatile *)(& mdev->flags)); if (tmp___9 != 0) { return (0); } else { } if ((unsigned int )oconn != 9U) { tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( oconn == C_WF_REPORT_PARAMS ) in %s:%d\n", tmp___11, tmp___10, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 3283); } else { } val___0.i = 0U; val___0.ldv_33381.conn = 1U; mask___0.i = 0U; mask___0.ldv_33381.conn = 31U; drbd_force_state(mdev, mask___0, val___0); return (0); } } else { } } else { } } else { } spin_lock_irq(& mdev->req_lock); if ((unsigned int )mdev->state.ldv_33381.conn != (unsigned int )oconn) { goto retry; } else { } clear_bit(15, (unsigned long volatile *)(& mdev->flags)); ns.i = mdev->state.i; ns.ldv_33381.conn = (unsigned char )nconn; ns.ldv_33381.peer = peer_state.ldv_33381.role; ns.ldv_33381.pdsk = (unsigned char )real_peer_disk; ns.ldv_33381.peer_isp = (unsigned char )((int )peer_state.ldv_33381.aftr_isp | (int )peer_state.ldv_33381.user_isp); if (((unsigned int )nconn == 10U || (unsigned int )nconn == 13U) && (unsigned int )*((unsigned char *)(& ns) + 1UL) == 6U) { ns.ldv_33381.disk = mdev->new_state_tmp.ldv_33381.disk; } else { } rv = _drbd_set_state(mdev, ns, 3, 0); ns = mdev->state; spin_unlock_irq(& mdev->req_lock); if (rv <= 0) { val___1.i = 0U; val___1.ldv_33381.conn = 1U; mask___1.i = 0U; mask___1.ldv_33381.conn = 31U; drbd_force_state(mdev, mask___1, val___1); return (0); } else { } if ((unsigned int )oconn > 9U) { if (((unsigned int )nconn > 10U && (int )peer_state.ldv_33381.conn <= 10) && (unsigned int )*((unsigned char *)(& peer_state) + 1UL) != 6U) { drbd_send_uuids(mdev); drbd_send_state(mdev); } else { } } else { } (mdev->net_conf)->want_lose = 0U; drbd_md_sync(mdev); return (1); } } static int receive_sync_uuid(struct drbd_conf *mdev , struct p_header *h ) { struct p_rs_uuid *p ; wait_queue_t __wait ; struct task_struct *tmp ; int _b ; char const *tmp___0 ; char const *tmp___1 ; int tmp___2 ; __u64 tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; int tmp___6 ; { p = (struct p_rs_uuid *)h; if (((unsigned int )*((unsigned short *)mdev + 994UL) == 240U || (int )mdev->state.ldv_33381.conn <= 9) || (int )mdev->state.ldv_33381.disk <= 2) { goto ldv_43978; } else { } tmp = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_43981: prepare_to_wait(& mdev->misc_wait, & __wait, 2); if (((unsigned int )*((unsigned short *)mdev + 994UL) == 240U || (int )mdev->state.ldv_33381.conn <= 9) || (int )mdev->state.ldv_33381.disk <= 2) { goto ldv_43980; } else { } schedule(); goto ldv_43981; ldv_43980: finish_wait(& mdev->misc_wait, & __wait); ldv_43978: _b = (unsigned int )h->length != 8U; if (_b != 0) { tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___1, tmp___0, "receive_sync_uuid", (char *)"h->length != (sizeof(*p)-sizeof(*h))", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 3340); } else { } if (_b != 0) { return (0); } else { } tmp___2 = drbd_recv(mdev, (void *)(& h->payload), (size_t )h->length); if (tmp___2 != (int )h->length) { return (0); } else { } tmp___6 = _get_ldev_if_state(mdev, D_NEGOTIATING); if (tmp___6 != 0) { tmp___3 = __fswab64(p->uuid); _drbd_uuid_set(mdev, 0, tmp___3); _drbd_uuid_set(mdev, 1, 0ULL); drbd_start_resync(mdev, C_SYNC_TARGET); put_ldev(mdev); } else { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Ignoring SyncUUID packet!\n", tmp___5, tmp___4); } return (1); } } static enum receive_bitmap_ret receive_bitmap_plain(struct drbd_conf *mdev , struct p_header *h , unsigned long *buffer , struct bm_xfer_ctx *c ) { unsigned int num_words ; size_t __min1 ; size_t __min2 ; unsigned int want ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; { __min1 = 511UL; __min2 = c->bm_words - c->word_offset; num_words = (unsigned int )(__min1 < __min2 ? __min1 : __min2); want = num_words * 8U; if ((unsigned int )h->length != want) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s:want (%u) != h->length (%u)\n", tmp___0, tmp, "receive_bitmap_plain", want, (int )h->length); return (FAILED); } else { } if (want == 0U) { return (DONE); } else { } tmp___1 = drbd_recv(mdev, (void *)buffer, (size_t )want); if ((unsigned int )tmp___1 != want) { return (FAILED); } else { } drbd_bm_merge_lel(mdev, c->word_offset, (size_t )num_words, buffer); c->word_offset = c->word_offset + (unsigned long )num_words; c->bit_offset = c->word_offset * 64UL; if (c->bit_offset > c->bm_bits) { c->bit_offset = c->bm_bits; } else { } return (OK); } } static enum receive_bitmap_ret recv_bm_rle_bits(struct drbd_conf *mdev , struct p_compressed_bm *p , struct bm_xfer_ctx *c ) { struct bitstream bs ; u64 look_ahead ; u64 rl ; u64 tmp ; unsigned long s ; unsigned long e ; int len ; int toggle ; int tmp___0 ; int have ; int bits ; int tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; { s = c->bit_offset; len = (int )((unsigned int )p->head.length - 1U); tmp___0 = DCBP_get_start(p); toggle = tmp___0; tmp___1 = DCBP_get_pad_bits(p); bitstream_init(& bs, (void *)(& p->code), (size_t )len, (unsigned int )tmp___1); bits = bitstream_get_bits(& bs, & look_ahead, 64); if (bits < 0) { return (FAILED); } else { } have = bits; goto ldv_44017; ldv_44016: bits = vli_decode_bits(& rl, look_ahead); if (bits <= 0) { return (FAILED); } else { } if (toggle != 0) { e = (unsigned long )(((unsigned long long )s + rl) - 1ULL); if (c->bm_bits <= e) { tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: bitmap overflow (e:%lu) while decoding bm RLE packet\n", tmp___3, tmp___2, e); return (FAILED); } else { } _drbd_bm_set_bits(mdev, s, e); } else { } if (have < bits) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: bitmap decoding error: h:%d b:%d la:0x%08llx l:%u/%u\n", tmp___5, tmp___4, have, bits, look_ahead, (unsigned int )((long )bs.cur.b) - (unsigned int )((long )(& p->code)), (unsigned int )bs.buf_len); return (FAILED); } else { } look_ahead = look_ahead >> bits; have = have - bits; bits = bitstream_get_bits(& bs, & tmp, 64 - have); if (bits < 0) { return (FAILED); } else { } look_ahead = (tmp << have) | look_ahead; have = have + bits; s = (unsigned long )((unsigned long long )s + rl); toggle = toggle == 0; ldv_44017: ; if (have > 0) { goto ldv_44016; } else { } c->bit_offset = s; bm_xfer_ctx_bit_to_word_offset(c); return (c->bm_bits == s); } } static enum receive_bitmap_ret decode_bitmap_c(struct drbd_conf *mdev , struct p_compressed_bm *p , struct bm_xfer_ctx *c ) { enum receive_bitmap_ret tmp ; enum drbd_bitmap_code tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; union drbd_state val ; union drbd_state mask ; { tmp___0 = DCBP_get_code(p); if ((unsigned int )tmp___0 == 2U) { tmp = recv_bm_rle_bits(mdev, p, c); return (tmp); } else { } tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: receive_bitmap_c: unknown encoding %u\n", tmp___2, tmp___1, (int )p->encoding); val.i = 0U; val.ldv_33381.conn = 6U; mask.i = 0U; mask.ldv_33381.conn = 31U; drbd_force_state(mdev, mask, val); return (FAILED); } } void INFO_bm_xfer_stats(struct drbd_conf *mdev , char const *direction , struct bm_xfer_ctx *c ) { unsigned int plain ; unsigned int total ; unsigned int r ; char const *tmp ; char const *tmp___0 ; { plain = (unsigned int )(((c->bm_words + 510UL) / 511UL + c->bm_words) + 1UL) * 8U; total = c->bytes[0] + c->bytes[1]; if (total == 0U) { return; } else { } if (total >= plain) { return; } else { } r = total > 4294967U ? total / (plain / 1000U) : (total * 1000U) / plain; if (r > 1000U) { r = 1000U; } else { } r = 1000U - r; tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: %s bitmap stats [Bytes(packets)]: plain %u(%u), RLE %u(%u), total %u; compression: %u.%u%%\n", tmp___0, tmp, direction, c->bytes[1], c->packets[1], c->bytes[0], c->packets[0], total, r / 10U, r % 10U); return; } } static int receive_bitmap(struct drbd_conf *mdev , struct p_header *h ) { struct bm_xfer_ctx c ; void *buffer ; enum receive_bitmap_ret ret ; int ok ; int tmp ; wait_queue_t __wait ; struct task_struct *tmp___0 ; int tmp___1 ; unsigned long tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; struct bm_xfer_ctx __constr_expr_0 ; unsigned long tmp___5 ; size_t tmp___6 ; struct p_compressed_bm *p ; char const *tmp___7 ; char const *tmp___8 ; size_t __len ; void *__ret ; int tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; int tmp___14 ; int tmp___15 ; union drbd_state val ; union drbd_state mask ; char const *tmp___16 ; char const *tmp___17 ; char const *tmp___18 ; char const *tmp___19 ; char const *tmp___20 ; { ok = 0; tmp = atomic_read((atomic_t const *)(& mdev->ap_bio_cnt)); if (tmp == 0) { goto ldv_44044; } else { } tmp___0 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___0; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_44047: prepare_to_wait(& mdev->misc_wait, & __wait, 2); tmp___1 = atomic_read((atomic_t const *)(& mdev->ap_bio_cnt)); if (tmp___1 == 0) { goto ldv_44046; } else { } schedule(); goto ldv_44047; ldv_44046: finish_wait(& mdev->misc_wait, & __wait); ldv_44044: drbd_bm_lock(mdev, (char *)"receive bitmap"); tmp___2 = __get_free_pages(16U, 0U); buffer = (void *)tmp___2; if ((unsigned long )buffer == (unsigned long )((void *)0)) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: failed to allocate one page buffer in %s\n", tmp___4, tmp___3, "receive_bitmap"); goto out; } else { } tmp___5 = drbd_bm_bits(mdev); tmp___6 = drbd_bm_words(mdev); __constr_expr_0.bm_bits = tmp___5; __constr_expr_0.bm_words = tmp___6; __constr_expr_0.bit_offset = 0UL; __constr_expr_0.word_offset = 0UL; __constr_expr_0.packets[0] = 0U; __constr_expr_0.packets[1] = 0U; __constr_expr_0.bytes[0] = 0U; __constr_expr_0.bytes[1] = 0U; c = __constr_expr_0; ldv_44056: ; if ((unsigned int )h->command == 4U) { ret = receive_bitmap_plain(mdev, h, (unsigned long *)buffer, & c); } else if ((unsigned int )h->command == 36U) { if ((unsigned int )h->length > 4088U) { tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ReportCBitmap packet too large\n", tmp___8, tmp___7); goto out; } else { } p = (struct p_compressed_bm *)buffer; __len = 8UL; if (__len > 63UL) { __ret = memcpy((void *)p, (void const *)h, __len); } else { __ret = memcpy((void *)p, (void const *)h, __len); } tmp___9 = drbd_recv(mdev, (void *)(& p->head.payload), (size_t )h->length); if (tmp___9 != (int )h->length) { goto out; } else { } if ((unsigned int )p->head.length <= 1U) { tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ReportCBitmap packet too small (l:%u)\n", tmp___11, tmp___10, (int )p->head.length); return (2); } else { } ret = decode_bitmap_c(mdev, p, & c); } else { tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: receive_bitmap: h->command neither ReportBitMap nor ReportCBitMap (is 0x%x)", tmp___13, tmp___12, (int )h->command); goto out; } c.packets[(unsigned int )h->command == 4U] = c.packets[(unsigned int )h->command == 4U] + 1U; c.bytes[(unsigned int )h->command == 4U] = (c.bytes[(unsigned int )h->command == 4U] + (unsigned int )h->length) + 8U; if ((unsigned int )ret != 0U) { goto ldv_44055; } else { } tmp___14 = drbd_recv_header(mdev, h); if (tmp___14 == 0) { goto out; } else { } if ((unsigned int )ret == 0U) { goto ldv_44056; } else { } ldv_44055: ; if ((unsigned int )ret == 2U) { goto out; } else { } INFO_bm_xfer_stats(mdev, "receive", & c); if ((unsigned int )*((unsigned short *)mdev + 994UL) == 224U) { tmp___15 = drbd_send_bitmap(mdev); ok = tmp___15 == 0; if (ok == 0) { goto out; } else { } val.i = 0U; val.ldv_33381.conn = 15U; mask.i = 0U; mask.ldv_33381.conn = 31U; ok = _drbd_request_state(mdev, mask, val, CS_VERBOSE); if (ok != 1) { tmp___16 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___17 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( ok == SS_SUCCESS ) in %s:%d\n", tmp___17, tmp___16, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 3576); } else { } } else if ((unsigned int )*((unsigned short *)mdev + 994UL) != 208U) { tmp___18 = drbd_conn_str((enum drbd_conns )mdev->state.ldv_33381.conn); tmp___19 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___20 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: unexpected cstate (%s) in receive_bitmap\n", tmp___20, tmp___19, tmp___18); } else { } ok = 1; out: drbd_bm_unlock(mdev); if (ok != 0 && (unsigned int )*((unsigned short *)mdev + 994UL) == 208U) { drbd_start_resync(mdev, C_SYNC_SOURCE); } else { } free_pages((unsigned long )buffer, 0U); return (ok); } } static int receive_skip(struct drbd_conf *mdev , struct p_header *h ) { char sink[128U] ; int size ; int want ; int r ; char const *tmp ; char const *tmp___0 ; int __min1 ; int __min2 ; int _b ; char const *tmp___1 ; char const *tmp___2 ; { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: skipping unknown optional packet type %d, l: %d!\n", tmp___0, tmp, (int )h->command, (int )h->length); size = (int )h->length; goto ldv_44077; ldv_44076: __min1 = size; __min2 = 128; want = __min1 < __min2 ? __min1 : __min2; r = drbd_recv(mdev, (void *)(& sink), (size_t )want); _b = r <= 0; if (_b != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___2, tmp___1, "receive_skip", (char *)"r <= 0", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 3606); } else { } if (_b != 0) { goto ldv_44075; } else { } size = size - r; ldv_44077: ; if (size > 0) { goto ldv_44076; } else { } ldv_44075: ; return (size == 0); } } static int receive_UnplugRemote(struct drbd_conf *mdev , struct p_header *h ) { { if ((int )mdev->state.ldv_33381.disk > 3) { drbd_kick_lo(mdev); } else { } drbd_tcp_quickack(mdev->data.socket); return (1); } } static void timeval_sub_us(struct timeval *tv , unsigned int us ) { { tv->tv_sec = tv->tv_sec - (__kernel_time_t )(us / 1000000U); us = us % 1000000U; if (tv->tv_usec > (__kernel_suseconds_t )us) { tv->tv_usec = tv->tv_usec + 1000000L; tv->tv_sec = tv->tv_sec - (__kernel_time_t )1; } else { } tv->tv_usec = tv->tv_usec - (__kernel_suseconds_t )us; return; } } static void got_delay_probe(struct drbd_conf *mdev , int from , struct p_delay_probe *p ) { struct delay_probe *dp ; struct list_head *le ; struct timeval now ; int seq_num ; int offset ; int data_delay ; __u32 tmp ; __u32 tmp___0 ; struct list_head const *__mptr ; char const *tmp___1 ; char const *tmp___2 ; int tmp___3 ; void *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; { tmp = __fswab32(p->seq_num); seq_num = (int )tmp; tmp___0 = __fswab32(p->offset); offset = (int )tmp___0; spin_lock(& mdev->peer_seq_lock); tmp___3 = list_empty((struct list_head const *)(& mdev->delay_probes)); if (tmp___3 == 0) { if (from == 1) { le = mdev->delay_probes.next; } else { le = mdev->delay_probes.prev; } __mptr = (struct list_head const *)le; dp = (struct delay_probe *)__mptr; if (dp->seq_num == (unsigned int )seq_num) { list_del(le); spin_unlock(& mdev->peer_seq_lock); do_gettimeofday(& now); timeval_sub_us(& now, (unsigned int )offset); data_delay = (int )(((unsigned int )now.tv_usec - (unsigned int )dp->time.tv_usec) + (unsigned int )(now.tv_sec - dp->time.tv_sec) * 1000000U); if (data_delay > 0) { mdev->data_delay = data_delay; } else { } kfree((void const *)dp); return; } else { } if (dp->seq_num > (unsigned int )seq_num) { spin_unlock(& mdev->peer_seq_lock); tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Previous allocation failure of struct delay_probe?\n", tmp___2, tmp___1); return; } else { } } else { } spin_unlock(& mdev->peer_seq_lock); tmp___4 = kmalloc___1(40UL, 16U); dp = (struct delay_probe *)tmp___4; if ((unsigned long )dp == (unsigned long )((struct delay_probe *)0)) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Failed to allocate a struct delay_probe, do not worry.\n", tmp___6, tmp___5); return; } else { } dp->seq_num = (unsigned int )seq_num; do_gettimeofday(& dp->time); timeval_sub_us(& dp->time, (unsigned int )offset); spin_lock(& mdev->peer_seq_lock); if (from == 1) { list_add(& dp->list, & mdev->delay_probes); } else { list_add_tail(& dp->list, & mdev->delay_probes); } spin_unlock(& mdev->peer_seq_lock); return; } } static int receive_delay_probe(struct drbd_conf *mdev , struct p_header *h ) { struct p_delay_probe *p ; int _b ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; { p = (struct p_delay_probe *)h; _b = (unsigned int )h->length != 8U; if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "receive_delay_probe", (char *)"h->length != (sizeof(*p)-sizeof(*h))", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 3702); } else { } if (_b != 0) { return (0); } else { } tmp___1 = drbd_recv(mdev, (void *)(& h->payload), (size_t )h->length); if (tmp___1 != (int )h->length) { return (0); } else { } got_delay_probe(mdev, 1, p); return (1); } } static drbd_cmd_handler_f drbd_default_handler[41U] = { & receive_Data, & receive_DataReply, & receive_RSDataReply, & receive_Barrier, & receive_bitmap, 0, 0, & receive_UnplugRemote, & receive_DataRequest, & receive_DataRequest, & receive_SyncParam, & receive_protocol, & receive_uuids, & receive_sizes, & receive_state, & receive_sync_uuid, 0, 0, & receive_req_state, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, & receive_DataRequest, & receive_DataRequest, 0, & receive_DataRequest, 0, & receive_SyncParam, & receive_bitmap, 0, 0, & receive_delay_probe, 0}; static drbd_cmd_handler_f (**drbd_cmd_handler)(struct drbd_conf * , struct p_header * ) = (drbd_cmd_handler_f (**)(struct drbd_conf * , struct p_header * ))(& drbd_default_handler); static drbd_cmd_handler_f (**drbd_opt_cmd_handler)(struct drbd_conf * , struct p_header * ) ; static void drbdd(struct drbd_conf *mdev ) { int (*handler)(struct drbd_conf * , struct p_header * ) ; struct p_header *header ; union drbd_state val ; union drbd_state mask ; int tmp ; char const *tmp___0 ; char const *tmp___1 ; union drbd_state val___0 ; union drbd_state mask___0 ; long tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; union drbd_state val___1 ; union drbd_state mask___1 ; int tmp___6 ; long tmp___7 ; enum drbd_thread_state tmp___8 ; { header = & mdev->data.rbuf.header; goto ldv_44132; ldv_44131: drbd_thread_current_set_cpu(mdev); tmp = drbd_recv_header(mdev, header); if (tmp == 0) { val.i = 0U; val.ldv_33381.conn = 6U; mask.i = 0U; mask.ldv_33381.conn = 31U; drbd_force_state(mdev, mask, val); goto ldv_44122; } else { } if ((unsigned int )header->command <= 39U) { handler = *(drbd_cmd_handler + (unsigned long )header->command); } else if ((unsigned int )header->command > 256U && (unsigned int )header->command <= 256U) { handler = *(drbd_opt_cmd_handler + ((unsigned long )header->command + 0xffffffffffffff00UL)); } else if ((unsigned int )header->command > 257U) { handler = & receive_skip; } else { handler = 0; } tmp___2 = ldv__builtin_expect((unsigned long )handler == (unsigned long )((int (*)(struct drbd_conf * , struct p_header * ))0), 0L); if (tmp___2 != 0L) { tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: unknown packet type %d, l: %d!\n", tmp___1, tmp___0, (int )header->command, (int )header->length); val___0.i = 0U; val___0.ldv_33381.conn = 6U; mask___0.i = 0U; mask___0.ldv_33381.conn = 31U; drbd_force_state(mdev, mask___0, val___0); goto ldv_44122; } else { } tmp___6 = (*handler)(mdev, header); tmp___7 = ldv__builtin_expect(tmp___6 == 0, 0L); if (tmp___7 != 0L) { tmp___3 = cmdname((enum drbd_packets )header->command); tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: error receiving %s, l: %d!\n", tmp___5, tmp___4, tmp___3, (int )header->length); val___1.i = 0U; val___1.ldv_33381.conn = 6U; mask___1.i = 0U; mask___1.ldv_33381.conn = 31U; drbd_force_state(mdev, mask___1, val___1); goto ldv_44122; } else { } ldv_44132: tmp___8 = get_t_state(& mdev->receiver); if ((unsigned int )tmp___8 == 1U) { goto ldv_44131; } else { } ldv_44122: ; return; } } static void drbd_fail_pending_reads(struct drbd_conf *mdev ) { struct hlist_head *slot ; struct hlist_node *pos ; struct hlist_node *tmp ; struct drbd_request *req ; int i ; char const *tmp___0 ; char const *tmp___1 ; int tmp___2 ; struct hlist_node const *__mptr ; char const *tmp___3 ; char const *tmp___4 ; int tmp___5 ; { spin_lock_irq(& mdev->req_lock); i = 0; goto ldv_44149; ldv_44148: slot = mdev->app_reads_hash + (unsigned long )i; pos = slot->first; goto ldv_44146; ldv_44145: tmp___2 = list_empty((struct list_head const *)(& req->w.list)); if (tmp___2 == 0) { tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&req->w.list) ) in %s:%d\n", tmp___1, tmp___0, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 3799); } else { } _req_mod(req, connection_lost_while_pending); pos = tmp; ldv_44146: ; if ((unsigned long )pos != (unsigned long )((struct hlist_node *)0)) { tmp = pos->next; if (1 != 0) { __mptr = (struct hlist_node const *)pos; req = (struct drbd_request *)__mptr + 0xffffffffffffffd8UL; if (1 != 0) { goto ldv_44145; } else { goto ldv_44147; } } else { goto ldv_44147; } } else { } ldv_44147: i = i + 1; ldv_44149: ; if (i <= 14) { goto ldv_44148; } else { } i = 0; goto ldv_44152; ldv_44151: tmp___5 = hlist_empty((struct hlist_head const *)mdev->app_reads_hash + (unsigned long )i); if (tmp___5 == 0) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: ASSERT FAILED: app_reads_hash[%d].first: %p, should be NULL\n", tmp___4, tmp___3, i, (mdev->app_reads_hash + (unsigned long )i)->first); } else { } i = i + 1; ldv_44152: ; if (i <= 14) { goto ldv_44151; } else { } memset((void *)mdev->app_reads_hash, 0, 120UL); spin_unlock_irq(& mdev->req_lock); return; } } void drbd_flush_workqueue(struct drbd_conf *mdev ) { struct drbd_wq_barrier barr ; { barr.w.cb = & w_prev_work_done; init_completion(& barr.done); drbd_queue_work(& mdev->data.work, & barr.w); wait_for_completion(& barr.done); return; } } static void drbd_disconnect(struct drbd_conf *mdev ) { enum drbd_fencing_p fp ; union drbd_state os ; union drbd_state ns ; int rv ; unsigned int i ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; int tmp___4 ; enum drbd_disk_state nps ; enum drbd_disk_state tmp___5 ; union drbd_state val ; union drbd_state mask ; struct hlist_head *h ; int tmp___6 ; wait_queue_t __wait ; struct task_struct *tmp___7 ; int tmp___8 ; int tmp___9 ; wait_queue_t __wait___0 ; struct task_struct *tmp___10 ; int tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; char const *tmp___14 ; char const *tmp___15 ; union drbd_state val___0 ; union drbd_state mask___0 ; int tmp___16 ; char const *tmp___17 ; char const *tmp___18 ; int tmp___19 ; char const *tmp___20 ; char const *tmp___21 ; char const *tmp___22 ; char const *tmp___23 ; int tmp___24 ; char const *tmp___25 ; char const *tmp___26 ; int tmp___27 ; char const *tmp___28 ; char const *tmp___29 ; int tmp___30 ; char const *tmp___31 ; char const *tmp___32 ; int tmp___33 ; char const *tmp___34 ; char const *tmp___35 ; int tmp___36 ; { rv = 0; if ((unsigned int )*((unsigned short *)mdev + 994UL) == 0U) { return; } else { } if ((int )mdev->state.ldv_33381.conn > 7) { tmp = drbd_conn_str((enum drbd_conns )mdev->state.ldv_33381.conn); tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT FAILED cstate = %s, expected < WFConnection\n", tmp___1, tmp___0, tmp); } else { } drbd_thread_stop(& mdev->asender); drbd_free_sock(mdev); spin_lock_irq(& mdev->req_lock); _drbd_wait_ee_list_empty(mdev, & mdev->active_ee); _drbd_wait_ee_list_empty(mdev, & mdev->sync_ee); _drbd_wait_ee_list_empty(mdev, & mdev->read_ee); spin_unlock_irq(& mdev->req_lock); drbd_rs_cancel_all(mdev); mdev->rs_total = 0UL; mdev->rs_failed = 0UL; atomic_set(& mdev->rs_pending_cnt, 0); __wake_up(& mdev->misc_wait, 3U, 1, 0); del_timer_sync(& mdev->resync_timer); set_bit(3U, (unsigned long volatile *)(& mdev->flags)); resync_timer_fn((unsigned long )mdev); drbd_flush_workqueue(mdev); drbd_process_done_ee(mdev); kfree((void const *)mdev->p_uuid); mdev->p_uuid = 0; if ((unsigned int )*((unsigned char *)mdev + 1990UL) == 0U) { tl_clear(mdev); } else { } drbd_fail_pending_reads(mdev); tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Connection closed\n", tmp___3, tmp___2); drbd_md_sync(mdev); fp = FP_DONT_CARE; tmp___4 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___4 != 0) { fp = (enum drbd_fencing_p )(mdev->ldev)->dc.fencing; put_ldev(mdev); } else { } if ((unsigned int )*((unsigned char *)mdev + 1988UL) == 1U) { if ((unsigned int )fp != 0U && (int )mdev->state.ldv_33381.pdsk > 5) { tmp___5 = drbd_try_outdate_peer(mdev); nps = tmp___5; val.i = 0U; val.ldv_33381.pdsk = (unsigned char )nps; mask.i = 0U; mask.ldv_33381.pdsk = 15U; drbd_request_state(mdev, mask, val); } else { } } else { } spin_lock_irq(& mdev->req_lock); os = mdev->state; if ((int )os.ldv_33381.conn > 1) { ns = os; ns.ldv_33381.conn = 2U; rv = _drbd_set_state(mdev, ns, CS_VERBOSE, 0); } else { } spin_unlock_irq(& mdev->req_lock); if ((unsigned int )*((unsigned short *)(& os) + 0UL) == 16U) { tmp___6 = atomic_read((atomic_t const *)(& mdev->net_cnt)); if (tmp___6 == 0) { goto ldv_44172; } else { } tmp___7 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___7; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_44175: prepare_to_wait(& mdev->misc_wait, & __wait, 2); tmp___8 = atomic_read((atomic_t const *)(& mdev->net_cnt)); if (tmp___8 == 0) { goto ldv_44174; } else { } schedule(); goto ldv_44175; ldv_44174: finish_wait(& mdev->misc_wait, & __wait); ldv_44172: tmp___9 = atomic_read((atomic_t const *)(& mdev->ap_bio_cnt)); if (tmp___9 == 0) { goto ldv_44176; } else { } tmp___10 = get_current(); __wait___0.flags = 0U; __wait___0.private = (void *)tmp___10; __wait___0.func = & autoremove_wake_function; __wait___0.task_list.next = & __wait___0.task_list; __wait___0.task_list.prev = & __wait___0.task_list; ldv_44179: prepare_to_wait(& mdev->misc_wait, & __wait___0, 2); tmp___11 = atomic_read((atomic_t const *)(& mdev->ap_bio_cnt)); if (tmp___11 == 0) { goto ldv_44178; } else { } schedule(); goto ldv_44179; ldv_44178: finish_wait(& mdev->misc_wait, & __wait___0); ldv_44176: spin_lock_irq(& mdev->req_lock); h = mdev->ee_hash; goto ldv_44181; ldv_44180: ; if ((unsigned long )h->first != (unsigned long )((struct hlist_node *)0)) { tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT FAILED ee_hash[%u].first == %p, expected NULL\n", tmp___13, tmp___12, (int )(((long )h - (long )mdev->ee_hash) / 8L), h->first); } else { } h = h + 1; ldv_44181: ; if ((unsigned long )(mdev->ee_hash + (unsigned long )mdev->ee_hash_s) > (unsigned long )h) { goto ldv_44180; } else { } kfree((void const *)mdev->ee_hash); mdev->ee_hash = 0; mdev->ee_hash_s = 0U; h = mdev->tl_hash; goto ldv_44184; ldv_44183: ; if ((unsigned long )h->first != (unsigned long )((struct hlist_node *)0)) { tmp___14 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___15 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT FAILED tl_hash[%u] == %p, expected NULL\n", tmp___15, tmp___14, (int )(((long )h - (long )mdev->tl_hash) / 8L), h->first); } else { } h = h + 1; ldv_44184: ; if ((unsigned long )(mdev->tl_hash + (unsigned long )mdev->tl_hash_s) > (unsigned long )h) { goto ldv_44183; } else { } kfree((void const *)mdev->tl_hash); mdev->tl_hash = 0; mdev->tl_hash_s = 0U; spin_unlock_irq(& mdev->req_lock); crypto_free_hash(mdev->cram_hmac_tfm); mdev->cram_hmac_tfm = 0; kfree((void const *)mdev->net_conf); mdev->net_conf = 0; val___0.i = 0U; val___0.ldv_33381.conn = 0U; mask___0.i = 0U; mask___0.ldv_33381.conn = 31U; drbd_request_state(mdev, mask___0, val___0); } else { } tmp___16 = drbd_release_ee(mdev, & mdev->net_ee); i = (unsigned int )tmp___16; if (i != 0U) { tmp___17 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___18 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: net_ee not empty, killed %u entries\n", tmp___18, tmp___17, i); } else { } tmp___19 = atomic_read((atomic_t const *)(& mdev->pp_in_use)); i = (unsigned int )tmp___19; if (i != 0U) { tmp___20 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___21 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: pp_in_use = %d, expected 0\n", tmp___21, tmp___20, i); } else { } tmp___24 = list_empty((struct list_head const *)(& mdev->read_ee)); if (tmp___24 == 0) { tmp___22 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___23 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&mdev->read_ee) ) in %s:%d\n", tmp___23, tmp___22, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 3962); } else { } tmp___27 = list_empty((struct list_head const *)(& mdev->active_ee)); if (tmp___27 == 0) { tmp___25 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___26 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&mdev->active_ee) ) in %s:%d\n", tmp___26, tmp___25, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 3963); } else { } tmp___30 = list_empty((struct list_head const *)(& mdev->sync_ee)); if (tmp___30 == 0) { tmp___28 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___29 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&mdev->sync_ee) ) in %s:%d\n", tmp___29, tmp___28, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 3964); } else { } tmp___33 = list_empty((struct list_head const *)(& mdev->done_ee)); if (tmp___33 == 0) { tmp___31 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___32 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&mdev->done_ee) ) in %s:%d\n", tmp___32, tmp___31, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 3965); } else { } atomic_set(& (mdev->current_epoch)->epoch_size, 0); tmp___36 = list_empty((struct list_head const *)(& (mdev->current_epoch)->list)); if (tmp___36 == 0) { tmp___34 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___35 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&mdev->current_epoch->list) ) in %s:%d\n", tmp___35, tmp___34, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 3969); } else { } return; } } static int drbd_send_handshake(struct drbd_conf *mdev ) { struct p_handshake *p ; int ok ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; { p = & mdev->data.sbuf.handshake; tmp___1 = ldv_mutex_lock_interruptible_48(& mdev->data.mutex); if (tmp___1 != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: interrupted during initial handshake\n", tmp___0, tmp); return (0); } else { } if ((unsigned long )mdev->data.socket == (unsigned long )((struct socket *)0)) { ldv_mutex_unlock_49(& mdev->data.mutex); return (0); } else { } memset((void *)p, 0, 80UL); p->protocol_min = 1442840576U; p->protocol_max = 1560281088U; ok = _drbd_send_cmd(mdev, mdev->data.socket, P_HAND_SHAKE, (struct p_header *)p, 80UL, 0U); ldv_mutex_unlock_50(& mdev->data.mutex); return (ok); } } static int drbd_do_handshake(struct drbd_conf *mdev ) { struct p_handshake *p ; int expect ; int rv ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; __u32 tmp___6 ; __u32 tmp___7 ; int __min1 ; int __min2 ; char const *tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; { p = & mdev->data.rbuf.handshake; expect = 72; rv = drbd_send_handshake(mdev); if (rv == 0) { return (0); } else { } rv = drbd_recv_header(mdev, & p->head); if (rv == 0) { return (0); } else { } if ((unsigned int )p->head.command != 65534U) { tmp = cmdname((enum drbd_packets )p->head.command); tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: expected HandShake packet, received: %s (0x%04x)\n", tmp___1, tmp___0, tmp, (int )p->head.command); return (-1); } else { } if ((int )p->head.length != expect) { tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: expected HandShake length: %u, received: %u\n", tmp___3, tmp___2, expect, (int )p->head.length); return (-1); } else { } rv = drbd_recv(mdev, (void *)(& p->head.payload), (size_t )expect); if (rv != expect) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: short read receiving handshake packet: l=%u\n", tmp___5, tmp___4, rv); return (0); } else { } tmp___6 = __fswab32(p->protocol_min); p->protocol_min = tmp___6; tmp___7 = __fswab32(p->protocol_max); p->protocol_max = tmp___7; if (p->protocol_max == 0U) { p->protocol_max = p->protocol_min; } else { } if (p->protocol_min > 93U || p->protocol_max <= 85U) { goto incompat; } else { } __min1 = 93; __min2 = (int )p->protocol_max; mdev->agreed_pro_version = __min1 < __min2 ? __min1 : __min2; tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Handshake successful: Agreed network protocol version %d\n", tmp___9, tmp___8, mdev->agreed_pro_version); return (1); incompat: tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: incompatible DRBD dialects: I support %d-%d, peer supports %d-%d\n", tmp___11, tmp___10, 86, 93, p->protocol_min, p->protocol_max); return (-1); } } static int drbd_do_auth(struct drbd_conf *mdev ) { char my_challenge[64U] ; struct scatterlist sg ; char *response ; char *right_response ; char *peers_ch ; struct p_header p ; unsigned int key_len ; size_t tmp ; unsigned int resp_size ; struct hash_desc desc ; int rv ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; void *tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; void *tmp___12 ; char const *tmp___13 ; char const *tmp___14 ; char const *tmp___15 ; char const *tmp___16 ; char const *tmp___17 ; char const *tmp___18 ; char const *tmp___19 ; char const *tmp___20 ; char const *tmp___21 ; char const *tmp___22 ; char const *tmp___23 ; void *tmp___24 ; char const *tmp___25 ; char const *tmp___26 ; char const *tmp___27 ; char const *tmp___28 ; int tmp___29 ; char const *tmp___30 ; char const *tmp___31 ; { response = 0; right_response = 0; peers_ch = 0; tmp = strlen((char const *)(& (mdev->net_conf)->shared_secret)); key_len = (unsigned int )tmp; desc.tfm = mdev->cram_hmac_tfm; desc.flags = 0U; rv = crypto_hash_setkey(mdev->cram_hmac_tfm, (u8 const *)(& (mdev->net_conf)->shared_secret), key_len); if (rv != 0) { tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: crypto_hash_setkey() failed with %d\n", tmp___1, tmp___0, rv); rv = -1; goto fail; } else { } get_random_bytes((void *)(& my_challenge), 64); rv = drbd_send_cmd2(mdev, P_AUTH_CHALLENGE, (char *)(& my_challenge), 64UL); if (rv == 0) { goto fail; } else { } rv = drbd_recv_header(mdev, & p); if (rv == 0) { goto fail; } else { } if ((unsigned int )p.command != 16U) { tmp___2 = cmdname((enum drbd_packets )p.command); tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: expected AuthChallenge packet, received: %s (0x%04x)\n", tmp___4, tmp___3, tmp___2, (int )p.command); rv = 0; goto fail; } else { } if ((unsigned int )p.length > 128U) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: expected AuthChallenge payload too big.\n", tmp___6, tmp___5); rv = -1; goto fail; } else { } tmp___7 = kmalloc___1((size_t )p.length, 16U); peers_ch = (char *)tmp___7; if ((unsigned long )peers_ch == (unsigned long )((char *)0)) { tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: kmalloc of peers_ch failed\n", tmp___9, tmp___8); rv = -1; goto fail; } else { } rv = drbd_recv(mdev, (void *)peers_ch, (size_t )p.length); if ((int )p.length != rv) { tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: short read AuthChallenge: l=%u\n", tmp___11, tmp___10, rv); rv = 0; goto fail; } else { } resp_size = crypto_hash_digestsize(mdev->cram_hmac_tfm); tmp___12 = kmalloc___1((size_t )resp_size, 16U); response = (char *)tmp___12; if ((unsigned long )response == (unsigned long )((char *)0)) { tmp___13 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___14 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: kmalloc of response failed\n", tmp___14, tmp___13); rv = -1; goto fail; } else { } sg_init_table(& sg, 1U); sg_set_buf(& sg, (void const *)peers_ch, (unsigned int )p.length); rv = crypto_hash_digest(& desc, & sg, sg.length, (u8 *)response); if (rv != 0) { tmp___15 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___16 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: crypto_hash_digest() failed with %d\n", tmp___16, tmp___15, rv); rv = -1; goto fail; } else { } rv = drbd_send_cmd2(mdev, P_AUTH_RESPONSE, response, (size_t )resp_size); if (rv == 0) { goto fail; } else { } rv = drbd_recv_header(mdev, & p); if (rv == 0) { goto fail; } else { } if ((unsigned int )p.command != 17U) { tmp___17 = cmdname((enum drbd_packets )p.command); tmp___18 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___19 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: expected AuthResponse packet, received: %s (0x%04x)\n", tmp___19, tmp___18, tmp___17, (int )p.command); rv = 0; goto fail; } else { } if ((unsigned int )p.length != resp_size) { tmp___20 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___21 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: expected AuthResponse payload of wrong size\n", tmp___21, tmp___20); rv = 0; goto fail; } else { } rv = drbd_recv(mdev, (void *)response, (size_t )resp_size); if ((unsigned int )rv != resp_size) { tmp___22 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___23 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: short read receiving AuthResponse: l=%u\n", tmp___23, tmp___22, rv); rv = 0; goto fail; } else { } tmp___24 = kmalloc___1((size_t )resp_size, 16U); right_response = (char *)tmp___24; if ((unsigned long )right_response == (unsigned long )((char *)0)) { tmp___25 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___26 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: kmalloc of right_response failed\n", tmp___26, tmp___25); rv = -1; goto fail; } else { } sg_set_buf(& sg, (void const *)(& my_challenge), 64U); rv = crypto_hash_digest(& desc, & sg, sg.length, (u8 *)right_response); if (rv != 0) { tmp___27 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___28 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: crypto_hash_digest() failed with %d\n", tmp___28, tmp___27, rv); rv = -1; goto fail; } else { } tmp___29 = memcmp((void const *)response, (void const *)right_response, (size_t )resp_size); rv = tmp___29 == 0; if (rv != 0) { tmp___30 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___31 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Peer authenticated using %d bytes of \'%s\' HMAC\n", tmp___31, tmp___30, resp_size, (unsigned char *)(& (mdev->net_conf)->cram_hmac_alg)); } else { rv = -1; } fail: kfree((void const *)peers_ch); kfree((void const *)response); kfree((void const *)right_response); return (rv); } } int drbdd_init(struct drbd_thread *thi ) { struct drbd_conf *mdev ; unsigned int minor ; unsigned int tmp ; int h ; struct task_struct *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; struct task_struct *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; union drbd_state val ; union drbd_state mask ; int tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; { mdev = thi->mdev; tmp = mdev_to_minor(mdev); minor = tmp; tmp___0 = get_current(); sprintf((char *)(& tmp___0->comm), "drbd%d_receiver", minor); tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: receiver (re)started\n", tmp___2, tmp___1); ldv_44229: h = drbd_connect(mdev); if (h == 0) { drbd_disconnect(mdev); tmp___3 = get_current(); tmp___3->state = 1L; schedule_timeout(250L); } else { } if (h == -1) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Discarding network configuration.\n", tmp___5, tmp___4); val.i = 0U; val.ldv_33381.conn = 1U; mask.i = 0U; mask.ldv_33381.conn = 31U; drbd_force_state(mdev, mask, val); } else { } if (h == 0) { goto ldv_44229; } else { } if (h > 0) { tmp___6 = get_net_conf(mdev); if (tmp___6 != 0) { drbdd(mdev); put_net_conf(mdev); } else { } } else { } drbd_disconnect(mdev); tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: receiver terminated\n", tmp___8, tmp___7); return (0); } } static int got_RqSReply(struct drbd_conf *mdev , struct p_header *h ) { struct p_req_state_reply *p ; int retcode ; __u32 tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; { p = (struct p_req_state_reply *)h; tmp = __fswab32(p->retcode); retcode = (int )tmp; if (retcode > 0) { set_bit(10U, (unsigned long volatile *)(& mdev->flags)); } else { set_bit(11U, (unsigned long volatile *)(& mdev->flags)); tmp___0 = drbd_set_st_err_str((enum drbd_state_ret_codes )retcode); tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Requested state change failed by peer: %s (%d)\n", tmp___2, tmp___1, tmp___0, retcode); } __wake_up(& mdev->state_wait, 3U, 1, 0); return (1); } } static int got_Ping(struct drbd_conf *mdev , struct p_header *h ) { int tmp ; { tmp = drbd_send_ping_ack(mdev); return (tmp); } } static int got_PingAck(struct drbd_conf *mdev , struct p_header *h ) { int tmp ; { ((mdev->meta.socket)->sk)->sk_rcvtimeo = (long )((mdev->net_conf)->ping_int * 250); tmp = test_and_set_bit(26, (unsigned long volatile *)(& mdev->flags)); if (tmp == 0) { __wake_up(& mdev->misc_wait, 3U, 1, 0); } else { } return (1); } } static int got_IsInSync(struct drbd_conf *mdev , struct p_header *h ) { struct p_block_ack *p ; sector_t sector ; __u64 tmp ; int blksize ; __u32 tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; __u32 tmp___3 ; int tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; int tmp___7 ; { p = (struct p_block_ack *)h; tmp = __fswab64(p->sector); sector = (sector_t )tmp; tmp___0 = __fswab32(p->blksize); blksize = (int )tmp___0; if (mdev->agreed_pro_version <= 88) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->agreed_pro_version >= 89 ) in %s:%d\n", tmp___2, tmp___1, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 4308); } else { } tmp___3 = __fswab32(p->seq_num); update_peer_seq(mdev, tmp___3); drbd_rs_complete_io(mdev, sector); __drbd_set_in_sync(mdev, sector, blksize, "/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 4313U); mdev->rs_same_csum = mdev->rs_same_csum + (unsigned long )(blksize >> 12); atomic_dec(& mdev->rs_pending_cnt); tmp___7 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); if (tmp___7 < 0) { tmp___4 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: rs_pending_cnt = %d < 0 !\n", tmp___6, tmp___5, "got_IsInSync", 4316, tmp___4); } else { } return (1); } } static struct drbd_request *_ack_id_to_req(struct drbd_conf *mdev , u64 id , sector_t sector ) { struct hlist_head *slot ; struct hlist_head *tmp ; struct hlist_node *n ; struct drbd_request *req ; char const *tmp___0 ; char const *tmp___1 ; struct hlist_node const *__mptr ; char const *tmp___2 ; char const *tmp___3 ; { tmp = tl_hash_slot(mdev, sector); slot = tmp; n = slot->first; goto ldv_44270; ldv_44269: ; if ((unsigned long )req == (unsigned long )id) { if (req->sector != sector) { tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: _ack_id_to_req: found req %p but it has wrong sector (%llus versus %llus)\n", tmp___1, tmp___0, req, (unsigned long long )req->sector, (unsigned long long )sector); goto ldv_44268; } else { } return (req); } else { } n = n->next; ldv_44270: ; if ((unsigned long )n != (unsigned long )((struct hlist_node *)0)) { __builtin_prefetch((void const *)n->next); if (1 != 0) { __mptr = (struct hlist_node const *)n; req = (struct drbd_request *)__mptr + 0xffffffffffffffd8UL; if (1 != 0) { goto ldv_44269; } else { goto ldv_44268; } } else { goto ldv_44268; } } else { } ldv_44268: tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: _ack_id_to_req: failed to find req %p, sector %llus in list\n", tmp___3, tmp___2, (void *)id, (unsigned long long )sector); return (0); } } static int validate_req_change_req_state(struct drbd_conf *mdev , u64 id , sector_t sector , req_validator_fn *validator , char const *func , enum drbd_req_event what ) { struct drbd_request *req ; struct bio_and_error m ; char const *tmp ; char const *tmp___0 ; long tmp___1 ; { spin_lock_irq(& mdev->req_lock); req = (*validator)(mdev, id, sector); tmp___1 = ldv__builtin_expect((unsigned long )req == (unsigned long )((struct drbd_request *)0), 0L); if (tmp___1 != 0L) { spin_unlock_irq(& mdev->req_lock); tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: got a corrupt block_id/sector pair\n", tmp___0, tmp, func); return (0); } else { } __req_mod(req, what, & m); spin_unlock_irq(& mdev->req_lock); if ((unsigned long )m.bio != (unsigned long )((struct bio *)0)) { complete_master_bio(mdev, & m); } else { } return (1); } } static int got_BlockAck(struct drbd_conf *mdev , struct p_header *h ) { struct p_block_ack *p ; sector_t sector ; __u64 tmp ; int blksize ; __u32 tmp___0 ; enum drbd_req_event what ; __u32 tmp___1 ; int tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; int tmp___5 ; __u16 tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; char const *tmp___14 ; char const *tmp___15 ; char const *tmp___16 ; int tmp___17 ; { p = (struct p_block_ack *)h; tmp = __fswab64(p->sector); sector = (sector_t )tmp; tmp___0 = __fswab32(p->blksize); blksize = (int )tmp___0; tmp___1 = __fswab32(p->seq_num); update_peer_seq(mdev, tmp___1); if (p->block_id == 0xffffffffffffffffULL) { __drbd_set_in_sync(mdev, sector, blksize, "/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 4382U); atomic_dec(& mdev->rs_pending_cnt); tmp___5 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); if (tmp___5 < 0) { tmp___2 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: rs_pending_cnt = %d < 0 !\n", tmp___4, tmp___3, "got_BlockAck", 4383, tmp___2); } else { } return (1); } else { } tmp___6 = __fswab16((int )h->command); switch ((int )tmp___6) { case 23: ; if ((mdev->net_conf)->wire_protocol != 3) { tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->net_conf->wire_protocol == DRBD_PROT_C ) in %s:%d\n", tmp___8, tmp___7, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 4388); } else { } what = write_acked_by_peer_and_sis; goto ldv_44298; case 22: ; if ((mdev->net_conf)->wire_protocol != 3) { tmp___9 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___10 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->net_conf->wire_protocol == DRBD_PROT_C ) in %s:%d\n", tmp___10, tmp___9, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 4392); } else { } what = write_acked_by_peer; goto ldv_44298; case 21: ; if ((mdev->net_conf)->wire_protocol != 2) { tmp___11 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___12 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->net_conf->wire_protocol == DRBD_PROT_B ) in %s:%d\n", tmp___12, tmp___11, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 4396); } else { } what = recv_acked_by_peer; goto ldv_44298; case 24: ; if ((mdev->net_conf)->wire_protocol != 3) { tmp___13 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___14 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->net_conf->wire_protocol == DRBD_PROT_C ) in %s:%d\n", tmp___14, tmp___13, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 4400); } else { } what = conflict_discarded_by_peer; goto ldv_44298; default: tmp___15 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___16 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( 0 ) in %s:%d\n", tmp___16, tmp___15, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 4404); return (0); } ldv_44298: tmp___17 = validate_req_change_req_state(mdev, p->block_id, sector, & _ack_id_to_req, "got_BlockAck", what); return (tmp___17); } } static int got_NegAck(struct drbd_conf *mdev , struct p_header *h ) { struct p_block_ack *p ; sector_t sector ; __u64 tmp ; char const *tmp___0 ; char const *tmp___1 ; int tmp___2 ; __u32 tmp___3 ; int size ; __u32 tmp___4 ; int tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; int tmp___8 ; int tmp___9 ; { p = (struct p_block_ack *)h; tmp = __fswab64(p->sector); sector = (sector_t )tmp; tmp___2 = ___ratelimit(& drbd_ratelimit_state, "got_NegAck"); if (tmp___2 != 0) { tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Got NegAck packet. Peer is in troubles?\n", tmp___1, tmp___0); } else { } tmp___3 = __fswab32(p->seq_num); update_peer_seq(mdev, tmp___3); if (p->block_id == 0xffffffffffffffffULL) { tmp___4 = __fswab32(p->blksize); size = (int )tmp___4; atomic_dec(& mdev->rs_pending_cnt); tmp___8 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); if (tmp___8 < 0) { tmp___5 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: rs_pending_cnt = %d < 0 !\n", tmp___7, tmp___6, "got_NegAck", 4424, tmp___5); } else { } drbd_rs_failed_io(mdev, sector, size); return (1); } else { } tmp___9 = validate_req_change_req_state(mdev, p->block_id, sector, & _ack_id_to_req, "got_NegAck", neg_acked); return (tmp___9); } } static int got_NegDReply(struct drbd_conf *mdev , struct p_header *h ) { struct p_block_ack *p ; sector_t sector ; __u64 tmp ; __u32 tmp___0 ; __u32 tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; int tmp___4 ; { p = (struct p_block_ack *)h; tmp = __fswab64(p->sector); sector = (sector_t )tmp; tmp___0 = __fswab32(p->seq_num); update_peer_seq(mdev, tmp___0); tmp___1 = __fswab32(p->blksize); tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Got NegDReply; Sector %llus, len %u; Fail original request.\n", tmp___3, tmp___2, (unsigned long long )sector, tmp___1); tmp___4 = validate_req_change_req_state(mdev, p->block_id, sector, & _ar_id_to_req, "got_NegDReply", neg_acked); return (tmp___4); } } static int got_NegRSDReply(struct drbd_conf *mdev , struct p_header *h ) { sector_t sector ; int size ; struct p_block_ack *p ; __u64 tmp ; __u32 tmp___0 ; __u32 tmp___1 ; int tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; int tmp___5 ; int tmp___6 ; { p = (struct p_block_ack *)h; tmp = __fswab64(p->sector); sector = (sector_t )tmp; tmp___0 = __fswab32(p->blksize); size = (int )tmp___0; tmp___1 = __fswab32(p->seq_num); update_peer_seq(mdev, tmp___1); atomic_dec(& mdev->rs_pending_cnt); tmp___5 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); if (tmp___5 < 0) { tmp___2 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: rs_pending_cnt = %d < 0 !\n", tmp___4, tmp___3, "got_NegRSDReply", 4456, tmp___2); } else { } tmp___6 = _get_ldev_if_state(mdev, D_FAILED); if (tmp___6 != 0) { drbd_rs_complete_io(mdev, sector); drbd_rs_failed_io(mdev, sector, size); put_ldev(mdev); } else { } return (1); } } static int got_BarrierAck(struct drbd_conf *mdev , struct p_header *h ) { struct p_barrier_ack *p ; __u32 tmp ; { p = (struct p_barrier_ack *)h; tmp = __fswab32(p->set_size); tl_release(mdev, p->barrier, tmp); return (1); } } static int got_OVResult(struct drbd_conf *mdev , struct p_header *h ) { struct p_block_ack *p ; struct drbd_work *w ; sector_t sector ; int size ; __u64 tmp ; __u32 tmp___0 ; __u32 tmp___1 ; __u64 tmp___2 ; int tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; int tmp___6 ; void *tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; { p = (struct p_block_ack *)h; tmp = __fswab64(p->sector); sector = (sector_t )tmp; tmp___0 = __fswab32(p->blksize); size = (int )tmp___0; tmp___1 = __fswab32(p->seq_num); update_peer_seq(mdev, tmp___1); tmp___2 = __fswab64(p->block_id); if (tmp___2 == 4712ULL) { drbd_ov_oos_found(mdev, sector, size); } else { ov_oos_print(mdev); } drbd_rs_complete_io(mdev, sector); atomic_dec(& mdev->rs_pending_cnt); tmp___6 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); if (tmp___6 < 0) { tmp___3 = atomic_read((atomic_t const *)(& mdev->rs_pending_cnt)); tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: rs_pending_cnt = %d < 0 !\n", tmp___5, tmp___4, "got_OVResult", 4494, tmp___3); } else { } mdev->ov_left = mdev->ov_left - 1UL; if (mdev->ov_left == 0UL) { tmp___7 = kmalloc___1(24UL, 16U); w = (struct drbd_work *)tmp___7; if ((unsigned long )w != (unsigned long )((struct drbd_work *)0)) { w->cb = & w_ov_finished; drbd_queue_work_front(& mdev->data.work, w); } else { tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: kmalloc(w) failed.", tmp___9, tmp___8); ov_oos_print(mdev); drbd_resync_finished(mdev); } } else { } return (1); } } static int got_delay_probe_m(struct drbd_conf *mdev , struct p_header *h ) { struct p_delay_probe *p ; { p = (struct p_delay_probe *)h; got_delay_probe(mdev, 0, p); return (1); } } static struct asender_cmd *get_asender_cmd(int cmd ) { struct asender_cmd asender_tbl[41U] ; { asender_tbl[0].pkt_size = 0UL; asender_tbl[0].process = 0; asender_tbl[1].pkt_size = 0UL; asender_tbl[1].process = 0; asender_tbl[2].pkt_size = 0UL; asender_tbl[2].process = 0; asender_tbl[3].pkt_size = 0UL; asender_tbl[3].process = 0; asender_tbl[4].pkt_size = 0UL; asender_tbl[4].process = 0; asender_tbl[5].pkt_size = 0UL; asender_tbl[5].process = 0; asender_tbl[6].pkt_size = 0UL; asender_tbl[6].process = 0; asender_tbl[7].pkt_size = 0UL; asender_tbl[7].process = 0; asender_tbl[8].pkt_size = 0UL; asender_tbl[8].process = 0; asender_tbl[9].pkt_size = 0UL; asender_tbl[9].process = 0; asender_tbl[10].pkt_size = 0UL; asender_tbl[10].process = 0; asender_tbl[11].pkt_size = 0UL; asender_tbl[11].process = 0; asender_tbl[12].pkt_size = 0UL; asender_tbl[12].process = 0; asender_tbl[13].pkt_size = 0UL; asender_tbl[13].process = 0; asender_tbl[14].pkt_size = 0UL; asender_tbl[14].process = 0; asender_tbl[15].pkt_size = 0UL; asender_tbl[15].process = 0; asender_tbl[16].pkt_size = 0UL; asender_tbl[16].process = 0; asender_tbl[17].pkt_size = 0UL; asender_tbl[17].process = 0; asender_tbl[18].pkt_size = 0UL; asender_tbl[18].process = 0; asender_tbl[19].pkt_size = 8UL; asender_tbl[19].process = & got_Ping; asender_tbl[20].pkt_size = 8UL; asender_tbl[20].process = & got_PingAck; asender_tbl[21].pkt_size = 32UL; asender_tbl[21].process = & got_BlockAck; asender_tbl[22].pkt_size = 32UL; asender_tbl[22].process = & got_BlockAck; asender_tbl[23].pkt_size = 32UL; asender_tbl[23].process = & got_BlockAck; asender_tbl[24].pkt_size = 32UL; asender_tbl[24].process = & got_BlockAck; asender_tbl[25].pkt_size = 32UL; asender_tbl[25].process = & got_NegAck; asender_tbl[26].pkt_size = 32UL; asender_tbl[26].process = & got_NegDReply; asender_tbl[27].pkt_size = 32UL; asender_tbl[27].process = & got_NegRSDReply; asender_tbl[28].pkt_size = 16UL; asender_tbl[28].process = & got_BarrierAck; asender_tbl[29].pkt_size = 12UL; asender_tbl[29].process = & got_RqSReply; asender_tbl[30].pkt_size = 0UL; asender_tbl[30].process = 0; asender_tbl[31].pkt_size = 0UL; asender_tbl[31].process = 0; asender_tbl[32].pkt_size = 32UL; asender_tbl[32].process = & got_OVResult; asender_tbl[33].pkt_size = 0UL; asender_tbl[33].process = 0; asender_tbl[34].pkt_size = 32UL; asender_tbl[34].process = & got_IsInSync; asender_tbl[35].pkt_size = 0UL; asender_tbl[35].process = 0; asender_tbl[36].pkt_size = 0UL; asender_tbl[36].process = 0; asender_tbl[37].pkt_size = 0UL; asender_tbl[37].process = 0; asender_tbl[38].pkt_size = 0UL; asender_tbl[38].process = 0; asender_tbl[39].pkt_size = 16UL; asender_tbl[39].process = & got_delay_probe_m; asender_tbl[40].pkt_size = 0UL; asender_tbl[40].process = 0; if (cmd > 40 || (unsigned long )asender_tbl[cmd].process == (unsigned long )((int (*)(struct drbd_conf * , struct p_header * ))0)) { return (0); } else { } return ((struct asender_cmd *)(& asender_tbl) + (unsigned long )cmd); } } int drbd_asender(struct drbd_thread *thi ) { struct drbd_conf *mdev ; struct p_header *h ; struct asender_cmd *cmd ; int rv ; int len ; void *buf ; int received ; int expect ; int empty ; unsigned int tmp ; struct task_struct *tmp___0 ; struct task_struct *tmp___1 ; struct task_struct *tmp___2 ; int _b ; int tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; int tmp___6 ; int tmp___7 ; struct task_struct *tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; int tmp___11 ; struct task_struct *tmp___12 ; int tmp___13 ; struct task_struct *tmp___14 ; char const *tmp___15 ; char const *tmp___16 ; char const *tmp___17 ; char const *tmp___18 ; char const *tmp___19 ; char const *tmp___20 ; long tmp___21 ; __u32 tmp___22 ; char const *tmp___23 ; char const *tmp___24 ; long tmp___25 ; __u16 tmp___26 ; __u16 tmp___27 ; __u32 tmp___28 ; char const *tmp___29 ; char const *tmp___30 ; long tmp___31 ; int _b___0 ; char const *tmp___32 ; char const *tmp___33 ; char const *tmp___34 ; char const *tmp___35 ; int tmp___36 ; enum drbd_thread_state tmp___37 ; union drbd_state val ; union drbd_state mask ; union drbd_state val___0 ; union drbd_state mask___0 ; char const *tmp___38 ; char const *tmp___39 ; char const *tmp___40 ; char const *tmp___41 ; { mdev = thi->mdev; h = & mdev->meta.rbuf.header; cmd = 0; buf = (void *)h; received = 0; expect = 8; tmp = mdev_to_minor(mdev); tmp___0 = get_current(); sprintf((char *)(& tmp___0->comm), "drbd%d_asender", tmp); tmp___1 = get_current(); tmp___1->policy = 2U; tmp___2 = get_current(); tmp___2->rt_priority = 2U; goto ldv_44381; ldv_44385: drbd_thread_current_set_cpu(mdev); tmp___6 = test_and_clear_bit(2, (unsigned long volatile *)(& mdev->flags)); if (tmp___6 != 0) { tmp___3 = drbd_send_ping(mdev); _b = tmp___3 == 0; if (_b != 0) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___5, tmp___4, "drbd_asender", (char *)"!drbd_send_ping(mdev)", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 4570); } else { } if (_b != 0) { goto reconnect; } else { } ((mdev->meta.socket)->sk)->sk_rcvtimeo = (long )(((mdev->net_conf)->ping_timeo * 250) / 10); } else { } if ((unsigned int )*((unsigned char *)mdev->net_conf + 528UL) == 0U) { tmp___7 = atomic_read((atomic_t const *)(& mdev->unacked_cnt)); if (tmp___7 > 3) { drbd_tcp_cork(mdev->meta.socket); } else { } } else { } ldv_44380: clear_bit(1, (unsigned long volatile *)(& mdev->flags)); tmp___8 = get_current(); flush_signals(tmp___8); tmp___11 = drbd_process_done_ee(mdev); if (tmp___11 == 0) { tmp___9 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___10 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: process_done_ee() = NOT_OK\n", tmp___10, tmp___9); goto reconnect; } else { } set_bit(1U, (unsigned long volatile *)(& mdev->flags)); spin_lock_irq(& mdev->req_lock); empty = list_empty((struct list_head const *)(& mdev->done_ee)); spin_unlock_irq(& mdev->req_lock); if (empty != 0) { goto ldv_44379; } else { } goto ldv_44380; ldv_44379: ; if ((unsigned int )*((unsigned char *)mdev->net_conf + 528UL) == 0U) { drbd_tcp_uncork(mdev->meta.socket); } else { } tmp___12 = get_current(); tmp___13 = signal_pending(tmp___12); if (tmp___13 != 0) { goto ldv_44381; } else { } rv = drbd_recv_short(mdev, mdev->meta.socket, buf, (size_t )(expect - received), 0); clear_bit(1, (unsigned long volatile *)(& mdev->flags)); tmp___14 = get_current(); flush_signals(tmp___14); tmp___21 = ldv__builtin_expect(rv > 0, 1L); if (tmp___21 != 0L) { received = received + rv; buf = buf + (unsigned long )rv; } else if (rv == 0) { tmp___15 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___16 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: meta connection shut down by peer.\n", tmp___16, tmp___15); goto reconnect; } else if (rv == -11) { if (((mdev->meta.socket)->sk)->sk_rcvtimeo == (long )(((mdev->net_conf)->ping_timeo * 250) / 10)) { tmp___17 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___18 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: PingAck did not arrive in time.\n", tmp___18, tmp___17); goto reconnect; } else { } set_bit(2U, (unsigned long volatile *)(& mdev->flags)); goto ldv_44381; } else if (rv == -4) { goto ldv_44381; } else { tmp___19 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___20 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: sock_recvmsg returned %d\n", tmp___20, tmp___19, rv); goto reconnect; } if (received == expect && (unsigned long )cmd == (unsigned long )((struct asender_cmd *)0)) { tmp___25 = ldv__builtin_expect(h->magic != 1728214147U, 0L); if (tmp___25 != 0L) { tmp___22 = __fswab32(h->magic); tmp___23 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___24 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: magic?? on meta m: 0x%lx c: %d l: %d\n", tmp___24, tmp___23, (long )tmp___22, (int )h->command, (int )h->length); goto reconnect; } else { } tmp___26 = __fswab16((int )h->command); cmd = get_asender_cmd((int )tmp___26); tmp___27 = __fswab16((int )h->length); len = (int )tmp___27; tmp___31 = ldv__builtin_expect((unsigned long )cmd == (unsigned long )((struct asender_cmd *)0), 0L); if (tmp___31 != 0L) { tmp___28 = __fswab32(h->magic); tmp___29 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___30 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: unknown command?? on meta m: 0x%lx c: %d l: %d\n", tmp___30, tmp___29, (long )tmp___28, (int )h->command, (int )h->length); goto disconnect; } else { } expect = (int )cmd->pkt_size; _b___0 = (unsigned long )len != (unsigned long )expect - 8UL; if (_b___0 != 0) { tmp___32 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___33 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___33, tmp___32, "drbd_asender", (char *)"len != expect-sizeof(struct p_header)", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 4659); } else { } if (_b___0 != 0) { goto reconnect; } else { } } else { } if (received == expect) { if ((unsigned long )cmd == (unsigned long )((struct asender_cmd *)0)) { tmp___34 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___35 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( cmd != NULL ) in %s:%d\n", tmp___35, tmp___34, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 4663); } else { } tmp___36 = (*(cmd->process))(mdev, h); if (tmp___36 == 0) { goto reconnect; } else { } buf = (void *)h; received = 0; expect = 8; cmd = 0; } else { } ldv_44381: tmp___37 = get_t_state(thi); if ((unsigned int )tmp___37 == 1U) { goto ldv_44385; } else { } if (0) { reconnect: val.i = 0U; val.ldv_33381.conn = 5U; mask.i = 0U; mask.ldv_33381.conn = 31U; drbd_force_state(mdev, mask, val); } else { } if (0) { disconnect: val___0.i = 0U; val___0.ldv_33381.conn = 1U; mask___0.i = 0U; mask___0.ldv_33381.conn = 31U; drbd_force_state(mdev, mask___0, val___0); } else { } clear_bit(1, (unsigned long volatile *)(& mdev->flags)); if ((int )mdev->state.ldv_33381.conn > 9) { tmp___38 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___39 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->state.conn < C_CONNECTED ) in %s:%d\n", tmp___39, tmp___38, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_receiver.c.prepared", 4684); } else { } tmp___40 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___41 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: asender terminated\n", tmp___41, tmp___40); return (0); } } void ldv_main3_sequence_infinite_withcheck_stateful(void) { int tmp ; int tmp___0 ; { LDV_IN_INTERRUPT = 1; ldv_initialize(); goto ldv_44414; ldv_44413: tmp = nondet_int(); switch (tmp) { default: ; goto ldv_44412; } ldv_44412: ; ldv_44414: tmp___0 = nondet_int(); if (tmp___0 != 0) { goto ldv_44413; } else { } ldv_check_final_state(); return; } } void ldv_mutex_lock_45(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_46(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_47(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } int ldv_mutex_lock_interruptible_48(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___2 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_lock_interruptible(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_lock_interruptible_mutex_of_drbd_socket(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_49(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_50(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } extern unsigned long __per_cpu_offset[4096U] ; __inline static void hlist_del(struct hlist_node *n ) { { __hlist_del(n); n->next = 0xdead000000100100UL; n->pprev = 0xdead000000200200UL; return; } } __inline static int atomic_add_return(int i , atomic_t *v ) { int __i ; { __i = i; __asm__ volatile (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; xaddl %0, %1": "+r" (i), "+m" (v->counter): : "memory"); return (i + __i); } } __inline static int atomic_sub_return(int i , atomic_t *v ) { int tmp ; { tmp = atomic_add_return(- i, v); return (tmp); } } extern void lock_acquire(struct lockdep_map * , unsigned int , int , int , int , struct lockdep_map * , unsigned long ) ; extern void lock_release(struct lockdep_map * , int , unsigned long ) ; void ldv_mutex_unlock_58(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_59(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_57(struct mutex *ldv_func_arg1 ) ; extern int del_timer(struct timer_list * ) ; extern int cpu_number ; extern struct lockdep_map rcu_lock_map ; __inline static void rcu_read_lock(void) { { rcu_read_lock_sched_notrace(); lock_acquire(& rcu_lock_map, 0U, 0, 2, 1, 0, (unsigned long )((void *)0)); return; } } __inline static void rcu_read_unlock(void) { { lock_release(& rcu_lock_map, 1, (unsigned long )((void *)0)); rcu_read_lock_sched_notrace(); return; } } __inline static void trace_kmalloc___2(unsigned long call_site , void const *ptr , size_t bytes_req , size_t bytes_alloc , gfp_t gfp_flags ) { void **it_func ; int tmp ; int tmp___0 ; void **_________p1 ; long tmp___1 ; { tmp___1 = ldv__builtin_expect(__tracepoint_kmalloc.state != 0, 0L); if (tmp___1 != 0L) { rcu_read_lock_sched_notrace(); tmp = debug_lockdep_rcu_enabled(); if (tmp != 0) { tmp___0 = rcu_read_lock_sched_held(); if (tmp___0 == 0) { lockdep_rcu_dereference("include/trace/events/kmem.h", 87); } else { } } else { } _________p1 = *((void ** volatile *)(& __tracepoint_kmalloc.funcs)); it_func = _________p1; if ((unsigned long )it_func != (unsigned long )((void **)0)) { ldv_11651: (*((void (*)(unsigned long , void const * , size_t , size_t , gfp_t ))*it_func))(call_site, ptr, bytes_req, bytes_alloc, gfp_flags); it_func = it_func + 1; if ((unsigned long )*it_func != (unsigned long )((void *)0)) { goto ldv_11651; } else { } } else { } rcu_read_lock_sched_notrace(); } else { } return; } } __inline static void *kmalloc_large___2(size_t size , gfp_t flags ) { unsigned int order ; int tmp ; void *ret ; unsigned long tmp___0 ; { tmp = get_order(size); order = (unsigned int )tmp; tmp___0 = __get_free_pages(flags | 16384U, order); ret = (void *)tmp___0; kmemleak_alloc((void const *)ret, size, 1, flags); trace_kmalloc___2((unsigned long )((void *)0), (void const *)ret, size, 4096UL << (int )order, flags); return (ret); } } __inline static void *kmalloc___2(size_t size , gfp_t flags ) { void *ret ; void *tmp ; struct kmem_cache *s ; struct kmem_cache *tmp___0 ; void *tmp___1 ; { if (0) { if (size > 8192UL) { tmp = kmalloc_large___2(size, flags); return (tmp); } else { } if ((flags & 1U) == 0U) { tmp___0 = kmalloc_slab(size); s = tmp___0; if ((unsigned long )s == (unsigned long )((struct kmem_cache *)0)) { return (16); } else { } ret = kmem_cache_alloc_notrace(s, flags); trace_kmalloc___2((unsigned long )((void *)0), (void const *)ret, size, (size_t )s->size, flags); return (ret); } else { } } else { } tmp___1 = __kmalloc(size, flags); return (tmp___1); } } __inline static struct gendisk *part_to_disk(struct hd_struct *part ) { struct device const *__mptr ; struct device const *__mptr___0 ; long tmp ; { tmp = ldv__builtin_expect((unsigned long )part != (unsigned long )((struct hd_struct *)0), 1L); if (tmp != 0L) { if (part->partno != 0) { __mptr = (struct device const *)part->__dev.parent; return ((struct gendisk *)__mptr + 0xffffffffffffffa0UL); } else { __mptr___0 = (struct device const *)(& part->__dev); return ((struct gendisk *)__mptr___0 + 0xffffffffffffffa0UL); } } else { } return (0); } } __inline static void part_inc_in_flight(struct hd_struct *part , int rw ) { struct gendisk *tmp ; { part->in_flight[rw] = part->in_flight[rw] + 1; if (part->partno != 0) { tmp = part_to_disk(part); tmp->part0.in_flight[rw] = tmp->part0.in_flight[rw] + 1; } else { } return; } } __inline static void part_dec_in_flight(struct hd_struct *part , int rw ) { struct gendisk *tmp ; { part->in_flight[rw] = part->in_flight[rw] - 1; if (part->partno != 0) { tmp = part_to_disk(part); tmp->part0.in_flight[rw] = tmp->part0.in_flight[rw] - 1; } else { } return; } } extern void part_round_stats(int , struct hd_struct * ) ; __inline static bool bio_rw_flagged(struct bio *bio , enum bio_rw_flags flag ) { { return ((bio->bi_rw & (unsigned long )(1 << (int )flag)) != 0UL); } } extern struct bio_pair *bio_split(struct bio * , int ) ; extern void bio_pair_release(struct bio_pair * ) ; extern struct bio *bio_clone(struct bio * , gfp_t ) ; extern void blk_plug_device(struct request_queue * ) ; int allow_oos ; void _tl_add_barrier(struct drbd_conf *mdev , struct drbd_tl_epoch *new ) ; int drbd_make_request_26(struct request_queue *q , struct bio *bio ) ; int drbd_merge_bvec(struct request_queue *q , struct bvec_merge_data *bvm , struct bio_vec *bvec ) ; __inline static void __drbd_chk_io_error____1(struct drbd_conf *mdev , int forcedetach , char const *where ) { char const *tmp ; char const *tmp___0 ; int tmp___1 ; union drbd_state __ns ; char const *tmp___2 ; char const *tmp___3 ; { switch ((mdev->ldev)->dc.on_io_error) { case 0: ; if (forcedetach == 0) { tmp___1 = __printk_ratelimit("__drbd_chk_io_error_"); if (tmp___1 != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Local IO failed in %s.Passing error on...\n", tmp___0, tmp, where); } else { } goto ldv_41660; } else { } case 2: ; case 1: ; if ((int )mdev->state.ldv_33381.disk > 2) { __ns.i = mdev->state.i; __ns.ldv_33381.disk = 2U; _drbd_set_state(mdev, __ns, CS_HARD, 0); tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Local IO failed in %s.Detaching...\n", tmp___3, tmp___2, where); } else { } goto ldv_41660; } ldv_41660: ; return; } } __inline static void inc_ap_pending(struct drbd_conf *mdev ) { { atomic_inc(& mdev->ap_pending_cnt); return; } } __inline static int drbd_get_max_buffers(struct drbd_conf *mdev ) { int mxb ; int tmp ; { mxb = 1000000; tmp = get_net_conf(mdev); if (tmp != 0) { mxb = (mdev->net_conf)->max_buffers; put_net_conf(mdev); } else { } return (mxb); } } __inline static int drbd_state_is_stable(union drbd_state s ) { { switch ((unsigned int )s.ldv_33381.conn) { case 0U: ; case 8U: ; case 10U: ; case 16U: ; case 17U: ; case 18U: ; case 19U: ; case 20U: ; case 21U: ; goto ldv_41819; case 1U: ; case 2U: ; case 3U: ; case 4U: ; case 5U: ; case 6U: ; case 7U: ; case 9U: ; case 11U: ; case 12U: ; case 13U: ; case 14U: ; case 15U: ; case 31U: ; return (0); } ldv_41819: ; switch ((unsigned int )s.ldv_33381.disk) { case 0U: ; case 4U: ; case 5U: ; case 7U: ; case 8U: ; goto ldv_41839; case 1U: ; case 2U: ; case 3U: ; case 6U: ; case 15U: ; return (0); } ldv_41839: ; return (1); } } __inline static int __inc_ap_bio_cond(struct drbd_conf *mdev ) { int mxb ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; { tmp = drbd_get_max_buffers(mdev); mxb = tmp; if ((unsigned int )*((unsigned char *)mdev + 1990UL) != 0U) { return (0); } else { } tmp___0 = constant_test_bit(17U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___0 != 0) { return (0); } else { } tmp___1 = drbd_state_is_stable(mdev->state); if (tmp___1 == 0) { return (0); } else { } tmp___2 = atomic_read((atomic_t const *)(& mdev->ap_bio_cnt)); if (tmp___2 > mxb) { return (0); } else { } tmp___3 = constant_test_bit(18U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___3 != 0) { return (0); } else { } tmp___4 = atomic_read((atomic_t const *)(& mdev->new_c_uuid)); if (tmp___4 != 0) { return (0); } else { } return (1); } } __inline static void inc_ap_bio(struct drbd_conf *mdev , int count ) { wait_queue_t wait ; struct task_struct *tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; { tmp = get_current(); wait.flags = 0U; wait.private = (void *)tmp; wait.func = & autoremove_wake_function; wait.task_list.next = & wait.task_list; wait.task_list.prev = & wait.task_list; tmp___0 = atomic_read((atomic_t const *)(& mdev->new_c_uuid)); if (tmp___0 != 0) { tmp___1 = atomic_add_unless(& mdev->new_c_uuid, -1, 1); if (tmp___1 != 0) { drbd_queue_work_front(& mdev->data.work, & mdev->uuid_work); } else { } } else { } spin_lock_irq(& mdev->req_lock); goto ldv_41855; ldv_41854: prepare_to_wait(& mdev->misc_wait, & wait, 2); spin_unlock_irq(& mdev->req_lock); schedule(); finish_wait(& mdev->misc_wait, & wait); spin_lock_irq(& mdev->req_lock); ldv_41855: tmp___2 = __inc_ap_bio_cond(mdev); if (tmp___2 == 0) { goto ldv_41854; } else { } atomic_add(count, & mdev->ap_bio_cnt); spin_unlock_irq(& mdev->req_lock); return; } } __inline static void dec_ap_bio(struct drbd_conf *mdev ) { int mxb ; int tmp ; int ap_bio ; int tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; int tmp___3 ; int tmp___4 ; { tmp = drbd_get_max_buffers(mdev); mxb = tmp; tmp___0 = atomic_sub_return(1, & mdev->ap_bio_cnt); ap_bio = tmp___0; if (ap_bio < 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( ap_bio >= 0 ) in %s:%d\n", tmp___2, tmp___1, (char *)"/work/ldvuser/novikov/inst/current/envs/linux/linux/drivers/block/drbd/drbd_int.h", 2264); } else { } if (ap_bio < mxb) { __wake_up(& mdev->misc_wait, 3U, 1, 0); } else { } if (ap_bio == 0) { tmp___4 = constant_test_bit(18U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___4 != 0) { tmp___3 = test_and_set_bit(19, (unsigned long volatile *)(& mdev->flags)); if (tmp___3 == 0) { drbd_queue_work(& mdev->data.work, & mdev->bm_io_work.w); } else { } } else { } } else { } return; } } __inline static void drbd_plug_device(struct drbd_conf *mdev ) { struct request_queue *q ; int tmp ; { q = bdev_get_queue(mdev->this_bdev); spin_lock_irq(q->queue_lock); tmp = constant_test_bit(7U, (unsigned long const volatile *)(& q->queue_flags)); if (tmp == 0) { blk_plug_device(q); del_timer(& q->unplug_timer); } else { } spin_unlock_irq(q->queue_lock); return; } } __inline static struct hlist_head *ee_hash_slot___0(struct drbd_conf *mdev , sector_t sector ) { long tmp ; { tmp = ldv__builtin_expect(mdev->ee_hash_s == 0U, 0L); if (tmp != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/inst/current/envs/linux/linux/drivers/block/drbd/drbd_req.h"), "i" (207), "i" (12UL)); ldv_41962: ; goto ldv_41962; } else { } return (mdev->ee_hash + (unsigned long )((unsigned int )(sector >> 6) % mdev->ee_hash_s)); } } __inline static struct hlist_head *tl_hash_slot___0(struct drbd_conf *mdev , sector_t sector ) { long tmp ; { tmp = ldv__builtin_expect(mdev->tl_hash_s == 0U, 0L); if (tmp != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/inst/current/envs/linux/linux/drivers/block/drbd/drbd_req.h"), "i" (216), "i" (12UL)); ldv_41967: ; goto ldv_41967; } else { } return (mdev->tl_hash + (unsigned long )((unsigned int )(sector >> 6) % mdev->tl_hash_s)); } } static struct hlist_head *ar_hash_slot___0(struct drbd_conf *mdev , sector_t sector ) { { return (mdev->app_reads_hash + (unsigned long )((unsigned int )sector % 15U)); } } __inline static struct drbd_request *drbd_req_new(struct drbd_conf *mdev , struct bio *bio_src ) { struct bio *bio ; struct drbd_request *req ; void *tmp ; long tmp___0 ; { tmp = mempool_alloc(drbd_request_mempool, 16U); req = (struct drbd_request *)tmp; tmp___0 = ldv__builtin_expect((unsigned long )req != (unsigned long )((struct drbd_request *)0), 1L); if (tmp___0 != 0L) { bio = bio_clone(bio_src, 16U); req->rq_state = 0UL; req->mdev = mdev; req->master_bio = bio_src; req->private_bio = bio; req->epoch = 0U; req->sector = bio->bi_sector; req->size = bio->bi_size; req->start_time = jiffies; INIT_HLIST_NODE(& req->colision); INIT_LIST_HEAD(& req->tl_requests); INIT_LIST_HEAD(& req->w.list); bio->bi_private = (void *)req; bio->bi_end_io = & drbd_endio_pri; bio->bi_next = 0; } else { } return (req); } } void _req_may_be_done(struct drbd_request *req , struct bio_and_error *m ) ; static void _drbd_start_io_acct(struct drbd_conf *mdev , struct drbd_request *req , struct bio *bio ) { int rw ; int cpu ; int pfo_ret__ ; void const *__vpp_verify ; unsigned long __ptr ; void const *__vpp_verify___0 ; unsigned long __ptr___0 ; struct gendisk *tmp ; void const *__vpp_verify___1 ; unsigned long __ptr___1 ; void const *__vpp_verify___2 ; unsigned long __ptr___2 ; struct gendisk *tmp___0 ; { rw = (int const )bio->bi_rw & (int const )1; rcu_read_lock(); switch (4UL) { case 1UL: __asm__ ("movb %%gs:%P1,%0": "=q" (pfo_ret__): "m" (cpu_number)); goto ldv_42036; case 2UL: __asm__ ("movw %%gs:%P1,%0": "=r" (pfo_ret__): "m" (cpu_number)); goto ldv_42036; case 4UL: __asm__ ("movl %%gs:%P1,%0": "=r" (pfo_ret__): "m" (cpu_number)); goto ldv_42036; case 8UL: __asm__ ("movq %%gs:%P1,%0": "=r" (pfo_ret__): "m" (cpu_number)); goto ldv_42036; default: __bad_percpu_size(); } ldv_42036: cpu = pfo_ret__; __vpp_verify = 0; __asm__ ("": "=r" (__ptr): "0" ((mdev->vdisk)->part0.dkstats)); ((struct disk_stats *)(__per_cpu_offset[cpu] + __ptr))->ios[rw] = ((struct disk_stats *)(__per_cpu_offset[cpu] + __ptr))->ios[rw] + 1UL; if ((mdev->vdisk)->part0.partno != 0) { __vpp_verify___0 = 0; tmp = part_to_disk(& (mdev->vdisk)->part0); __asm__ ("": "=r" (__ptr___0): "0" (tmp->part0.dkstats)); ((struct disk_stats *)(__per_cpu_offset[cpu] + __ptr___0))->ios[rw] = ((struct disk_stats *)(__per_cpu_offset[cpu] + __ptr___0))->ios[rw] + 1UL; } else { } __vpp_verify___1 = 0; __asm__ ("": "=r" (__ptr___1): "0" ((mdev->vdisk)->part0.dkstats)); ((struct disk_stats *)(__per_cpu_offset[cpu] + __ptr___1))->sectors[rw] = ((struct disk_stats *)(__per_cpu_offset[cpu] + __ptr___1))->sectors[rw] + (unsigned long )(bio->bi_size >> 9); if ((mdev->vdisk)->part0.partno != 0) { __vpp_verify___2 = 0; tmp___0 = part_to_disk(& (mdev->vdisk)->part0); __asm__ ("": "=r" (__ptr___2): "0" (tmp___0->part0.dkstats)); ((struct disk_stats *)(__per_cpu_offset[cpu] + __ptr___2))->sectors[rw] = ((struct disk_stats *)(__per_cpu_offset[cpu] + __ptr___2))->sectors[rw] + (unsigned long )(bio->bi_size >> 9); } else { } part_inc_in_flight(& (mdev->vdisk)->part0, rw); rcu_read_unlock(); return; } } static void _drbd_end_io_acct(struct drbd_conf *mdev , struct drbd_request *req ) { int rw ; unsigned long duration ; int cpu ; int pfo_ret__ ; void const *__vpp_verify ; unsigned long __ptr ; void const *__vpp_verify___0 ; unsigned long __ptr___0 ; struct gendisk *tmp ; { rw = (int )(req->master_bio)->bi_rw & 1; duration = (unsigned long )jiffies - req->start_time; rcu_read_lock(); switch (4UL) { case 1UL: __asm__ ("movb %%gs:%P1,%0": "=q" (pfo_ret__): "m" (cpu_number)); goto ldv_42069; case 2UL: __asm__ ("movw %%gs:%P1,%0": "=r" (pfo_ret__): "m" (cpu_number)); goto ldv_42069; case 4UL: __asm__ ("movl %%gs:%P1,%0": "=r" (pfo_ret__): "m" (cpu_number)); goto ldv_42069; case 8UL: __asm__ ("movq %%gs:%P1,%0": "=r" (pfo_ret__): "m" (cpu_number)); goto ldv_42069; default: __bad_percpu_size(); } ldv_42069: cpu = pfo_ret__; __vpp_verify = 0; __asm__ ("": "=r" (__ptr): "0" ((mdev->vdisk)->part0.dkstats)); ((struct disk_stats *)(__per_cpu_offset[cpu] + __ptr))->ticks[rw] = ((struct disk_stats *)(__per_cpu_offset[cpu] + __ptr))->ticks[rw] + duration; if ((mdev->vdisk)->part0.partno != 0) { __vpp_verify___0 = 0; tmp = part_to_disk(& (mdev->vdisk)->part0); __asm__ ("": "=r" (__ptr___0): "0" (tmp->part0.dkstats)); ((struct disk_stats *)(__per_cpu_offset[cpu] + __ptr___0))->ticks[rw] = ((struct disk_stats *)(__per_cpu_offset[cpu] + __ptr___0))->ticks[rw] + duration; } else { } part_round_stats(cpu, & (mdev->vdisk)->part0); part_dec_in_flight(& (mdev->vdisk)->part0, rw); rcu_read_unlock(); return; } } static void _req_is_done(struct drbd_conf *mdev , struct drbd_request *req , int const rw ) { unsigned long s ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; int tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; int tmp___7 ; { s = req->rq_state; if ((int )rw == 1) { list_del(& req->tl_requests); if ((s & 128UL) == 0UL || (s & 4UL) == 0UL) { __drbd_set_out_of_sync(mdev, req->sector, (int )req->size, "/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 117U); } else { } if (((s & 128UL) != 0UL && (s & 4UL) != 0UL) && (s & 256UL) != 0UL) { __drbd_set_in_sync(mdev, req->sector, (int )req->size, "/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 120U); } else { } if ((s & 7UL) != 0UL) { tmp___2 = _get_ldev_if_state(mdev, D_FAILED); if (tmp___2 != 0) { drbd_al_complete_io(mdev, req->sector); put_ldev(mdev); } else { tmp___1 = ___ratelimit(& drbd_ratelimit_state, "_req_is_done"); if (tmp___1 != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Should have called drbd_al_complete_io(, %llu), but my Disk seems to have failed :(\n", tmp___0, tmp, (unsigned long long )req->sector); } else { } } } else { } } else { } if ((int )rw == 1 && ((s & 7UL) != 0UL && (s & 4UL) == 0UL)) { if ((unsigned long )((void *)req->w.list.next) != 0xdead000000100100UL) { tmp___7 = list_empty((struct list_head const *)(& req->w.list)); if (tmp___7 == 0) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: req->w.list.next = %p\n", tmp___4, tmp___3, req->w.list.next); tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: req->w.list.prev = %p\n", tmp___6, tmp___5, req->w.list.prev); } else { } } else { } req->w.cb = & w_io_error; drbd_queue_work(& mdev->data.work, & req->w); } else { drbd_req_free(req); } return; } } static void queue_barrier(struct drbd_conf *mdev ) { struct drbd_tl_epoch *b ; int tmp ; { tmp = constant_test_bit(0U, (unsigned long const volatile *)(& mdev->flags)); if (tmp != 0) { return; } else { } b = mdev->newest_tle; b->w.cb = & w_send_barrier; inc_ap_pending(mdev); drbd_queue_work(& mdev->data.work, & b->w); set_bit(0U, (unsigned long volatile *)(& mdev->flags)); return; } } static void _about_to_complete_local_write(struct drbd_conf *mdev , struct drbd_request *req ) { unsigned long s ; struct drbd_request *i ; struct drbd_epoch_entry *e ; struct hlist_node *n ; struct hlist_head *slot ; sector_t sector ; int size ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; struct hlist_node const *__mptr ; int tmp___2 ; struct hlist_node const *__mptr___0 ; { s = req->rq_state; if ((int )mdev->state.ldv_33381.conn > 9 && req->epoch == (mdev->newest_tle)->br_number) { queue_barrier(mdev); } else { } if ((s & 64UL) != 0UL && (unsigned long )mdev->ee_hash != (unsigned long )((struct hlist_head *)0)) { sector = req->sector; size = (int const )req->size; slot = tl_hash_slot___0(mdev, sector); n = slot->first; goto ldv_42112; ldv_42111: tmp___1 = overlaps(sector, size, i->sector, (int )i->size); if (tmp___1 != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: LOGIC BUG: completed: %p %llus +%u; other: %p %llus +%u\n", tmp___0, tmp, req, (unsigned long long )sector, size, i, (unsigned long long )i->sector, i->size); } else { } n = n->next; ldv_42112: ; if ((unsigned long )n != (unsigned long )((struct hlist_node *)0)) { __builtin_prefetch((void const *)n->next); if (1 != 0) { __mptr = (struct hlist_node const *)n; i = (struct drbd_request *)__mptr + 0xffffffffffffffd8UL; if (1 != 0) { goto ldv_42111; } else { goto ldv_42113; } } else { goto ldv_42113; } } else { } ldv_42113: slot = ee_hash_slot___0(mdev, req->sector); n = slot->first; goto ldv_42120; ldv_42119: tmp___2 = overlaps(sector, size, e->sector, (int )e->size); if (tmp___2 != 0) { __wake_up(& mdev->misc_wait, 3U, 1, 0); goto ldv_42118; } else { } n = n->next; ldv_42120: ; if ((unsigned long )n != (unsigned long )((struct hlist_node *)0)) { __builtin_prefetch((void const *)n->next); if (1 != 0) { __mptr___0 = (struct hlist_node const *)n; e = (struct drbd_epoch_entry *)__mptr___0 + 0xffffffffffffffe8UL; if (1 != 0) { goto ldv_42119; } else { goto ldv_42118; } } else { goto ldv_42118; } } else { } ldv_42118: ; } else { } return; } } void complete_master_bio(struct drbd_conf *mdev , struct bio_and_error *m ) { { bio_endio(m->bio, m->error); dec_ap_bio(mdev); return; } } void _req_may_be_done(struct drbd_request *req , struct bio_and_error *m ) { unsigned long s ; struct drbd_conf *mdev ; int rw ; int ok ; int error ; long tmp ; char const *tmp___0 ; char const *tmp___1 ; int tmp___2 ; { s = req->rq_state; mdev = req->mdev; rw = (unsigned long )req->master_bio != (unsigned long )((struct bio *)0) ? (int )(req->master_bio)->bi_rw & 1 : 1; if ((s & 16UL) != 0UL) { return; } else { } if ((s & 8UL) != 0UL) { return; } else { } if ((int )s & 1) { return; } else { } if ((unsigned long )req->master_bio != (unsigned long )((struct bio *)0)) { ok = (s & 4UL) != 0UL || (s & 128UL) != 0UL; tmp = PTR_ERR((void const *)req->private_bio); error = (int )tmp; tmp___2 = hlist_unhashed((struct hlist_node const *)(& req->colision)); if (tmp___2 == 0) { hlist_del(& req->colision); } else if ((s & 504UL) != 0UL) { tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( (s & RQ_NET_MASK) == 0 ) in %s:%d\n", tmp___1, tmp___0, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 322); } else { } if (rw == 1) { _about_to_complete_local_write(mdev, req); } else { } _drbd_end_io_acct(mdev, req); m->error = ok == 0 ? (error != 0 ? error : -5) : 0; m->bio = req->master_bio; req->master_bio = 0; } else { } if ((s & 504UL) == 0UL || (s & 64UL) != 0UL) { _req_is_done(mdev, req, rw); } else { } return; } } static int _req_conflicts(struct drbd_request *req ) { struct drbd_conf *mdev ; sector_t sector ; int size ; struct drbd_request *i ; struct drbd_epoch_entry *e ; struct hlist_node *n ; struct hlist_head *slot ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; int tmp___2 ; int _b ; char const *tmp___3 ; char const *tmp___4 ; long tmp___5 ; struct task_struct *tmp___6 ; struct task_struct *tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; int tmp___10 ; struct hlist_node const *__mptr ; long tmp___11 ; struct task_struct *tmp___12 ; struct task_struct *tmp___13 ; char const *tmp___14 ; char const *tmp___15 ; int tmp___16 ; struct hlist_node const *__mptr___0 ; { mdev = req->mdev; sector = req->sector; size = (int const )req->size; tmp___1 = hlist_unhashed((struct hlist_node const *)(& req->colision)); if (tmp___1 == 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( hlist_unhashed(&req->colision) ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 380); } else { } tmp___2 = get_net_conf(mdev); if (tmp___2 == 0) { return (0); } else { } _b = mdev->tl_hash_s == 0U; if (_b != 0) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___4, tmp___3, "_req_conflicts", (char *)"mdev->tl_hash_s == 0", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 386); } else { } if (_b != 0) { goto out_no_conflict; } else { } tmp___5 = ldv__builtin_expect((unsigned long )mdev->tl_hash == (unsigned long )((struct hlist_head *)0), 0L); if (tmp___5 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared"), "i" (388), "i" (12UL)); ldv_42148: ; goto ldv_42148; } else { } slot = tl_hash_slot___0(mdev, sector); n = slot->first; goto ldv_42155; ldv_42154: tmp___10 = overlaps(i->sector, (int )i->size, sector, size); if (tmp___10 != 0) { tmp___6 = get_current(); tmp___7 = get_current(); tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: %s[%u] Concurrent local write detected! [DISCARD L] new: %llus +%u; pending: %llus +%u\n", tmp___9, tmp___8, (char *)(& tmp___7->comm), tmp___6->pid, (unsigned long long )sector, size, (unsigned long long )i->sector, i->size); goto out_conflict; } else { } n = n->next; ldv_42155: ; if ((unsigned long )n != (unsigned long )((struct hlist_node *)0)) { __builtin_prefetch((void const *)n->next); if (1 != 0) { __mptr = (struct hlist_node const *)n; i = (struct drbd_request *)__mptr + 0xffffffffffffffd8UL; if (1 != 0) { goto ldv_42154; } else { goto ldv_42156; } } else { goto ldv_42156; } } else { } ldv_42156: ; if (mdev->ee_hash_s != 0U) { tmp___11 = ldv__builtin_expect((unsigned long )mdev->ee_hash == (unsigned long )((struct hlist_head *)0), 0L); if (tmp___11 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared"), "i" (406), "i" (12UL)); ldv_42157: ; goto ldv_42157; } else { } slot = ee_hash_slot___0(mdev, sector); n = slot->first; goto ldv_42163; ldv_42162: tmp___16 = overlaps(e->sector, (int )e->size, sector, size); if (tmp___16 != 0) { tmp___12 = get_current(); tmp___13 = get_current(); tmp___14 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___15 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: %s[%u] Concurrent remote write detected! [DISCARD L] new: %llus +%u; pending: %llus +%u\n", tmp___15, tmp___14, (char *)(& tmp___13->comm), tmp___12->pid, (unsigned long long )sector, size, (unsigned long long )e->sector, e->size); goto out_conflict; } else { } n = n->next; ldv_42163: ; if ((unsigned long )n != (unsigned long )((struct hlist_node *)0)) { __builtin_prefetch((void const *)n->next); if (1 != 0) { __mptr___0 = (struct hlist_node const *)n; e = (struct drbd_epoch_entry *)__mptr___0 + 0xffffffffffffffe8UL; if (1 != 0) { goto ldv_42162; } else { goto ldv_42164; } } else { goto ldv_42164; } } else { } ldv_42164: ; } else { } out_no_conflict: put_net_conf(mdev); return (0); out_conflict: put_net_conf(mdev); return (1); } } void __req_mod(struct drbd_request *req , enum drbd_req_event what , struct bio_and_error *m ) { struct drbd_conf *mdev ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; struct hlist_head *tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; struct hlist_head *tmp___14 ; char const *tmp___15 ; char const *tmp___16 ; int tmp___17 ; char const *tmp___18 ; char const *tmp___19 ; int tmp___20 ; int tmp___21 ; char const *tmp___22 ; char const *tmp___23 ; int tmp___24 ; int tmp___25 ; int tmp___26 ; char const *tmp___27 ; char const *tmp___28 ; int tmp___29 ; char const *tmp___30 ; char const *tmp___31 ; char const *tmp___32 ; char const *tmp___33 ; int tmp___34 ; int tmp___35 ; char const *tmp___36 ; char const *tmp___37 ; int tmp___38 ; int tmp___39 ; int tmp___40 ; char const *tmp___41 ; char const *tmp___42 ; int tmp___43 ; char const *tmp___44 ; char const *tmp___45 ; char const *tmp___46 ; char const *tmp___47 ; char const *tmp___48 ; char const *tmp___49 ; int tmp___50 ; int tmp___51 ; char const *tmp___52 ; char const *tmp___53 ; int tmp___54 ; { mdev = req->mdev; m->bio = 0; switch ((unsigned int )what) { default: tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: LOGIC BUG in %s:%u\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 455); goto ldv_42172; case 1U: ; if ((req->rq_state & 504UL) != 0UL) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( !(req->rq_state & RQ_NET_MASK) ) in %s:%d\n", tmp___2, tmp___1, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 467); } else { } req->rq_state = req->rq_state | 8UL; inc_ap_pending(mdev); goto ldv_42172; case 2U: ; if ((req->rq_state & 7UL) != 0UL) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( !(req->rq_state & RQ_LOCAL_MASK) ) in %s:%d\n", tmp___4, tmp___3, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 474); } else { } req->rq_state = req->rq_state | 1UL; goto ldv_42172; case 19U: ; if ((int )(req->master_bio)->bi_rw & 1) { mdev->writ_cnt = mdev->writ_cnt + (req->size >> 9); } else { mdev->read_cnt = mdev->read_cnt + (req->size >> 9); } req->rq_state = req->rq_state | 6UL; req->rq_state = req->rq_state & 0xfffffffffffffffeUL; _req_may_be_done(req, m); put_ldev(mdev); goto ldv_42172; case 18U: req->rq_state = req->rq_state | 2UL; req->rq_state = req->rq_state & 0xfffffffffffffffeUL; tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: Local WRITE failed sec=%llus size=%u\n", tmp___6, tmp___5, (unsigned long long )req->sector, req->size); __drbd_chk_io_error____1(mdev, 0, "__req_mod"); _req_may_be_done(req, m); put_ldev(mdev); goto ldv_42172; case 17U: req->rq_state = req->rq_state | 2UL; req->rq_state = req->rq_state & 0xfffffffffffffffeUL; _req_may_be_done(req, m); put_ldev(mdev); goto ldv_42172; case 16U: __drbd_set_out_of_sync(mdev, req->sector, (int )req->size, "/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 512U); req->rq_state = req->rq_state | 2UL; req->rq_state = req->rq_state & 0xfffffffffffffffeUL; tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: Local READ failed sec=%llus size=%u\n", tmp___8, tmp___7, (unsigned long long )req->sector, req->size); if ((req->rq_state & 504UL) != 0UL) { tmp___9 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___10 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( !(req->rq_state & RQ_NET_MASK) ) in %s:%d\n", tmp___10, tmp___9, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 520); } else { } req->rq_state = req->rq_state | 8UL; inc_ap_pending(mdev); __drbd_chk_io_error____1(mdev, 0, "__req_mod"); put_ldev(mdev); case 4U: tmp___11 = ar_hash_slot___0(mdev, req->sector); hlist_add_head(& req->colision, tmp___11); set_bit(5U, (unsigned long volatile *)(& mdev->flags)); if ((req->rq_state & 8UL) == 0UL) { tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( req->rq_state & RQ_NET_PENDING ) in %s:%d\n", tmp___13, tmp___12, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 549); } else { } req->rq_state = req->rq_state | 16UL; req->w.cb = (req->rq_state & 7UL) != 0UL ? & w_read_retry_remote : & w_send_read_req; drbd_queue_work(& mdev->data.work, & req->w); goto ldv_42172; case 3U: tmp___14 = tl_hash_slot___0(mdev, req->sector); hlist_add_head(& req->colision, tmp___14); set_bit(5U, (unsigned long volatile *)(& mdev->flags)); tmp___17 = constant_test_bit(0U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___17 != 0) { tmp___15 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___16 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( test_bit(CREATE_BARRIER, &mdev->flags) == 0 ) in %s:%d\n", tmp___16, tmp___15, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 585); } else { } req->epoch = (mdev->newest_tle)->br_number; list_add_tail(& req->tl_requests, & (mdev->newest_tle)->requests); (mdev->newest_tle)->n_req = (mdev->newest_tle)->n_req + 1; if ((req->rq_state & 8UL) == 0UL) { tmp___18 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___19 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( req->rq_state & RQ_NET_PENDING ) in %s:%d\n", tmp___19, tmp___18, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 595); } else { } req->rq_state = req->rq_state | 16UL; req->w.cb = & w_send_dblock; drbd_queue_work(& mdev->data.work, & req->w); if ((mdev->newest_tle)->n_req >= (mdev->net_conf)->max_epoch_size) { queue_barrier(mdev); } else { } goto ldv_42172; case 5U: ; case 6U: req->rq_state = req->rq_state & 0xffffffffffffffefUL; _req_may_be_done(req, m); goto ldv_42172; case 7U: ; if ((int )(req->master_bio)->bi_rw & 1 && (mdev->net_conf)->wire_protocol == 1) { if ((req->rq_state & 8UL) != 0UL) { tmp___20 = atomic_dec_and_test(& mdev->ap_pending_cnt); if (tmp___20 != 0) { __wake_up(& mdev->misc_wait, 3U, 1, 0); } else { } tmp___24 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); if (tmp___24 < 0) { tmp___21 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); tmp___22 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___23 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: ap_pending_cnt = %d < 0 !\n", tmp___23, tmp___22, "__req_mod", 624, tmp___21); } else { } req->rq_state = req->rq_state & 0xfffffffffffffff7UL; req->rq_state = req->rq_state | 128UL; } else { } } else { } req->rq_state = req->rq_state & 0xffffffffffffffefUL; req->rq_state = req->rq_state | 32UL; _req_may_be_done(req, m); goto ldv_42172; case 8U: ; if ((req->rq_state & 8UL) != 0UL) { tmp___25 = atomic_dec_and_test(& mdev->ap_pending_cnt); if (tmp___25 != 0) { __wake_up(& mdev->misc_wait, 3U, 1, 0); } else { } tmp___29 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); if (tmp___29 < 0) { tmp___26 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); tmp___27 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___28 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: ap_pending_cnt = %d < 0 !\n", tmp___28, tmp___27, "__req_mod", 646, tmp___26); } else { } } else { } req->rq_state = req->rq_state & 0xffffffffffffff77UL; req->rq_state = req->rq_state | 64UL; if ((req->rq_state & 16UL) == 0UL) { _req_may_be_done(req, m); } else { } goto ldv_42172; case 11U: req->rq_state = req->rq_state | 256UL; case 12U: ; if ((unsigned int )what == 12U) { tmp___30 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___31 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: Got DiscardAck packet %llus +%u! DRBD is not a random data generator!\n", tmp___31, tmp___30, (unsigned long long )req->sector, req->size); } else { } req->rq_state = req->rq_state | 64UL; case 10U: ; case 9U: req->rq_state = req->rq_state | 128UL; if ((req->rq_state & 8UL) == 0UL) { tmp___32 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___33 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( req->rq_state & RQ_NET_PENDING ) in %s:%d\n", tmp___33, tmp___32, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 684); } else { } tmp___34 = atomic_dec_and_test(& mdev->ap_pending_cnt); if (tmp___34 != 0) { __wake_up(& mdev->misc_wait, 3U, 1, 0); } else { } tmp___38 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); if (tmp___38 < 0) { tmp___35 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); tmp___36 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___37 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: ap_pending_cnt = %d < 0 !\n", tmp___37, tmp___36, "__req_mod", 685, tmp___35); } else { } req->rq_state = req->rq_state & 0xfffffffffffffff7UL; _req_may_be_done(req, m); goto ldv_42172; case 13U: ; if ((req->rq_state & 8UL) != 0UL) { tmp___39 = atomic_dec_and_test(& mdev->ap_pending_cnt); if (tmp___39 != 0) { __wake_up(& mdev->misc_wait, 3U, 1, 0); } else { } tmp___43 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); if (tmp___43 < 0) { tmp___40 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); tmp___41 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___42 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: ap_pending_cnt = %d < 0 !\n", tmp___42, tmp___41, "__req_mod", 693, tmp___40); } else { } } else { } req->rq_state = req->rq_state & 0xffffffffffffff77UL; req->rq_state = req->rq_state | 64UL; _req_may_be_done(req, m); goto ldv_42172; case 14U: ; if ((req->rq_state & 8UL) != 0UL) { tmp___44 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___45 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: FIXME (barrier_acked but pending)\n", tmp___45, tmp___44); list_move(& req->tl_requests, & mdev->out_of_sequence_requests); } else { } if ((req->rq_state & 32UL) == 0UL) { tmp___46 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___47 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( req->rq_state & RQ_NET_SENT ) in %s:%d\n", tmp___47, tmp___46, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 709); } else { } req->rq_state = req->rq_state | 64UL; _req_may_be_done(req, m); goto ldv_42172; case 15U: ; if ((req->rq_state & 8UL) == 0UL) { tmp___48 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___49 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( req->rq_state & RQ_NET_PENDING ) in %s:%d\n", tmp___49, tmp___48, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 715); } else { } tmp___50 = atomic_dec_and_test(& mdev->ap_pending_cnt); if (tmp___50 != 0) { __wake_up(& mdev->misc_wait, 3U, 1, 0); } else { } tmp___54 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); if (tmp___54 < 0) { tmp___51 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); tmp___52 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___53 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: ap_pending_cnt = %d < 0 !\n", tmp___53, tmp___52, "__req_mod", 716, tmp___51); } else { } req->rq_state = req->rq_state & 0xfffffffffffffff7UL; req->rq_state = req->rq_state | 192UL; _req_may_be_done(req, m); goto ldv_42172; } ldv_42172: ; return; } } static int drbd_may_do_local_read(struct drbd_conf *mdev , sector_t sector , int size ) { unsigned long sbnr ; unsigned long ebnr ; sector_t esector ; sector_t nr_sectors ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; int tmp___3 ; { if ((unsigned int )*((unsigned char *)mdev + 1989UL) == 16U) { return (1); } else { } if ((int )mdev->state.ldv_33381.disk > 4) { return (0); } else { } if ((int )mdev->state.ldv_33381.disk <= 3) { return (0); } else { } nr_sectors = drbd_get_capacity(mdev->this_bdev); esector = ((sector_t )(size >> 9) + sector) - 1UL; if (sector >= nr_sectors) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( sector < nr_sectors ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 746); } else { } if (esector >= nr_sectors) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( esector < nr_sectors ) in %s:%d\n", tmp___2, tmp___1, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 747); } else { } sbnr = sector >> 3; ebnr = esector >> 3; tmp___3 = drbd_bm_count_bits(mdev, sbnr, ebnr); return (tmp___3 == 0); } } static int drbd_make_request_common(struct drbd_conf *mdev , struct bio *bio ) { int rw ; int size ; sector_t sector ; struct drbd_tl_epoch *b ; struct drbd_request *req ; int local ; int remote ; int err ; int ret ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; void *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; int tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; int tmp___12 ; char const *tmp___13 ; char const *tmp___14 ; int tmp___15 ; int tmp___16 ; int tmp___17 ; int tmp___18 ; char const *tmp___19 ; char const *tmp___20 ; int tmp___21 ; int tmp___22 ; int tmp___23 ; { rw = (int const )bio->bi_rw & (int const )3; size = (int const )bio->bi_size; sector = bio->bi_sector; b = 0; err = -5; ret = 0; req = drbd_req_new(mdev, bio); if ((unsigned long )req == (unsigned long )((struct drbd_request *)0)) { dec_ap_bio(mdev); tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: could not kmalloc() req\n", tmp___0, tmp); bio_endio(bio, -12); return (0); } else { } local = _get_ldev_if_state(mdev, D_INCONSISTENT); if (local == 0) { bio_put(req->private_bio); req->private_bio = 0; } else { } if (rw == 1) { remote = 1; } else { if (local != 0) { tmp___1 = drbd_may_do_local_read(mdev, sector, size); if (tmp___1 == 0) { local = 0; bio_put(req->private_bio); req->private_bio = 0; put_ldev(mdev); } else { } } else { } remote = local == 0 && (int )mdev->state.ldv_33381.pdsk > 7; } if ((rw == 2 && (int )mdev->state.ldv_33381.disk > 3) && local == 0) { err = -11; goto fail_and_free_req; } else { } if (rw == 1 && local != 0) { drbd_al_begin_io(mdev, sector); } else { } remote = remote != 0 && (*((unsigned int *)mdev + 497UL) == 65536U || (*((unsigned int *)mdev + 497UL) == 32768U && (int )mdev->state.ldv_33381.conn > 9)); if ((local == 0 && remote == 0) && (unsigned int )*((unsigned char *)mdev + 1990UL) == 0U) { tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: IO ERROR: neither local nor remote disk\n", tmp___3, tmp___2); goto fail_free_complete; } else { } if ((rw == 1 && remote != 0) && (unsigned long )mdev->unused_spare_tle == (unsigned long )((struct drbd_tl_epoch *)0)) { tmp___7 = constant_test_bit(0U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___7 != 0) { allocate_barrier: tmp___4 = kmalloc___2(56UL, 16U); b = (struct drbd_tl_epoch *)tmp___4; if ((unsigned long )b == (unsigned long )((struct drbd_tl_epoch *)0)) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Failed to alloc barrier.\n", tmp___6, tmp___5); err = -12; goto fail_free_complete; } else { } } else { } } else { } spin_lock_irq(& mdev->req_lock); if ((unsigned int )*((unsigned char *)mdev + 1990UL) != 0U) { ret = 1; spin_unlock_irq(& mdev->req_lock); goto fail_free_complete; } else { } if (remote != 0) { remote = *((unsigned int *)mdev + 497UL) == 65536U || (*((unsigned int *)mdev + 497UL) == 32768U && (int )mdev->state.ldv_33381.conn > 9); if (remote == 0) { tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: lost connection while grabbing the req_lock!\n", tmp___9, tmp___8); } else { } if (local == 0 && remote == 0) { tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: IO ERROR: neither local nor remote disk\n", tmp___11, tmp___10); spin_unlock_irq(& mdev->req_lock); goto fail_free_complete; } else { } } else { } if ((unsigned long )b != (unsigned long )((struct drbd_tl_epoch *)0) && (unsigned long )mdev->unused_spare_tle == (unsigned long )((struct drbd_tl_epoch *)0)) { mdev->unused_spare_tle = b; b = 0; } else { } if ((rw == 1 && remote != 0) && (unsigned long )mdev->unused_spare_tle == (unsigned long )((struct drbd_tl_epoch *)0)) { tmp___12 = constant_test_bit(0U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___12 != 0) { spin_unlock_irq(& mdev->req_lock); goto allocate_barrier; } else { } } else { } _drbd_start_io_acct(mdev, req, bio); if (remote != 0 && (unsigned long )mdev->unused_spare_tle != (unsigned long )((struct drbd_tl_epoch *)0)) { tmp___16 = test_and_clear_bit(0, (unsigned long volatile *)(& mdev->flags)); if (tmp___16 != 0) { _tl_add_barrier(mdev, mdev->unused_spare_tle); mdev->unused_spare_tle = 0; } else { goto _L; } } else _L: /* CIL Label */ if (remote != 0 && rw == 1) { tmp___15 = constant_test_bit(0U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___15 != 0) { tmp___13 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___14 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( !(remote && rw == WRITE && test_bit(CREATE_BARRIER, &mdev->flags)) ) in %s:%d\n", tmp___14, tmp___13, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 909); } else { } } else { } if (remote != 0) { _req_mod(req, to_be_send); } else { } if (local != 0) { _req_mod(req, to_be_submitted); } else { } if (rw == 1) { tmp___22 = _req_conflicts(req); if (tmp___22 != 0) { if (local != 0) { bio_put(req->private_bio); req->private_bio = 0; drbd_al_complete_io(mdev, req->sector); put_ldev(mdev); local = 0; } else { } if (remote != 0) { tmp___17 = atomic_dec_and_test(& mdev->ap_pending_cnt); if (tmp___17 != 0) { __wake_up(& mdev->misc_wait, 3U, 1, 0); } else { } tmp___21 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); if (tmp___21 < 0) { tmp___18 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); tmp___19 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___20 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: ap_pending_cnt = %d < 0 !\n", tmp___20, tmp___19, "drbd_make_request_common", 950, tmp___18); } else { } } else { } _drbd_end_io_acct(mdev, req); bio_endio(req->master_bio, 0); req->master_bio = 0; dec_ap_bio(mdev); drbd_req_free(req); remote = 0; } else { } } else { } if (remote != 0) { _req_mod(req, rw == 1 ? queue_for_net_write : queue_for_net_read); } else { } spin_unlock_irq(& mdev->req_lock); kfree((void const *)b); if (local != 0) { (req->private_bio)->bi_bdev = (mdev->ldev)->backing_bdev; tmp___23 = drbd_insert_fault(mdev, rw != 1 ? (rw == 0 ? 5U : 6U) : 4U); if (tmp___23 != 0) { bio_endio(req->private_bio, -5); } else { generic_make_request(req->private_bio); } } else { } drbd_plug_device(mdev); return (0); fail_free_complete: ; if (rw == 1 && local != 0) { drbd_al_complete_io(mdev, sector); } else { } fail_and_free_req: ; if (local != 0) { bio_put(req->private_bio); req->private_bio = 0; put_ldev(mdev); } else { } if (ret == 0) { bio_endio(bio, err); } else { } drbd_req_free(req); dec_ap_bio(mdev); kfree((void const *)b); return (ret); } } static int drbd_fail_request_early(struct drbd_conf *mdev , int is_write ) { struct task_struct *tmp ; struct task_struct *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; int tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; int tmp___6 ; { if ((unsigned int )*((unsigned char *)mdev + 1988UL) != 1U && (allow_oos == 0 || is_write != 0)) { tmp___3 = ___ratelimit(& drbd_ratelimit_state, "drbd_fail_request_early"); if (tmp___3 != 0) { tmp = get_current(); tmp___0 = get_current(); tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Process %s[%u] tried to %s; since we are not in Primary state, we cannot allow this\n", tmp___2, tmp___1, (char *)(& tmp___0->comm), tmp->pid, is_write != 0 ? (char *)"WRITE" : (char *)"READ"); } else { } return (1); } else { } if ((int )mdev->state.ldv_33381.disk <= 7 && (int )mdev->state.ldv_33381.pdsk <= 7) { tmp___6 = ___ratelimit(& drbd_ratelimit_state, "drbd_fail_request_early"); if (tmp___6 != 0) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Sorry, I have no access to good data anymore.\n", tmp___5, tmp___4); } else { } return (1); } else { } return (0); } } int drbd_make_request_26(struct request_queue *q , struct bio *bio ) { unsigned int s_enr ; unsigned int e_enr ; struct drbd_conf *mdev ; int tmp ; bool tmp___0 ; long tmp___1 ; int tmp___2 ; long tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; int tmp___10 ; long tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; struct bio_pair *bp ; sector_t sect ; int sps ; int mask ; sector_t first_sectors ; char const *tmp___14 ; char const *tmp___15 ; int tmp___16 ; int tmp___17 ; { mdev = (struct drbd_conf *)q->queuedata; tmp = drbd_fail_request_early(mdev, (int )bio->bi_rw & 1); if (tmp != 0) { bio_endio(bio, -1); return (0); } else { } tmp___0 = bio_rw_flagged(bio, BIO_RW_BARRIER); tmp___1 = ldv__builtin_expect((long )tmp___0, 0L); if (tmp___1 != 0L) { tmp___2 = constant_test_bit(14U, (unsigned long const volatile *)(& mdev->flags)); tmp___3 = ldv__builtin_expect(tmp___2 != 0, 0L); if (tmp___3 != 0L) { bio_endio(bio, -95); return (0); } else { } } else { } if (bio->bi_size == 0U) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( bio->bi_size > 0 ) in %s:%d\n", tmp___5, tmp___4, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 1074); } else { } if ((bio->bi_size & 511U) != 0U) { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( (bio->bi_size & 0x1ff) == 0 ) in %s:%d\n", tmp___7, tmp___6, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 1075); } else { } if ((unsigned int )bio->bi_idx != 0U) { tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( bio->bi_idx == 0 ) in %s:%d\n", tmp___9, tmp___8, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 1076); } else { } s_enr = (unsigned int )(bio->bi_sector >> 6); e_enr = (unsigned int )(((bio->bi_sector + (sector_t )(bio->bi_size >> 9)) - 1UL) >> 6); tmp___11 = ldv__builtin_expect(s_enr == e_enr, 1L); if (tmp___11 != 0L) { inc_ap_bio(mdev, 1); tmp___10 = drbd_make_request_common(mdev, bio); return (tmp___10); } else { } if (((unsigned int )bio->bi_vcnt != 1U || (unsigned int )bio->bi_idx != 0U) || bio->bi_size > 32768U) { tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: bio would need to, but cannot, be split: (vcnt=%u,idx=%u,size=%u,sector=%llu)\n", tmp___13, tmp___12, (int )bio->bi_vcnt, (int )bio->bi_idx, bio->bi_size, (unsigned long long )bio->bi_sector); bio_endio(bio, -22); } else { sect = bio->bi_sector; sps = 64; mask = sps + -1; first_sectors = (unsigned long )sps - ((unsigned long )mask & sect); bp = bio_split(bio, (int )first_sectors); inc_ap_bio(mdev, 3); if (s_enr + 1U != e_enr) { tmp___14 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___15 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( e_enr == s_enr + 1 ) in %s:%d\n", tmp___15, tmp___14, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_req.c.prepared", 1125); } else { } goto ldv_42255; ldv_42254: inc_ap_bio(mdev, 1); ldv_42255: tmp___16 = drbd_make_request_common(mdev, & bp->bio1); if (tmp___16 != 0) { goto ldv_42254; } else { } goto ldv_42258; ldv_42257: inc_ap_bio(mdev, 1); ldv_42258: tmp___17 = drbd_make_request_common(mdev, & bp->bio2); if (tmp___17 != 0) { goto ldv_42257; } else { } dec_ap_bio(mdev); bio_pair_release(bp); } return (0); } } int drbd_merge_bvec(struct request_queue *q , struct bvec_merge_data *bvm , struct bio_vec *bvec ) { struct drbd_conf *mdev ; unsigned int bio_offset ; unsigned int bio_size ; int limit ; int backing_limit ; struct request_queue *b ; int _min1 ; int _min2 ; int tmp ; { mdev = (struct drbd_conf *)q->queuedata; bio_offset = (unsigned int )bvm->bi_sector << 9; bio_size = bvm->bi_size; limit = (int )(32768U - ((bio_offset & 32767U) + bio_size)); if (limit < 0) { limit = 0; } else { } if (bio_size == 0U) { if ((unsigned int )limit <= bvec->bv_len) { limit = (int )bvec->bv_len; } else if (limit != 0) { tmp = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp != 0) { b = (((mdev->ldev)->backing_bdev)->bd_disk)->queue; if ((unsigned long )b->merge_bvec_fn != (unsigned long )((merge_bvec_fn *)0)) { backing_limit = (*(b->merge_bvec_fn))(b, bvm, bvec); _min1 = limit; _min2 = backing_limit; limit = _min1 < _min2 ? _min1 : _min2; } else { } put_ldev(mdev); } else { } } else { } } else { } return (limit); } } void ldv_mutex_lock_57(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_58(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_59(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } __inline static int mutex_is_locked(struct mutex *lock ) { int tmp ; { tmp = atomic_read((atomic_t const *)(& lock->count)); return (tmp != 1); } } __inline static int ldv_mutex_is_locked_66(struct mutex *lock ) ; void ldv_mutex_unlock_64(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_65(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_68(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_70(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_71(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_72(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_73(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_63(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_67(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_69(struct mutex *ldv_func_arg1 ) ; int ldv_mutex_is_locked_md_io_mutex_of_drbd_conf(struct mutex *lock ) ; __inline static void trace_kmalloc___3(unsigned long call_site , void const *ptr , size_t bytes_req , size_t bytes_alloc , gfp_t gfp_flags ) { void **it_func ; int tmp ; int tmp___0 ; void **_________p1 ; long tmp___1 ; { tmp___1 = ldv__builtin_expect(__tracepoint_kmalloc.state != 0, 0L); if (tmp___1 != 0L) { rcu_read_lock_sched_notrace(); tmp = debug_lockdep_rcu_enabled(); if (tmp != 0) { tmp___0 = rcu_read_lock_sched_held(); if (tmp___0 == 0) { lockdep_rcu_dereference("include/trace/events/kmem.h", 87); } else { } } else { } _________p1 = *((void ** volatile *)(& __tracepoint_kmalloc.funcs)); it_func = _________p1; if ((unsigned long )it_func != (unsigned long )((void **)0)) { ldv_10574: (*((void (*)(unsigned long , void const * , size_t , size_t , gfp_t ))*it_func))(call_site, ptr, bytes_req, bytes_alloc, gfp_flags); it_func = it_func + 1; if ((unsigned long )*it_func != (unsigned long )((void *)0)) { goto ldv_10574; } else { } } else { } rcu_read_lock_sched_notrace(); } else { } return; } } __inline static void *kmalloc_large___3(size_t size , gfp_t flags ) { unsigned int order ; int tmp ; void *ret ; unsigned long tmp___0 ; { tmp = get_order(size); order = (unsigned int )tmp; tmp___0 = __get_free_pages(flags | 16384U, order); ret = (void *)tmp___0; kmemleak_alloc((void const *)ret, size, 1, flags); trace_kmalloc___3((unsigned long )((void *)0), (void const *)ret, size, 4096UL << (int )order, flags); return (ret); } } __inline static void *kmalloc___3(size_t size , gfp_t flags ) { void *ret ; void *tmp ; struct kmem_cache *s ; struct kmem_cache *tmp___0 ; void *tmp___1 ; { if (0) { if (size > 8192UL) { tmp = kmalloc_large___3(size, flags); return (tmp); } else { } if ((flags & 1U) == 0U) { tmp___0 = kmalloc_slab(size); s = tmp___0; if ((unsigned long )s == (unsigned long )((struct kmem_cache *)0)) { return (16); } else { } ret = kmem_cache_alloc_notrace(s, flags); trace_kmalloc___3((unsigned long )((void *)0), (void const *)ret, size, (size_t )s->size, flags); return (ret); } else { } } else { } tmp___1 = __kmalloc(size, flags); return (tmp___1); } } __inline static void *kzalloc___0(size_t size , gfp_t flags ) { void *tmp ; { tmp = kmalloc___3(size, flags | 32768U); return (tmp); } } __inline static void get_page(struct page *page ) { int tmp ; long tmp___0 ; { page = compound_head(page); tmp = atomic_read((atomic_t const *)(& page->_count)); tmp___0 = ldv__builtin_expect(tmp == 0, 0L); if (tmp___0 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/mm.h"), "i" (315), "i" (12UL)); ldv_15738: ; goto ldv_15738; } else { } atomic_inc(& page->_count); return; } } __inline static unsigned short queue_logical_block_size(struct request_queue *q ) { int retval ; { retval = 512; if ((unsigned long )q != (unsigned long )((struct request_queue *)0) && (unsigned int )q->limits.logical_block_size != 0U) { retval = (int )q->limits.logical_block_size; } else { } return ((unsigned short )retval); } } __inline static unsigned short bdev_logical_block_size(struct block_device *bdev ) { struct request_queue *tmp ; unsigned short tmp___0 ; { tmp = bdev_get_queue(bdev); tmp___0 = queue_logical_block_size(tmp); return (tmp___0); } } extern void lc_reset(struct lru_cache * ) ; extern void lc_set(struct lru_cache * , unsigned int , int ) ; extern void lc_del(struct lru_cache * , struct lc_element * ) ; extern struct lc_element *lc_try_get(struct lru_cache * , unsigned int ) ; extern struct lc_element *lc_find(struct lru_cache * , unsigned int ) ; extern struct lc_element *lc_get(struct lru_cache * , unsigned int ) ; extern unsigned int lc_put(struct lru_cache * , struct lc_element * ) ; extern void lc_changed(struct lru_cache * , struct lc_element * ) ; __inline static int lc_try_lock(struct lru_cache *lc ) { int tmp ; { tmp = test_and_set_bit(1, (unsigned long volatile *)(& lc->flags)); return (tmp == 0); } } __inline static void lc_unlock(struct lru_cache *lc ) { { clear_bit(1, (unsigned long volatile *)(& lc->flags)); __asm__ volatile ("": : : "memory"); return; } } __inline static int lc_is_used(struct lru_cache *lc , unsigned int enr ) { struct lc_element *e ; struct lc_element *tmp ; { tmp = lc_find(lc, enr); e = tmp; return ((unsigned long )e != (unsigned long )((struct lc_element *)0) && e->refcnt != 0U); } } extern struct lc_element *lc_element_by_index(struct lru_cache * , unsigned int ) ; extern unsigned int lc_index_of(struct lru_cache * , struct lc_element * ) ; int drbd_al_read_log(struct drbd_conf *mdev , struct drbd_backing_dev *bdev ) ; void drbd_al_apply_to_bm(struct drbd_conf *mdev ) ; void drbd_al_to_on_disk_bm(struct drbd_conf *mdev ) ; void drbd_al_shrink(struct drbd_conf *mdev ) ; void drbd_bcast_sync_progress(struct drbd_conf *mdev ) ; __inline static void __drbd_chk_io_error____2(struct drbd_conf *mdev , int forcedetach , char const *where ) { char const *tmp ; char const *tmp___0 ; int tmp___1 ; union drbd_state __ns ; char const *tmp___2 ; char const *tmp___3 ; { switch ((mdev->ldev)->dc.on_io_error) { case 0: ; if (forcedetach == 0) { tmp___1 = __printk_ratelimit("__drbd_chk_io_error_"); if (tmp___1 != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Local IO failed in %s.Passing error on...\n", tmp___0, tmp, where); } else { } goto ldv_41693; } else { } case 2: ; case 1: ; if ((int )mdev->state.ldv_33381.disk > 2) { __ns.i = mdev->state.i; __ns.ldv_33381.disk = 2U; _drbd_set_state(mdev, __ns, CS_HARD, 0); tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Local IO failed in %s.Detaching...\n", tmp___3, tmp___2, where); } else { } goto ldv_41693; } ldv_41693: ; return; } } __inline static void drbd_chk_io_error____0(struct drbd_conf *mdev , int error , int forcedetach , char const *where ) { unsigned long flags ; raw_spinlock_t *tmp ; { if (error != 0) { tmp = spinlock_check(& mdev->req_lock); flags = _raw_spin_lock_irqsave(tmp); __drbd_chk_io_error____2(mdev, forcedetach, where); spin_unlock_irqrestore(& mdev->req_lock, flags); } else { } return; } } int w_al_write_transaction(struct drbd_conf *mdev , struct drbd_work *w , int unused ) ; static int _drbd_md_sync_page_io(struct drbd_conf *mdev , struct drbd_backing_dev *bdev , struct page *page , sector_t sector , int rw , int size ) { struct bio *bio ; struct drbd_md_io md_io ; int ok ; int tmp ; int tmp___0 ; int tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; bool tmp___4 ; long tmp___5 ; long tmp___6 ; { md_io.mdev = mdev; init_completion(& md_io.event); md_io.error = 0; if (rw & 1) { tmp = constant_test_bit(16U, (unsigned long const volatile *)(& mdev->flags)); if (tmp == 0) { rw = rw | 32; } else { } } else { } rw = rw | 192; retry: bio = bio_alloc(16U, 1); bio->bi_bdev = bdev->md_bdev; bio->bi_sector = sector; tmp___0 = bio_add_page(bio, page, (unsigned int )size, 0U); ok = tmp___0 == size; if (ok == 0) { goto out; } else { } bio->bi_private = (void *)(& md_io); bio->bi_end_io = & drbd_md_io_complete; bio->bi_rw = (unsigned long )rw; tmp___1 = drbd_insert_fault(mdev, rw & 1 ? 0U : 1U); if (tmp___1 != 0) { bio_endio(bio, -5); } else { submit_bio(rw, bio); } wait_for_completion(& md_io.event); ok = (int )bio->bi_flags & 1 && md_io.error == 0; tmp___4 = bio_rw_flagged(bio, BIO_RW_BARRIER); tmp___5 = ldv__builtin_expect((long )tmp___4, 0L); if (tmp___5 != 0L) { tmp___6 = ldv__builtin_expect(ok == 0, 0L); if (tmp___6 != 0L) { tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Barriers not supported on meta data device - disabling\n", tmp___3, tmp___2); set_bit(16U, (unsigned long volatile *)(& mdev->flags)); rw = rw & -33; bio_put(bio); goto retry; } else { } } else { } out: bio_put(bio); return (ok); } } int drbd_md_sync_page_io(struct drbd_conf *mdev , struct drbd_backing_dev *bdev , sector_t sector , int rw ) { int logical_block_size ; int mask ; int ok ; int offset ; struct page *iop ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; long tmp___2 ; unsigned short tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; void *p ; void *tmp___8 ; void *hp ; void *tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; long tmp___12 ; size_t __len ; void *__ret ; struct task_struct *tmp___13 ; struct task_struct *tmp___14 ; char const *tmp___15 ; char const *tmp___16 ; sector_t tmp___17 ; sector_t tmp___18 ; char const *tmp___19 ; char const *tmp___20 ; long tmp___21 ; void *p___0 ; void *tmp___22 ; void *hp___0 ; void *tmp___23 ; size_t __len___0 ; void *__ret___0 ; { offset = 0; iop = mdev->md_io_page; tmp___1 = ldv_mutex_is_locked_66(& mdev->md_io_mutex); if (tmp___1 == 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mutex_is_locked(&mdev->md_io_mutex) ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 165); } else { } tmp___2 = ldv__builtin_expect((unsigned long )bdev->md_bdev == (unsigned long )((struct block_device *)0), 0L); if (tmp___2 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared"), "i" (167), "i" (12UL)); ldv_42008: ; goto ldv_42008; } else { } tmp___3 = bdev_logical_block_size(bdev->md_bdev); logical_block_size = (int )tmp___3; if (logical_block_size == 0) { logical_block_size = 512; } else { } if (logical_block_size != 512) { mask = logical_block_size / 512 + -1; if ((mask != 1 && mask != 3) && mask != 7) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mask == 1 || mask == 3 || mask == 7 ) in %s:%d\n", tmp___5, tmp___4, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 176); } else { } if ((mask + 1) * 512 != logical_block_size) { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( logical_block_size == (mask+1) * MD_SECTOR_SIZE ) in %s:%d\n", tmp___7, tmp___6, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 177); } else { } offset = (int )((unsigned int )sector & (unsigned int )mask); sector = (sector_t )(~ mask) & sector; iop = mdev->md_io_tmpp; if (rw & 1) { tmp___8 = lowmem_page_address(mdev->md_io_page); p = tmp___8; tmp___9 = lowmem_page_address(mdev->md_io_tmpp); hp = tmp___9; ok = _drbd_md_sync_page_io(mdev, bdev, iop, sector, 0, logical_block_size); tmp___12 = ldv__builtin_expect(ok == 0, 0L); if (tmp___12 != 0L) { tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: drbd_md_sync_page_io(,%llus,READ [logical_block_size!=512]) failed!\n", tmp___11, tmp___10, (unsigned long long )sector); return (0); } else { } __len = 512UL; if (__len > 63UL) { __ret = memcpy(hp + (unsigned long )(offset * 512), (void const *)p, __len); } else { __ret = memcpy(hp + (unsigned long )(offset * 512), (void const *)p, __len); } } else { } } else { } tmp___17 = drbd_md_first_sector(bdev); if (tmp___17 > sector) { tmp___13 = get_current(); tmp___14 = get_current(); tmp___15 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___16 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: %s [%d]:%s(,%llus,%s) out of range md access!\n", tmp___16, tmp___15, (char *)(& tmp___14->comm), tmp___13->pid, "drbd_md_sync_page_io", (unsigned long long )sector, rw & 1 ? (char *)"WRITE" : (char *)"READ"); } else { tmp___18 = drbd_md_last_sector(bdev); if (tmp___18 < sector) { tmp___13 = get_current(); tmp___14 = get_current(); tmp___15 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___16 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: %s [%d]:%s(,%llus,%s) out of range md access!\n", tmp___16, tmp___15, (char *)(& tmp___14->comm), tmp___13->pid, "drbd_md_sync_page_io", (unsigned long long )sector, rw & 1 ? (char *)"WRITE" : (char *)"READ"); } else { } } ok = _drbd_md_sync_page_io(mdev, bdev, iop, sector, rw, logical_block_size); tmp___21 = ldv__builtin_expect(ok == 0, 0L); if (tmp___21 != 0L) { tmp___19 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___20 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: drbd_md_sync_page_io(,%llus,%s) failed!\n", tmp___20, tmp___19, (unsigned long long )sector, rw & 1 ? (char *)"WRITE" : (char *)"READ"); return (0); } else { } if (logical_block_size != 512 && (rw & 1) == 0) { tmp___22 = lowmem_page_address(mdev->md_io_page); p___0 = tmp___22; tmp___23 = lowmem_page_address(mdev->md_io_tmpp); hp___0 = tmp___23; __len___0 = 512UL; if (__len___0 > 63UL) { __ret___0 = memcpy(p___0, (void const *)hp___0 + (unsigned long )(offset * 512), __len___0); } else { __ret___0 = memcpy(p___0, (void const *)hp___0 + (unsigned long )(offset * 512), __len___0); } } else { } return (ok); } } static struct lc_element *_al_get(struct drbd_conf *mdev , unsigned int enr ) { struct lc_element *al_ext ; struct lc_element *tmp ; unsigned long al_flags ; struct bm_extent *bm_ext ; struct lc_element const *__mptr ; int tmp___0 ; long tmp___1 ; { al_flags = 0UL; spin_lock_irq(& mdev->al_lock); tmp = lc_find(mdev->resync, enr / 4U); tmp___1 = ldv__builtin_expect((unsigned long )tmp != (unsigned long )((struct lc_element *)0), 0L); if (tmp___1 != 0L) { __mptr = (struct lc_element const *)tmp; bm_ext = (struct bm_extent *)__mptr + 0xfffffffffffffff0UL; tmp___0 = constant_test_bit(0U, (unsigned long const volatile *)(& bm_ext->flags)); if (tmp___0 != 0) { spin_unlock_irq(& mdev->al_lock); return (0); } else { } } else { } al_ext = lc_get(mdev->act_log, enr); al_flags = (mdev->act_log)->flags; spin_unlock_irq(& mdev->al_lock); return (al_ext); } } void drbd_al_begin_io(struct drbd_conf *mdev , sector_t sector ) { unsigned int enr ; struct lc_element *al_ext ; struct update_al_work al_work ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; wait_queue_t __wait ; struct task_struct *tmp___2 ; { enr = (unsigned int )(sector >> 13); tmp___1 = atomic_read((atomic_t const *)(& mdev->local_cnt)); if (tmp___1 <= 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( atomic_read(&mdev->local_cnt) > 0 ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 262); } else { } al_ext = _al_get(mdev, enr); if ((unsigned long )al_ext != (unsigned long )((struct lc_element *)0)) { goto ldv_42037; } else { } tmp___2 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___2; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_42040: prepare_to_wait(& mdev->al_wait, & __wait, 2); al_ext = _al_get(mdev, enr); if ((unsigned long )al_ext != (unsigned long )((struct lc_element *)0)) { goto ldv_42039; } else { } schedule(); goto ldv_42040; ldv_42039: finish_wait(& mdev->al_wait, & __wait); ldv_42037: ; if (al_ext->lc_number != enr) { init_completion(& al_work.event); al_work.al_ext = al_ext; al_work.enr = enr; al_work.old_enr = al_ext->lc_number; al_work.w.cb = & w_al_write_transaction; drbd_queue_work_front(& mdev->data.work, & al_work.w); wait_for_completion(& al_work.event); mdev->al_writ_cnt = mdev->al_writ_cnt + 1U; spin_lock_irq(& mdev->al_lock); lc_changed(mdev->act_log, al_ext); spin_unlock_irq(& mdev->al_lock); __wake_up(& mdev->al_wait, 3U, 1, 0); } else { } return; } } void drbd_al_complete_io(struct drbd_conf *mdev , sector_t sector ) { unsigned int enr ; struct lc_element *extent ; unsigned long flags ; raw_spinlock_t *tmp ; char const *tmp___0 ; char const *tmp___1 ; unsigned int tmp___2 ; { enr = (unsigned int )(sector >> 13); tmp = spinlock_check(& mdev->al_lock); flags = _raw_spin_lock_irqsave(tmp); extent = lc_find(mdev->act_log, enr); if ((unsigned long )extent == (unsigned long )((struct lc_element *)0)) { spin_unlock_irqrestore(& mdev->al_lock, flags); tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: al_complete_io() called on inactive extent %u\n", tmp___1, tmp___0, enr); return; } else { } tmp___2 = lc_put(mdev->act_log, extent); if (tmp___2 == 0U) { __wake_up(& mdev->al_wait, 3U, 1, 0); } else { } spin_unlock_irqrestore(& mdev->al_lock, flags); return; } } int w_al_write_transaction(struct drbd_conf *mdev , struct drbd_work *w , int unused ) { struct update_al_work *aw ; struct drbd_work const *__mptr ; struct lc_element *updated ; unsigned int new_enr ; unsigned int evicted ; struct al_transaction *buffer ; sector_t sector ; int i ; int n ; int mx ; unsigned int extent_nr ; u32 xor_sum ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; void *tmp___2 ; __u32 tmp___3 ; unsigned int tmp___4 ; __u32 tmp___5 ; __u32 tmp___6 ; int __min1 ; int __min2 ; unsigned int idx ; struct lc_element *tmp___7 ; __u32 tmp___8 ; __u32 tmp___9 ; __u32 tmp___10 ; int tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; { __mptr = (struct drbd_work const *)w; aw = (struct update_al_work *)__mptr; updated = aw->al_ext; new_enr = aw->enr; evicted = aw->old_enr; xor_sum = 0U; tmp___1 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___1 == 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: get_ldev() failed in w_al_write_transaction\n", tmp___0, tmp); complete(& ((struct update_al_work *)w)->event); return (1); } else { } if ((int )mdev->state.ldv_33381.conn <= 9 && evicted != 4294967295U) { drbd_bm_write_sect(mdev, (unsigned long )(evicted / 4U)); } else { } ldv_mutex_lock_67(& mdev->md_io_mutex); tmp___2 = lowmem_page_address(mdev->md_io_page); buffer = (struct al_transaction *)tmp___2; buffer->magic = 1728214147U; tmp___3 = __fswab32(mdev->al_tr_number); buffer->tr_number = tmp___3; tmp___4 = lc_index_of(mdev->act_log, updated); n = (int )tmp___4; tmp___5 = __fswab32((__u32 )n); buffer->updates[0].pos = tmp___5; tmp___6 = __fswab32(new_enr); buffer->updates[0].extent = tmp___6; xor_sum = xor_sum ^ new_enr; __min1 = 61; __min2 = (int )((mdev->act_log)->nr_elements - (unsigned int )mdev->al_tr_cycle); mx = __min1 < __min2 ? __min1 : __min2; i = 0; goto ldv_42074; ldv_42073: idx = (unsigned int )(mdev->al_tr_cycle + i); tmp___7 = lc_element_by_index(mdev->act_log, idx); extent_nr = tmp___7->lc_number; tmp___8 = __fswab32(idx); buffer->updates[i + 1].pos = tmp___8; tmp___9 = __fswab32(extent_nr); buffer->updates[i + 1].extent = tmp___9; xor_sum = xor_sum ^ extent_nr; i = i + 1; ldv_42074: ; if (i < mx) { goto ldv_42073; } else { } goto ldv_42077; ldv_42076: buffer->updates[i + 1].pos = 4294967295U; buffer->updates[i + 1].extent = 4294967295U; xor_sum = ~ xor_sum; i = i + 1; ldv_42077: ; if (i <= 60) { goto ldv_42076; } else { } mdev->al_tr_cycle = mdev->al_tr_cycle + 61; if ((unsigned int )mdev->al_tr_cycle >= (mdev->act_log)->nr_elements) { mdev->al_tr_cycle = 0; } else { } tmp___10 = __fswab32(xor_sum); buffer->xor_sum = tmp___10; sector = (sector_t )(((mdev->ldev)->md.md_offset + (u64 )(mdev->ldev)->md.al_offset) + (u64 )mdev->al_tr_pos); tmp___11 = drbd_md_sync_page_io(mdev, mdev->ldev, sector, 1); if (tmp___11 == 0) { drbd_chk_io_error____0(mdev, 1, 1, "w_al_write_transaction"); } else { } mdev->al_tr_pos = mdev->al_tr_pos + 1; if ((unsigned int )mdev->al_tr_pos > (mdev->act_log)->nr_elements / 61U + ((mdev->act_log)->nr_elements % 61U != 0U ? 1U : 0U)) { mdev->al_tr_pos = 0; } else { } if (mdev->al_tr_pos > 63) { tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->al_tr_pos < MD_AL_MAX_SIZE ) in %s:%d\n", tmp___13, tmp___12, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 380); } else { } mdev->al_tr_number = mdev->al_tr_number + 1U; ldv_mutex_unlock_68(& mdev->md_io_mutex); complete(& ((struct update_al_work *)w)->event); put_ldev(mdev); return (1); } } static int drbd_al_read_tr(struct drbd_conf *mdev , struct drbd_backing_dev *bdev , struct al_transaction *b , int index ) { sector_t sector ; int rv ; int i ; u32 xor_sum ; int tmp ; __u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; { xor_sum = 0U; sector = (sector_t )((bdev->md.md_offset + (u64 )bdev->md.al_offset) + (u64 )index); tmp = drbd_md_sync_page_io(mdev, bdev, sector, 0); if (tmp == 0) { return (-1); } else { } tmp___0 = __fswab32(b->magic); rv = tmp___0 == 2205418087U; i = 0; goto ldv_42091; ldv_42090: tmp___1 = __fswab32(b->updates[i].extent); xor_sum = tmp___1 ^ xor_sum; i = i + 1; ldv_42091: ; if (i <= 61) { goto ldv_42090; } else { } tmp___2 = __fswab32(b->xor_sum); rv = (tmp___2 == xor_sum) & rv; return (rv); } } int drbd_al_read_log(struct drbd_conf *mdev , struct drbd_backing_dev *bdev ) { struct al_transaction *buffer ; int i ; int rv ; int mx ; int active_extents ; int transactions ; int found_valid ; int from ; int to ; u32 from_tnr ; u32 to_tnr ; u32 cnr ; void *tmp ; __u32 tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; int j ; int pos ; unsigned int extent_nr ; unsigned int trn ; int _b ; char const *tmp___7 ; char const *tmp___8 ; __u32 tmp___9 ; __u32 tmp___10 ; __u32 tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; { active_extents = 0; transactions = 0; found_valid = 0; from = 0; to = 0; from_tnr = 0U; to_tnr = 0U; mx = (int )((mdev->act_log)->nr_elements / 61U + ((mdev->act_log)->nr_elements % 61U != 0U ? 1U : 0U)); ldv_mutex_lock_69(& mdev->md_io_mutex); tmp = lowmem_page_address(mdev->md_io_page); buffer = (struct al_transaction *)tmp; i = 0; goto ldv_42111; ldv_42110: rv = drbd_al_read_tr(mdev, bdev, buffer, i); if (rv == 0) { goto ldv_42109; } else { } if (rv == -1) { ldv_mutex_unlock_70(& mdev->md_io_mutex); return (0); } else { } tmp___0 = __fswab32(buffer->tr_number); cnr = tmp___0; found_valid = found_valid + 1; if (found_valid == 1) { from = i; to = i; from_tnr = cnr; to_tnr = cnr; goto ldv_42109; } else { } if ((int )cnr - (int )from_tnr < 0) { if (((from_tnr - cnr) + (u32 )i) - (u32 )from != (u32 )(mx + 1)) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( from_tnr - cnr + i - from == mx+1 ) in %s:%d\n", tmp___2, tmp___1, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 474); } else { } from = i; from_tnr = cnr; } else { } if ((int )cnr - (int )to_tnr > 0) { if (cnr - to_tnr != (u32 )(i - to)) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( cnr - to_tnr == i - to ) in %s:%d\n", tmp___4, tmp___3, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 479); } else { } to = i; to_tnr = cnr; } else { } ldv_42109: i = i + 1; ldv_42111: ; if (i <= mx) { goto ldv_42110; } else { } if (found_valid == 0) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: No usable activity log found.\n", tmp___6, tmp___5); ldv_mutex_unlock_71(& mdev->md_io_mutex); return (1); } else { } i = from; ldv_42126: rv = drbd_al_read_tr(mdev, bdev, buffer, i); _b = rv == 0; if (_b != 0) { tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___8, tmp___7, "drbd_al_read_log", (char *)"rv == 0", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 500); } else { } if (_b != 0) { goto cancel; } else { } if (rv == -1) { ldv_mutex_unlock_72(& mdev->md_io_mutex); return (0); } else { } tmp___9 = __fswab32(buffer->tr_number); trn = tmp___9; spin_lock_irq(& mdev->al_lock); j = 61; goto ldv_42123; ldv_42122: tmp___10 = __fswab32(buffer->updates[j].pos); pos = (int )tmp___10; tmp___11 = __fswab32(buffer->updates[j].extent); extent_nr = tmp___11; if (extent_nr == 4294967295U) { goto ldv_42121; } else { } lc_set(mdev->act_log, extent_nr, pos); active_extents = active_extents + 1; ldv_42121: j = j - 1; ldv_42123: ; if (j >= 0) { goto ldv_42122; } else { } spin_unlock_irq(& mdev->al_lock); transactions = transactions + 1; cancel: ; if (i == to) { goto ldv_42125; } else { } i = i + 1; if (i > mx) { i = 0; } else { } goto ldv_42126; ldv_42125: mdev->al_tr_number = to_tnr + 1U; mdev->al_tr_pos = to; mdev->al_tr_pos = mdev->al_tr_pos + 1; if ((unsigned int )mdev->al_tr_pos > (mdev->act_log)->nr_elements / 61U + ((mdev->act_log)->nr_elements % 61U != 0U ? 1U : 0U)) { mdev->al_tr_pos = 0; } else { } ldv_mutex_unlock_73(& mdev->md_io_mutex); tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Found %d transactions (%d active extents) in activity log.\n", tmp___13, tmp___12, transactions, active_extents); return (1); } } static void atodb_endio(struct bio *bio , int error ) { struct drbd_atodb_wait *wc ; struct drbd_conf *mdev ; struct page *page ; int uptodate ; int tmp ; { wc = (struct drbd_atodb_wait *)bio->bi_private; mdev = wc->mdev; uptodate = (int )bio->bi_flags & 1; if (error == 0 && uptodate == 0) { error = -5; } else { } drbd_chk_io_error____0(mdev, error, 1, "atodb_endio"); if (error != 0 && wc->error == 0) { wc->error = error; } else { } tmp = atomic_dec_and_test(& wc->count); if (tmp != 0) { complete(& wc->io_done); } else { } page = (bio->bi_io_vec)->bv_page; put_page(page); bio_put(bio); mdev->bm_writ_cnt = mdev->bm_writ_cnt + 1U; put_ldev(mdev); return; } } static int atodb_prepare_unless_covered(struct drbd_conf *mdev , struct bio **bios , unsigned int enr , struct drbd_atodb_wait *wc ) { struct bio *bio ; struct page *page ; sector_t on_disk_sector ; unsigned int page_offset___0 ; int offset ; int i ; int err ; char const *tmp ; char const *tmp___0 ; struct bio_vec const *prev_bv ; void *tmp___1 ; size_t __min1 ; size_t __min2 ; size_t tmp___2 ; int tmp___3 ; { page_offset___0 = 4096U; i = 0; err = -12; enr = enr & 4294967288U; on_disk_sector = (sector_t )(((u64 )enr + (mdev->ldev)->md.md_offset) + (u64 )(mdev->ldev)->md.bm_offset); if ((on_disk_sector & 7UL) != 0UL) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( !(on_disk_sector & 7U) ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 602); } else { } goto ldv_42150; ldv_42149: ; if (bio->bi_sector == on_disk_sector) { return (0); } else { } i = i + 1; ldv_42150: bio = *(bios + (unsigned long )i); if ((unsigned long )bio != (unsigned long )((struct bio *)0)) { goto ldv_42149; } else { } bio = bio_alloc(208U, 1); if ((unsigned long )bio == (unsigned long )((struct bio *)0)) { return (-12); } else { } if (i > 0) { prev_bv = (struct bio_vec const *)(*(bios + ((unsigned long )i + 0xffffffffffffffffUL)))->bi_io_vec; page_offset___0 = (unsigned int )prev_bv->bv_offset + (unsigned int )prev_bv->bv_len; page = prev_bv->bv_page; } else { } if (page_offset___0 == 4096U) { page = alloc_pages(2U, 0U); if ((unsigned long )page == (unsigned long )((struct page *)0)) { goto out_bio_put; } else { } page_offset___0 = 0U; } else { get_page(page); } offset = (int )(enr << 6); tmp___1 = kmap(page); __min1 = 512UL; tmp___2 = drbd_bm_words(mdev); __min2 = tmp___2 - (size_t )offset; drbd_bm_get_lel(mdev, (size_t )offset, __min1 < __min2 ? __min1 : __min2, (unsigned long *)tmp___1 + (unsigned long )page_offset___0); kunmap(page); bio->bi_private = (void *)wc; bio->bi_end_io = & atodb_endio; bio->bi_bdev = (mdev->ldev)->md_bdev; bio->bi_sector = on_disk_sector; tmp___3 = bio_add_page(bio, page, 4096U, page_offset___0); if (tmp___3 != 4096) { goto out_put_page; } else { } atomic_inc(& wc->count); atomic_inc(& mdev->local_cnt); *(bios + (unsigned long )i) = bio; return (0); out_put_page: err = -22; put_page(page); out_bio_put: bio_put(bio); return (err); } } void drbd_al_to_on_disk_bm(struct drbd_conf *mdev ) { int i ; int nr_elements ; unsigned int enr ; struct bio **bios ; struct drbd_atodb_wait wc ; int _b ; int tmp ; char const *tmp___0 ; char const *tmp___1 ; int tmp___2 ; wait_queue_t __wait ; struct task_struct *tmp___3 ; int tmp___4 ; void *tmp___5 ; struct lc_element *tmp___6 ; int tmp___7 ; int tmp___8 ; struct request_queue *tmp___9 ; int tmp___10 ; char const *tmp___11 ; char const *tmp___12 ; struct lc_element *tmp___13 ; { tmp = _get_ldev_if_state(mdev, D_ATTACHING); _b = tmp == 0; if (_b != 0) { tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___1, tmp___0, "drbd_al_to_on_disk_bm", (char *)"!get_ldev_if_state(mdev, D_ATTACHING)", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 685); } else { } if (_b != 0) { return; } else { } tmp___2 = lc_try_lock(mdev->act_log); if (tmp___2 != 0) { goto ldv_42169; } else { } tmp___3 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___3; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_42172: prepare_to_wait(& mdev->al_wait, & __wait, 2); tmp___4 = lc_try_lock(mdev->act_log); if (tmp___4 != 0) { goto ldv_42171; } else { } schedule(); goto ldv_42172; ldv_42171: finish_wait(& mdev->al_wait, & __wait); ldv_42169: nr_elements = (int )(mdev->act_log)->nr_elements; tmp___5 = kzalloc___0((unsigned long )nr_elements * 8UL, 208U); bios = (struct bio **)tmp___5; if ((unsigned long )bios == (unsigned long )((struct bio **)0)) { goto submit_one_by_one; } else { } atomic_set(& wc.count, 0); init_completion(& wc.io_done); wc.mdev = mdev; wc.error = 0; i = 0; goto ldv_42177; ldv_42176: tmp___6 = lc_element_by_index(mdev->act_log, (unsigned int )i); enr = tmp___6->lc_number; if (enr == 4294967295U) { goto ldv_42174; } else { } tmp___7 = atodb_prepare_unless_covered(mdev, bios, enr / 4U, & wc); if (tmp___7 != 0) { goto free_bios_submit_one_by_one; } else { } ldv_42174: i = i + 1; ldv_42177: ; if (i < nr_elements) { goto ldv_42176; } else { } lc_unlock(mdev->act_log); __wake_up(& mdev->al_wait, 3U, 1, 0); i = 0; goto ldv_42181; ldv_42180: ; if ((unsigned long )*(bios + (unsigned long )i) == (unsigned long )((struct bio *)0)) { goto ldv_42179; } else { } tmp___8 = drbd_insert_fault(mdev, 0U); if (tmp___8 != 0) { (*(bios + (unsigned long )i))->bi_rw = 1UL; bio_endio(*(bios + (unsigned long )i), -5); } else { submit_bio(1, *(bios + (unsigned long )i)); } i = i + 1; ldv_42181: ; if (i < nr_elements) { goto ldv_42180; } else { } ldv_42179: tmp___9 = bdev_get_queue((mdev->ldev)->md_bdev); drbd_blk_run_queue(tmp___9); drbd_md_flush(mdev); tmp___10 = atomic_read((atomic_t const *)(& wc.count)); if (tmp___10 != 0) { wait_for_completion(& wc.io_done); } else { } put_ldev(mdev); kfree((void const *)bios); return; free_bios_submit_one_by_one: i = 0; goto ldv_42183; ldv_42182: bio_endio(*(bios + (unsigned long )i), 0); i = i + 1; ldv_42183: ; if (i < nr_elements && (unsigned long )*(bios + (unsigned long )i) != (unsigned long )((struct bio *)0)) { goto ldv_42182; } else { } kfree((void const *)bios); submit_one_by_one: tmp___11 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___12 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Using the slow drbd_al_to_on_disk_bm()\n", tmp___12, tmp___11); i = 0; goto ldv_42187; ldv_42186: tmp___13 = lc_element_by_index(mdev->act_log, (unsigned int )i); enr = tmp___13->lc_number; if (enr == 4294967295U) { goto ldv_42185; } else { } drbd_bm_write_sect(mdev, (unsigned long )(enr / 4U)); ldv_42185: i = i + 1; ldv_42187: ; if ((unsigned int )i < (mdev->act_log)->nr_elements) { goto ldv_42186; } else { } lc_unlock(mdev->act_log); __wake_up(& mdev->al_wait, 3U, 1, 0); put_ldev(mdev); return; } } void drbd_al_apply_to_bm(struct drbd_conf *mdev ) { unsigned int enr ; unsigned long add ; char ppb[10U] ; int i ; int tmp ; wait_queue_t __wait ; struct task_struct *tmp___0 ; int tmp___1 ; struct lc_element *tmp___2 ; unsigned long tmp___3 ; char *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; { add = 0UL; tmp = lc_try_lock(mdev->act_log); if (tmp != 0) { goto ldv_42196; } else { } tmp___0 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___0; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_42199: prepare_to_wait(& mdev->al_wait, & __wait, 2); tmp___1 = lc_try_lock(mdev->act_log); if (tmp___1 != 0) { goto ldv_42198; } else { } schedule(); goto ldv_42199; ldv_42198: finish_wait(& mdev->al_wait, & __wait); ldv_42196: i = 0; goto ldv_42202; ldv_42201: tmp___2 = lc_element_by_index(mdev->act_log, (unsigned int )i); enr = tmp___2->lc_number; if (enr == 4294967295U) { goto ldv_42200; } else { } tmp___3 = drbd_bm_ALe_set_all(mdev, (unsigned long )enr); add = tmp___3 + add; ldv_42200: i = i + 1; ldv_42202: ; if ((unsigned int )i < (mdev->act_log)->nr_elements) { goto ldv_42201; } else { } lc_unlock(mdev->act_log); __wake_up(& mdev->al_wait, 3U, 1, 0); tmp___4 = ppsize((char *)(& ppb), (unsigned long long )(add << 2)); tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Marked additional %s as out-of-sync based on AL.\n", tmp___6, tmp___5, tmp___4); return; } } static int _try_lc_del(struct drbd_conf *mdev , struct lc_element *al_ext ) { int rv ; long tmp ; { spin_lock_irq(& mdev->al_lock); rv = al_ext->refcnt == 0U; tmp = ldv__builtin_expect(rv != 0, 1L); if (tmp != 0L) { lc_del(mdev->act_log, al_ext); } else { } spin_unlock_irq(& mdev->al_lock); return (rv); } } void drbd_al_shrink(struct drbd_conf *mdev ) { struct lc_element *al_ext ; int i ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; int tmp___2 ; wait_queue_t __wait ; struct task_struct *tmp___3 ; int tmp___4 ; { tmp___1 = constant_test_bit(1U, (unsigned long const volatile *)(& (mdev->act_log)->flags)); if (tmp___1 == 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( test_bit(__LC_DIRTY, &mdev->act_log->flags) ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 826); } else { } i = 0; goto ldv_42220; ldv_42219: al_ext = lc_element_by_index(mdev->act_log, (unsigned int )i); if (al_ext->lc_number == 4294967295U) { goto ldv_42214; } else { } tmp___2 = _try_lc_del(mdev, al_ext); if (tmp___2 != 0) { goto ldv_42215; } else { } tmp___3 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___3; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_42218: prepare_to_wait(& mdev->al_wait, & __wait, 2); tmp___4 = _try_lc_del(mdev, al_ext); if (tmp___4 != 0) { goto ldv_42217; } else { } schedule(); goto ldv_42218; ldv_42217: finish_wait(& mdev->al_wait, & __wait); ldv_42215: ; ldv_42214: i = i + 1; ldv_42220: ; if ((unsigned int )i < (mdev->act_log)->nr_elements) { goto ldv_42219; } else { } __wake_up(& mdev->al_wait, 3U, 1, 0); return; } } static int w_update_odbm(struct drbd_conf *mdev , struct drbd_work *w , int unused ) { struct update_odbm_work *udw ; struct drbd_work const *__mptr ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; int tmp___2 ; unsigned long tmp___3 ; { __mptr = (struct drbd_work const *)w; udw = (struct update_odbm_work *)__mptr; tmp___2 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___2 == 0) { tmp___1 = ___ratelimit(& drbd_ratelimit_state, "w_update_odbm"); if (tmp___1 != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Can not update on disk bitmap, local IO disabled.\n", tmp___0, tmp); } else { } kfree((void const *)udw); return (1); } else { } drbd_bm_write_sect(mdev, (unsigned long )udw->enr); put_ldev(mdev); kfree((void const *)udw); tmp___3 = drbd_bm_total_weight(mdev); if (tmp___3 <= mdev->rs_failed) { switch ((int )mdev->state.ldv_33381.conn) { case 16: ; case 17: ; case 20: ; case 21: drbd_resync_finished(mdev); default: ; goto ldv_42236; } ldv_42236: ; } else { } drbd_bcast_sync_progress(mdev); return (1); } } static void drbd_try_clear_on_disk_bm(struct drbd_conf *mdev , sector_t sector , int count , int success ) { struct lc_element *e ; struct update_odbm_work *udw ; unsigned int enr ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; struct bm_extent *ext ; struct lc_element const *__mptr ; char const *tmp___2 ; char const *tmp___3 ; union drbd_state val ; union drbd_state mask ; int rs_left ; int tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; void *tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; { tmp___1 = atomic_read((atomic_t const *)(& mdev->local_cnt)); if (tmp___1 == 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( atomic_read(&mdev->local_cnt) ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 884); } else { } enr = (unsigned int )(sector >> 15); e = lc_get(mdev->resync, enr); if ((unsigned long )e != (unsigned long )((struct lc_element *)0)) { __mptr = (struct lc_element const *)e; ext = (struct bm_extent *)__mptr + 0xfffffffffffffff0UL; if (ext->lce.lc_number == enr) { if (success != 0) { ext->rs_left = ext->rs_left - count; } else { ext->rs_failed = ext->rs_failed + count; } if (ext->rs_left < ext->rs_failed) { tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: BAD! sector=%llus enr=%u rs_left=%d rs_failed=%d count=%d\n", tmp___3, tmp___2, (unsigned long long )sector, ext->lce.lc_number, ext->rs_left, ext->rs_failed, count); dump_stack(); lc_put(mdev->resync, & ext->lce); val.i = 0U; val.ldv_33381.conn = 1U; mask.i = 0U; mask.ldv_33381.conn = 31U; drbd_force_state(mdev, mask, val); return; } else { } } else { tmp___4 = drbd_bm_e_weight(mdev, (unsigned long )enr); rs_left = tmp___4; if (ext->flags != 0UL) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: changing resync lce: %d[%u;%02lx] -> %d[%u;00]\n", tmp___6, tmp___5, ext->lce.lc_number, ext->rs_left, ext->flags, enr, rs_left); ext->flags = 0UL; } else { } if (ext->rs_failed != 0) { tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Kicking resync_lru element enr=%u out with rs_failed=%d\n", tmp___8, tmp___7, ext->lce.lc_number, ext->rs_failed); set_bit(13U, (unsigned long volatile *)(& mdev->flags)); } else { } ext->rs_left = rs_left; ext->rs_failed = success == 0 ? count : 0; lc_changed(mdev->resync, & ext->lce); } lc_put(mdev->resync, & ext->lce); if (ext->rs_left == ext->rs_failed) { ext->rs_failed = 0; tmp___9 = kmalloc___3(32UL, 32U); udw = (struct update_odbm_work *)tmp___9; if ((unsigned long )udw != (unsigned long )((struct update_odbm_work *)0)) { udw->enr = ext->lce.lc_number; udw->w.cb = & w_update_odbm; drbd_queue_work_front(& mdev->data.work, & udw->w); } else { tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Could not kmalloc an udw\n", tmp___11, tmp___10); set_bit(13U, (unsigned long volatile *)(& mdev->flags)); } } else { } } else { tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: lc_get() failed! locked=%d/%d flags=%lu\n", tmp___13, tmp___12, mdev->resync_locked, (mdev->resync)->nr_elements, (mdev->resync)->flags); } return; } } void __drbd_set_in_sync(struct drbd_conf *mdev , sector_t sector , int size , char const *file , unsigned int const line ) { unsigned long sbnr ; unsigned long ebnr ; unsigned long lbnr ; unsigned long count ; sector_t esector ; sector_t nr_sectors ; int wake_up ; unsigned long flags ; char const *tmp ; char const *tmp___0 ; int _b ; char const *tmp___1 ; char const *tmp___2 ; int _b___0 ; char const *tmp___3 ; char const *tmp___4 ; long tmp___5 ; long tmp___6 ; raw_spinlock_t *tmp___7 ; int tmp___8 ; unsigned long tmp___9 ; int tmp___10 ; { count = 0UL; wake_up = 0; if ((size <= 0 || (size & 511) != 0) || (unsigned int )size > 32768U) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: drbd_set_in_sync: sector=%llus size=%d nonsense!\n", tmp___0, tmp, (unsigned long long )sector, size); return; } else { } nr_sectors = drbd_get_capacity(mdev->this_bdev); esector = ((sector_t )(size >> 9) + sector) - 1UL; _b = sector >= nr_sectors; if (_b != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___2, tmp___1, "__drbd_set_in_sync", (char *)"sector >= nr_sectors", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 984); } else { } if (_b != 0) { return; } else { } _b___0 = esector >= nr_sectors; if (_b___0 != 0) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___4, tmp___3, "__drbd_set_in_sync", (char *)"esector >= nr_sectors", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 985); } else { } if (_b___0 != 0) { esector = nr_sectors - 1UL; } else { } lbnr = (nr_sectors - 1UL) >> 3; tmp___5 = ldv__builtin_expect(esector <= 6UL, 0L); if (tmp___5 != 0L) { return; } else { } tmp___6 = ldv__builtin_expect(nr_sectors - 1UL == esector, 0L); if (tmp___6 != 0L) { ebnr = lbnr; } else { ebnr = (esector - 7UL) >> 3; } sbnr = (sector + 7UL) >> 3; if (sbnr > ebnr) { return; } else { } tmp___7 = spinlock_check(& mdev->al_lock); flags = _raw_spin_lock_irqsave(tmp___7); tmp___8 = drbd_bm_clear_bits(mdev, sbnr, ebnr); count = (unsigned long )tmp___8; if (count != 0UL) { if ((unsigned long )jiffies - mdev->rs_mark_time > 2500UL) { tmp___9 = drbd_bm_total_weight(mdev); if ((mdev->rs_mark_left != tmp___9 && (unsigned int )*((unsigned short *)mdev + 994UL) != 336U) && (unsigned int )*((unsigned short *)mdev + 994UL) != 320U) { mdev->rs_mark_time = jiffies; mdev->rs_mark_left = drbd_bm_total_weight(mdev); } else { } } else { } tmp___10 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___10 != 0) { drbd_try_clear_on_disk_bm(mdev, sector, (int )count, 1); put_ldev(mdev); } else { } wake_up = 1; } else { } spin_unlock_irqrestore(& mdev->al_lock, flags); if (wake_up != 0) { __wake_up(& mdev->al_wait, 3U, 1, 0); } else { } return; } } void __drbd_set_out_of_sync(struct drbd_conf *mdev , sector_t sector , int size , char const *file , unsigned int const line ) { unsigned long sbnr ; unsigned long ebnr ; unsigned long lbnr ; unsigned long flags ; sector_t esector ; sector_t nr_sectors ; unsigned int enr ; unsigned int count ; struct lc_element *e ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; int _b ; char const *tmp___2 ; char const *tmp___3 ; int _b___0 ; char const *tmp___4 ; char const *tmp___5 ; raw_spinlock_t *tmp___6 ; int tmp___7 ; struct lc_element const *__mptr ; struct lc_element const *__mptr___0 ; { if ((size <= 0 || (size & 511) != 0) || (unsigned int )size > 32768U) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: sector: %llus, size: %d\n", tmp___0, tmp, (unsigned long long )sector, size); return; } else { } tmp___1 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___1 == 0) { return; } else { } nr_sectors = drbd_get_capacity(mdev->this_bdev); esector = ((sector_t )(size >> 9) + sector) - 1UL; _b = sector >= nr_sectors; if (_b != 0) { tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___3, tmp___2, "__drbd_set_out_of_sync", (char *)"sector >= nr_sectors", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 1062); } else { } if (_b != 0) { goto out; } else { } _b___0 = esector >= nr_sectors; if (_b___0 != 0) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___5, tmp___4, "__drbd_set_out_of_sync", (char *)"esector >= nr_sectors", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 1064); } else { } if (_b___0 != 0) { esector = nr_sectors - 1UL; } else { } lbnr = (nr_sectors - 1UL) >> 3; sbnr = sector >> 3; ebnr = esector >> 3; tmp___6 = spinlock_check(& mdev->al_lock); flags = _raw_spin_lock_irqsave(tmp___6); tmp___7 = drbd_bm_set_bits(mdev, sbnr, ebnr); count = (unsigned int )tmp___7; enr = (unsigned int )(sector >> 15); e = lc_find(mdev->resync, enr); if ((unsigned long )e != (unsigned long )((struct lc_element *)0)) { __mptr = (struct lc_element const *)e; __mptr___0 = (struct lc_element const *)e; ((struct bm_extent *)__mptr + 0xfffffffffffffff0UL)->rs_left = (int )((unsigned int )((struct bm_extent *)__mptr___0 + 0xfffffffffffffff0UL)->rs_left + count); } else { } spin_unlock_irqrestore(& mdev->al_lock, flags); out: put_ldev(mdev); return; } } static struct bm_extent *_bme_get(struct drbd_conf *mdev , unsigned int enr ) { struct lc_element *e ; struct bm_extent *bm_ext ; int wakeup ; unsigned long rs_flags ; struct lc_element const *__mptr ; char const *tmp ; char const *tmp___0 ; long tmp___1 ; { wakeup = 0; spin_lock_irq(& mdev->al_lock); if (mdev->resync_locked > (mdev->resync)->nr_elements / 2U) { spin_unlock_irq(& mdev->al_lock); return (0); } else { } e = lc_get(mdev->resync, enr); if ((unsigned long )e != (unsigned long )((struct lc_element *)0)) { __mptr = (struct lc_element const *)e; bm_ext = (struct bm_extent *)__mptr + 0xfffffffffffffff0UL; } else { bm_ext = 0; } if ((unsigned long )bm_ext != (unsigned long )((struct bm_extent *)0)) { if (bm_ext->lce.lc_number != enr) { bm_ext->rs_left = drbd_bm_e_weight(mdev, (unsigned long )enr); bm_ext->rs_failed = 0; lc_changed(mdev->resync, & bm_ext->lce); wakeup = 1; } else { } if (bm_ext->lce.refcnt == 1U) { mdev->resync_locked = mdev->resync_locked + 1U; } else { } set_bit(0U, (unsigned long volatile *)(& bm_ext->flags)); } else { } rs_flags = (mdev->resync)->flags; spin_unlock_irq(& mdev->al_lock); if (wakeup != 0) { __wake_up(& mdev->al_wait, 3U, 1, 0); } else { } if ((unsigned long )bm_ext == (unsigned long )((struct bm_extent *)0)) { if ((rs_flags & 4UL) != 0UL) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Have to wait for element (resync LRU too small?)\n", tmp___0, tmp); } else { } tmp___1 = ldv__builtin_expect((rs_flags & 2UL) != 0UL, 0L); if (tmp___1 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared"), "i" (1124), "i" (12UL)); ldv_42314: ; goto ldv_42314; } else { } } else { } return (bm_ext); } } static int _is_in_al(struct drbd_conf *mdev , unsigned int enr ) { struct lc_element *al_ext ; int rv ; long tmp ; { rv = 0; spin_lock_irq(& mdev->al_lock); tmp = ldv__builtin_expect((mdev->act_log)->new_number == enr, 0L); if (tmp != 0L) { rv = 1; } else { al_ext = lc_find(mdev->act_log, enr); if ((unsigned long )al_ext != (unsigned long )((struct lc_element *)0)) { if (al_ext->refcnt != 0U) { rv = 1; } else { } } else { } } spin_unlock_irq(& mdev->al_lock); return (rv); } } int drbd_rs_begin_io(struct drbd_conf *mdev , sector_t sector ) { unsigned int enr ; struct bm_extent *bm_ext ; int i ; int sig ; int __ret ; wait_queue_t __wait ; struct task_struct *tmp ; struct task_struct *tmp___0 ; int tmp___1 ; int tmp___2 ; int __ret___0 ; wait_queue_t __wait___0 ; struct task_struct *tmp___3 ; int tmp___4 ; struct task_struct *tmp___5 ; int tmp___6 ; int tmp___7 ; unsigned int tmp___8 ; { enr = (unsigned int )(sector >> 15); __ret = 0; bm_ext = _bme_get(mdev, enr); if ((unsigned long )bm_ext == (unsigned long )((struct bm_extent *)0)) { tmp = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_42333: prepare_to_wait(& mdev->al_wait, & __wait, 1); bm_ext = _bme_get(mdev, enr); if ((unsigned long )bm_ext != (unsigned long )((struct bm_extent *)0)) { goto ldv_42331; } else { } tmp___0 = get_current(); tmp___1 = signal_pending(tmp___0); if (tmp___1 == 0) { schedule(); goto ldv_42332; } else { } __ret = -512; goto ldv_42331; ldv_42332: ; goto ldv_42333; ldv_42331: finish_wait(& mdev->al_wait, & __wait); } else { } sig = __ret; if (sig != 0) { return (0); } else { } tmp___2 = constant_test_bit(1U, (unsigned long const volatile *)(& bm_ext->flags)); if (tmp___2 != 0) { return (1); } else { } i = 0; goto ldv_42342; ldv_42341: __ret___0 = 0; tmp___7 = _is_in_al(mdev, enr * 4U + (unsigned int )i); if (tmp___7 != 0) { tmp___3 = get_current(); __wait___0.flags = 0U; __wait___0.private = (void *)tmp___3; __wait___0.func = & autoremove_wake_function; __wait___0.task_list.next = & __wait___0.task_list; __wait___0.task_list.prev = & __wait___0.task_list; ldv_42339: prepare_to_wait(& mdev->al_wait, & __wait___0, 1); tmp___4 = _is_in_al(mdev, enr * 4U + (unsigned int )i); if (tmp___4 == 0) { goto ldv_42337; } else { } tmp___5 = get_current(); tmp___6 = signal_pending(tmp___5); if (tmp___6 == 0) { schedule(); goto ldv_42338; } else { } __ret___0 = -512; goto ldv_42337; ldv_42338: ; goto ldv_42339; ldv_42337: finish_wait(& mdev->al_wait, & __wait___0); } else { } sig = __ret___0; if (sig != 0) { spin_lock_irq(& mdev->al_lock); tmp___8 = lc_put(mdev->resync, & bm_ext->lce); if (tmp___8 == 0U) { clear_bit(0, (unsigned long volatile *)(& bm_ext->flags)); mdev->resync_locked = mdev->resync_locked - 1U; __wake_up(& mdev->al_wait, 3U, 1, 0); } else { } spin_unlock_irq(& mdev->al_lock); return (0); } else { } i = i + 1; ldv_42342: ; if (i <= 3) { goto ldv_42341; } else { } set_bit(1U, (unsigned long volatile *)(& bm_ext->flags)); return (1); } } int drbd_try_rs_begin_io(struct drbd_conf *mdev , sector_t sector ) { unsigned int enr ; unsigned int al_enr ; struct lc_element *e ; struct bm_extent *bm_ext ; int i ; struct lc_element const *__mptr ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; int tmp___4 ; unsigned int tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; struct lc_element const *__mptr___0 ; int tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; int tmp___11 ; struct lc_element const *__mptr___1 ; unsigned long rs_flags ; char const *tmp___12 ; char const *tmp___13 ; long tmp___14 ; char const *tmp___15 ; char const *tmp___16 ; int tmp___17 ; char const *tmp___18 ; char const *tmp___19 ; long tmp___20 ; int tmp___21 ; { enr = (unsigned int )(sector >> 15); al_enr = enr * 4U; spin_lock_irq(& mdev->al_lock); if (mdev->resync_wenr != 4294967295U && mdev->resync_wenr != enr) { e = lc_find(mdev->resync, mdev->resync_wenr); if ((unsigned long )e != (unsigned long )((struct lc_element *)0)) { __mptr = (struct lc_element const *)e; bm_ext = (struct bm_extent *)__mptr + 0xfffffffffffffff0UL; } else { bm_ext = 0; } if ((unsigned long )bm_ext != (unsigned long )((struct bm_extent *)0)) { tmp___1 = constant_test_bit(1U, (unsigned long const volatile *)(& bm_ext->flags)); if (tmp___1 != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( !test_bit(BME_LOCKED, &bm_ext->flags) ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 1231); } else { } tmp___4 = constant_test_bit(0U, (unsigned long const volatile *)(& bm_ext->flags)); if (tmp___4 == 0) { tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( test_bit(BME_NO_WRITES, &bm_ext->flags) ) in %s:%d\n", tmp___3, tmp___2, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 1232); } else { } clear_bit(0, (unsigned long volatile *)(& bm_ext->flags)); mdev->resync_wenr = 4294967295U; tmp___5 = lc_put(mdev->resync, & bm_ext->lce); if (tmp___5 == 0U) { mdev->resync_locked = mdev->resync_locked - 1U; } else { } __wake_up(& mdev->al_wait, 3U, 1, 0); } else { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: LOGIC BUG\n", tmp___7, tmp___6); } } else { } e = lc_try_get(mdev->resync, enr); if ((unsigned long )e != (unsigned long )((struct lc_element *)0)) { __mptr___0 = (struct lc_element const *)e; bm_ext = (struct bm_extent *)__mptr___0 + 0xfffffffffffffff0UL; } else { bm_ext = 0; } if ((unsigned long )bm_ext != (unsigned long )((struct bm_extent *)0)) { tmp___8 = constant_test_bit(1U, (unsigned long const volatile *)(& bm_ext->flags)); if (tmp___8 != 0) { goto proceed; } else { } tmp___11 = test_and_set_bit(0, (unsigned long volatile *)(& bm_ext->flags)); if (tmp___11 == 0) { mdev->resync_locked = mdev->resync_locked + 1U; } else { bm_ext->lce.refcnt = bm_ext->lce.refcnt - 1U; if (bm_ext->lce.refcnt == 0U) { tmp___9 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___10 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( bm_ext->lce.refcnt > 0 ) in %s:%d\n", tmp___10, tmp___9, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 1256); } else { } } goto check_al; } else { if (mdev->resync_locked > (mdev->resync)->nr_elements - 3U) { goto try_again; } else { } e = lc_get(mdev->resync, enr); if ((unsigned long )e != (unsigned long )((struct lc_element *)0)) { __mptr___1 = (struct lc_element const *)e; bm_ext = (struct bm_extent *)__mptr___1 + 0xfffffffffffffff0UL; } else { bm_ext = 0; } if ((unsigned long )bm_ext == (unsigned long )((struct bm_extent *)0)) { rs_flags = (mdev->resync)->flags; if ((rs_flags & 4UL) != 0UL) { tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Have to wait for element (resync LRU too small?)\n", tmp___13, tmp___12); } else { } tmp___14 = ldv__builtin_expect((rs_flags & 2UL) != 0UL, 0L); if (tmp___14 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared"), "i" (1271), "i" (12UL)); ldv_42363: ; goto ldv_42363; } else { } goto try_again; } else { } if (bm_ext->lce.lc_number != enr) { bm_ext->rs_left = drbd_bm_e_weight(mdev, (unsigned long )enr); bm_ext->rs_failed = 0; lc_changed(mdev->resync, & bm_ext->lce); __wake_up(& mdev->al_wait, 3U, 1, 0); tmp___17 = constant_test_bit(1U, (unsigned long const volatile *)(& bm_ext->flags)); if (tmp___17 != 0) { tmp___15 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___16 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( test_bit(BME_LOCKED, &bm_ext->flags) == 0 ) in %s:%d\n", tmp___16, tmp___15, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 1279); } else { } } else { } set_bit(0U, (unsigned long volatile *)(& bm_ext->flags)); if (bm_ext->lce.refcnt != 1U) { tmp___18 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___19 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( bm_ext->lce.refcnt == 1 ) in %s:%d\n", tmp___19, tmp___18, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 1282); } else { } mdev->resync_locked = mdev->resync_locked + 1U; goto check_al; } check_al: i = 0; goto ldv_42365; ldv_42364: tmp___20 = ldv__builtin_expect(al_enr + (unsigned int )i == (mdev->act_log)->new_number, 0L); if (tmp___20 != 0L) { goto try_again; } else { } tmp___21 = lc_is_used(mdev->act_log, al_enr + (unsigned int )i); if (tmp___21 != 0) { goto try_again; } else { } i = i + 1; ldv_42365: ; if (i <= 3) { goto ldv_42364; } else { } set_bit(1U, (unsigned long volatile *)(& bm_ext->flags)); proceed: mdev->resync_wenr = 4294967295U; spin_unlock_irq(& mdev->al_lock); return (0); try_again: ; if ((unsigned long )bm_ext != (unsigned long )((struct bm_extent *)0)) { mdev->resync_wenr = enr; } else { } spin_unlock_irq(& mdev->al_lock); return (-11); } } void drbd_rs_complete_io(struct drbd_conf *mdev , sector_t sector ) { unsigned int enr ; struct lc_element *e ; struct bm_extent *bm_ext ; unsigned long flags ; raw_spinlock_t *tmp ; struct lc_element const *__mptr ; char const *tmp___0 ; char const *tmp___1 ; int tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; unsigned int tmp___5 ; { enr = (unsigned int )(sector >> 15); tmp = spinlock_check(& mdev->al_lock); flags = _raw_spin_lock_irqsave(tmp); e = lc_find(mdev->resync, enr); if ((unsigned long )e != (unsigned long )((struct lc_element *)0)) { __mptr = (struct lc_element const *)e; bm_ext = (struct bm_extent *)__mptr + 0xfffffffffffffff0UL; } else { bm_ext = 0; } if ((unsigned long )bm_ext == (unsigned long )((struct bm_extent *)0)) { spin_unlock_irqrestore(& mdev->al_lock, flags); tmp___2 = ___ratelimit(& drbd_ratelimit_state, "drbd_rs_complete_io"); if (tmp___2 != 0) { tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: drbd_rs_complete_io() called, but extent not found\n", tmp___1, tmp___0); } else { } return; } else { } if (bm_ext->lce.refcnt == 0U) { spin_unlock_irqrestore(& mdev->al_lock, flags); tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: drbd_rs_complete_io(,%llu [=%u]) called, but refcnt is 0!?\n", tmp___4, tmp___3, (unsigned long long )sector, enr); return; } else { } tmp___5 = lc_put(mdev->resync, & bm_ext->lce); if (tmp___5 == 0U) { clear_bit(1, (unsigned long volatile *)(& bm_ext->flags)); clear_bit(0, (unsigned long volatile *)(& bm_ext->flags)); mdev->resync_locked = mdev->resync_locked - 1U; __wake_up(& mdev->al_wait, 3U, 1, 0); } else { } spin_unlock_irqrestore(& mdev->al_lock, flags); return; } } void drbd_rs_cancel_all(struct drbd_conf *mdev ) { int tmp ; { spin_lock_irq(& mdev->al_lock); tmp = _get_ldev_if_state(mdev, D_FAILED); if (tmp != 0) { lc_reset(mdev->resync); put_ldev(mdev); } else { } mdev->resync_locked = 0U; mdev->resync_wenr = 4294967295U; spin_unlock_irq(& mdev->al_lock); __wake_up(& mdev->al_wait, 3U, 1, 0); return; } } int drbd_rs_del_all(struct drbd_conf *mdev ) { struct lc_element *e ; struct bm_extent *bm_ext ; int i ; struct lc_element const *__mptr ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; int tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; int tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; int tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; int tmp___14 ; char const *tmp___15 ; char const *tmp___16 ; int tmp___17 ; { spin_lock_irq(& mdev->al_lock); tmp___17 = _get_ldev_if_state(mdev, D_FAILED); if (tmp___17 != 0) { i = 0; goto ldv_42394; ldv_42393: e = lc_element_by_index(mdev->resync, (unsigned int )i); __mptr = (struct lc_element const *)e; bm_ext = (struct bm_extent *)__mptr + 0xfffffffffffffff0UL; if (bm_ext->lce.lc_number == 4294967295U) { goto ldv_42392; } else { } if (bm_ext->lce.lc_number == mdev->resync_wenr) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: dropping %u in drbd_rs_del_all, apparently got \'synced\' by application io\n", tmp___0, tmp, mdev->resync_wenr); tmp___3 = constant_test_bit(1U, (unsigned long const volatile *)(& bm_ext->flags)); if (tmp___3 != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( !test_bit(BME_LOCKED, &bm_ext->flags) ) in %s:%d\n", tmp___2, tmp___1, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 1385); } else { } tmp___6 = constant_test_bit(0U, (unsigned long const volatile *)(& bm_ext->flags)); if (tmp___6 == 0) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( test_bit(BME_NO_WRITES, &bm_ext->flags) ) in %s:%d\n", tmp___5, tmp___4, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 1386); } else { } clear_bit(0, (unsigned long volatile *)(& bm_ext->flags)); mdev->resync_wenr = 4294967295U; lc_put(mdev->resync, & bm_ext->lce); } else { } if (bm_ext->lce.refcnt != 0U) { tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Retrying drbd_rs_del_all() later. refcnt=%d\n", tmp___8, tmp___7, bm_ext->lce.refcnt); put_ldev(mdev); spin_unlock_irq(& mdev->al_lock); return (-11); } else { } tmp___11 = constant_test_bit(1U, (unsigned long const volatile *)(& bm_ext->flags)); if (tmp___11 != 0) { tmp___9 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___10 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( !test_bit(BME_LOCKED, &bm_ext->flags) ) in %s:%d\n", tmp___10, tmp___9, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 1398); } else { } tmp___14 = constant_test_bit(0U, (unsigned long const volatile *)(& bm_ext->flags)); if (tmp___14 != 0) { tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( !test_bit(BME_NO_WRITES, &bm_ext->flags) ) in %s:%d\n", tmp___13, tmp___12, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 1399); } else { } lc_del(mdev->resync, & bm_ext->lce); ldv_42392: i = i + 1; ldv_42394: ; if ((unsigned int )i < (mdev->resync)->nr_elements) { goto ldv_42393; } else { } if ((mdev->resync)->used != 0U) { tmp___15 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___16 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->resync->used == 0 ) in %s:%d\n", tmp___16, tmp___15, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 1402); } else { } put_ldev(mdev); } else { } spin_unlock_irq(& mdev->al_lock); return (0); } } void drbd_rs_failed_io(struct drbd_conf *mdev , sector_t sector , int size ) { unsigned long sbnr ; unsigned long ebnr ; unsigned long lbnr ; unsigned long count ; sector_t esector ; sector_t nr_sectors ; int wake_up ; char const *tmp ; char const *tmp___0 ; int _b ; char const *tmp___1 ; char const *tmp___2 ; int _b___0 ; char const *tmp___3 ; char const *tmp___4 ; long tmp___5 ; long tmp___6 ; int tmp___7 ; int tmp___8 ; { wake_up = 0; if ((size <= 0 || (size & 511) != 0) || (unsigned int )size > 32768U) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: drbd_rs_failed_io: sector=%llus size=%d nonsense!\n", tmp___0, tmp, (unsigned long long )sector, size); return; } else { } nr_sectors = drbd_get_capacity(mdev->this_bdev); esector = ((sector_t )(size >> 9) + sector) - 1UL; _b = sector >= nr_sectors; if (_b != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___2, tmp___1, "drbd_rs_failed_io", (char *)"sector >= nr_sectors", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 1432); } else { } if (_b != 0) { return; } else { } _b___0 = esector >= nr_sectors; if (_b___0 != 0) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___4, tmp___3, "drbd_rs_failed_io", (char *)"esector >= nr_sectors", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_actlog.c.prepared", 1433); } else { } if (_b___0 != 0) { esector = nr_sectors - 1UL; } else { } lbnr = (nr_sectors - 1UL) >> 3; tmp___5 = ldv__builtin_expect(esector <= 6UL, 0L); if (tmp___5 != 0L) { return; } else { } tmp___6 = ldv__builtin_expect(nr_sectors - 1UL == esector, 0L); if (tmp___6 != 0L) { ebnr = lbnr; } else { ebnr = (esector - 7UL) >> 3; } sbnr = (sector + 7UL) >> 3; if (sbnr > ebnr) { return; } else { } spin_lock_irq(& mdev->al_lock); tmp___7 = drbd_bm_count_bits(mdev, sbnr, ebnr); count = (unsigned long )tmp___7; if (count != 0UL) { mdev->rs_failed = mdev->rs_failed + count; tmp___8 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___8 != 0) { drbd_try_clear_on_disk_bm(mdev, sector, (int )count, 0); put_ldev(mdev); } else { } wake_up = 1; } else { } spin_unlock_irq(& mdev->al_lock); if (wake_up != 0) { __wake_up(& mdev->al_wait, 3U, 1, 0); } else { } return; } } void ldv_mutex_lock_63(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_64(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_65(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } __inline static int ldv_mutex_is_locked_66(struct mutex *lock ) { ldv_func_ret_type___2 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_is_locked(lock); ldv_func_res = tmp; tmp___0 = ldv_mutex_is_locked_md_io_mutex_of_drbd_conf(lock); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_lock_67(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_md_io_mutex_of_drbd_conf(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_68(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_md_io_mutex_of_drbd_conf(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_69(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_md_io_mutex_of_drbd_conf(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_70(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_md_io_mutex_of_drbd_conf(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_71(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_md_io_mutex_of_drbd_conf(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_72(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_md_io_mutex_of_drbd_conf(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_73(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_md_io_mutex_of_drbd_conf(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } __inline static __u32 __fswahw32(__u32 val ) { { return ((val << 16) | (val >> (8UL * sizeof(val) - 16UL))); } } extern int __bitmap_weight(unsigned long const * , int ) ; __inline static void bitmap_fill(unsigned long *dst , int nbits ) { size_t nlongs ; int len ; { nlongs = ((unsigned long )nbits + 63UL) / 64UL; len = (int )(((unsigned int )nlongs + 536870911U) * 8U); memset((void *)dst, 255, (size_t )len); *(dst + (nlongs + 0xffffffffffffffffUL)) = ((unsigned int )nbits & 63U) != 0U ? (1UL << nbits % 64) - 1UL : 0xffffffffffffffffUL; return; } } __inline static int bitmap_weight(unsigned long const *src , int nbits ) { int tmp___0 ; { tmp___0 = __bitmap_weight(src, nbits); return (tmp___0); } } extern int nr_cpu_ids ; extern struct cpumask const * const cpu_online_mask ; __inline static unsigned int cpumask_check(unsigned int cpu ) { bool __warned ; int __ret_warn_once ; int __ret_warn_on ; long tmp ; long tmp___0 ; long tmp___1 ; { __ret_warn_once = (unsigned int )nr_cpu_ids <= cpu; tmp___1 = ldv__builtin_expect(__ret_warn_once != 0, 0L); if (tmp___1 != 0L) { __ret_warn_on = ! __warned; tmp = ldv__builtin_expect(__ret_warn_on != 0, 0L); if (tmp != 0L) { warn_slowpath_null("include/linux/cpumask.h", 107); } else { } tmp___0 = ldv__builtin_expect(__ret_warn_on != 0, 0L); if (tmp___0 != 0L) { __warned = 1; } else { } } else { } ldv__builtin_expect(__ret_warn_once != 0, 0L); return (cpu); } } __inline static unsigned int cpumask_next(int n , struct cpumask const *srcp ) { unsigned long tmp ; { if (n != -1) { cpumask_check((unsigned int )n); } else { } tmp = find_next_bit((unsigned long const *)(& srcp->bits), (unsigned long )nr_cpu_ids, (unsigned long )(n + 1)); return ((unsigned int )tmp); } } __inline static void cpumask_set_cpu(unsigned int cpu , struct cpumask *dstp ) { unsigned int tmp ; { tmp = cpumask_check(cpu); set_bit(tmp, (unsigned long volatile *)(& dstp->bits)); return; } } __inline static void cpumask_setall(struct cpumask *dstp ) { { bitmap_fill((unsigned long *)(& dstp->bits), nr_cpu_ids); return; } } __inline static unsigned int cpumask_weight(struct cpumask const *srcp ) { int tmp ; { tmp = bitmap_weight((unsigned long const *)(& srcp->bits), nr_cpu_ids); return ((unsigned int )tmp); } } extern bool zalloc_cpumask_var(cpumask_var_t ** , gfp_t ) ; extern void free_cpumask_var(cpumask_var_t ) ; void ldv_mutex_unlock_86(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_87(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_89(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_92(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_93(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_95(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_97(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_99(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_101(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_103(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_105(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_107(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_109(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_85(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_88(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_90(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_91(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_94(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_96(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_98(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_100(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_102(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_104(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_106(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_108(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_state_mutex_of_drbd_conf(struct mutex *lock ) ; void ldv_mutex_unlock_state_mutex_of_drbd_conf(struct mutex *lock ) ; __inline static struct thread_info *current_thread_info___1(void) { struct thread_info *ti ; unsigned long pfo_ret__ ; { switch (8UL) { case 1UL: __asm__ ("movb %%gs:%P1,%0": "=q" (pfo_ret__): "p" (& kernel_stack)); goto ldv_5886; case 2UL: __asm__ ("movw %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& kernel_stack)); goto ldv_5886; case 4UL: __asm__ ("movl %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& kernel_stack)); goto ldv_5886; case 8UL: __asm__ ("movq %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& kernel_stack)); goto ldv_5886; default: __bad_percpu_size(); } ldv_5886: ti = (struct thread_info *)(pfo_ret__ - 8152UL); return (ti); } } extern void __rwlock_init(rwlock_t * , char const * , struct lock_class_key * ) ; extern void init_timer_key(struct timer_list * , char const * , struct lock_class_key * ) ; extern void __bad_size_call_parameter(void) ; extern struct tracepoint __tracepoint_module_get ; __inline static void trace_module_get(struct module *mod , unsigned long ip , int refcnt ) { void **it_func ; int tmp ; int tmp___0 ; void **_________p1 ; long tmp___1 ; { tmp___1 = ldv__builtin_expect(__tracepoint_module_get.state != 0, 0L); if (tmp___1 != 0L) { rcu_read_lock_sched_notrace(); tmp = debug_lockdep_rcu_enabled(); if (tmp != 0) { tmp___0 = rcu_read_lock_sched_held(); if (tmp___0 == 0) { lockdep_rcu_dereference("include/trace/events/module.h", 81); } else { } } else { } _________p1 = *((void ** volatile *)(& __tracepoint_module_get.funcs)); it_func = _________p1; if ((unsigned long )it_func != (unsigned long )((void **)0)) { ldv_11181: (*((void (*)(struct module * , unsigned long , int ))*it_func))(mod, ip, refcnt); it_func = it_func + 1; if ((unsigned long )*it_func != (unsigned long )((void *)0)) { goto ldv_11181; } else { } } else { } rcu_read_lock_sched_notrace(); } else { } return; } } __inline static int module_is_live(struct module *mod ) { { return ((unsigned int )mod->state != 2U); } } __inline static int try_module_get(struct module *module ) { int ret ; void const *__vpp_verify ; int pao_ID__ ; int pao_ID_____0 ; int pao_ID_____1 ; int pao_ID_____2 ; unsigned int pscr_ret__ ; void const *__vpp_verify___0 ; unsigned int pfo_ret__ ; unsigned int pfo_ret_____0 ; unsigned int pfo_ret_____1 ; unsigned int pfo_ret_____2 ; int tmp ; long tmp___0 ; { ret = 1; if ((unsigned long )module != (unsigned long )((struct module *)0)) { tmp = module_is_live(module); tmp___0 = ldv__builtin_expect(tmp != 0, 1L); if (tmp___0 != 0L) { __vpp_verify = 0; switch (4UL) { case 1UL: pao_ID__ = 1; switch (4UL) { case 1UL: ; if (pao_ID__ == 1) { __asm__ ("incb %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID__ == -1) { __asm__ ("decb %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addb %1, %%gs:%P0": "+m" ((module->refptr)->incs): "qi" (1U)); } goto ldv_11548; case 2UL: ; if (pao_ID__ == 1) { __asm__ ("incw %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID__ == -1) { __asm__ ("decw %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addw %1, %%gs:%P0": "+m" ((module->refptr)->incs): "ri" (1U)); } goto ldv_11548; case 4UL: ; if (pao_ID__ == 1) { __asm__ ("incl %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID__ == -1) { __asm__ ("decl %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addl %1, %%gs:%P0": "+m" ((module->refptr)->incs): "ri" (1U)); } goto ldv_11548; case 8UL: ; if (pao_ID__ == 1) { __asm__ ("incq %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID__ == -1) { __asm__ ("decq %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addq %1, %%gs:%P0": "+m" ((module->refptr)->incs): "re" (1U)); } goto ldv_11548; default: __bad_percpu_size(); } ldv_11548: ; goto ldv_11553; case 2UL: pao_ID_____0 = 1; switch (4UL) { case 1UL: ; if (pao_ID_____0 == 1) { __asm__ ("incb %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____0 == -1) { __asm__ ("decb %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addb %1, %%gs:%P0": "+m" ((module->refptr)->incs): "qi" (1U)); } goto ldv_11559; case 2UL: ; if (pao_ID_____0 == 1) { __asm__ ("incw %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____0 == -1) { __asm__ ("decw %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addw %1, %%gs:%P0": "+m" ((module->refptr)->incs): "ri" (1U)); } goto ldv_11559; case 4UL: ; if (pao_ID_____0 == 1) { __asm__ ("incl %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____0 == -1) { __asm__ ("decl %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addl %1, %%gs:%P0": "+m" ((module->refptr)->incs): "ri" (1U)); } goto ldv_11559; case 8UL: ; if (pao_ID_____0 == 1) { __asm__ ("incq %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____0 == -1) { __asm__ ("decq %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addq %1, %%gs:%P0": "+m" ((module->refptr)->incs): "re" (1U)); } goto ldv_11559; default: __bad_percpu_size(); } ldv_11559: ; goto ldv_11553; case 4UL: pao_ID_____1 = 1; switch (4UL) { case 1UL: ; if (pao_ID_____1 == 1) { __asm__ ("incb %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____1 == -1) { __asm__ ("decb %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addb %1, %%gs:%P0": "+m" ((module->refptr)->incs): "qi" (1U)); } goto ldv_11569; case 2UL: ; if (pao_ID_____1 == 1) { __asm__ ("incw %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____1 == -1) { __asm__ ("decw %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addw %1, %%gs:%P0": "+m" ((module->refptr)->incs): "ri" (1U)); } goto ldv_11569; case 4UL: ; if (pao_ID_____1 == 1) { __asm__ ("incl %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____1 == -1) { __asm__ ("decl %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addl %1, %%gs:%P0": "+m" ((module->refptr)->incs): "ri" (1U)); } goto ldv_11569; case 8UL: ; if (pao_ID_____1 == 1) { __asm__ ("incq %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____1 == -1) { __asm__ ("decq %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addq %1, %%gs:%P0": "+m" ((module->refptr)->incs): "re" (1U)); } goto ldv_11569; default: __bad_percpu_size(); } ldv_11569: ; goto ldv_11553; case 8UL: pao_ID_____2 = 1; switch (4UL) { case 1UL: ; if (pao_ID_____2 == 1) { __asm__ ("incb %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____2 == -1) { __asm__ ("decb %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addb %1, %%gs:%P0": "+m" ((module->refptr)->incs): "qi" (1U)); } goto ldv_11579; case 2UL: ; if (pao_ID_____2 == 1) { __asm__ ("incw %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____2 == -1) { __asm__ ("decw %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addw %1, %%gs:%P0": "+m" ((module->refptr)->incs): "ri" (1U)); } goto ldv_11579; case 4UL: ; if (pao_ID_____2 == 1) { __asm__ ("incl %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____2 == -1) { __asm__ ("decl %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addl %1, %%gs:%P0": "+m" ((module->refptr)->incs): "ri" (1U)); } goto ldv_11579; case 8UL: ; if (pao_ID_____2 == 1) { __asm__ ("incq %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____2 == -1) { __asm__ ("decq %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addq %1, %%gs:%P0": "+m" ((module->refptr)->incs): "re" (1U)); } goto ldv_11579; default: __bad_percpu_size(); } ldv_11579: ; goto ldv_11553; default: __bad_size_call_parameter(); goto ldv_11553; } ldv_11553: __vpp_verify___0 = 0; switch (4UL) { case 1UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%P1,%0": "=q" (pfo_ret__): "m" ((module->refptr)->incs)); goto ldv_11592; case 2UL: __asm__ ("movw %%gs:%P1,%0": "=r" (pfo_ret__): "m" ((module->refptr)->incs)); goto ldv_11592; case 4UL: __asm__ ("movl %%gs:%P1,%0": "=r" (pfo_ret__): "m" ((module->refptr)->incs)); goto ldv_11592; case 8UL: __asm__ ("movq %%gs:%P1,%0": "=r" (pfo_ret__): "m" ((module->refptr)->incs)); goto ldv_11592; default: __bad_percpu_size(); } ldv_11592: pscr_ret__ = pfo_ret__; goto ldv_11598; case 2UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%P1,%0": "=q" (pfo_ret_____0): "m" ((module->refptr)->incs)); goto ldv_11602; case 2UL: __asm__ ("movw %%gs:%P1,%0": "=r" (pfo_ret_____0): "m" ((module->refptr)->incs)); goto ldv_11602; case 4UL: __asm__ ("movl %%gs:%P1,%0": "=r" (pfo_ret_____0): "m" ((module->refptr)->incs)); goto ldv_11602; case 8UL: __asm__ ("movq %%gs:%P1,%0": "=r" (pfo_ret_____0): "m" ((module->refptr)->incs)); goto ldv_11602; default: __bad_percpu_size(); } ldv_11602: pscr_ret__ = pfo_ret_____0; goto ldv_11598; case 4UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%P1,%0": "=q" (pfo_ret_____1): "m" ((module->refptr)->incs)); goto ldv_11611; case 2UL: __asm__ ("movw %%gs:%P1,%0": "=r" (pfo_ret_____1): "m" ((module->refptr)->incs)); goto ldv_11611; case 4UL: __asm__ ("movl %%gs:%P1,%0": "=r" (pfo_ret_____1): "m" ((module->refptr)->incs)); goto ldv_11611; case 8UL: __asm__ ("movq %%gs:%P1,%0": "=r" (pfo_ret_____1): "m" ((module->refptr)->incs)); goto ldv_11611; default: __bad_percpu_size(); } ldv_11611: pscr_ret__ = pfo_ret_____1; goto ldv_11598; case 8UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%P1,%0": "=q" (pfo_ret_____2): "m" ((module->refptr)->incs)); goto ldv_11620; case 2UL: __asm__ ("movw %%gs:%P1,%0": "=r" (pfo_ret_____2): "m" ((module->refptr)->incs)); goto ldv_11620; case 4UL: __asm__ ("movl %%gs:%P1,%0": "=r" (pfo_ret_____2): "m" ((module->refptr)->incs)); goto ldv_11620; case 8UL: __asm__ ("movq %%gs:%P1,%0": "=r" (pfo_ret_____2): "m" ((module->refptr)->incs)); goto ldv_11620; default: __bad_percpu_size(); } ldv_11620: pscr_ret__ = pfo_ret_____2; goto ldv_11598; default: __bad_size_call_parameter(); goto ldv_11598; } ldv_11598: ; trace_module_get(module, (unsigned long )((void *)0), (int )pscr_ret__); } else { ret = 0; } } else { } return (ret); } } extern void module_put(struct module * ) ; extern int kernel_sendmsg(struct socket * , struct msghdr * , struct kvec * , size_t , size_t ) ; extern int kernel_sock_shutdown(struct socket * , enum sock_shutdown_cmd ) ; extern struct kmem_cache *kmem_cache_create(char const * , size_t , size_t , unsigned long , void (*)(void * ) ) ; extern void kmem_cache_destroy(struct kmem_cache * ) ; __inline static void trace_kmalloc___4(unsigned long call_site , void const *ptr , size_t bytes_req , size_t bytes_alloc , gfp_t gfp_flags ) { void **it_func ; int tmp ; int tmp___0 ; void **_________p1 ; long tmp___1 ; { tmp___1 = ldv__builtin_expect(__tracepoint_kmalloc.state != 0, 0L); if (tmp___1 != 0L) { rcu_read_lock_sched_notrace(); tmp = debug_lockdep_rcu_enabled(); if (tmp != 0) { tmp___0 = rcu_read_lock_sched_held(); if (tmp___0 == 0) { lockdep_rcu_dereference("include/trace/events/kmem.h", 87); } else { } } else { } _________p1 = *((void ** volatile *)(& __tracepoint_kmalloc.funcs)); it_func = _________p1; if ((unsigned long )it_func != (unsigned long )((void **)0)) { ldv_13418: (*((void (*)(unsigned long , void const * , size_t , size_t , gfp_t ))*it_func))(call_site, ptr, bytes_req, bytes_alloc, gfp_flags); it_func = it_func + 1; if ((unsigned long )*it_func != (unsigned long )((void *)0)) { goto ldv_13418; } else { } } else { } rcu_read_lock_sched_notrace(); } else { } return; } } __inline static void *kmalloc_large___4(size_t size , gfp_t flags ) { unsigned int order ; int tmp ; void *ret ; unsigned long tmp___0 ; { tmp = get_order(size); order = (unsigned int )tmp; tmp___0 = __get_free_pages(flags | 16384U, order); ret = (void *)tmp___0; kmemleak_alloc((void const *)ret, size, 1, flags); trace_kmalloc___4((unsigned long )((void *)0), (void const *)ret, size, 4096UL << (int )order, flags); return (ret); } } __inline static void *kmalloc___4(size_t size , gfp_t flags ) { void *ret ; void *tmp ; struct kmem_cache *s ; struct kmem_cache *tmp___0 ; void *tmp___1 ; { if (0) { if (size > 8192UL) { tmp = kmalloc_large___4(size, flags); return (tmp); } else { } if ((flags & 1U) == 0U) { tmp___0 = kmalloc_slab(size); s = tmp___0; if ((unsigned long )s == (unsigned long )((struct kmem_cache *)0)) { return (16); } else { } ret = kmem_cache_alloc_notrace(s, flags); trace_kmalloc___4((unsigned long )((void *)0), (void const *)ret, size, (size_t )s->size, flags); return (ret); } else { } } else { } tmp___1 = __kmalloc(size, flags); return (tmp___1); } } __inline static void *kzalloc___1(size_t size , gfp_t flags ) { void *tmp ; { tmp = kmalloc___4(size, flags | 32768U); return (tmp); } } __inline static int PageSlab(struct page *page ) { int tmp ; { tmp = constant_test_bit(7U, (unsigned long const volatile *)(& page->flags)); return (tmp); } } extern int register_blkdev(unsigned int , char const * ) ; extern void unregister_blkdev(unsigned int , char const * ) ; extern struct block_device *bdget(dev_t ) ; extern void bdput(struct block_device * ) ; extern void bd_release(struct block_device * ) ; extern struct proc_dir_entry *proc_create_data(char const * , mode_t , struct proc_dir_entry * , struct file_operations const * , void * ) ; extern void remove_proc_entry(char const * , struct proc_dir_entry * ) ; extern int set_cpus_allowed_ptr(struct task_struct * , struct cpumask const * ) ; extern int wake_up_process(struct task_struct * ) ; extern void fput(struct file * ) ; extern int register_reboot_notifier(struct notifier_block * ) ; extern int unregister_reboot_notifier(struct notifier_block * ) ; extern struct task_struct *kthread_create(int (*)(void * ) , void * , char const * , ...) ; extern void del_gendisk(struct gendisk * ) ; extern void set_disk_ro(struct gendisk * , int ) ; extern struct gendisk *alloc_disk(int ) ; extern void put_disk(struct gendisk * ) ; __inline static int bdi_congested(struct backing_dev_info *bdi , int bdi_bits ) { int tmp ; { if ((unsigned long )bdi->congested_fn != (unsigned long )((congested_fn *)0)) { tmp = (*(bdi->congested_fn))(bdi->congested_data, bdi_bits); return (tmp); } else { } return ((int )((unsigned int )bdi->state & (unsigned int )bdi_bits)); } } extern mempool_t *mempool_create(int , mempool_alloc_t * , mempool_free_t * , void * ) ; extern void mempool_destroy(mempool_t * ) ; extern void *mempool_alloc_slab(gfp_t , void * ) ; extern void mempool_free_slab(void * , void * ) ; extern int blk_remove_plug(struct request_queue * ) ; extern void blk_cleanup_queue(struct request_queue * ) ; extern void blk_queue_make_request(struct request_queue * , make_request_fn * ) ; extern void blk_queue_bounce_limit(struct request_queue * , u64 ) ; extern void blk_queue_max_segment_size(struct request_queue * , unsigned int ) ; extern void blk_queue_merge_bvec(struct request_queue * , merge_bvec_fn * ) ; extern struct request_queue *blk_alloc_queue(gfp_t ) ; extern void lc_destroy(struct lru_cache * ) ; int disable_sendpage ; int allow_oos ; unsigned int cn_idx ; int enable_faults ; int fault_rate ; int fault_devs ; char usermode_helper[80U] ; struct drbd_conf **minor_table ; __inline static void DCBP_set_code(struct p_compressed_bm *p , enum drbd_bitmap_code code ) { long tmp ; { tmp = ldv__builtin_expect(((unsigned int )code & 4294967280U) != 0U, 0L); if (tmp != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/inst/current/envs/linux/linux/drivers/block/drbd/drbd_int.h"), "i" (569), "i" (12UL)); ldv_41451: ; goto ldv_41451; } else { } p->encoding = ((unsigned int )p->encoding & 240U) | (unsigned int )((u8 )code); return; } } __inline static void DCBP_set_start(struct p_compressed_bm *p , int set ) { { p->encoding = (u8 )(((int )((signed char )p->encoding) & 127) | (set != 0 ? -128 : 0)); return; } } __inline static void DCBP_set_pad_bits(struct p_compressed_bm *p , int n ) { long tmp ; { tmp = ldv__builtin_expect((n & -8) != 0, 0L); if (tmp != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/novikov/inst/current/envs/linux/linux/drivers/block/drbd/drbd_int.h"), "i" (594), "i" (12UL)); ldv_41466: ; goto ldv_41466; } else { } p->encoding = (u8 )(((int )((signed char )p->encoding) & -128) | (int )((signed char )(n << 4))); return; } } __inline static int drbd_get_data_sock___0(struct drbd_conf *mdev ) { long tmp ; { ldv_mutex_lock_85(& mdev->data.mutex); tmp = ldv__builtin_expect((unsigned long )mdev->data.socket == (unsigned long )((struct socket *)0), 0L); if (tmp != 0L) { ldv_mutex_unlock_86(& mdev->data.mutex); return (0); } else { } return (1); } } __inline static void drbd_put_data_sock___0(struct drbd_conf *mdev ) { { ldv_mutex_unlock_87(& mdev->data.mutex); return; } } void drbd_init_set_defaults(struct drbd_conf *mdev ) ; void print_st_err(struct drbd_conf *mdev , union drbd_state os , union drbd_state ns , int err ) ; void drbd_calc_cpu_mask(struct drbd_conf *mdev ) ; void drbd_free_resources(struct drbd_conf *mdev ) ; int drbd_send(struct drbd_conf *mdev , struct socket *sock , void *buf , size_t size , unsigned int msg_flags ) ; int drbd_send_uuids_skip_initial_sync(struct drbd_conf *mdev ) ; int _drbd_send_bitmap(struct drbd_conf *mdev ) ; void drbd_free_bc(struct drbd_backing_dev *ldev ) ; int drbd_md_read(struct drbd_conf *mdev , struct drbd_backing_dev *bdev ) ; void drbd_md_set_flag(struct drbd_conf *mdev , int flag ) ; void drbd_md_clear_flag(struct drbd_conf *mdev , int flag ) ; int drbd_md_test_flag(struct drbd_backing_dev *bdev , int flag ) ; void drbd_md_mark_dirty(struct drbd_conf *mdev ) ; struct kmem_cache *drbd_request_cache ; struct kmem_cache *drbd_ee_cache ; struct kmem_cache *drbd_bm_ext_cache ; struct kmem_cache *drbd_al_ext_cache ; mempool_t *drbd_request_mempool ; mempool_t *drbd_ee_mempool ; struct page *drbd_pp_pool ; spinlock_t drbd_pp_lock ; int drbd_pp_vacant ; wait_queue_head_t drbd_pp_wait ; struct drbd_conf *drbd_new_device(unsigned int minor ) ; void drbd_free_mdev(struct drbd_conf *mdev ) ; int proc_details ; void drbd_suspend_io(struct drbd_conf *mdev ) ; void drbd_resume_io(struct drbd_conf *mdev ) ; void drbd_nl_cleanup(void) ; int drbd_nl_init(void) ; void drbd_bcast_state(struct drbd_conf *mdev , union drbd_state state ) ; __inline static void drbd_state_lock___0(struct drbd_conf *mdev ) { int tmp ; wait_queue_t __wait ; struct task_struct *tmp___0 ; int tmp___1 ; { tmp = test_and_set_bit(9, (unsigned long volatile *)(& mdev->flags)); if (tmp == 0) { goto ldv_42489; } else { } tmp___0 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___0; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_42492: prepare_to_wait(& mdev->misc_wait, & __wait, 2); tmp___1 = test_and_set_bit(9, (unsigned long volatile *)(& mdev->flags)); if (tmp___1 == 0) { goto ldv_42491; } else { } schedule(); goto ldv_42492; ldv_42491: finish_wait(& mdev->misc_wait, & __wait); ldv_42489: ; return; } } __inline static void __drbd_chk_io_error____3(struct drbd_conf *mdev , int forcedetach , char const *where ) { char const *tmp ; char const *tmp___0 ; int tmp___1 ; union drbd_state __ns ; char const *tmp___2 ; char const *tmp___3 ; { switch ((mdev->ldev)->dc.on_io_error) { case 0: ; if (forcedetach == 0) { tmp___1 = __printk_ratelimit("__drbd_chk_io_error_"); if (tmp___1 != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Local IO failed in %s.Passing error on...\n", tmp___0, tmp, where); } else { } goto ldv_42515; } else { } case 2: ; case 1: ; if ((int )mdev->state.ldv_33381.disk > 2) { __ns.i = mdev->state.i; __ns.ldv_33381.disk = 2U; _drbd_set_state(mdev, __ns, CS_HARD, 0); tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Local IO failed in %s.Detaching...\n", tmp___3, tmp___2, where); } else { } goto ldv_42515; } ldv_42515: ; return; } } __inline static void drbd_chk_io_error____1(struct drbd_conf *mdev , int error , int forcedetach , char const *where ) { unsigned long flags ; raw_spinlock_t *tmp ; { if (error != 0) { tmp = spinlock_check(& mdev->req_lock); flags = _raw_spin_lock_irqsave(tmp); __drbd_chk_io_error____3(mdev, forcedetach, where); spin_unlock_irqrestore(& mdev->req_lock, flags); } else { } return; } } __inline static sector_t drbd_get_max_capacity___0(struct drbd_backing_dev *bdev ) { sector_t s ; sector_t __min1 ; sector_t __min2 ; sector_t tmp___0 ; sector_t tmp___1 ; sector_t __min1___0 ; sector_t __min2___0 ; sector_t tmp___2 ; sector_t __min1___1 ; sector_t __min2___1 ; sector_t __min1___2 ; sector_t __min2___2 ; sector_t tmp___3 ; { switch (bdev->dc.meta_dev_idx) { case -1: ; case -3: tmp___1 = drbd_get_capacity(bdev->backing_bdev); if (tmp___1 != 0UL) { __min1 = 34359738368UL; tmp___0 = drbd_md_first_sector(bdev); __min2 = tmp___0; s = __min1 < __min2 ? __min1 : __min2; } else { s = 0UL; } goto ldv_42556; case -2: __min1___0 = 34359738368UL; tmp___2 = drbd_get_capacity(bdev->backing_bdev); __min2___0 = tmp___2; s = __min1___0 < __min2___0 ? __min1___0 : __min2___0; __min1___1 = s; __min2___1 = (unsigned long )(bdev->md.md_size_sect - (u32 )bdev->md.bm_offset) << 15; s = __min1___1 < __min2___1 ? __min1___1 : __min2___1; goto ldv_42556; default: __min1___2 = 8587575296UL; tmp___3 = drbd_get_capacity(bdev->backing_bdev); __min2___2 = tmp___3; s = __min1___2 < __min2___2 ? __min1___2 : __min2___2; } ldv_42556: ; return (s); } } __inline static sector_t drbd_md_ss__(struct drbd_conf *mdev , struct drbd_backing_dev *bdev ) { char const *tmp ; char const *tmp___0 ; int tmp___1 ; sector_t tmp___2 ; { switch (bdev->dc.meta_dev_idx) { default: ; return ((unsigned long )bdev->dc.meta_dev_idx * 262144UL); case -1: ; case -3: ; if ((unsigned long )bdev->backing_bdev == (unsigned long )((struct block_device *)0)) { tmp___1 = ___ratelimit(& drbd_ratelimit_state, "drbd_md_ss__"); if (tmp___1 != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: bdev->backing_bdev==NULL\n", tmp___0, tmp); dump_stack(); } else { } return (0UL); } else { } tmp___2 = drbd_get_capacity(bdev->backing_bdev); return ((sector_t )(((unsigned long long )tmp___2 & 0xfffffffffffffff8ULL) - 8ULL)); case -2: ; return (0UL); } } } __inline static void drbd_thread_stop_nowait(struct drbd_thread *thi ) { { _drbd_thread_stop(thi, 0, 0); return; } } __inline static void drbd_thread_restart_nowait(struct drbd_thread *thi ) { { _drbd_thread_stop(thi, 1, 0); return; } } __inline static int drbd_state_is_stable___0(union drbd_state s ) { { switch ((unsigned int )s.ldv_33381.conn) { case 0U: ; case 8U: ; case 10U: ; case 16U: ; case 17U: ; case 18U: ; case 19U: ; case 20U: ; case 21U: ; goto ldv_42674; case 1U: ; case 2U: ; case 3U: ; case 4U: ; case 5U: ; case 6U: ; case 7U: ; case 9U: ; case 11U: ; case 12U: ; case 13U: ; case 14U: ; case 15U: ; case 31U: ; return (0); } ldv_42674: ; switch ((unsigned int )s.ldv_33381.disk) { case 0U: ; case 4U: ; case 5U: ; case 7U: ; case 8U: ; goto ldv_42694; case 1U: ; case 2U: ; case 3U: ; case 6U: ; case 15U: ; return (0); } ldv_42694: ; return (1); } } __inline static int __inc_ap_bio_cond___0(struct drbd_conf *mdev ) { int mxb ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; { tmp = drbd_get_max_buffers(mdev); mxb = tmp; if ((unsigned int )*((unsigned char *)mdev + 1990UL) != 0U) { return (0); } else { } tmp___0 = constant_test_bit(17U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___0 != 0) { return (0); } else { } tmp___1 = drbd_state_is_stable___0(mdev->state); if (tmp___1 == 0) { return (0); } else { } tmp___2 = atomic_read((atomic_t const *)(& mdev->ap_bio_cnt)); if (tmp___2 > mxb) { return (0); } else { } tmp___3 = constant_test_bit(18U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___3 != 0) { return (0); } else { } tmp___4 = atomic_read((atomic_t const *)(& mdev->new_c_uuid)); if (tmp___4 != 0) { return (0); } else { } return (1); } } __inline static void drbd_update_congested(struct drbd_conf *mdev ) { struct sock *sk ; { sk = (mdev->data.socket)->sk; if (sk->sk_wmem_queued > (sk->sk_sndbuf * 4) / 5) { set_bit(21U, (unsigned long volatile *)(& mdev->flags)); } else { } return; } } __inline static int drbd_queue_order_type(struct drbd_conf *mdev ) { { return (0); } } __inline static int __vli_encode_bits(u64 *out , u64 const in ) { u64 max ; u64 adj ; { max = 0ULL; adj = 1ULL; if ((unsigned long long )in == 0ULL) { return (-22); } else { } max = max + 2ULL; if ((unsigned long long )in <= max) { if ((unsigned long )out != (unsigned long )((u64 *)0)) { *out = ((unsigned long long )in - adj) << 1; } else { } return (2); } else { } adj = max + 1ULL; max = max + 2ULL; if ((unsigned long long )in <= max) { if ((unsigned long )out != (unsigned long )((u64 *)0)) { *out = (((unsigned long long )in - adj) << 2) | 1ULL; } else { } return (3); } else { } adj = max + 1ULL; max = max + 4ULL; if ((unsigned long long )in <= max) { if ((unsigned long )out != (unsigned long )((u64 *)0)) { *out = (((unsigned long long )in - adj) << 3) | 3ULL; } else { } return (5); } else { } adj = max + 1ULL; max = max + 8ULL; if ((unsigned long long )in <= max) { if ((unsigned long )out != (unsigned long )((u64 *)0)) { *out = (((unsigned long long )in - adj) << 4) | 7ULL; } else { } return (7); } else { } adj = max + 1ULL; max = max + 32ULL; if ((unsigned long long )in <= max) { if ((unsigned long )out != (unsigned long )((u64 *)0)) { *out = (((unsigned long long )in - adj) << 5) | 15ULL; } else { } return (10); } else { } adj = max + 1ULL; max = max + 256ULL; if ((unsigned long long )in <= max) { if ((unsigned long )out != (unsigned long )((u64 *)0)) { *out = (((unsigned long long )in - adj) << 6) | 31ULL; } else { } return (14); } else { } adj = max + 1ULL; max = max + 8192ULL; if ((unsigned long long )in <= max) { if ((unsigned long )out != (unsigned long )((u64 *)0)) { *out = (((unsigned long long )in - adj) << 8) | 63ULL; } else { } return (21); } else { } adj = max + 1ULL; max = max + 2097152ULL; if ((unsigned long long )in <= max) { if ((unsigned long )out != (unsigned long )((u64 *)0)) { *out = (((unsigned long long )in - adj) << 8) | 127ULL; } else { } return (29); } else { } adj = max + 1ULL; max = max + 17179869184ULL; if ((unsigned long long )in <= max) { if ((unsigned long )out != (unsigned long )((u64 *)0)) { *out = (((unsigned long long )in - adj) << 8) | 191ULL; } else { } return (42); } else { } adj = max + 1ULL; max = max + 72057594037927936ULL; if ((unsigned long long )in <= max) { if ((unsigned long )out != (unsigned long )((u64 *)0)) { *out = (((unsigned long long )in - adj) << 8) | 255ULL; } else { } return (64); } else { } adj = max + 1ULL; return (-75); } } __inline static int bitstream_put_bits(struct bitstream *bs , u64 val , unsigned int const bits ) { unsigned char *b ; unsigned int tmp ; unsigned char *tmp___0 ; unsigned char *tmp___1 ; { b = bs->cur.b; if ((unsigned int )bits == 0U) { return (0); } else { } if ((unsigned long )((long )(bs->cur.b + (unsigned long )(((bs->cur.bit + (unsigned int )bits) - 1U) >> 3)) - (long )bs->buf) >= bs->buf_len) { return (-105); } else { } if ((unsigned int )bits <= 63U) { val = (0xffffffffffffffffULL >> (int )(64U - (unsigned int )bits)) & val; } else { } tmp___0 = b; b = b + 1; *tmp___0 = (int )*tmp___0 | (int )((unsigned char )((val & 255ULL) << (int )bs->cur.bit)); tmp = 8U - bs->cur.bit; goto ldv_42920; ldv_42919: tmp___1 = b; b = b + 1; *tmp___1 = (int )*tmp___1 | (int )((unsigned char )(val >> (int )tmp)); tmp = tmp + 8U; ldv_42920: ; if (tmp < (unsigned int )bits) { goto ldv_42919; } else { } bitstream_cursor_advance(& bs->cur, bits); return ((int )bits); } } __inline static int vli_encode_bits(struct bitstream *bs , u64 in ) { u64 code ; int bits ; int tmp ; int tmp___0 ; { code = code; tmp = __vli_encode_bits(& code, in); bits = tmp; if (bits <= 0) { return (bits); } else { } tmp___0 = bitstream_put_bits(bs, code, (unsigned int const )bits); return (tmp___0); } } int drbd_init(void) ; static int drbd_open(struct block_device *bdev , fmode_t mode ) ; static int drbd_release(struct gendisk *gd , fmode_t mode ) ; static int w_after_state_ch(struct drbd_conf *mdev , struct drbd_work *w , int unused ) ; static void after_state_ch(struct drbd_conf *mdev , union drbd_state os , union drbd_state ns , enum chg_state_flags flags ) ; static int w_md_sync(struct drbd_conf *mdev , struct drbd_work *w , int unused ) ; static void md_sync_timer_fn(unsigned long data ) ; static int w_bitmap_io(struct drbd_conf *mdev , struct drbd_work *w , int unused ) ; static int fault_count ; unsigned int minor_count = 32U; unsigned int cn_idx = 8U; char usermode_helper[80U] = { '/', 's', 'b', 'i', 'n', '/', 'd', 'r', 'b', 'd', 'a', 'd', 'm', '\000'}; struct ratelimit_state drbd_ratelimit_state = {{{{{0U}, 3735899821U, 4294967295U, 0xffffffffffffffffUL, {0, 0, "drbd_ratelimit_state.lock", 0, 0UL}}}}, 1250, 5, 0, 0, 0UL}; static struct block_device_operations const drbd_ops = {& drbd_open, & drbd_release, 0, 0, 0, 0, 0, 0, 0, 0, & __this_module}; static int tl_init(struct drbd_conf *mdev ) { struct drbd_tl_epoch *b ; void *tmp ; { tmp = kmalloc___4(56UL, 208U); b = (struct drbd_tl_epoch *)tmp; if ((unsigned long )b == (unsigned long )((struct drbd_tl_epoch *)0)) { return (0); } else { } INIT_LIST_HEAD(& b->requests); INIT_LIST_HEAD(& b->w.list); b->next = 0; b->br_number = 4711U; b->n_req = 0; b->w.cb = 0; mdev->oldest_tle = b; mdev->newest_tle = b; INIT_LIST_HEAD(& mdev->out_of_sequence_requests); mdev->tl_hash = 0; mdev->tl_hash_s = 0U; return (1); } } static void tl_cleanup(struct drbd_conf *mdev ) { char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; int tmp___3 ; { if ((unsigned long )mdev->oldest_tle != (unsigned long )mdev->newest_tle) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->oldest_tle == mdev->newest_tle ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 257); } else { } tmp___3 = list_empty((struct list_head const *)(& mdev->out_of_sequence_requests)); if (tmp___3 == 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&mdev->out_of_sequence_requests) ) in %s:%d\n", tmp___2, tmp___1, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 258); } else { } kfree((void const *)mdev->oldest_tle); mdev->oldest_tle = 0; kfree((void const *)mdev->unused_spare_tle); mdev->unused_spare_tle = 0; kfree((void const *)mdev->tl_hash); mdev->tl_hash = 0; mdev->tl_hash_s = 0U; return; } } void _tl_add_barrier(struct drbd_conf *mdev , struct drbd_tl_epoch *new ) { struct drbd_tl_epoch *newest_before ; { INIT_LIST_HEAD(& new->requests); INIT_LIST_HEAD(& new->w.list); new->w.cb = 0; new->next = 0; new->n_req = 0; newest_before = mdev->newest_tle; new->br_number = newest_before->br_number + 1U != 0U ? newest_before->br_number + 1U : 1U; if ((unsigned long )mdev->newest_tle != (unsigned long )new) { (mdev->newest_tle)->next = new; mdev->newest_tle = new; } else { } return; } } void tl_release(struct drbd_conf *mdev , unsigned int barrier_nr , unsigned int set_size ) { struct drbd_tl_epoch *b ; struct drbd_tl_epoch *nob ; struct list_head *le ; struct list_head *tle ; struct drbd_request *r ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; struct list_head const *__mptr ; char const *tmp___5 ; char const *tmp___6 ; int tmp___7 ; int tmp___8 ; int tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; int tmp___12 ; union drbd_state val ; union drbd_state mask ; { spin_lock_irq(& mdev->req_lock); b = mdev->oldest_tle; if ((unsigned long )b == (unsigned long )((struct drbd_tl_epoch *)0)) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: BAD! BarrierAck #%u received, but no epoch in tl!?\n", tmp___0, tmp, barrier_nr); goto bail; } else { } if (b->br_number != barrier_nr) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: BAD! BarrierAck #%u received, expected #%u!\n", tmp___2, tmp___1, barrier_nr, b->br_number); goto bail; } else { } if ((unsigned int )b->n_req != set_size) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: BAD! BarrierAck #%u received with n_req=%u, expected n_req=%u!\n", tmp___4, tmp___3, barrier_nr, set_size, b->n_req); goto bail; } else { } le = b->requests.next; tle = le->next; goto ldv_43142; ldv_43141: __mptr = (struct list_head const *)le; r = (struct drbd_request *)__mptr + 0xffffffffffffffb8UL; _req_mod(r, barrier_acked); le = tle; tle = le->next; ldv_43142: ; if ((unsigned long )(& b->requests) != (unsigned long )le) { goto ldv_43141; } else { } list_del_init(& b->requests); nob = b->next; tmp___7 = test_and_clear_bit(0, (unsigned long volatile *)(& mdev->flags)); if (tmp___7 != 0) { _tl_add_barrier(mdev, b); if ((unsigned long )nob != (unsigned long )((struct drbd_tl_epoch *)0)) { mdev->oldest_tle = nob; } else { } } else { if ((unsigned long )nob == (unsigned long )((struct drbd_tl_epoch *)0)) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( nob != NULL ) in %s:%d\n", tmp___6, tmp___5, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 361); } else { } mdev->oldest_tle = nob; kfree((void const *)b); } spin_unlock_irq(& mdev->req_lock); tmp___8 = atomic_dec_and_test(& mdev->ap_pending_cnt); if (tmp___8 != 0) { __wake_up(& mdev->misc_wait, 3U, 1, 0); } else { } tmp___12 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); if (tmp___12 < 0) { tmp___9 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: ap_pending_cnt = %d < 0 !\n", tmp___11, tmp___10, "tl_release", 367, tmp___9); } else { } return; bail: spin_unlock_irq(& mdev->req_lock); val.i = 0U; val.ldv_33381.conn = 6U; mask.i = 0U; mask.ldv_33381.conn = 31U; drbd_force_state(mdev, mask, val); return; } } void tl_clear(struct drbd_conf *mdev ) { struct drbd_tl_epoch *b ; struct drbd_tl_epoch *tmp ; struct list_head *le ; struct list_head *tle ; struct drbd_request *r ; int new_initial_bnr ; u32 tmp___0 ; struct list_head const *__mptr ; int tmp___1 ; int tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; int tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; int tmp___10 ; struct list_head const *__mptr___0 ; { tmp___0 = random32(); new_initial_bnr = (int )tmp___0; spin_lock_irq(& mdev->req_lock); b = mdev->oldest_tle; goto ldv_43172; ldv_43171: le = b->requests.next; tle = le->next; goto ldv_43164; ldv_43163: __mptr = (struct list_head const *)le; r = (struct drbd_request *)__mptr + 0xffffffffffffffb8UL; _req_mod(r, connection_lost_while_pending); le = tle; tle = le->next; ldv_43164: ; if ((unsigned long )(& b->requests) != (unsigned long )le) { goto ldv_43163; } else { } tmp = b->next; list_del(& b->requests); if ((unsigned long )b->w.cb != (unsigned long )((int (*)(struct drbd_conf * , struct drbd_work * , int ))0)) { tmp___1 = atomic_dec_and_test(& mdev->ap_pending_cnt); if (tmp___1 != 0) { __wake_up(& mdev->misc_wait, 3U, 1, 0); } else { } tmp___5 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); if (tmp___5 < 0) { tmp___2 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: in %s:%d: ap_pending_cnt = %d < 0 !\n", tmp___4, tmp___3, "tl_clear", 412, tmp___2); } else { } } else { } if ((unsigned long )mdev->newest_tle == (unsigned long )b) { if ((unsigned long )tmp != (unsigned long )((struct drbd_tl_epoch *)0)) { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( tmp == NULL ) in %s:%d\n", tmp___7, tmp___6, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 416); } else { } INIT_LIST_HEAD(& b->requests); INIT_LIST_HEAD(& b->w.list); b->w.cb = 0; b->br_number = (unsigned int )new_initial_bnr; b->n_req = 0; mdev->oldest_tle = b; goto ldv_43170; } else { } kfree((void const *)b); b = tmp; ldv_43172: ; if ((unsigned long )b != (unsigned long )((struct drbd_tl_epoch *)0)) { goto ldv_43171; } else { } ldv_43170: tmp___10 = list_empty((struct list_head const *)(& mdev->out_of_sequence_requests)); if (tmp___10 == 0) { tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&mdev->out_of_sequence_requests) ) in %s:%d\n", tmp___9, tmp___8, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 431); } else { } le = mdev->out_of_sequence_requests.next; tle = le->next; goto ldv_43176; ldv_43175: __mptr___0 = (struct list_head const *)le; r = (struct drbd_request *)__mptr___0 + 0xffffffffffffffb8UL; _req_mod(r, connection_lost_while_pending); le = tle; tle = le->next; ldv_43176: ; if ((unsigned long )(& mdev->out_of_sequence_requests) != (unsigned long )le) { goto ldv_43175; } else { } clear_bit(0, (unsigned long volatile *)(& mdev->flags)); spin_unlock_irq(& mdev->req_lock); return; } } static int cl_wide_st_chg(struct drbd_conf *mdev , union drbd_state os , union drbd_state ns ) { { return (((((int )os.ldv_33381.conn > 9 && (int )ns.ldv_33381.conn > 9) && (((((unsigned int )*((unsigned char *)(& os) + 0UL) != 1U && (unsigned int )*((unsigned char *)(& ns) + 0UL) == 1U) || ((unsigned int )*((unsigned short *)(& os) + 0UL) != 192U && (unsigned int )*((unsigned short *)(& ns) + 0UL) == 192U)) || ((unsigned int )*((unsigned short *)(& os) + 0UL) != 176U && (unsigned int )*((unsigned short *)(& ns) + 0UL) == 176U)) || ((unsigned int )*((unsigned char *)(& os) + 1UL) != 0U && (unsigned int )*((unsigned char *)(& ns) + 1UL) == 0U))) || ((int )os.ldv_33381.conn > 9 && (unsigned int )*((unsigned short *)(& ns) + 0UL) == 16U)) || ((unsigned int )*((unsigned short *)(& os) + 0UL) == 160U && (unsigned int )*((unsigned short *)(& ns) + 0UL) == 288U)); } } int drbd_change_state(struct drbd_conf *mdev , enum chg_state_flags f , union drbd_state mask , union drbd_state val ) { unsigned long flags ; union drbd_state os ; union drbd_state ns ; int rv ; raw_spinlock_t *tmp ; { tmp = spinlock_check(& mdev->req_lock); flags = _raw_spin_lock_irqsave(tmp); os = mdev->state; ns.i = (os.i & ~ mask.i) | val.i; rv = _drbd_set_state(mdev, ns, f, 0); ns = mdev->state; spin_unlock_irqrestore(& mdev->req_lock, flags); return (rv); } } void drbd_force_state(struct drbd_conf *mdev , union drbd_state mask , union drbd_state val ) { { drbd_change_state(mdev, CS_HARD, mask, val); return; } } static int is_valid_state(struct drbd_conf *mdev , union drbd_state ns ) ; static int is_valid_state_transition(struct drbd_conf *mdev , union drbd_state ns , union drbd_state os ) ; static union drbd_state sanitize_state(struct drbd_conf *mdev , union drbd_state os , union drbd_state ns , int *warn_sync_abort ) ; int drbd_send_state_req(struct drbd_conf *mdev , union drbd_state mask , union drbd_state val ) ; static enum drbd_state_ret_codes _req_st_cond(struct drbd_conf *mdev , union drbd_state mask , union drbd_state val ) { union drbd_state os ; union drbd_state ns ; unsigned long flags ; int rv ; int tmp ; int tmp___0 ; raw_spinlock_t *tmp___1 ; int tmp___2 ; { tmp = test_and_clear_bit(10, (unsigned long volatile *)(& mdev->flags)); if (tmp != 0) { return (SS_CW_SUCCESS); } else { } tmp___0 = test_and_clear_bit(11, (unsigned long volatile *)(& mdev->flags)); if (tmp___0 != 0) { return (SS_CW_FAILED_BY_PEER); } else { } rv = 0; tmp___1 = spinlock_check(& mdev->req_lock); flags = _raw_spin_lock_irqsave(tmp___1); os = mdev->state; ns.i = (os.i & ~ mask.i) | val.i; ns = sanitize_state(mdev, os, ns, 0); tmp___2 = cl_wide_st_chg(mdev, os, ns); if (tmp___2 == 0) { rv = 4; } else { } if (rv == 0) { rv = is_valid_state(mdev, ns); if (rv == 1) { rv = is_valid_state_transition(mdev, ns, os); if (rv == 1) { rv = 0; } else { } } else { } } else { } spin_unlock_irqrestore(& mdev->req_lock, flags); return ((enum drbd_state_ret_codes )rv); } } static int drbd_req_state(struct drbd_conf *mdev , union drbd_state mask , union drbd_state val , enum chg_state_flags f ) { struct completion done ; unsigned long flags ; union drbd_state os ; union drbd_state ns ; int rv ; raw_spinlock_t *tmp ; int tmp___0 ; enum drbd_state_ret_codes tmp___1 ; wait_queue_t __wait ; struct task_struct *tmp___2 ; enum drbd_state_ret_codes tmp___3 ; raw_spinlock_t *tmp___4 ; int tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; struct task_struct *tmp___8 ; { init_completion(& done); if (((unsigned int )f & 8U) != 0U) { ldv_mutex_lock_88(& mdev->state_mutex); } else { } tmp = spinlock_check(& mdev->req_lock); flags = _raw_spin_lock_irqsave(tmp); os = mdev->state; ns.i = (os.i & ~ mask.i) | val.i; ns = sanitize_state(mdev, os, ns, 0); tmp___5 = cl_wide_st_chg(mdev, os, ns); if (tmp___5 != 0) { rv = is_valid_state(mdev, ns); if (rv == 1) { rv = is_valid_state_transition(mdev, ns, os); } else { } spin_unlock_irqrestore(& mdev->req_lock, flags); if (rv <= 0) { if (((unsigned int )f & 2U) != 0U) { print_st_err(mdev, os, ns, rv); } else { } goto abort; } else { } drbd_state_lock___0(mdev); tmp___0 = drbd_send_state_req(mdev, mask, val); if (tmp___0 == 0) { drbd_state_unlock(mdev); rv = -10; if (((unsigned int )f & 2U) != 0U) { print_st_err(mdev, os, ns, rv); } else { } goto abort; } else { } tmp___1 = _req_st_cond(mdev, mask, val); rv = (int )tmp___1; if (rv != 0) { goto ldv_43244; } else { } tmp___2 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___2; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_43247: prepare_to_wait(& mdev->state_wait, & __wait, 2); tmp___3 = _req_st_cond(mdev, mask, val); rv = (int )tmp___3; if (rv != 0) { goto ldv_43246; } else { } schedule(); goto ldv_43247; ldv_43246: finish_wait(& mdev->state_wait, & __wait); ldv_43244: ; if (rv <= 0) { drbd_state_unlock(mdev); if (((unsigned int )f & 2U) != 0U) { print_st_err(mdev, os, ns, rv); } else { } goto abort; } else { } tmp___4 = spinlock_check(& mdev->req_lock); flags = _raw_spin_lock_irqsave(tmp___4); os = mdev->state; ns.i = (os.i & ~ mask.i) | val.i; rv = _drbd_set_state(mdev, ns, f, & done); drbd_state_unlock(mdev); } else { rv = _drbd_set_state(mdev, ns, f, & done); } spin_unlock_irqrestore(& mdev->req_lock, flags); if (((unsigned int )f & 4U) != 0U && rv == 1) { tmp___8 = get_current(); if ((unsigned long )tmp___8 == (unsigned long )mdev->worker.task) { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( current != mdev->worker.task ) in %s:%d\n", tmp___7, tmp___6, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 607); } else { } wait_for_completion(& done); } else { } abort: ; if (((unsigned int )f & 8U) != 0U) { ldv_mutex_unlock_89(& mdev->state_mutex); } else { } return (rv); } } int _drbd_request_state(struct drbd_conf *mdev , union drbd_state mask , union drbd_state val , enum chg_state_flags f ) { int rv ; wait_queue_t __wait ; struct task_struct *tmp ; { rv = drbd_req_state(mdev, mask, val, f); if (rv != -18) { goto ldv_43258; } else { } tmp = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_43261: prepare_to_wait(& mdev->state_wait, & __wait, 2); rv = drbd_req_state(mdev, mask, val, f); if (rv != -18) { goto ldv_43260; } else { } schedule(); goto ldv_43261; ldv_43260: finish_wait(& mdev->state_wait, & __wait); ldv_43258: ; return (rv); } } static void print_st(struct drbd_conf *mdev , char *name , union drbd_state ns ) { char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; { tmp = drbd_disk_str((enum drbd_disk_state )ns.ldv_33381.pdsk); tmp___0 = drbd_disk_str((enum drbd_disk_state )ns.ldv_33381.disk); tmp___1 = drbd_role_str((enum drbd_role )ns.ldv_33381.peer); tmp___2 = drbd_role_str((enum drbd_role )ns.ldv_33381.role); tmp___3 = drbd_conn_str((enum drbd_conns )ns.ldv_33381.conn); tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s = { cs:%s ro:%s/%s ds:%s/%s %c%c%c%c }\n", tmp___5, tmp___4, name, tmp___3, tmp___2, tmp___1, tmp___0, tmp, (unsigned int )*((unsigned char *)(& ns) + 2UL) != 0U ? 115 : 114, (unsigned int )*((unsigned char *)(& ns) + 2UL) != 0U ? 97 : 45, (unsigned int )*((unsigned char *)(& ns) + 2UL) != 0U ? 112 : 45, (unsigned int )*((unsigned char *)(& ns) + 2UL) != 0U ? 117 : 45); return; } } void print_st_err(struct drbd_conf *mdev , union drbd_state os , union drbd_state ns , int err ) { char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; { if (err == -18) { return; } else { } tmp = drbd_set_st_err_str((enum drbd_state_ret_codes )err); tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: State change failed: %s\n", tmp___1, tmp___0, tmp); print_st(mdev, (char *)" state", os); print_st(mdev, (char *)"wanted", ns); return; } } static int is_valid_state(struct drbd_conf *mdev , union drbd_state ns ) { enum drbd_fencing_p fp ; int rv ; int tmp ; int tmp___0 ; { rv = 1; fp = FP_DONT_CARE; tmp = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp != 0) { fp = (enum drbd_fencing_p )(mdev->ldev)->dc.fencing; put_ldev(mdev); } else { } tmp___0 = get_net_conf(mdev); if (tmp___0 != 0) { if (((unsigned int )*((unsigned char *)mdev->net_conf + 528UL) == 0U && (unsigned int )*((unsigned char *)(& ns) + 0UL) == 1U) && (unsigned int )*((unsigned char *)(& ns) + 0UL) == 4U) { rv = -1; } else { } put_net_conf(mdev); } else { } if (rv <= 0) { } else if ((unsigned int )*((unsigned char *)(& ns) + 0UL) == 2U && mdev->open_cnt != 0) { rv = -12; } else if (((unsigned int )*((unsigned char *)(& ns) + 0UL) == 1U && (int )ns.ldv_33381.conn <= 9) && (int )ns.ldv_33381.disk <= 7) { rv = -2; } else if ((((unsigned int )fp != 0U && (unsigned int )*((unsigned char *)(& ns) + 0UL) == 1U) && (int )ns.ldv_33381.conn <= 9) && (int )ns.ldv_33381.pdsk > 5) { rv = -7; } else if (((unsigned int )*((unsigned char *)(& ns) + 0UL) == 1U && (int )ns.ldv_33381.disk <= 4) && (int )ns.ldv_33381.pdsk <= 4) { rv = -2; } else if ((int )ns.ldv_33381.conn > 10 && (int )ns.ldv_33381.disk <= 3) { rv = -4; } else if ((int )ns.ldv_33381.conn > 10 && (int )ns.ldv_33381.pdsk <= 3) { rv = -5; } else if (((int )ns.ldv_33381.conn > 10 && (int )ns.ldv_33381.disk <= 7) && (int )ns.ldv_33381.pdsk <= 7) { rv = -2; } else if (((((unsigned int )*((unsigned short *)(& ns) + 0UL) == 160U || (unsigned int )*((unsigned short *)(& ns) + 0UL) == 208U) || (unsigned int )*((unsigned short *)(& ns) + 0UL) == 256U) || (unsigned int )*((unsigned short *)(& ns) + 0UL) == 320U) && (unsigned int )*((unsigned char *)(& ns) + 1UL) == 10U) { rv = -6; } else if (((unsigned int )*((unsigned short *)(& ns) + 0UL) == 288U || (unsigned int )*((unsigned short *)(& ns) + 0UL) == 304U) && (unsigned int )mdev->sync_conf.verify_alg[0] == 0U) { rv = -14; } else if (((unsigned int )*((unsigned short *)(& ns) + 0UL) == 288U || (unsigned int )*((unsigned short *)(& ns) + 0UL) == 304U) && mdev->agreed_pro_version <= 87) { rv = -17; } else { } return (rv); } } static int is_valid_state_transition(struct drbd_conf *mdev , union drbd_state ns , union drbd_state os ) { int rv ; { rv = 1; if (((unsigned int )*((unsigned short *)(& ns) + 0UL) == 192U || (unsigned int )*((unsigned short *)(& ns) + 0UL) == 176U) && (int )os.ldv_33381.conn > 10) { rv = -8; } else { } if ((unsigned int )*((unsigned short *)(& ns) + 0UL) == 16U && (unsigned int )*((unsigned short *)(& os) + 0UL) == 0U) { rv = -9; } else { } if ((int )ns.ldv_33381.disk > 1 && (unsigned int )*((unsigned char *)(& os) + 1UL) == 0U) { rv = -11; } else { } if ((unsigned int )*((unsigned short *)(& ns) + 0UL) == 128U && (int )os.ldv_33381.conn <= 1) { rv = -13; } else { } if (((unsigned int )*((unsigned char *)(& ns) + 1UL) == 10U && (int )os.ldv_33381.disk <= 4) && (unsigned int )*((unsigned char *)(& os) + 1UL) != 2U) { rv = -16; } else { } if ((unsigned int )*((unsigned short *)(& ns) + 0UL) == 16U && (unsigned int )*((unsigned short *)(& os) + 0UL) == 32U) { rv = -18; } else { } if ((int )ns.ldv_33381.conn == (int )os.ldv_33381.conn && (unsigned int )*((unsigned short *)(& ns) + 0UL) == 144U) { rv = -18; } else { } if (((unsigned int )*((unsigned short *)(& ns) + 0UL) == 288U || (unsigned int )*((unsigned short *)(& ns) + 0UL) == 304U) && (int )os.ldv_33381.conn <= 9) { rv = -15; } else { } if ((((unsigned int )*((unsigned short *)(& ns) + 0UL) == 288U || (unsigned int )*((unsigned short *)(& ns) + 0UL) == 304U) && (int )ns.ldv_33381.conn != (int )os.ldv_33381.conn) && (int )os.ldv_33381.conn > 10) { rv = -8; } else { } if (((unsigned int )*((unsigned short *)(& ns) + 0UL) == 176U || (unsigned int )*((unsigned short *)(& ns) + 0UL) == 192U) && (int )os.ldv_33381.conn <= 9) { rv = -15; } else { } return (rv); } } static union drbd_state sanitize_state(struct drbd_conf *mdev , union drbd_state os , union drbd_state ns , int *warn_sync_abort ) { enum drbd_fencing_p fp ; int tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; int tmp___10 ; { fp = FP_DONT_CARE; tmp = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp != 0) { fp = (enum drbd_fencing_p )(mdev->ldev)->dc.fencing; put_ldev(mdev); } else { } if (((int )ns.ldv_33381.conn > 2 && (int )ns.ldv_33381.conn <= 7) && (int )os.ldv_33381.conn <= 1) { ns.ldv_33381.conn = os.ldv_33381.conn; } else { } if ((((int )os.ldv_33381.conn > 2 && (int )os.ldv_33381.conn <= 7) && (unsigned int )*((unsigned short *)(& ns) + 0UL) != 32U) && (unsigned int )*((unsigned short *)(& ns) + 0UL) != 16U) { ns.ldv_33381.conn = os.ldv_33381.conn; } else { } if ((unsigned int )*((unsigned short *)(& os) + 0UL) == 16U && (unsigned int )*((unsigned short *)(& ns) + 0UL) != 0U) { ns.ldv_33381.conn = os.ldv_33381.conn; } else { } if ((int )ns.ldv_33381.conn <= 9) { ns.ldv_33381.peer_isp = 0U; ns.ldv_33381.peer = 0U; if ((int )ns.ldv_33381.pdsk > 6 || (int )ns.ldv_33381.pdsk <= 3) { ns.ldv_33381.pdsk = 6U; } else { } } else { } if (((unsigned int )*((unsigned short *)(& ns) + 0UL) == 0U && (unsigned int )*((unsigned char *)(& ns) + 1UL) == 0U) && (unsigned int )*((unsigned char *)(& ns) + 0UL) == 2U) { ns.ldv_33381.aftr_isp = 0U; } else { } if ((int )ns.ldv_33381.conn <= 1 && (unsigned int )*((unsigned char *)(& ns) + 1UL) == 0U) { ns.ldv_33381.pdsk = 6U; } else { } if (((int )os.ldv_33381.conn > 10 && (int )ns.ldv_33381.conn > 10) && ((int )ns.ldv_33381.disk <= 2 || (int )ns.ldv_33381.pdsk <= 2)) { if ((unsigned long )warn_sync_abort != (unsigned long )((int *)0)) { *warn_sync_abort = 1; } else { } ns.ldv_33381.conn = 10U; } else { } if ((int )ns.ldv_33381.conn > 9 && (((unsigned int )*((unsigned char *)(& ns) + 1UL) == 14U || (unsigned int )*((unsigned char *)(& ns) + 1UL) == 10U) || ((unsigned int )*((unsigned char *)(& ns) + 1UL) == 6U && (unsigned int )*((unsigned short *)(& ns) + 0UL) == 224U))) { switch ((int )ns.ldv_33381.conn) { case 14: ; case 21: ns.ldv_33381.disk = 5U; goto ldv_43294; case 10: ; case 13: ; case 16: ; case 20: ns.ldv_33381.disk = 8U; goto ldv_43294; case 17: ns.ldv_33381.disk = 4U; tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Implicitly set disk state Inconsistent!\n", tmp___1, tmp___0); goto ldv_43294; } ldv_43294: ; if ((unsigned int )*((unsigned char *)(& os) + 1UL) == 10U && (unsigned int )*((unsigned char *)(& ns) + 1UL) == 16U) { tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Implicitly set disk from Outdated to UpToDate\n", tmp___3, tmp___2); } else { } } else { } if ((int )ns.ldv_33381.conn > 9 && (*((unsigned int *)(& ns) + 0UL) == 57344U || *((unsigned int *)(& ns) + 0UL) == 40960U)) { switch ((int )ns.ldv_33381.conn) { case 10: ; case 14: ; case 21: ; case 17: ns.ldv_33381.pdsk = 8U; goto ldv_43304; case 13: ; case 20: ns.ldv_33381.pdsk = (int )os.ldv_33381.pdsk > 0 && (int )os.ldv_33381.pdsk <= 4 ? os.ldv_33381.pdsk : 5U; goto ldv_43304; case 16: ns.ldv_33381.pdsk = 4U; tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Implicitly set pdsk Inconsistent!\n", tmp___5, tmp___4); goto ldv_43304; } ldv_43304: ; if (*((unsigned int *)(& os) + 0UL) == 40960U && *((unsigned int *)(& ns) + 0UL) == 65536U) { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Implicitly set pdsk from Outdated to UpToDate\n", tmp___7, tmp___6); } else { } } else { } if ((int )ns.ldv_33381.conn <= 9 && (unsigned int )*((unsigned char *)(& ns) + 1UL) == 6U) { tmp___10 = _get_ldev_if_state(mdev, D_NEGOTIATING); if (tmp___10 != 0) { if (mdev->ed_uuid == (mdev->ldev)->md.uuid[0]) { ns.ldv_33381.disk = mdev->new_state_tmp.ldv_33381.disk; ns.ldv_33381.pdsk = mdev->new_state_tmp.ldv_33381.pdsk; } else { tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<1>%s %s: Connection lost while negotiating, no data!\n", tmp___9, tmp___8); ns.ldv_33381.disk = 0U; ns.ldv_33381.pdsk = 6U; } put_ldev(mdev); } else { } } else { } if (((unsigned int )fp == 2U && (((unsigned int )*((unsigned char *)(& ns) + 0UL) == 1U && (int )ns.ldv_33381.conn <= 9) && (int )ns.ldv_33381.pdsk > 5)) && (((unsigned int )*((unsigned char *)(& os) + 0UL) != 1U || (int )os.ldv_33381.conn > 9) || (int )os.ldv_33381.pdsk <= 5)) { ns.ldv_33381.susp = 1U; } else { } if (((unsigned int )*((unsigned char *)(& ns) + 2UL) != 0U || (unsigned int )*((unsigned char *)(& ns) + 2UL) != 0U) || (unsigned int )*((unsigned char *)(& ns) + 2UL) != 0U) { if ((unsigned int )*((unsigned short *)(& ns) + 0UL) == 256U) { ns.ldv_33381.conn = 20U; } else { } if ((unsigned int )*((unsigned short *)(& ns) + 0UL) == 272U) { ns.ldv_33381.conn = 21U; } else { } } else { if ((unsigned int )*((unsigned short *)(& ns) + 0UL) == 320U) { ns.ldv_33381.conn = 16U; } else { } if ((unsigned int )*((unsigned short *)(& ns) + 0UL) == 336U) { ns.ldv_33381.conn = 17U; } else { } } return (ns); } } static void set_ov_position(struct drbd_conf *mdev , enum drbd_conns cs ) { unsigned long bit ; { if ((unsigned int )cs == 19U) { mdev->ov_start_sector = 0xffffffffffffffffUL; } else { bit = mdev->ov_start_sector >> 3; if (mdev->rs_total <= bit) { mdev->ov_start_sector = (mdev->rs_total - 1UL) << 3; } else { } mdev->ov_position = mdev->ov_start_sector; } return; } } int __drbd_set_state(struct drbd_conf *mdev , union drbd_state ns , enum chg_state_flags flags , struct completion *done ) { union drbd_state os ; int rv ; int warn_sync_abort ; struct after_state_chg_work *ascw ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; int tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char *pbp ; char pb[300U] ; char const *tmp___5 ; char const *tmp___6 ; int tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; int tmp___10 ; char const *tmp___11 ; char const *tmp___12 ; int tmp___13 ; char const *tmp___14 ; char const *tmp___15 ; int tmp___16 ; char const *tmp___17 ; char const *tmp___18 ; int tmp___19 ; int tmp___20 ; int tmp___21 ; int tmp___22 ; int tmp___23 ; char const *tmp___24 ; char const *tmp___25 ; int tmp___26 ; char const *tmp___27 ; char const *tmp___28 ; char const *tmp___29 ; char const *tmp___30 ; int tmp___31 ; char const *tmp___32 ; char const *tmp___33 ; unsigned long tmp___34 ; unsigned long tmp___35 ; char const *tmp___36 ; char const *tmp___37 ; u32 mdf ; int tmp___38 ; int tmp___39 ; void *tmp___40 ; char const *tmp___41 ; char const *tmp___42 ; { rv = 1; warn_sync_abort = 0; os = mdev->state; ns = sanitize_state(mdev, os, ns, & warn_sync_abort); if (ns.i == os.i) { return (2); } else { } if (((unsigned int )flags & 1U) == 0U) { rv = is_valid_state(mdev, ns); if (rv <= 0) { tmp___2 = is_valid_state(mdev, os); if (tmp___2 == rv) { tmp = drbd_set_st_err_str((enum drbd_state_ret_codes )rv); tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Considering state change from bad state. Error would be: \'%s\'\n", tmp___1, tmp___0, tmp); print_st(mdev, (char *)"old", os); print_st(mdev, (char *)"new", ns); rv = is_valid_state_transition(mdev, ns, os); } else { rv = is_valid_state_transition(mdev, ns, os); } } else { } } else { } if (rv <= 0) { if (((unsigned int )flags & 2U) != 0U) { print_st_err(mdev, os, ns, rv); } else { } return (rv); } else { } if (warn_sync_abort != 0) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Resync aborted.\n", tmp___4, tmp___3); } else { } pbp = (char *)(& pb); *pbp = 0; if ((int )ns.ldv_33381.role != (int )os.ldv_33381.role) { tmp___5 = drbd_role_str((enum drbd_role )ns.ldv_33381.role); tmp___6 = drbd_role_str((enum drbd_role )os.ldv_33381.role); tmp___7 = sprintf(pbp, "role( %s -> %s ) ", tmp___6, tmp___5); pbp = pbp + (unsigned long )tmp___7; } else { } if ((int )ns.ldv_33381.peer != (int )os.ldv_33381.peer) { tmp___8 = drbd_role_str((enum drbd_role )ns.ldv_33381.peer); tmp___9 = drbd_role_str((enum drbd_role )os.ldv_33381.peer); tmp___10 = sprintf(pbp, "peer( %s -> %s ) ", tmp___9, tmp___8); pbp = pbp + (unsigned long )tmp___10; } else { } if ((int )ns.ldv_33381.conn != (int )os.ldv_33381.conn) { tmp___11 = drbd_conn_str((enum drbd_conns )ns.ldv_33381.conn); tmp___12 = drbd_conn_str((enum drbd_conns )os.ldv_33381.conn); tmp___13 = sprintf(pbp, "conn( %s -> %s ) ", tmp___12, tmp___11); pbp = pbp + (unsigned long )tmp___13; } else { } if ((int )ns.ldv_33381.disk != (int )os.ldv_33381.disk) { tmp___14 = drbd_disk_str((enum drbd_disk_state )ns.ldv_33381.disk); tmp___15 = drbd_disk_str((enum drbd_disk_state )os.ldv_33381.disk); tmp___16 = sprintf(pbp, "disk( %s -> %s ) ", tmp___15, tmp___14); pbp = pbp + (unsigned long )tmp___16; } else { } if ((int )ns.ldv_33381.pdsk != (int )os.ldv_33381.pdsk) { tmp___17 = drbd_disk_str((enum drbd_disk_state )ns.ldv_33381.pdsk); tmp___18 = drbd_disk_str((enum drbd_disk_state )os.ldv_33381.pdsk); tmp___19 = sprintf(pbp, "pdsk( %s -> %s ) ", tmp___18, tmp___17); pbp = pbp + (unsigned long )tmp___19; } else { } if ((int )ns.ldv_33381.susp != (int )os.ldv_33381.susp) { tmp___20 = sprintf(pbp, "susp( %s -> %s ) ", (unsigned int )*((unsigned char *)(& os) + 2UL) != 0U ? (char *)"1" : (char *)"0", (unsigned int )*((unsigned char *)(& ns) + 2UL) != 0U ? (char *)"1" : (char *)"0"); pbp = pbp + (unsigned long )tmp___20; } else { } if ((int )ns.ldv_33381.aftr_isp != (int )os.ldv_33381.aftr_isp) { tmp___21 = sprintf(pbp, "aftr_isp( %s -> %s ) ", (unsigned int )*((unsigned char *)(& os) + 2UL) != 0U ? (char *)"1" : (char *)"0", (unsigned int )*((unsigned char *)(& ns) + 2UL) != 0U ? (char *)"1" : (char *)"0"); pbp = pbp + (unsigned long )tmp___21; } else { } if ((int )ns.ldv_33381.peer_isp != (int )os.ldv_33381.peer_isp) { tmp___22 = sprintf(pbp, "peer_isp( %s -> %s ) ", (unsigned int )*((unsigned char *)(& os) + 2UL) != 0U ? (char *)"1" : (char *)"0", (unsigned int )*((unsigned char *)(& ns) + 2UL) != 0U ? (char *)"1" : (char *)"0"); pbp = pbp + (unsigned long )tmp___22; } else { } if ((int )ns.ldv_33381.user_isp != (int )os.ldv_33381.user_isp) { tmp___23 = sprintf(pbp, "user_isp( %s -> %s ) ", (unsigned int )*((unsigned char *)(& os) + 2UL) != 0U ? (char *)"1" : (char *)"0", (unsigned int )*((unsigned char *)(& ns) + 2UL) != 0U ? (char *)"1" : (char *)"0"); pbp = pbp + (unsigned long )tmp___23; } else { } tmp___24 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___25 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: %s\n", tmp___25, tmp___24, (char *)(& pb)); if (((unsigned int )*((unsigned char *)(& ns) + 1UL) == 0U && (unsigned int )*((unsigned short *)(& ns) + 0UL) == 0U) && (unsigned int )*((unsigned char *)(& ns) + 0UL) == 2U) { tmp___26 = test_and_set_bit(22, (unsigned long volatile *)(& mdev->flags)); if (tmp___26 == 0) { set_bit(23U, (unsigned long volatile *)(& mdev->flags)); } else { } } else { } mdev->state.i = ns.i; __wake_up(& mdev->misc_wait, 3U, 1, 0); __wake_up(& mdev->state_wait, 3U, 1, 0); if ((int )os.ldv_33381.conn > 15 && (int )ns.ldv_33381.conn <= 10) { set_bit(3U, (unsigned long volatile *)(& mdev->flags)); mod_timer(& mdev->resync_timer, jiffies); } else { } if (((unsigned int )*((unsigned short *)(& os) + 0UL) == 288U || (unsigned int )*((unsigned short *)(& os) + 0UL) == 304U) && (int )ns.ldv_33381.conn <= 9) { mdev->ov_start_sector = (mdev->rs_total - mdev->ov_left) << 3; tmp___27 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___28 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Online Verify reached sector %llu\n", tmp___28, tmp___27, (unsigned long long )mdev->ov_start_sector); } else { } if (((unsigned int )*((unsigned short *)(& os) + 0UL) == 336U || (unsigned int )*((unsigned short *)(& os) + 0UL) == 320U) && ((unsigned int )*((unsigned short *)(& ns) + 0UL) == 272U || (unsigned int )*((unsigned short *)(& ns) + 0UL) == 256U)) { tmp___29 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___30 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Syncer continues.\n", tmp___30, tmp___29); mdev->rs_paused = mdev->rs_paused + (unsigned long )((long )jiffies - (long )mdev->rs_mark_time); if ((unsigned int )*((unsigned short *)(& ns) + 0UL) == 272U) { tmp___31 = test_and_clear_bit(3, (unsigned long volatile *)(& mdev->flags)); if (tmp___31 == 0) { mod_timer(& mdev->resync_timer, jiffies); } else { } } else { } } else { } if (((unsigned int )*((unsigned short *)(& os) + 0UL) == 272U || (unsigned int )*((unsigned short *)(& os) + 0UL) == 256U) && ((unsigned int )*((unsigned short *)(& ns) + 0UL) == 336U || (unsigned int )*((unsigned short *)(& ns) + 0UL) == 320U)) { tmp___32 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___33 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Resync suspended\n", tmp___33, tmp___32); mdev->rs_mark_time = jiffies; if ((unsigned int )*((unsigned short *)(& ns) + 0UL) == 336U) { set_bit(3U, (unsigned long volatile *)(& mdev->flags)); } else { } } else { } if ((unsigned int )*((unsigned short *)(& os) + 0UL) == 160U && ((unsigned int )*((unsigned short *)(& ns) + 0UL) == 288U || (unsigned int )*((unsigned short *)(& ns) + 0UL) == 304U)) { mdev->ov_position = 0UL; tmp___34 = drbd_bm_bits(mdev); mdev->rs_mark_left = tmp___34; mdev->rs_total = tmp___34; if (mdev->agreed_pro_version > 89) { set_ov_position(mdev, (enum drbd_conns )ns.ldv_33381.conn); } else { mdev->ov_start_sector = 0UL; } mdev->ov_left = mdev->rs_total - (mdev->ov_position >> 3); tmp___35 = jiffies; mdev->rs_mark_time = tmp___35; mdev->rs_start = tmp___35; mdev->ov_last_oos_size = 0UL; mdev->ov_last_oos_start = 0UL; if ((unsigned int )*((unsigned short *)(& ns) + 0UL) == 288U) { tmp___36 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___37 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Starting Online Verify from sector %llu\n", tmp___37, tmp___36, (unsigned long long )mdev->ov_position); mod_timer(& mdev->resync_timer, jiffies); } else { } } else { } tmp___39 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___39 != 0) { mdf = (mdev->ldev)->md.flags & 4294967176U; tmp___38 = constant_test_bit(12U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___38 != 0) { mdf = mdf | 64U; } else { } if ((unsigned int )*((unsigned char *)mdev + 1988UL) == 1U || ((int )mdev->state.ldv_33381.pdsk <= 3 && (unsigned int )*((unsigned char *)mdev + 1988UL) == 4U)) { mdf = mdf | 2U; } else { } if ((int )mdev->state.ldv_33381.conn > 9) { mdf = mdf | 4U; } else { } if ((int )mdev->state.ldv_33381.disk > 4) { mdf = mdf | 1U; } else { } if ((int )mdev->state.ldv_33381.disk > 5) { mdf = mdf | 16U; } else { } if ((int )mdev->state.ldv_33381.pdsk <= 5 && (int )mdev->state.ldv_33381.pdsk > 3) { mdf = mdf | 32U; } else { } if ((mdev->ldev)->md.flags != mdf) { (mdev->ldev)->md.flags = mdf; drbd_md_mark_dirty(mdev); } else { } if ((int )os.ldv_33381.disk <= 6 && (int )ns.ldv_33381.disk > 6) { drbd_set_ed_uuid(mdev, (mdev->ldev)->md.uuid[0]); } else { } put_ldev(mdev); } else { } if ((((unsigned int )*((unsigned char *)(& os) + 1UL) == 8U && *((unsigned int *)(& os) + 0UL) == 32768U) && (unsigned int )*((unsigned char *)(& os) + 0UL) == 8U) && (unsigned int )*((unsigned char *)(& ns) + 0UL) == 4U) { set_bit(15U, (unsigned long volatile *)(& mdev->flags)); } else { } if ((unsigned int )*((unsigned short *)(& os) + 0UL) != 16U && (unsigned int )*((unsigned short *)(& ns) + 0UL) == 16U) { drbd_thread_stop_nowait(& mdev->receiver); } else { } if ((unsigned int )*((unsigned short *)(& os) + 0UL) != 0U && (unsigned int )*((unsigned short *)(& ns) + 0UL) == 0U) { drbd_thread_stop_nowait(& mdev->receiver); } else { } if (((int )os.ldv_33381.conn > 7 && (int )ns.ldv_33381.conn <= 7) && (int )ns.ldv_33381.conn > 2) { drbd_thread_restart_nowait(& mdev->receiver); } else { } tmp___40 = kmalloc___4(48UL, 32U); ascw = (struct after_state_chg_work *)tmp___40; if ((unsigned long )ascw != (unsigned long )((struct after_state_chg_work *)0)) { ascw->os = os; ascw->ns = ns; ascw->flags = flags; ascw->w.cb = & w_after_state_ch; ascw->done = done; drbd_queue_work(& mdev->data.work, & ascw->w); } else { tmp___41 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___42 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Could not kmalloc an ascw\n", tmp___42, tmp___41); } return (rv); } } static int w_after_state_ch(struct drbd_conf *mdev , struct drbd_work *w , int unused ) { struct after_state_chg_work *ascw ; struct drbd_work const *__mptr ; char const *tmp ; char const *tmp___0 ; { __mptr = (struct drbd_work const *)w; ascw = (struct after_state_chg_work *)__mptr; after_state_ch(mdev, ascw->os, ascw->ns, ascw->flags); if (((unsigned int )ascw->flags & 4U) != 0U) { if ((unsigned long )ascw->done == (unsigned long )((struct completion *)0)) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( ascw->done != NULL ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 1170); } else { } complete(ascw->done); } else { } kfree((void const *)ascw); return (1); } } static void abw_start_sync(struct drbd_conf *mdev , int rv ) { char const *tmp ; char const *tmp___0 ; union drbd_state val ; union drbd_state mask ; union drbd_state val___0 ; union drbd_state mask___0 ; { if (rv != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Writing the bitmap failed not starting resync.\n", tmp___0, tmp); val.i = 0U; val.ldv_33381.conn = 10U; mask.i = 0U; mask.ldv_33381.conn = 31U; _drbd_request_state(mdev, mask, val, CS_VERBOSE); return; } else { } switch ((int )mdev->state.ldv_33381.conn) { case 12: val___0.i = 0U; val___0.ldv_33381.conn = 15U; mask___0.i = 0U; mask___0.ldv_33381.conn = 31U; _drbd_request_state(mdev, mask___0, val___0, CS_VERBOSE); goto ldv_43347; case 11: drbd_start_resync(mdev, C_SYNC_SOURCE); goto ldv_43347; } ldv_43347: ; return; } } static void after_state_ch(struct drbd_conf *mdev , union drbd_state os , union drbd_state ns , enum chg_state_flags flags ) { enum drbd_fencing_p fp ; int tmp ; union drbd_state __ns ; int tmp___0 ; int tmp___1 ; enum drbd_io_error_p eh ; int tmp___2 ; int tmp___3 ; wait_queue_t __wait ; struct task_struct *tmp___4 ; int tmp___5 ; union drbd_state __ns___0 ; char const *tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; int tmp___10 ; int tmp___11 ; wait_queue_t __wait___0 ; struct task_struct *tmp___12 ; int tmp___13 ; int tmp___14 ; int tmp___15 ; { if ((unsigned int )*((unsigned short *)(& os) + 0UL) != 160U && (unsigned int )*((unsigned short *)(& ns) + 0UL) == 160U) { clear_bit(12, (unsigned long volatile *)(& mdev->flags)); if ((unsigned long )mdev->p_uuid != (unsigned long )((u64 *)0)) { *(mdev->p_uuid + 5UL) = *(mdev->p_uuid + 5UL) & 0xfffffffffffffffdULL; } else { } } else { } fp = FP_DONT_CARE; tmp = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp != 0) { fp = (enum drbd_fencing_p )(mdev->ldev)->dc.fencing; put_ldev(mdev); } else { } drbd_bcast_state(mdev, ns); if ((((unsigned int )*((unsigned char *)(& os) + 0UL) != 1U || (int )os.ldv_33381.disk > 7) || (int )os.ldv_33381.pdsk > 7) && (((unsigned int )*((unsigned char *)(& ns) + 0UL) == 1U && (int )ns.ldv_33381.disk <= 7) && (int )ns.ldv_33381.pdsk <= 7)) { drbd_khelper(mdev, (char *)"pri-on-incon-degr"); } else { } if ((unsigned int )fp == 2U && (unsigned int )*((unsigned char *)(& ns) + 2UL) != 0U) { if (((int )os.ldv_33381.pdsk > 5 && (int )ns.ldv_33381.pdsk <= 5) || ((int )os.ldv_33381.conn <= 9 && (int )ns.ldv_33381.conn > 9)) { tl_clear(mdev); spin_lock_irq(& mdev->req_lock); __ns.i = mdev->state.i; __ns.ldv_33381.susp = 0U; _drbd_set_state(mdev, __ns, CS_VERBOSE, 0); spin_unlock_irq(& mdev->req_lock); } else { } } else { } if (*((unsigned int *)(& os) + 0UL) == 0U && (int )ns.ldv_33381.pdsk > 0) { drbd_send_uuids(mdev); drbd_send_state(mdev); } else { } if ((unsigned int )*((unsigned short *)(& os) + 0UL) != 208U && (unsigned int )*((unsigned short *)(& ns) + 0UL) == 208U) { drbd_queue_bitmap_io(mdev, & drbd_send_bitmap, 0, (char *)"send_bitmap (WFBitMapS)"); } else { } if ((((int )os.ldv_33381.pdsk > 3 && *((unsigned int *)(& os) + 0UL) != 49152U) && *((unsigned int *)(& os) + 0UL) != 40960U) && (((int )ns.ldv_33381.pdsk <= 3 || *((unsigned int *)(& ns) + 0UL) == 49152U) || *((unsigned int *)(& ns) + 0UL) == 40960U)) { kfree((void const *)mdev->p_uuid); mdev->p_uuid = 0; tmp___0 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___0 != 0) { if ((((unsigned int )*((unsigned char *)(& ns) + 0UL) == 1U || (unsigned int )*((unsigned char *)(& ns) + 0UL) == 4U) && (mdev->ldev)->md.uuid[1] == 0ULL) && (int )ns.ldv_33381.disk > 7) { atomic_set(& mdev->new_c_uuid, 2); } else { } put_ldev(mdev); } else { } } else { } if ((int )ns.ldv_33381.pdsk <= 3) { tmp___1 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___1 != 0) { if ((unsigned int )*((unsigned char *)(& ns) + 0UL) == 4U && (mdev->ldev)->md.uuid[1] == 0ULL) { atomic_set(& mdev->new_c_uuid, 2); } else { } if ((unsigned int )*((unsigned char *)(& os) + 0UL) == 4U && (unsigned int )*((unsigned char *)(& ns) + 0UL) == 8U) { drbd_al_to_on_disk_bm(mdev); } else { } put_ldev(mdev); } else { } } else { } if (((int )ns.ldv_33381.conn > 9 && (unsigned int )*((unsigned char *)(& os) + 1UL) == 2U) && (unsigned int )*((unsigned char *)(& ns) + 1UL) == 6U) { kfree((void const *)mdev->p_uuid); mdev->p_uuid = 0; drbd_send_sizes(mdev, 0, 0); drbd_send_uuids(mdev); drbd_send_state(mdev); } else { } if ((int )ns.ldv_33381.conn > 9 && ((int )os.ldv_33381.aftr_isp != (int )ns.ldv_33381.aftr_isp || (int )os.ldv_33381.user_isp != (int )ns.ldv_33381.user_isp)) { drbd_send_state(mdev); } else { } if ((((unsigned int )*((unsigned char *)(& os) + 2UL) == 0U && (unsigned int )*((unsigned char *)(& os) + 2UL) == 0U) && (unsigned int )*((unsigned char *)(& os) + 2UL) == 0U) && (((unsigned int )*((unsigned char *)(& ns) + 2UL) != 0U || (unsigned int )*((unsigned char *)(& ns) + 2UL) != 0U) || (unsigned int )*((unsigned char *)(& ns) + 2UL) != 0U)) { suspend_other_sg(mdev); } else { } if ((unsigned int )*((unsigned short *)(& os) + 0UL) == 144U && (int )ns.ldv_33381.conn > 9) { drbd_send_state(mdev); } else { } if (((unsigned int )*((unsigned short *)(& os) + 0UL) != 192U && (unsigned int )*((unsigned short *)(& ns) + 0UL) == 192U) || ((unsigned int )*((unsigned short *)(& os) + 0UL) != 176U && (unsigned int )*((unsigned short *)(& ns) + 0UL) == 176U)) { drbd_queue_bitmap_io(mdev, & drbd_bmio_set_n_write, & abw_start_sync, (char *)"set_n_write from StartingSync"); } else { } if ((((int )os.ldv_33381.conn <= 9 && (int )ns.ldv_33381.conn <= 9) && (int )os.ldv_33381.disk > 4) && (unsigned int )*((unsigned char *)(& ns) + 1UL) == 8U) { drbd_queue_bitmap_io(mdev, & drbd_bmio_set_n_write, 0, (char *)"set_n_write from invalidate"); } else { } if ((int )os.ldv_33381.disk > 2 && (unsigned int )*((unsigned char *)(& ns) + 1UL) == 4U) { eh = EP_PASS_ON; tmp___2 = _get_ldev_if_state(mdev, D_FAILED); if (tmp___2 != 0) { eh = (enum drbd_io_error_p )(mdev->ldev)->dc.on_io_error; put_ldev(mdev); } else { } drbd_rs_cancel_all(mdev); tmp___3 = atomic_read((atomic_t const *)(& mdev->local_cnt)); if (tmp___3 == 0) { goto ldv_43359; } else { } tmp___4 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___4; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_43362: prepare_to_wait(& mdev->misc_wait, & __wait, 2); tmp___5 = atomic_read((atomic_t const *)(& mdev->local_cnt)); if (tmp___5 == 0) { goto ldv_43361; } else { } schedule(); goto ldv_43362; ldv_43361: finish_wait(& mdev->misc_wait, & __wait); ldv_43359: mdev->rs_total = 0UL; mdev->rs_failed = 0UL; atomic_set(& mdev->rs_pending_cnt, 0); spin_lock_irq(& mdev->req_lock); __ns___0.i = mdev->state.i; __ns___0.ldv_33381.disk = 0U; _drbd_set_state(mdev, __ns___0, CS_HARD, 0); spin_unlock_irq(& mdev->req_lock); if ((unsigned int )eh == 1U) { drbd_khelper(mdev, (char *)"local-io-error"); } else { } } else { } if ((int )os.ldv_33381.disk > 0 && (unsigned int )*((unsigned char *)(& ns) + 1UL) == 0U) { if ((unsigned int )*((unsigned char *)(& os) + 1UL) == 4U) { tmp___10 = drbd_send_state(mdev); if (tmp___10 != 0) { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Notified peer that my disk is broken.\n", tmp___7, tmp___6); } else { tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Sending state in drbd_io_error() failed\n", tmp___9, tmp___8); } } else { } tmp___11 = atomic_read((atomic_t const *)(& mdev->local_cnt)); if (tmp___11 == 0) { goto ldv_43365; } else { } tmp___12 = get_current(); __wait___0.flags = 0U; __wait___0.private = (void *)tmp___12; __wait___0.func = & autoremove_wake_function; __wait___0.task_list.next = & __wait___0.task_list; __wait___0.task_list.prev = & __wait___0.task_list; ldv_43368: prepare_to_wait(& mdev->misc_wait, & __wait___0, 2); tmp___13 = atomic_read((atomic_t const *)(& mdev->local_cnt)); if (tmp___13 == 0) { goto ldv_43367; } else { } schedule(); goto ldv_43368; ldv_43367: finish_wait(& mdev->misc_wait, & __wait___0); ldv_43365: lc_destroy(mdev->resync); mdev->resync = 0; lc_destroy(mdev->act_log); mdev->act_log = 0; drbd_free_bc(mdev->ldev); mdev->ldev = 0; if ((unsigned long )mdev->md_io_tmpp != (unsigned long )((struct page *)0)) { __free_pages(mdev->md_io_tmpp, 0U); } else { } } else { } if ((int )ns.ldv_33381.disk > 3 && (int )ns.ldv_33381.pdsk > 3) { tmp___14 = test_and_clear_bit(20, (unsigned long volatile *)(& mdev->flags)); if (tmp___14 != 0) { if ((unsigned int )*((unsigned short *)(& ns) + 0UL) == 160U) { resync_after_online_grow(mdev); } else { } } else { } } else { } if ((((int )os.ldv_33381.conn > 10 && (int )ns.ldv_33381.conn <= 10) || ((unsigned int )*((unsigned char *)(& os) + 2UL) != 0U && (unsigned int )*((unsigned char *)(& ns) + 2UL) == 0U)) || ((unsigned int )*((unsigned char *)(& os) + 2UL) != 0U && (unsigned int )*((unsigned char *)(& ns) + 2UL) == 0U)) { resume_next_sg(mdev); } else { } if ((unsigned int )*((unsigned short *)(& os) + 0UL) == 0U && (unsigned int )*((unsigned short *)(& ns) + 0UL) == 32U) { drbd_thread_start(& mdev->receiver); } else { } if (((unsigned int )*((unsigned char *)(& ns) + 1UL) == 0U && (unsigned int )*((unsigned short *)(& ns) + 0UL) == 0U) && (unsigned int )*((unsigned char *)(& ns) + 0UL) == 2U) { if ((int )os.ldv_33381.aftr_isp != (int )ns.ldv_33381.aftr_isp) { resume_next_sg(mdev); } else { } tmp___15 = constant_test_bit(23U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___15 != 0) { drbd_thread_stop_nowait(& mdev->worker); } else { } } else { } drbd_md_sync(mdev); return; } } static int w_new_current_uuid(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { int tmp ; { tmp = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp != 0) { drbd_uuid_new_current(mdev); drbd_send_uuids(mdev); drbd_md_sync(mdev); put_ldev(mdev); } else { } atomic_dec(& mdev->new_c_uuid); __wake_up(& mdev->misc_wait, 3U, 1, 0); return (1); } } static int drbd_thread_setup(void *arg ) { struct drbd_thread *thi ; struct drbd_conf *mdev ; unsigned long flags ; int retval ; raw_spinlock_t *tmp ; struct task_struct *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; struct task_struct *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; { thi = (struct drbd_thread *)arg; mdev = thi->mdev; restart: retval = (*(thi->function))(thi); tmp = spinlock_check(& thi->t_lock); flags = _raw_spin_lock_irqsave(tmp); if ((unsigned int )thi->t_state == 3U) { tmp___0 = get_current(); tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Restarting %s\n", tmp___2, tmp___1, (char *)(& tmp___0->comm)); thi->t_state = Running; spin_unlock_irqrestore(& thi->t_lock, flags); goto restart; } else { } thi->task = 0; thi->t_state = None; __asm__ volatile ("mfence": : : "memory"); complete(& thi->stop); spin_unlock_irqrestore(& thi->t_lock, flags); tmp___3 = get_current(); tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Terminating %s\n", tmp___5, tmp___4, (char *)(& tmp___3->comm)); module_put(& __this_module); return (retval); } } static void drbd_thread_init(struct drbd_conf *mdev , struct drbd_thread *thi , int (*func)(struct drbd_thread * ) ) { struct lock_class_key __key ; { spinlock_check(& thi->t_lock); __raw_spin_lock_init(& thi->t_lock.ldv_5575.rlock, "&(&thi->t_lock)->rlock", & __key); thi->task = 0; thi->t_state = None; thi->function = func; thi->mdev = mdev; return; } } int drbd_thread_start(struct drbd_thread *thi ) { struct drbd_conf *mdev ; struct task_struct *nt ; unsigned long flags ; char const *me ; raw_spinlock_t *tmp ; struct task_struct *tmp___0 ; struct task_struct *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; int tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; struct task_struct *tmp___9 ; unsigned int tmp___10 ; char const *tmp___11 ; char const *tmp___12 ; long tmp___13 ; raw_spinlock_t *tmp___14 ; struct task_struct *tmp___15 ; struct task_struct *tmp___16 ; char const *tmp___17 ; char const *tmp___18 ; { mdev = thi->mdev; me = (unsigned long )(& mdev->receiver) != (unsigned long )thi ? ((unsigned long )(& mdev->asender) != (unsigned long )thi ? ((unsigned long )(& mdev->worker) == (unsigned long )thi ? "worker" : "NONSENSE") : "asender") : "receiver"; tmp = spinlock_check(& thi->t_lock); flags = _raw_spin_lock_irqsave(tmp); switch ((unsigned int )thi->t_state) { case 0U: tmp___0 = get_current(); tmp___1 = get_current(); tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Starting %s thread (from %s [%d])\n", tmp___3, tmp___2, me, (char *)(& tmp___1->comm), tmp___0->pid); tmp___6 = try_module_get(& __this_module); if (tmp___6 == 0) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Failed to get module reference in drbd_thread_start\n", tmp___5, tmp___4); spin_unlock_irqrestore(& thi->t_lock, flags); return (0); } else { } init_completion(& thi->stop); if ((unsigned long )thi->task != (unsigned long )((struct task_struct *)0)) { tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( thi->task == NULL ) in %s:%d\n", tmp___8, tmp___7, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 1487); } else { } thi->reset_cpu_mask = 1; thi->t_state = Running; spin_unlock_irqrestore(& thi->t_lock, flags); tmp___9 = get_current(); flush_signals(tmp___9); tmp___10 = mdev_to_minor(mdev); nt = kthread_create(& drbd_thread_setup, (void *)thi, "drbd%d_%s", tmp___10, me); tmp___13 = IS_ERR((void const *)nt); if (tmp___13 != 0L) { tmp___11 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___12 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Couldn\'t start thread\n", tmp___12, tmp___11); module_put(& __this_module); return (0); } else { } tmp___14 = spinlock_check(& thi->t_lock); flags = _raw_spin_lock_irqsave(tmp___14); thi->task = nt; thi->t_state = Running; spin_unlock_irqrestore(& thi->t_lock, flags); wake_up_process(nt); goto ldv_43406; case 2U: thi->t_state = Restarting; tmp___15 = get_current(); tmp___16 = get_current(); tmp___17 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___18 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Restarting %s thread (from %s [%d])\n", tmp___18, tmp___17, me, (char *)(& tmp___16->comm), tmp___15->pid); case 1U: ; case 3U: ; default: spin_unlock_irqrestore(& thi->t_lock, flags); goto ldv_43406; } ldv_43406: ; return (1); } } void _drbd_thread_stop(struct drbd_thread *thi , int restart , int wait ) { unsigned long flags ; enum drbd_thread_state ns ; raw_spinlock_t *tmp ; struct task_struct *tmp___0 ; { ns = restart != 0 ? Restarting : Exiting; tmp = spinlock_check(& thi->t_lock); flags = _raw_spin_lock_irqsave(tmp); if ((unsigned int )thi->t_state == 0U) { spin_unlock_irqrestore(& thi->t_lock, flags); if (restart != 0) { drbd_thread_start(thi); } else { } return; } else { } if ((unsigned int )thi->t_state != (unsigned int )ns) { if ((unsigned long )thi->task == (unsigned long )((struct task_struct *)0)) { spin_unlock_irqrestore(& thi->t_lock, flags); return; } else { } thi->t_state = ns; __asm__ volatile ("mfence": : : "memory"); init_completion(& thi->stop); tmp___0 = get_current(); if ((unsigned long )thi->task != (unsigned long )tmp___0) { force_sig(1, thi->task); } else { } } else { } spin_unlock_irqrestore(& thi->t_lock, flags); if (wait != 0) { wait_for_completion(& thi->stop); } else { } return; } } void drbd_calc_cpu_mask(struct drbd_conf *mdev ) { int ord ; int cpu ; unsigned int tmp ; unsigned int tmp___0 ; unsigned int tmp___1 ; int tmp___2 ; unsigned int tmp___3 ; { tmp = cpumask_weight((struct cpumask const *)mdev->cpu_mask); if (tmp != 0U) { return; } else { } tmp___0 = mdev_to_minor(mdev); tmp___1 = cpumask_weight(cpu_online_mask); ord = (int )(tmp___0 % tmp___1); cpu = -1; goto ldv_43427; ldv_43426: tmp___2 = ord; ord = ord - 1; if (tmp___2 == 0) { cpumask_set_cpu((unsigned int )cpu, mdev->cpu_mask); return; } else { } ldv_43427: tmp___3 = cpumask_next(cpu, cpu_online_mask); cpu = (int )tmp___3; if (cpu < nr_cpu_ids) { goto ldv_43426; } else { } cpumask_setall(mdev->cpu_mask); return; } } void drbd_thread_current_set_cpu(struct drbd_conf *mdev ) { struct task_struct *p ; struct task_struct *tmp ; struct drbd_thread *thi ; int _b ; char const *tmp___0 ; char const *tmp___1 ; { tmp = get_current(); p = tmp; thi = (unsigned long )mdev->asender.task == (unsigned long )p ? & mdev->asender : ((unsigned long )mdev->receiver.task == (unsigned long )p ? & mdev->receiver : ((unsigned long )mdev->worker.task == (unsigned long )p ? & mdev->worker : 0)); _b = (unsigned long )thi == (unsigned long )((struct drbd_thread *)0); if (_b != 0) { tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___1, tmp___0, "drbd_thread_current_set_cpu", (char *)"thi == NULL", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 1602); } else { } if (_b != 0) { return; } else { } if (thi->reset_cpu_mask == 0) { return; } else { } thi->reset_cpu_mask = 0; set_cpus_allowed_ptr(p, (struct cpumask const *)mdev->cpu_mask); return; } } int _drbd_send_cmd(struct drbd_conf *mdev , struct socket *sock , enum drbd_packets cmd , struct p_header *h , size_t size , unsigned int msg_flags ) { int sent ; int ok ; int _b ; char const *tmp ; char const *tmp___0 ; int _b___0 ; char const *tmp___1 ; char const *tmp___2 ; __u16 tmp___3 ; __u16 tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; { _b = (unsigned long )h == (unsigned long )((struct p_header *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "_drbd_send_cmd", (char *)"!h", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 1618); } else { } if (_b != 0) { return (0); } else { } _b___0 = size == 0UL; if (_b___0 != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___2, tmp___1, "_drbd_send_cmd", (char *)"!size", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 1619); } else { } if (_b___0 != 0) { return (0); } else { } h->magic = 1728214147U; tmp___3 = __fswab16((int )((__u16 )cmd)); h->command = tmp___3; tmp___4 = __fswab16((int )((unsigned int )((__u16 )size) - 8U)); h->length = tmp___4; sent = drbd_send(mdev, sock, (void *)h, size, msg_flags); ok = (size_t )sent == size; if (ok == 0) { tmp___5 = cmdname(cmd); tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: short sent %s size=%d sent=%d\n", tmp___7, tmp___6, tmp___5, (int )size, sent); } else { } return (ok); } } int drbd_send_cmd(struct drbd_conf *mdev , int use_data_socket , enum drbd_packets cmd , struct p_header *h , size_t size ) { int ok ; struct socket *sock ; long tmp ; { ok = 0; if (use_data_socket != 0) { ldv_mutex_lock_90(& mdev->data.mutex); sock = mdev->data.socket; } else { ldv_mutex_lock_91(& mdev->meta.mutex); sock = mdev->meta.socket; } tmp = ldv__builtin_expect((unsigned long )sock != (unsigned long )((struct socket *)0), 1L); if (tmp != 0L) { ok = _drbd_send_cmd(mdev, sock, cmd, h, size, 0U); } else { } if (use_data_socket != 0) { ldv_mutex_unlock_92(& mdev->data.mutex); } else { ldv_mutex_unlock_93(& mdev->meta.mutex); } return (ok); } } int drbd_send_cmd2(struct drbd_conf *mdev , enum drbd_packets cmd , char *data , size_t size ) { struct p_header h ; int ok ; __u16 tmp ; __u16 tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; { h.magic = 1728214147U; tmp = __fswab16((int )((__u16 )cmd)); h.command = tmp; tmp___0 = __fswab16((int )((__u16 )size)); h.length = tmp___0; tmp___1 = drbd_get_data_sock___0(mdev); if (tmp___1 == 0) { return (0); } else { } tmp___2 = drbd_send(mdev, mdev->data.socket, (void *)(& h), 8UL, 0U); ok = tmp___2 == 8; if (ok != 0) { tmp___3 = drbd_send(mdev, mdev->data.socket, (void *)data, size, 0U); if ((size_t )tmp___3 == size) { tmp___4 = 1; } else { tmp___4 = 0; } } else { tmp___4 = 0; } ok = tmp___4; drbd_put_data_sock___0(mdev); return (ok); } } int drbd_send_sync_param(struct drbd_conf *mdev , struct syncer_conf *sc ) { struct p_rs_param_89 *p ; struct socket *sock ; int size ; int rv ; int apv ; size_t tmp ; int tmp___0 ; enum drbd_packets cmd ; __u32 tmp___1 ; long tmp___2 ; { apv = mdev->agreed_pro_version; if (apv > 87) { if (apv == 88) { tmp = strlen((char const *)(& mdev->sync_conf.verify_alg)); tmp___0 = (int )((unsigned int )tmp + 13U); } else { tmp___0 = 140; } size = tmp___0; } else { size = 12; } ldv_mutex_lock_94(& mdev->data.mutex); sock = mdev->data.socket; tmp___2 = ldv__builtin_expect((unsigned long )sock != (unsigned long )((struct socket *)0), 1L); if (tmp___2 != 0L) { cmd = apv > 88 ? P_SYNC_PARAM89 : P_SYNC_PARAM; p = & mdev->data.sbuf.rs_param_89; memset((void *)(& p->verify_alg), 0, 128UL); tmp___1 = __fswab32((__u32 )sc->rate); p->rate = tmp___1; if (apv > 87) { strcpy((char *)(& p->verify_alg), (char const *)(& mdev->sync_conf.verify_alg)); } else { } if (apv > 88) { strcpy((char *)(& p->csums_alg), (char const *)(& mdev->sync_conf.csums_alg)); } else { } rv = _drbd_send_cmd(mdev, sock, cmd, & p->head, (size_t )size, 0U); } else { rv = 0; } ldv_mutex_unlock_95(& mdev->data.mutex); return (rv); } } int drbd_send_protocol(struct drbd_conf *mdev ) { struct p_protocol *p ; int size ; int cf ; int rv ; size_t tmp ; void *tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; __u32 tmp___4 ; __u32 tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; __u32 tmp___8 ; { size = 32; if (mdev->agreed_pro_version > 86) { tmp = strlen((char const *)(& (mdev->net_conf)->integrity_alg)); size = (int )(((unsigned int )tmp + (unsigned int )size) + 1U); } else { } tmp___0 = kmalloc___4((size_t )size, 16U); p = (struct p_protocol *)tmp___0; if ((unsigned long )p == (unsigned long )((struct p_protocol *)0)) { return (0); } else { } tmp___1 = __fswab32((__u32 )(mdev->net_conf)->wire_protocol); p->protocol = tmp___1; tmp___2 = __fswab32((__u32 )(mdev->net_conf)->after_sb_0p); p->after_sb_0p = tmp___2; tmp___3 = __fswab32((__u32 )(mdev->net_conf)->after_sb_1p); p->after_sb_1p = tmp___3; tmp___4 = __fswab32((__u32 )(mdev->net_conf)->after_sb_2p); p->after_sb_2p = tmp___4; tmp___5 = __fswab32((__u32 )(mdev->net_conf)->two_primaries); p->two_primaries = tmp___5; cf = 0; if ((unsigned int )*((unsigned char *)mdev->net_conf + 528UL) != 0U) { cf = cf | 1; } else { } if ((unsigned int )*((unsigned char *)mdev->net_conf + 528UL) != 0U) { if (mdev->agreed_pro_version > 91) { cf = cf | 2; } else { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: --dry-run is not supported by peer", tmp___7, tmp___6); kfree((void const *)p); return (0); } } else { } tmp___8 = __fswab32((__u32 )cf); p->conn_flags = tmp___8; if (mdev->agreed_pro_version > 86) { strcpy((char *)(& p->integrity_alg), (char const *)(& (mdev->net_conf)->integrity_alg)); } else { } rv = drbd_send_cmd(mdev, 1, P_PROTOCOL, (struct p_header *)p, (size_t )size); kfree((void const *)p); return (rv); } } int _drbd_send_uuids(struct drbd_conf *mdev , u64 uuid_flags ) { struct p_uuids p ; int i ; int tmp ; __u64 tmp___0 ; __u64 tmp___1 ; int tmp___2 ; __u64 tmp___3 ; int tmp___4 ; { tmp = _get_ldev_if_state(mdev, D_NEGOTIATING); if (tmp == 0) { return (1); } else { } i = 0; goto ldv_43493; ldv_43492: ; if ((unsigned long )mdev->ldev != (unsigned long )((struct drbd_backing_dev *)0)) { tmp___0 = __fswab64((mdev->ldev)->md.uuid[i]); p.uuid[i] = tmp___0; } else { p.uuid[i] = 0ULL; } i = i + 1; ldv_43493: ; if (i <= 3) { goto ldv_43492; } else { } mdev->comm_bm_set = drbd_bm_total_weight(mdev); tmp___1 = __fswab64((__u64 )mdev->comm_bm_set); p.uuid[4] = tmp___1; uuid_flags = ((unsigned int )*((unsigned char *)mdev->net_conf + 528UL) != 0U ? 1ULL : 0ULL) | uuid_flags; tmp___2 = constant_test_bit(12U, (unsigned long const volatile *)(& mdev->flags)); uuid_flags = (tmp___2 != 0 ? 2ULL : 0ULL) | uuid_flags; uuid_flags = ((unsigned int )*((unsigned char *)mdev + 1985UL) == 8U ? 4ULL : 0ULL) | uuid_flags; tmp___3 = __fswab64(uuid_flags); p.uuid[5] = tmp___3; put_ldev(mdev); tmp___4 = drbd_send_cmd(mdev, 1, P_UUIDS, (struct p_header *)(& p), 56UL); return (tmp___4); } } int drbd_send_uuids(struct drbd_conf *mdev ) { int tmp ; { tmp = _drbd_send_uuids(mdev, 0ULL); return (tmp); } } int drbd_send_uuids_skip_initial_sync(struct drbd_conf *mdev ) { int tmp ; { tmp = _drbd_send_uuids(mdev, 8ULL); return (tmp); } } int drbd_send_sync_uuid(struct drbd_conf *mdev , u64 val ) { struct p_rs_uuid p ; __u64 tmp ; int tmp___0 ; { tmp = __fswab64(val); p.uuid = tmp; tmp___0 = drbd_send_cmd(mdev, 1, P_SYNC_UUID, (struct p_header *)(& p), 16UL); return (tmp___0); } } int drbd_send_sizes(struct drbd_conf *mdev , int trigger_reply , enum dds_flags flags ) { struct p_sizes p ; sector_t d_size ; sector_t u_size ; int q_order_type ; int ok ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; __u64 tmp___2 ; __u64 tmp___3 ; sector_t tmp___4 ; __u64 tmp___5 ; __u64 tmp___6 ; unsigned int tmp___7 ; __u32 tmp___8 ; __u16 tmp___9 ; __u16 tmp___10 ; { tmp___1 = _get_ldev_if_state(mdev, D_NEGOTIATING); if (tmp___1 != 0) { if ((unsigned long )(mdev->ldev)->backing_bdev == (unsigned long )((struct block_device *)0)) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->ldev->backing_bdev ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 1826); } else { } d_size = drbd_get_max_capacity___0(mdev->ldev); u_size = (sector_t )(mdev->ldev)->dc.disk_size; q_order_type = drbd_queue_order_type(mdev); put_ldev(mdev); } else { d_size = 0UL; u_size = 0UL; q_order_type = 0; } tmp___2 = __fswab64((__u64 )d_size); p.d_size = tmp___2; tmp___3 = __fswab64((__u64 )u_size); p.u_size = tmp___3; if (trigger_reply == 0) { tmp___4 = drbd_get_capacity(mdev->this_bdev); tmp___5 = (__u64 )tmp___4; } else { tmp___5 = 0ULL; } tmp___6 = __fswab64(tmp___5); p.c_size = tmp___6; tmp___7 = queue_max_segment_size(mdev->rq_queue); tmp___8 = __fswab32(tmp___7); p.max_segment_size = tmp___8; tmp___9 = __fswab16((int )((__u16 )q_order_type)); p.queue_order_type = tmp___9; tmp___10 = __fswab16((int )((__u16 )flags)); p.dds_flags = tmp___10; ok = drbd_send_cmd(mdev, 1, P_SIZES, (struct p_header *)(& p), 40UL); return (ok); } } int drbd_send_state(struct drbd_conf *mdev ) { struct socket *sock ; struct p_state p ; int ok ; __u32 tmp ; long tmp___0 ; { ok = 0; drbd_state_lock___0(mdev); ldv_mutex_lock_96(& mdev->data.mutex); tmp = __fswab32(mdev->state.i); p.state = tmp; sock = mdev->data.socket; tmp___0 = ldv__builtin_expect((unsigned long )sock != (unsigned long )((struct socket *)0), 1L); if (tmp___0 != 0L) { ok = _drbd_send_cmd(mdev, sock, P_STATE, (struct p_header *)(& p), 12UL, 0U); } else { } ldv_mutex_unlock_97(& mdev->data.mutex); drbd_state_unlock(mdev); return (ok); } } int drbd_send_state_req(struct drbd_conf *mdev , union drbd_state mask , union drbd_state val ) { struct p_req_state p ; __u32 tmp ; __u32 tmp___0 ; int tmp___1 ; { tmp = __fswab32(mask.i); p.mask = tmp; tmp___0 = __fswab32(val.i); p.val = tmp___0; tmp___1 = drbd_send_cmd(mdev, 1, P_STATE_CHG_REQ, (struct p_header *)(& p), 16UL); return (tmp___1); } } int drbd_send_sr_reply(struct drbd_conf *mdev , int retcode ) { struct p_req_state_reply p ; __u32 tmp ; int tmp___0 ; { tmp = __fswab32((__u32 )retcode); p.retcode = tmp; tmp___0 = drbd_send_cmd(mdev, 0, P_STATE_CHG_REPLY, (struct p_header *)(& p), 12UL); return (tmp___0); } } int fill_bitmap_rle_bits(struct drbd_conf *mdev , struct p_compressed_bm *p , struct bm_xfer_ctx *c ) { struct bitstream bs ; unsigned long plain_bits ; unsigned long tmp ; unsigned long rl ; unsigned int len ; unsigned int toggle ; int bits ; unsigned long tmp___0 ; unsigned long tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; { if ((unsigned int )*((unsigned char *)mdev + 216UL) == 0U || mdev->agreed_pro_version <= 89) { return (0); } else { } if (c->bit_offset >= c->bm_bits) { return (0); } else { } bitstream_init(& bs, (void *)(& p->code), 4087UL, 0U); memset((void *)(& p->code), 0, 4087UL); plain_bits = 0UL; toggle = 2U; ldv_43547: ; if (toggle == 0U) { tmp___0 = _drbd_bm_find_next_zero(mdev, c->bit_offset); tmp = tmp___0; } else { tmp___1 = _drbd_bm_find_next(mdev, c->bit_offset); tmp = tmp___1; } if (tmp == 0xffffffffffffffffUL) { tmp = c->bm_bits; } else { } rl = tmp - c->bit_offset; if (toggle == 2U) { if (rl == 0UL) { DCBP_set_start(p, 1); toggle = toggle == 0U; goto ldv_43545; } else { } DCBP_set_start(p, 0); } else { } if (rl == 0UL) { tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: unexpected zero runlength while encoding bitmap t:%u bo:%lu\n", tmp___3, tmp___2, toggle, c->bit_offset); return (-1); } else { } bits = vli_encode_bits(& bs, (u64 )rl); if (bits == -105) { goto ldv_43546; } else { } if (bits <= 0) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: error while encoding bitmap: %d\n", tmp___5, tmp___4, bits); return (0); } else { } toggle = toggle == 0U; plain_bits = plain_bits + rl; c->bit_offset = tmp; ldv_43545: ; if (c->bit_offset < c->bm_bits) { goto ldv_43547; } else { } ldv_43546: len = ((unsigned int )((long )bs.cur.b) - (unsigned int )((long )(& p->code))) + (unsigned int )(bs.cur.bit != 0U); if ((unsigned long )(len << 3) > plain_bits) { c->bit_offset = c->bit_offset - plain_bits; bm_xfer_ctx_bit_to_word_offset(c); c->bit_offset = c->word_offset * 64UL; return (0); } else { } bm_xfer_ctx_bit_to_word_offset(c); DCBP_set_pad_bits(p, (int )(- bs.cur.bit) & 7); return ((int )len); } } enum ldv_29558 send_bitmap_rle_or_plain(struct drbd_conf *mdev , struct p_header *h , struct bm_xfer_ctx *c ) { struct p_compressed_bm *p ; unsigned long num_words ; int len ; int ok ; size_t __min1 ; size_t __min2 ; { p = (struct p_compressed_bm *)h; len = fill_bitmap_rle_bits(mdev, p, c); if (len < 0) { return (FAILED); } else { } if (len != 0) { DCBP_set_code(p, RLE_VLI_Bits); ok = _drbd_send_cmd(mdev, mdev->data.socket, P_COMPRESSED_BITMAP, h, (unsigned long )len + 9UL, 0U); c->packets[0] = c->packets[0] + 1U; c->bytes[0] = (c->bytes[0] + (unsigned int )len) + 9U; if (c->bit_offset >= c->bm_bits) { len = 0; } else { } } else { __min1 = 511UL; __min2 = c->bm_words - c->word_offset; num_words = __min1 < __min2 ? __min1 : __min2; len = (int )((unsigned int )num_words * 8U); if (len != 0) { drbd_bm_get_lel(mdev, c->word_offset, num_words, (unsigned long *)(& h->payload)); } else { } ok = _drbd_send_cmd(mdev, mdev->data.socket, P_BITMAP, h, (unsigned long )len + 8UL, 0U); c->word_offset = c->word_offset + num_words; c->bit_offset = c->word_offset * 64UL; c->packets[1] = c->packets[1] + 1U; c->bytes[1] = (c->bytes[1] + (unsigned int )len) + 8U; if (c->bit_offset > c->bm_bits) { c->bit_offset = c->bm_bits; } else { } } ok = ok != 0 ? (len == 0 ? 2 : 0) : 1; if (ok == 2) { INFO_bm_xfer_stats(mdev, "send", c); } else { } return ((enum ldv_29558 )ok); } } int _drbd_send_bitmap(struct drbd_conf *mdev ) { struct bm_xfer_ctx c ; struct p_header *p ; int ret ; int _b ; char const *tmp ; char const *tmp___0 ; unsigned long tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; int tmp___8 ; int tmp___9 ; int tmp___10 ; struct bm_xfer_ctx __constr_expr_0 ; unsigned long tmp___11 ; size_t tmp___12 ; enum ldv_29558 tmp___13 ; { _b = (unsigned long )mdev->bitmap == (unsigned long )((struct drbd_bitmap *)0); if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "_drbd_send_bitmap", (char *)"!mdev->bitmap", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 2051); } else { } if (_b != 0) { return (0); } else { } tmp___1 = __get_free_pages(16U, 0U); p = (struct p_header *)tmp___1; if ((unsigned long )p == (unsigned long )((struct p_header *)0)) { tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: failed to allocate one page buffer in %s\n", tmp___3, tmp___2, "_drbd_send_bitmap"); return (0); } else { } tmp___10 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___10 != 0) { tmp___9 = drbd_md_test_flag(mdev->ldev, 8); if (tmp___9 != 0) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Writing the whole bitmap, MDF_FullSync was set.\n", tmp___5, tmp___4); drbd_bm_set_all(mdev); tmp___8 = drbd_bm_write(mdev); if (tmp___8 != 0) { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Failed to write bitmap to disk!\n", tmp___7, tmp___6); } else { drbd_md_clear_flag(mdev, 8); drbd_md_sync(mdev); } } else { } put_ldev(mdev); } else { } tmp___11 = drbd_bm_bits(mdev); tmp___12 = drbd_bm_words(mdev); __constr_expr_0.bm_bits = tmp___11; __constr_expr_0.bm_words = tmp___12; __constr_expr_0.bit_offset = 0UL; __constr_expr_0.word_offset = 0UL; __constr_expr_0.packets[0] = 0U; __constr_expr_0.packets[1] = 0U; __constr_expr_0.bytes[0] = 0U; __constr_expr_0.bytes[1] = 0U; c = __constr_expr_0; ldv_43574: tmp___13 = send_bitmap_rle_or_plain(mdev, p, & c); ret = (int )tmp___13; if (ret == 0) { goto ldv_43574; } else { } free_pages((unsigned long )p, 0U); return (ret == 2); } } int drbd_send_bitmap(struct drbd_conf *mdev ) { int err ; int tmp ; int tmp___0 ; { tmp = drbd_get_data_sock___0(mdev); if (tmp == 0) { return (-1); } else { } tmp___0 = _drbd_send_bitmap(mdev); err = tmp___0 == 0; drbd_put_data_sock___0(mdev); return (err); } } int drbd_send_b_ack(struct drbd_conf *mdev , u32 barrier_nr , u32 set_size ) { int ok ; struct p_barrier_ack p ; __u32 tmp ; { p.barrier = barrier_nr; tmp = __fswab32(set_size); p.set_size = tmp; if ((int )mdev->state.ldv_33381.conn <= 9) { return (0); } else { } ok = drbd_send_cmd(mdev, 0, P_BARRIER_ACK, (struct p_header *)(& p), 16UL); return (ok); } } static int _drbd_send_ack(struct drbd_conf *mdev , enum drbd_packets cmd , u64 sector , u32 blksize , u64 block_id ) { int ok ; struct p_block_ack p ; int tmp ; __u32 tmp___0 ; { p.sector = sector; p.block_id = block_id; p.blksize = blksize; tmp = atomic_add_return(1, & mdev->packet_seq); tmp___0 = __fswab32((__u32 )tmp); p.seq_num = tmp___0; if ((unsigned long )mdev->meta.socket == (unsigned long )((struct socket *)0) || (int )mdev->state.ldv_33381.conn <= 9) { return (0); } else { } ok = drbd_send_cmd(mdev, 0, cmd, (struct p_header *)(& p), 32UL); return (ok); } } int drbd_send_ack_dp(struct drbd_conf *mdev , enum drbd_packets cmd , struct p_data *dp ) { int header_size ; int data_size ; __u32 tmp ; int tmp___0 ; { header_size = 24; data_size = (int )((struct p_header *)dp)->length - header_size; tmp = __fswab32((__u32 )data_size); tmp___0 = _drbd_send_ack(mdev, cmd, dp->sector, tmp, dp->block_id); return (tmp___0); } } int drbd_send_ack_rp(struct drbd_conf *mdev , enum drbd_packets cmd , struct p_block_req *rp ) { int tmp ; { tmp = _drbd_send_ack(mdev, cmd, rp->sector, rp->blksize, rp->block_id); return (tmp); } } int drbd_send_ack(struct drbd_conf *mdev , enum drbd_packets cmd , struct drbd_epoch_entry *e ) { __u32 tmp ; __u64 tmp___0 ; int tmp___1 ; { tmp = __fswab32(e->size); tmp___0 = __fswab64((__u64 )e->sector); tmp___1 = _drbd_send_ack(mdev, cmd, tmp___0, tmp, e->block_id); return (tmp___1); } } int drbd_send_ack_ex(struct drbd_conf *mdev , enum drbd_packets cmd , sector_t sector , int blksize , u64 block_id ) { __u64 tmp ; __u32 tmp___0 ; __u64 tmp___1 ; int tmp___2 ; { tmp = __fswab64(block_id); tmp___0 = __fswab32((__u32 )blksize); tmp___1 = __fswab64((__u64 )sector); tmp___2 = _drbd_send_ack(mdev, cmd, tmp___1, tmp___0, tmp); return (tmp___2); } } int drbd_send_drequest(struct drbd_conf *mdev , int cmd , sector_t sector , int size , u64 block_id ) { int ok ; struct p_block_req p ; __u64 tmp ; __u32 tmp___0 ; { tmp = __fswab64((__u64 )sector); p.sector = tmp; p.block_id = block_id; tmp___0 = __fswab32((__u32 )size); p.blksize = tmp___0; ok = drbd_send_cmd(mdev, 1, (enum drbd_packets )cmd, (struct p_header *)(& p), 32UL); return (ok); } } int drbd_send_drequest_csum(struct drbd_conf *mdev , sector_t sector , int size , void *digest , int digest_size , enum drbd_packets cmd ) { int ok ; struct p_block_req p ; __u64 tmp ; __u32 tmp___0 ; __u16 tmp___1 ; __u16 tmp___2 ; int tmp___3 ; int tmp___4 ; int tmp___5 ; { tmp = __fswab64((__u64 )sector); p.sector = tmp; p.block_id = 1728263026ULL; tmp___0 = __fswab32((__u32 )size); p.blksize = tmp___0; p.head.magic = 1728214147U; tmp___1 = __fswab16((int )((__u16 )cmd)); p.head.command = tmp___1; tmp___2 = __fswab16((int )((unsigned int )((__u16 )digest_size) + 24U)); p.head.length = tmp___2; ldv_mutex_lock_98(& mdev->data.mutex); tmp___3 = drbd_send(mdev, mdev->data.socket, (void *)(& p), 32UL, 0U); ok = tmp___3 == 32; if (ok != 0) { tmp___4 = drbd_send(mdev, mdev->data.socket, digest, (size_t )digest_size, 0U); if (tmp___4 == digest_size) { tmp___5 = 1; } else { tmp___5 = 0; } } else { tmp___5 = 0; } ok = tmp___5; ldv_mutex_unlock_99(& mdev->data.mutex); return (ok); } } int drbd_send_ov_request(struct drbd_conf *mdev , sector_t sector , int size ) { int ok ; struct p_block_req p ; __u64 tmp ; __u32 tmp___0 ; { tmp = __fswab64((__u64 )sector); p.sector = tmp; p.block_id = 1728261953ULL; tmp___0 = __fswab32((__u32 )size); p.blksize = tmp___0; ok = drbd_send_cmd(mdev, 1, P_OV_REQUEST, (struct p_header *)(& p), 32UL); return (ok); } } static int drbd_send_delay_probe(struct drbd_conf *mdev , struct drbd_socket *ds ) { struct p_delay_probe dp ; int offset ; int ok ; struct timeval now ; __u32 tmp ; __u32 tmp___0 ; long tmp___1 ; { ok = 0; ldv_mutex_lock_100(& ds->mutex); tmp___1 = ldv__builtin_expect((unsigned long )ds->socket != (unsigned long )((struct socket *)0), 1L); if (tmp___1 != 0L) { do_gettimeofday(& now); offset = (int )(((unsigned int )now.tv_usec - (unsigned int )mdev->dps_time.tv_usec) + (unsigned int )(now.tv_sec - mdev->dps_time.tv_sec) * 1000000U); tmp = __fswab32(mdev->delay_seq); dp.seq_num = tmp; tmp___0 = __fswab32((__u32 )offset); dp.offset = tmp___0; ok = _drbd_send_cmd(mdev, ds->socket, P_DELAY_PROBE, (struct p_header *)(& dp), 16UL, 0U); } else { } ldv_mutex_unlock_101(& ds->mutex); return (ok); } } static int drbd_send_delay_probes(struct drbd_conf *mdev ) { int ok ; int tmp ; int tmp___0 ; { mdev->delay_seq = mdev->delay_seq + 1U; do_gettimeofday(& mdev->dps_time); ok = drbd_send_delay_probe(mdev, & mdev->meta); if (ok != 0) { tmp = drbd_send_delay_probe(mdev, & mdev->data); if (tmp != 0) { tmp___0 = 1; } else { tmp___0 = 0; } } else { tmp___0 = 0; } ok = tmp___0; mdev->dp_volume_last = mdev->send_cnt; mod_timer(& mdev->delay_probe_timer, (unsigned long )((mdev->sync_conf.dp_interval * 250) / 10) + (unsigned long )jiffies); return (ok); } } static int we_should_drop_the_connection(struct drbd_conf *mdev , struct socket *sock ) { int drop_it ; enum drbd_thread_state tmp ; int tmp___0 ; struct task_struct *tmp___1 ; struct task_struct *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; { if ((unsigned long )mdev->meta.socket == (unsigned long )sock || (unsigned long )mdev->asender.task == (unsigned long )((struct task_struct *)0)) { tmp___0 = 1; } else { tmp = get_t_state(& mdev->asender); if ((unsigned int )tmp != 1U) { tmp___0 = 1; } else if ((int )mdev->state.ldv_33381.conn <= 9) { tmp___0 = 1; } else { tmp___0 = 0; } } drop_it = tmp___0; if (drop_it != 0) { return (1); } else { } mdev->ko_count = mdev->ko_count - 1U; drop_it = mdev->ko_count == 0U; if (drop_it == 0) { tmp___1 = get_current(); tmp___2 = get_current(); tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: [%s/%d] sock_sendmsg time expired, ko = %u\n", tmp___4, tmp___3, (char *)(& tmp___2->comm), tmp___1->pid, mdev->ko_count); request_ping(mdev); } else { } return (drop_it); } } static int _drbd_no_send_page(struct drbd_conf *mdev , struct page *page , int offset , size_t size ) { int sent ; void *tmp ; int tmp___0 ; { tmp = kmap(page); tmp___0 = drbd_send(mdev, mdev->data.socket, tmp + (unsigned long )offset, size, 0U); sent = tmp___0; kunmap(page); if ((size_t )sent == size) { mdev->send_cnt = mdev->send_cnt + (unsigned int )(size >> 9); } else { } return ((size_t )sent == size); } } static int _drbd_send_page(struct drbd_conf *mdev , struct page *page , int offset , size_t size ) { mm_segment_t oldfs ; struct thread_info *tmp ; int sent ; int ok ; int len ; int tmp___0 ; int tmp___1 ; int tmp___2 ; struct thread_info *tmp___3 ; mm_segment_t __constr_expr_0 ; ssize_t tmp___4 ; int tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; struct thread_info *tmp___8 ; long tmp___9 ; { tmp = current_thread_info___1(); oldfs = tmp->addr_limit; len = (int )size; if (disable_sendpage != 0) { tmp___0 = _drbd_no_send_page(mdev, page, offset, size); return (tmp___0); } else { tmp___1 = page_count(page); if (tmp___1 <= 0) { tmp___0 = _drbd_no_send_page(mdev, page, offset, size); return (tmp___0); } else { tmp___2 = PageSlab(page); if (tmp___2 != 0) { tmp___0 = _drbd_no_send_page(mdev, page, offset, size); return (tmp___0); } else { } } } drbd_update_congested(mdev); tmp___3 = current_thread_info___1(); __constr_expr_0.seg = 0xffffffffffffffffUL; tmp___3->addr_limit = __constr_expr_0; ldv_43684: tmp___4 = (*(((mdev->data.socket)->ops)->sendpage))(mdev->data.socket, page, offset, (size_t )len, 16384); sent = (int )tmp___4; if (sent == -11) { tmp___5 = we_should_drop_the_connection(mdev, mdev->data.socket); if (tmp___5 != 0) { goto ldv_43681; } else { goto ldv_43682; } } else { } if (sent <= 0) { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: %s: size=%d len=%d sent=%d\n", tmp___7, tmp___6, "_drbd_send_page", (int )size, len, sent); goto ldv_43681; } else { } len = len - sent; offset = offset + sent; ldv_43682: ; if (len > 0) { goto ldv_43684; } else { } ldv_43681: tmp___8 = current_thread_info___1(); tmp___8->addr_limit = oldfs; clear_bit(21, (unsigned long volatile *)(& mdev->flags)); ok = len == 0; tmp___9 = ldv__builtin_expect(ok != 0, 1L); if (tmp___9 != 0L) { mdev->send_cnt = mdev->send_cnt + (unsigned int )(size >> 9); } else { } return (ok); } } static int _drbd_send_bio(struct drbd_conf *mdev , struct bio *bio ) { struct bio_vec *bvec ; int i ; int tmp ; { bvec = bio->bi_io_vec; i = 0; goto ldv_43692; ldv_43691: tmp = _drbd_no_send_page(mdev, bvec->bv_page, (int )bvec->bv_offset, (size_t )bvec->bv_len); if (tmp == 0) { return (0); } else { } bvec = bvec + 1; i = i + 1; ldv_43692: ; if ((int )bio->bi_vcnt > i) { goto ldv_43691; } else { } return (1); } } static int _drbd_send_zc_bio(struct drbd_conf *mdev , struct bio *bio ) { struct bio_vec *bvec ; int i ; int tmp ; { bvec = bio->bi_io_vec; i = 0; goto ldv_43701; ldv_43700: tmp = _drbd_send_page(mdev, bvec->bv_page, (int )bvec->bv_offset, (size_t )bvec->bv_len); if (tmp == 0) { return (0); } else { } bvec = bvec + 1; i = i + 1; ldv_43701: ; if ((int )bio->bi_vcnt > i) { goto ldv_43700; } else { } return (1); } } static int _drbd_send_zc_ee(struct drbd_conf *mdev , struct drbd_epoch_entry *e ) { struct page *page ; unsigned int len ; unsigned int l ; unsigned int __min1 ; unsigned int __min2 ; int tmp ; struct page *tmp___0 ; { page = e->pages; len = e->size; goto ldv_43715; ldv_43714: __min1 = len; __min2 = 4096U; l = __min1 < __min2 ? __min1 : __min2; tmp = _drbd_send_page(mdev, page, 0, (size_t )l); if (tmp == 0) { return (0); } else { } len = len - l; page = page_chain_next(page); ldv_43715: ; if ((unsigned long )page != (unsigned long )((struct page *)0)) { tmp___0 = page_chain_next(page); __builtin_prefetch((void const *)tmp___0); if (1 != 0) { goto ldv_43714; } else { goto ldv_43716; } } else { } ldv_43716: ; return (1); } } static void consider_delay_probes(struct drbd_conf *mdev ) { { if ((unsigned int )*((unsigned short *)mdev + 994UL) != 256U || mdev->agreed_pro_version <= 92) { return; } else { } if (mdev->dp_volume_last + (unsigned int )(mdev->sync_conf.dp_volume * 2) < mdev->send_cnt) { drbd_send_delay_probes(mdev); } else { } return; } } static int w_delay_probes(struct drbd_conf *mdev , struct drbd_work *w , int cancel ) { { if (cancel == 0 && (unsigned int )*((unsigned short *)mdev + 994UL) == 256U) { drbd_send_delay_probes(mdev); } else { } return (1); } } static void delay_probe_timer_fn(unsigned long data ) { struct drbd_conf *mdev ; int tmp ; { mdev = (struct drbd_conf *)data; tmp = list_empty((struct list_head const *)(& mdev->delay_probe_work.list)); if (tmp != 0) { drbd_queue_work(& mdev->data.work, & mdev->delay_probe_work); } else { } return; } } int drbd_send_dblock(struct drbd_conf *mdev , struct drbd_request *req ) { int ok ; struct p_data p ; unsigned int dp_flags ; void *dgb ; int dgs ; int tmp ; unsigned int tmp___0 ; __u16 tmp___1 ; __u64 tmp___2 ; int tmp___3 ; __u32 tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; bool tmp___7 ; bool tmp___8 ; bool tmp___9 ; __u32 tmp___10 ; int tmp___11 ; { ok = 1; dp_flags = 0U; tmp = drbd_get_data_sock___0(mdev); if (tmp == 0) { return (0); } else { } if (mdev->agreed_pro_version > 86 && (unsigned long )mdev->integrity_w_tfm != (unsigned long )((struct crypto_hash *)0)) { tmp___0 = crypto_hash_digestsize(mdev->integrity_w_tfm); dgs = (int )tmp___0; } else { dgs = 0; } p.head.magic = 1728214147U; p.head.command = 0U; tmp___1 = __fswab16((int )((unsigned int )((int )((__u16 )dgs) + (int )((__u16 )req->size)) + 24U)); p.head.length = tmp___1; tmp___2 = __fswab64((__u64 )req->sector); p.sector = tmp___2; p.block_id = (u64 )req; tmp___3 = atomic_add_return(1, & mdev->packet_seq); req->seq_num = tmp___3; tmp___4 = __fswab32((__u32 )tmp___3); p.seq_num = tmp___4; dp_flags = 0U; tmp___7 = bio_rw_flagged(req->master_bio, BIO_RW_BARRIER); if ((int )tmp___7) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT FAILED would have set DP_HARDBARRIER\n", tmp___6, tmp___5); } else { } tmp___8 = bio_rw_flagged(req->master_bio, BIO_RW_SYNCIO); if ((int )tmp___8) { dp_flags = dp_flags | 2U; } else { } tmp___9 = bio_rw_flagged(req->master_bio, BIO_RW_UNPLUG); if ((int )tmp___9) { dp_flags = dp_flags | 2U; } else { } if ((int )mdev->state.ldv_33381.conn > 15 && (int )mdev->state.ldv_33381.conn <= 21) { dp_flags = dp_flags | 4U; } else { } tmp___10 = __fswab32(dp_flags); p.dp_flags = tmp___10; set_bit(5U, (unsigned long volatile *)(& mdev->flags)); tmp___11 = drbd_send(mdev, mdev->data.socket, (void *)(& p), 32UL, 32768U); ok = tmp___11 == 32; if (ok != 0 && dgs != 0) { dgb = mdev->int_dig_out; drbd_csum_bio(mdev, mdev->integrity_w_tfm, req->master_bio, dgb); ok = drbd_send(mdev, mdev->data.socket, dgb, (size_t )dgs, 32768U); } else { } if (ok != 0) { if ((mdev->net_conf)->wire_protocol == 1) { ok = _drbd_send_bio(mdev, req->master_bio); } else { ok = _drbd_send_zc_bio(mdev, req->master_bio); } } else { } drbd_put_data_sock___0(mdev); if (ok != 0) { consider_delay_probes(mdev); } else { } return (ok); } } int drbd_send_block(struct drbd_conf *mdev , enum drbd_packets cmd , struct drbd_epoch_entry *e ) { int ok ; struct p_data p ; void *dgb ; int dgs ; unsigned int tmp ; __u16 tmp___0 ; __u16 tmp___1 ; __u64 tmp___2 ; int tmp___3 ; int tmp___4 ; { if (mdev->agreed_pro_version > 86 && (unsigned long )mdev->integrity_w_tfm != (unsigned long )((struct crypto_hash *)0)) { tmp = crypto_hash_digestsize(mdev->integrity_w_tfm); dgs = (int )tmp; } else { dgs = 0; } p.head.magic = 1728214147U; tmp___0 = __fswab16((int )((__u16 )cmd)); p.head.command = tmp___0; tmp___1 = __fswab16((int )((unsigned int )((int )((__u16 )dgs) + (int )((__u16 )e->size)) + 24U)); p.head.length = tmp___1; tmp___2 = __fswab64((__u64 )e->sector); p.sector = tmp___2; p.block_id = e->block_id; tmp___3 = drbd_get_data_sock___0(mdev); if (tmp___3 == 0) { return (0); } else { } tmp___4 = drbd_send(mdev, mdev->data.socket, (void *)(& p), 32UL, 32768U); ok = tmp___4 == 32; if (ok != 0 && dgs != 0) { dgb = mdev->int_dig_out; drbd_csum_ee(mdev, mdev->integrity_w_tfm, e, dgb); ok = drbd_send(mdev, mdev->data.socket, dgb, (size_t )dgs, 32768U); } else { } if (ok != 0) { ok = _drbd_send_zc_ee(mdev, e); } else { } drbd_put_data_sock___0(mdev); if (ok != 0) { consider_delay_probes(mdev); } else { } return (ok); } } int drbd_send(struct drbd_conf *mdev , struct socket *sock , void *buf , size_t size , unsigned int msg_flags ) { struct kvec iov ; struct msghdr msg ; int rv ; int sent ; int tmp ; char const *tmp___0 ; char const *tmp___1 ; struct task_struct *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; union drbd_state val ; union drbd_state mask ; union drbd_state val___0 ; union drbd_state mask___0 ; { sent = 0; if ((unsigned long )sock == (unsigned long )((struct socket *)0)) { return (-1000); } else { } iov.iov_base = buf; iov.iov_len = size; msg.msg_name = 0; msg.msg_namelen = 0; msg.msg_control = 0; msg.msg_controllen = 0UL; msg.msg_flags = msg_flags | 16384U; if ((unsigned long )mdev->data.socket == (unsigned long )sock) { mdev->ko_count = (unsigned int )(mdev->net_conf)->ko_count; drbd_update_congested(mdev); } else { } ldv_43760: rv = kernel_sendmsg(sock, & msg, & iov, 1UL, size); if (rv == -11) { tmp = we_should_drop_the_connection(mdev, sock); if (tmp != 0) { goto ldv_43758; } else { goto ldv_43759; } } else { } if (rv == 0) { tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( rv != 0 ) in %s:%d\n", tmp___1, tmp___0, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 2623); } else { } if (rv == -4) { tmp___2 = get_current(); flush_signals(tmp___2); rv = 0; } else { } if (rv < 0) { goto ldv_43758; } else { } sent = sent + rv; iov.iov_base = iov.iov_base + (unsigned long )rv; iov.iov_len = iov.iov_len - (size_t )rv; ldv_43759: ; if ((size_t )sent < size) { goto ldv_43760; } else { } ldv_43758: ; if ((unsigned long )mdev->data.socket == (unsigned long )sock) { clear_bit(21, (unsigned long volatile *)(& mdev->flags)); } else { } if (rv <= 0) { if (rv != -11) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s_sendmsg returned %d\n", tmp___4, tmp___3, (unsigned long )mdev->meta.socket == (unsigned long )sock ? (char *)"msock" : (char *)"sock", rv); val.i = 0U; val.ldv_33381.conn = 4U; mask.i = 0U; mask.ldv_33381.conn = 31U; drbd_force_state(mdev, mask, val); } else { val___0.i = 0U; val___0.ldv_33381.conn = 3U; mask___0.i = 0U; mask___0.ldv_33381.conn = 31U; drbd_force_state(mdev, mask___0, val___0); } } else { } return (sent); } } static int drbd_open(struct block_device *bdev , fmode_t mode ) { struct drbd_conf *mdev ; unsigned long flags ; int rv ; raw_spinlock_t *tmp ; { mdev = (struct drbd_conf *)(bdev->bd_disk)->private_data; rv = 0; tmp = spinlock_check(& mdev->req_lock); flags = _raw_spin_lock_irqsave(tmp); if ((unsigned int )*((unsigned char *)mdev + 1988UL) != 1U) { if ((mode & 2U) != 0U) { rv = -30; } else if (allow_oos == 0) { rv = -124; } else { } } else { } if (rv == 0) { mdev->open_cnt = mdev->open_cnt + 1; } else { } spin_unlock_irqrestore(& mdev->req_lock, flags); return (rv); } } static int drbd_release(struct gendisk *gd , fmode_t mode ) { struct drbd_conf *mdev ; { mdev = (struct drbd_conf *)gd->private_data; mdev->open_cnt = mdev->open_cnt - 1; return (0); } } static void drbd_unplug_fn(struct request_queue *q ) { struct drbd_conf *mdev ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; int tmp___2 ; { mdev = (struct drbd_conf *)q->queuedata; spin_lock_irq(q->queue_lock); blk_remove_plug(q); spin_unlock_irq(q->queue_lock); spin_lock_irq(& mdev->req_lock); if ((int )mdev->state.ldv_33381.pdsk > 3 && (int )mdev->state.ldv_33381.conn > 9) { if ((unsigned int )*((unsigned char *)mdev + 1988UL) != 1U) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->state.role == R_PRIMARY ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 2694); } else { } tmp___2 = test_and_clear_bit(5, (unsigned long volatile *)(& mdev->flags)); if (tmp___2 != 0) { tmp___1 = list_empty((struct list_head const *)(& mdev->unplug_work.list)); if (tmp___1 != 0) { drbd_queue_work(& mdev->data.work, & mdev->unplug_work); } else { } } else { } } else { } spin_unlock_irq(& mdev->req_lock); if ((int )mdev->state.ldv_33381.disk > 3) { drbd_kick_lo(mdev); } else { } return; } } static void drbd_set_defaults(struct drbd_conf *mdev ) { union drbd_state __constr_expr_0 ; { mdev->sync_conf.after = -1; mdev->sync_conf.rate = 250; mdev->sync_conf.al_extents = 127; __constr_expr_0.ldv_33381.role = 2U; __constr_expr_0.ldv_33381.peer = 0U; __constr_expr_0.ldv_33381.conn = 0U; __constr_expr_0.ldv_33381.disk = 0U; __constr_expr_0.ldv_33381.pdsk = 6U; __constr_expr_0.ldv_33381.susp = 0U; __constr_expr_0.ldv_33381.aftr_isp = (unsigned char)0; __constr_expr_0.ldv_33381.peer_isp = (unsigned char)0; __constr_expr_0.ldv_33381.user_isp = (unsigned char)0; __constr_expr_0.ldv_33381._pad = (unsigned short)0; mdev->state = __constr_expr_0; return; } } void drbd_init_set_defaults(struct drbd_conf *mdev ) { struct lock_class_key __key ; struct lock_class_key __key___0 ; struct lock_class_key __key___1 ; struct lock_class_key __key___2 ; struct lock_class_key __key___3 ; struct lock_class_key __key___4 ; struct lock_class_key __key___5 ; struct lock_class_key __key___6 ; struct lock_class_key __key___7 ; struct lock_class_key __key___8 ; struct lock_class_key __key___9 ; struct lock_class_key __key___10 ; struct lock_class_key __key___11 ; struct lock_class_key __key___12 ; struct lock_class_key __key___13 ; struct lock_class_key __key___14 ; struct lock_class_key __key___15 ; struct lock_class_key __key___16 ; { drbd_set_defaults(mdev); set_bit(14U, (unsigned long volatile *)(& mdev->flags)); atomic_set(& mdev->ap_bio_cnt, 0); atomic_set(& mdev->ap_pending_cnt, 0); atomic_set(& mdev->rs_pending_cnt, 0); atomic_set(& mdev->unacked_cnt, 0); atomic_set(& mdev->local_cnt, 0); atomic_set(& mdev->net_cnt, 0); atomic_set(& mdev->packet_seq, 0); atomic_set(& mdev->pp_in_use, 0); atomic_set(& mdev->new_c_uuid, 0); __mutex_init(& mdev->md_io_mutex, "&mdev->md_io_mutex", & __key); __mutex_init(& mdev->data.mutex, "&mdev->data.mutex", & __key___0); __mutex_init(& mdev->meta.mutex, "&mdev->meta.mutex", & __key___1); sema_init(& mdev->data.work.s, 0); sema_init(& mdev->meta.work.s, 0); __mutex_init(& mdev->state_mutex, "&mdev->state_mutex", & __key___2); spinlock_check(& mdev->data.work.q_lock); __raw_spin_lock_init(& mdev->data.work.q_lock.ldv_5575.rlock, "&(&mdev->data.work.q_lock)->rlock", & __key___3); spinlock_check(& mdev->meta.work.q_lock); __raw_spin_lock_init(& mdev->meta.work.q_lock.ldv_5575.rlock, "&(&mdev->meta.work.q_lock)->rlock", & __key___4); spinlock_check(& mdev->al_lock); __raw_spin_lock_init(& mdev->al_lock.ldv_5575.rlock, "&(&mdev->al_lock)->rlock", & __key___5); spinlock_check(& mdev->req_lock); __raw_spin_lock_init(& mdev->req_lock.ldv_5575.rlock, "&(&mdev->req_lock)->rlock", & __key___6); spinlock_check(& mdev->peer_seq_lock); __raw_spin_lock_init(& mdev->peer_seq_lock.ldv_5575.rlock, "&(&mdev->peer_seq_lock)->rlock", & __key___7); spinlock_check(& mdev->epoch_lock); __raw_spin_lock_init(& mdev->epoch_lock.ldv_5575.rlock, "&(&mdev->epoch_lock)->rlock", & __key___8); INIT_LIST_HEAD(& mdev->active_ee); INIT_LIST_HEAD(& mdev->sync_ee); INIT_LIST_HEAD(& mdev->done_ee); INIT_LIST_HEAD(& mdev->read_ee); INIT_LIST_HEAD(& mdev->net_ee); INIT_LIST_HEAD(& mdev->resync_reads); INIT_LIST_HEAD(& mdev->data.work.q); INIT_LIST_HEAD(& mdev->meta.work.q); INIT_LIST_HEAD(& mdev->resync_work.list); INIT_LIST_HEAD(& mdev->unplug_work.list); INIT_LIST_HEAD(& mdev->md_sync_work.list); INIT_LIST_HEAD(& mdev->bm_io_work.w.list); INIT_LIST_HEAD(& mdev->delay_probes); INIT_LIST_HEAD(& mdev->delay_probe_work.list); INIT_LIST_HEAD(& mdev->uuid_work.list); mdev->resync_work.cb = & w_resync_inactive; mdev->unplug_work.cb = & w_send_write_hint; mdev->md_sync_work.cb = & w_md_sync; mdev->bm_io_work.w.cb = & w_bitmap_io; mdev->delay_probe_work.cb = & w_delay_probes; mdev->uuid_work.cb = & w_new_current_uuid; init_timer_key(& mdev->resync_timer, "&mdev->resync_timer", & __key___9); init_timer_key(& mdev->md_sync_timer, "&mdev->md_sync_timer", & __key___10); init_timer_key(& mdev->delay_probe_timer, "&mdev->delay_probe_timer", & __key___11); mdev->resync_timer.function = & resync_timer_fn; mdev->resync_timer.data = (unsigned long )mdev; mdev->md_sync_timer.function = & md_sync_timer_fn; mdev->md_sync_timer.data = (unsigned long )mdev; mdev->delay_probe_timer.function = & delay_probe_timer_fn; mdev->delay_probe_timer.data = (unsigned long )mdev; __init_waitqueue_head(& mdev->misc_wait, & __key___12); __init_waitqueue_head(& mdev->state_wait, & __key___13); __init_waitqueue_head(& mdev->ee_wait, & __key___14); __init_waitqueue_head(& mdev->al_wait, & __key___15); __init_waitqueue_head(& mdev->seq_wait, & __key___16); drbd_thread_init(mdev, & mdev->receiver, & drbdd_init); drbd_thread_init(mdev, & mdev->worker, & drbd_worker); drbd_thread_init(mdev, & mdev->asender, & drbd_asender); mdev->agreed_pro_version = 93; mdev->write_ordering = WO_bio_barrier; mdev->resync_wenr = 4294967295U; return; } } void drbd_mdev_cleanup(struct drbd_conf *mdev ) { char const *tmp ; char const *tmp___0 ; int tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; int tmp___4 ; unsigned int tmp___5 ; unsigned int tmp___6 ; unsigned int tmp___7 ; unsigned int tmp___8 ; unsigned int tmp___9 ; sector_t tmp___10 ; unsigned long tmp___11 ; unsigned long tmp___12 ; unsigned long tmp___13 ; unsigned long tmp___14 ; unsigned long tmp___15 ; char const *tmp___16 ; char const *tmp___17 ; char const *tmp___18 ; char const *tmp___19 ; int tmp___20 ; char const *tmp___21 ; char const *tmp___22 ; int tmp___23 ; char const *tmp___24 ; char const *tmp___25 ; int tmp___26 ; char const *tmp___27 ; char const *tmp___28 ; int tmp___29 ; char const *tmp___30 ; char const *tmp___31 ; int tmp___32 ; char const *tmp___33 ; char const *tmp___34 ; int tmp___35 ; char const *tmp___36 ; char const *tmp___37 ; int tmp___38 ; char const *tmp___39 ; char const *tmp___40 ; int tmp___41 ; char const *tmp___42 ; char const *tmp___43 ; int tmp___44 ; char const *tmp___45 ; char const *tmp___46 ; int tmp___47 ; { if ((unsigned int )mdev->receiver.t_state != 0U) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT FAILED: receiver t_state == %d expected 0.\n", tmp___0, tmp, (unsigned int )mdev->receiver.t_state); } else { } tmp___4 = atomic_read((atomic_t const *)(& (mdev->current_epoch)->epoch_size)); if (tmp___4 != 0) { tmp___1 = atomic_read((atomic_t const *)(& (mdev->current_epoch)->epoch_size)); tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: epoch_size:%d\n", tmp___3, tmp___2, tmp___1); } else { } tmp___15 = 0UL; mdev->rs_mark_time = tmp___15; tmp___14 = tmp___15; mdev->rs_mark_left = tmp___14; tmp___13 = tmp___14; mdev->rs_failed = tmp___13; tmp___12 = tmp___13; mdev->rs_total = tmp___12; tmp___11 = tmp___12; mdev->rs_start = tmp___11; tmp___10 = tmp___11; mdev->p_size = tmp___10; tmp___9 = (unsigned int )tmp___10; mdev->writ_cnt = tmp___9; tmp___8 = tmp___9; mdev->send_cnt = tmp___8; tmp___7 = tmp___8; mdev->recv_cnt = tmp___7; tmp___6 = tmp___7; mdev->read_cnt = tmp___6; tmp___5 = tmp___6; mdev->bm_writ_cnt = tmp___5; mdev->al_writ_cnt = tmp___5; if ((unsigned long )mdev->net_conf != (unsigned long )((struct net_conf *)0)) { tmp___16 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___17 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->net_conf == NULL ) in %s:%d\n", tmp___17, tmp___16, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 2832); } else { } drbd_set_my_capacity(mdev, 0UL); if ((unsigned long )mdev->bitmap != (unsigned long )((struct drbd_bitmap *)0)) { drbd_bm_resize(mdev, 0UL, 1); drbd_bm_cleanup(mdev); } else { } drbd_free_resources(mdev); tmp___20 = list_empty((struct list_head const *)(& mdev->active_ee)); if (tmp___20 == 0) { tmp___18 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___19 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&mdev->active_ee) ) in %s:%d\n", tmp___19, tmp___18, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 2847); } else { } tmp___23 = list_empty((struct list_head const *)(& mdev->sync_ee)); if (tmp___23 == 0) { tmp___21 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___22 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&mdev->sync_ee) ) in %s:%d\n", tmp___22, tmp___21, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 2848); } else { } tmp___26 = list_empty((struct list_head const *)(& mdev->done_ee)); if (tmp___26 == 0) { tmp___24 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___25 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&mdev->done_ee) ) in %s:%d\n", tmp___25, tmp___24, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 2849); } else { } tmp___29 = list_empty((struct list_head const *)(& mdev->read_ee)); if (tmp___29 == 0) { tmp___27 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___28 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&mdev->read_ee) ) in %s:%d\n", tmp___28, tmp___27, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 2850); } else { } tmp___32 = list_empty((struct list_head const *)(& mdev->net_ee)); if (tmp___32 == 0) { tmp___30 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___31 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&mdev->net_ee) ) in %s:%d\n", tmp___31, tmp___30, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 2851); } else { } tmp___35 = list_empty((struct list_head const *)(& mdev->resync_reads)); if (tmp___35 == 0) { tmp___33 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___34 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&mdev->resync_reads) ) in %s:%d\n", tmp___34, tmp___33, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 2852); } else { } tmp___38 = list_empty((struct list_head const *)(& mdev->data.work.q)); if (tmp___38 == 0) { tmp___36 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___37 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&mdev->data.work.q) ) in %s:%d\n", tmp___37, tmp___36, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 2853); } else { } tmp___41 = list_empty((struct list_head const *)(& mdev->meta.work.q)); if (tmp___41 == 0) { tmp___39 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___40 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&mdev->meta.work.q) ) in %s:%d\n", tmp___40, tmp___39, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 2854); } else { } tmp___44 = list_empty((struct list_head const *)(& mdev->resync_work.list)); if (tmp___44 == 0) { tmp___42 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___43 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&mdev->resync_work.list) ) in %s:%d\n", tmp___43, tmp___42, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 2855); } else { } tmp___47 = list_empty((struct list_head const *)(& mdev->unplug_work.list)); if (tmp___47 == 0) { tmp___45 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___46 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&mdev->unplug_work.list) ) in %s:%d\n", tmp___46, tmp___45, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 2856); } else { } return; } } static void drbd_destroy_mempools(void) { struct page *page ; { goto ldv_43821; ldv_43820: page = drbd_pp_pool; drbd_pp_pool = (struct page *)page->ldv_12090.ldv_12087.private; __free_pages(page, 0U); drbd_pp_vacant = drbd_pp_vacant - 1; ldv_43821: ; if ((unsigned long )drbd_pp_pool != (unsigned long )((struct page *)0)) { goto ldv_43820; } else { } if ((unsigned long )drbd_ee_mempool != (unsigned long )((mempool_t *)0)) { mempool_destroy(drbd_ee_mempool); } else { } if ((unsigned long )drbd_request_mempool != (unsigned long )((mempool_t *)0)) { mempool_destroy(drbd_request_mempool); } else { } if ((unsigned long )drbd_ee_cache != (unsigned long )((struct kmem_cache *)0)) { kmem_cache_destroy(drbd_ee_cache); } else { } if ((unsigned long )drbd_request_cache != (unsigned long )((struct kmem_cache *)0)) { kmem_cache_destroy(drbd_request_cache); } else { } if ((unsigned long )drbd_bm_ext_cache != (unsigned long )((struct kmem_cache *)0)) { kmem_cache_destroy(drbd_bm_ext_cache); } else { } if ((unsigned long )drbd_al_ext_cache != (unsigned long )((struct kmem_cache *)0)) { kmem_cache_destroy(drbd_al_ext_cache); } else { } drbd_ee_mempool = 0; drbd_request_mempool = 0; drbd_ee_cache = 0; drbd_request_cache = 0; drbd_bm_ext_cache = 0; drbd_al_ext_cache = 0; return; } } static int drbd_create_mempools(void) { struct page *page ; int number ; int i ; struct lock_class_key __key ; { number = (int const )(minor_count * 8U); drbd_request_mempool = 0; drbd_ee_cache = 0; drbd_request_cache = 0; drbd_bm_ext_cache = 0; drbd_al_ext_cache = 0; drbd_pp_pool = 0; drbd_request_cache = kmem_cache_create("drbd_req", 120UL, 0UL, 0UL, 0); if ((unsigned long )drbd_request_cache == (unsigned long )((struct kmem_cache *)0)) { goto Enomem; } else { } drbd_ee_cache = kmem_cache_create("drbd_ee", 96UL, 0UL, 0UL, 0); if ((unsigned long )drbd_ee_cache == (unsigned long )((struct kmem_cache *)0)) { goto Enomem; } else { } drbd_bm_ext_cache = kmem_cache_create("drbd_bm", 64UL, 0UL, 0UL, 0); if ((unsigned long )drbd_bm_ext_cache == (unsigned long )((struct kmem_cache *)0)) { goto Enomem; } else { } drbd_al_ext_cache = kmem_cache_create("drbd_al", 48UL, 0UL, 0UL, 0); if ((unsigned long )drbd_al_ext_cache == (unsigned long )((struct kmem_cache *)0)) { goto Enomem; } else { } drbd_request_mempool = mempool_create(number, & mempool_alloc_slab, & mempool_free_slab, (void *)drbd_request_cache); if ((unsigned long )drbd_request_mempool == (unsigned long )((mempool_t *)0)) { goto Enomem; } else { } drbd_ee_mempool = mempool_create(number, & mempool_alloc_slab, & mempool_free_slab, (void *)drbd_ee_cache); if ((unsigned long )drbd_request_mempool == (unsigned long )((mempool_t *)0)) { goto Enomem; } else { } spinlock_check(& drbd_pp_lock); __raw_spin_lock_init(& drbd_pp_lock.ldv_5575.rlock, "&(&drbd_pp_lock)->rlock", & __key); i = 0; goto ldv_43832; ldv_43831: page = alloc_pages(131282U, 0U); if ((unsigned long )page == (unsigned long )((struct page *)0)) { goto Enomem; } else { } page->ldv_12090.ldv_12087.private = (unsigned long )drbd_pp_pool; drbd_pp_pool = page; i = i + 1; ldv_43832: ; if (i < number) { goto ldv_43831; } else { } drbd_pp_vacant = number; return (0); Enomem: drbd_destroy_mempools(); return (-12); } } static int drbd_notify_sys(struct notifier_block *this , unsigned long code , void *unused ) { { return (0); } } static struct notifier_block drbd_notifier = {& drbd_notify_sys, 0, 0}; static void drbd_release_ee_lists(struct drbd_conf *mdev ) { int rr ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; { rr = drbd_release_ee(mdev, & mdev->active_ee); if (rr != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %d EEs in active list found!\n", tmp___0, tmp, rr); } else { } rr = drbd_release_ee(mdev, & mdev->sync_ee); if (rr != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %d EEs in sync list found!\n", tmp___2, tmp___1, rr); } else { } rr = drbd_release_ee(mdev, & mdev->read_ee); if (rr != 0) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %d EEs in read list found!\n", tmp___4, tmp___3, rr); } else { } rr = drbd_release_ee(mdev, & mdev->done_ee); if (rr != 0) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %d EEs in done list found!\n", tmp___6, tmp___5, rr); } else { } rr = drbd_release_ee(mdev, & mdev->net_ee); if (rr != 0) { tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %d EEs in net list found!\n", tmp___8, tmp___7, rr); } else { } return; } } static void drbd_delete_device(unsigned int minor ) { struct drbd_conf *mdev ; struct drbd_conf *tmp ; char const *tmp___0 ; char const *tmp___1 ; struct list_head *lp ; char const *tmp___2 ; char const *tmp___3 ; int _b ; int tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; { tmp = minor_to_mdev(minor); mdev = tmp; if ((unsigned long )mdev == (unsigned long )((struct drbd_conf *)0)) { return; } else { } if (mdev->open_cnt != 0) { tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: open_cnt = %d in %s:%u", tmp___1, tmp___0, mdev->open_cnt, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 3013); } else { } tmp___4 = list_empty((struct list_head const *)(& mdev->data.work.q)); _b = tmp___4 == 0; if (_b != 0) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___6, tmp___5, "drbd_delete_device", (char *)"!list_empty(&mdev->data.work.q)", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 3015); } else { } if (_b != 0) { lp = mdev->data.work.q.next; goto ldv_43853; ldv_43852: tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: lp = %p\n", tmp___3, tmp___2, lp); lp = lp->next; ldv_43853: __builtin_prefetch((void const *)lp->next); if ((unsigned long )(& mdev->data.work.q) != (unsigned long )lp) { goto ldv_43852; } else { } } else { } del_gendisk(mdev->vdisk); if ((unsigned long )mdev->this_bdev != (unsigned long )((struct block_device *)0)) { bdput(mdev->this_bdev); } else { } drbd_free_resources(mdev); drbd_release_ee_lists(mdev); kfree((void const *)mdev->ee_hash); lc_destroy(mdev->act_log); lc_destroy(mdev->resync); kfree((void const *)mdev->p_uuid); kfree((void const *)mdev->int_dig_out); kfree((void const *)mdev->int_dig_in); kfree((void const *)mdev->int_dig_vv); drbd_free_mdev(mdev); return; } } static void drbd_cleanup(void) { unsigned int i ; unsigned int tmp ; { unregister_reboot_notifier(& drbd_notifier); drbd_nl_cleanup(); if ((unsigned long )minor_table != (unsigned long )((struct drbd_conf **)0)) { if ((unsigned long )drbd_proc != (unsigned long )((struct proc_dir_entry *)0)) { remove_proc_entry("drbd", 0); } else { } i = minor_count; goto ldv_43860; ldv_43859: drbd_delete_device(i); ldv_43860: tmp = i; i = i - 1U; if (tmp != 0U) { goto ldv_43859; } else { } drbd_destroy_mempools(); } else { } kfree((void const *)minor_table); unregister_blkdev(147U, "drbd"); printk("<6>drbd: module cleanup done.\n"); return; } } static int drbd_congested(void *congested_data , int bdi_bits ) { struct drbd_conf *mdev ; struct request_queue *q ; char reason ; int r ; int tmp ; int tmp___0 ; int tmp___1 ; { mdev = (struct drbd_conf *)congested_data; reason = 45; r = 0; tmp = __inc_ap_bio_cond___0(mdev); if (tmp == 0) { r = bdi_bits; reason = 100; goto out; } else { } tmp___0 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___0 != 0) { q = bdev_get_queue((mdev->ldev)->backing_bdev); r = bdi_congested(& q->backing_dev_info, bdi_bits); put_ldev(mdev); if (r != 0) { reason = 98; } else { } } else { } if ((bdi_bits & 4) != 0) { tmp___1 = constant_test_bit(21U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___1 != 0) { r = r | 4; reason = (int )((signed char )reason) == 98 ? 97 : 110; } else { } } else { } out: mdev->congestion_reason = reason; return (r); } } struct drbd_conf *drbd_new_device(unsigned int minor ) { struct drbd_conf *mdev ; struct gendisk *disk ; struct request_queue *q ; void *tmp ; bool tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; void *tmp___4 ; void *tmp___5 ; { tmp = kzalloc___1(4192UL, 208U); mdev = (struct drbd_conf *)tmp; if ((unsigned long )mdev == (unsigned long )((struct drbd_conf *)0)) { return (0); } else { } tmp___0 = zalloc_cpumask_var(& mdev->cpu_mask, 208U); if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { goto out_no_cpumask; } else { } mdev->minor = minor; drbd_init_set_defaults(mdev); q = blk_alloc_queue(208U); if ((unsigned long )q == (unsigned long )((struct request_queue *)0)) { goto out_no_q; } else { } mdev->rq_queue = q; q->queuedata = (void *)mdev; disk = alloc_disk(1); if ((unsigned long )disk == (unsigned long )((struct gendisk *)0)) { goto out_no_disk; } else { } mdev->vdisk = disk; set_disk_ro(disk, 1); disk->queue = q; disk->major = 147; disk->first_minor = (int )minor; disk->fops = & drbd_ops; sprintf((char *)(& disk->disk_name), "drbd%d", minor); disk->private_data = (void *)mdev; mdev->this_bdev = bdget(minor | 154140672U); (mdev->this_bdev)->bd_contains = mdev->this_bdev; q->backing_dev_info.congested_fn = & drbd_congested; q->backing_dev_info.congested_data = (void *)mdev; blk_queue_make_request(q, & drbd_make_request_26); blk_queue_max_segment_size(q, 32768U); blk_queue_bounce_limit(q, 0xffffffffffffffffULL); blk_queue_merge_bvec(q, & drbd_merge_bvec); q->queue_lock = & mdev->req_lock; q->unplug_fn = & drbd_unplug_fn; mdev->md_io_page = alloc_pages(208U, 0U); if ((unsigned long )mdev->md_io_page == (unsigned long )((struct page *)0)) { goto out_no_io_page; } else { } tmp___2 = drbd_bm_init(mdev); if (tmp___2 != 0) { goto out_no_bitmap; } else { } tmp___3 = tl_init(mdev); if (tmp___3 == 0) { goto out_no_tl; } else { } tmp___4 = kzalloc___1(120UL, 208U); mdev->app_reads_hash = (struct hlist_head *)tmp___4; if ((unsigned long )mdev->app_reads_hash == (unsigned long )((struct hlist_head *)0)) { goto out_no_app_reads; } else { } tmp___5 = kzalloc___1(40UL, 208U); mdev->current_epoch = (struct drbd_epoch *)tmp___5; if ((unsigned long )mdev->current_epoch == (unsigned long )((struct drbd_epoch *)0)) { goto out_no_epoch; } else { } INIT_LIST_HEAD(& (mdev->current_epoch)->list); mdev->epochs = 1U; return (mdev); out_no_epoch: kfree((void const *)mdev->app_reads_hash); out_no_app_reads: tl_cleanup(mdev); out_no_tl: drbd_bm_cleanup(mdev); out_no_bitmap: __free_pages(mdev->md_io_page, 0U); out_no_io_page: put_disk(disk); out_no_disk: blk_cleanup_queue(q); out_no_q: free_cpumask_var(mdev->cpu_mask); out_no_cpumask: kfree((void const *)mdev); return (0); } } void drbd_free_mdev(struct drbd_conf *mdev ) { { kfree((void const *)mdev->current_epoch); kfree((void const *)mdev->app_reads_hash); tl_cleanup(mdev); if ((unsigned long )mdev->bitmap != (unsigned long )((struct drbd_bitmap *)0)) { drbd_bm_cleanup(mdev); } else { } __free_pages(mdev->md_io_page, 0U); put_disk(mdev->vdisk); blk_cleanup_queue(mdev->rq_queue); free_cpumask_var(mdev->cpu_mask); kfree((void const *)mdev); return; } } int drbd_init(void) { int err ; struct lock_class_key __key ; void *tmp ; struct lock_class_key __key___0 ; char const *tmp___0 ; { if (minor_count == 0U || minor_count > 255U) { printk("<3>drbd: invalid minor_count (%d)\n", minor_count); return (-22); } else { } err = drbd_nl_init(); if (err != 0) { return (err); } else { } err = register_blkdev(147U, "drbd"); if (err != 0) { printk("<3>drbd: unable to register block device major %d\n", 147); return (err); } else { } register_reboot_notifier(& drbd_notifier); err = -12; __init_waitqueue_head(& drbd_pp_wait, & __key); drbd_proc = 0; tmp = kzalloc___1((unsigned long )minor_count * 8UL, 208U); minor_table = (struct drbd_conf **)tmp; if ((unsigned long )minor_table == (unsigned long )((struct drbd_conf **)0)) { goto Enomem; } else { } err = drbd_create_mempools(); if (err != 0) { goto Enomem; } else { } drbd_proc = proc_create_data("drbd", 33060U, 0, & drbd_proc_fops, 0); if ((unsigned long )drbd_proc == (unsigned long )((struct proc_dir_entry *)0)) { printk("<3>drbd: unable to register proc file\n"); goto Enomem; } else { } __rwlock_init(& global_state_lock, "&global_state_lock", & __key___0); printk("<6>drbd: initialized. Version: 8.3.7 (api:%d/proto:%d-%d)\n", 88, 86, 93); tmp___0 = drbd_buildtag(); printk("<6>drbd: %s\n", tmp___0); printk("<6>drbd: registered as block device major %d\n", 147); printk("<6>drbd: minor_table @ 0x%p\n", minor_table); return (0); Enomem: drbd_cleanup(); if (err == -12) { printk("<3>drbd: ran out of memory\n"); } else { printk("<3>drbd: initialization failure\n"); } return (err); } } void drbd_free_bc(struct drbd_backing_dev *ldev ) { { if ((unsigned long )ldev == (unsigned long )((struct drbd_backing_dev *)0)) { return; } else { } bd_release(ldev->backing_bdev); bd_release(ldev->md_bdev); fput(ldev->lo_file); fput(ldev->md_file); kfree((void const *)ldev); return; } } void drbd_free_sock(struct drbd_conf *mdev ) { { if ((unsigned long )mdev->data.socket != (unsigned long )((struct socket *)0)) { ldv_mutex_lock_102(& mdev->data.mutex); kernel_sock_shutdown(mdev->data.socket, SHUT_RDWR); sock_release(mdev->data.socket); mdev->data.socket = 0; ldv_mutex_unlock_103(& mdev->data.mutex); } else { } if ((unsigned long )mdev->meta.socket != (unsigned long )((struct socket *)0)) { ldv_mutex_lock_104(& mdev->meta.mutex); kernel_sock_shutdown(mdev->meta.socket, SHUT_RDWR); sock_release(mdev->meta.socket); mdev->meta.socket = 0; ldv_mutex_unlock_105(& mdev->meta.mutex); } else { } return; } } void drbd_free_resources(struct drbd_conf *mdev ) { { crypto_free_hash(mdev->csums_tfm); mdev->csums_tfm = 0; crypto_free_hash(mdev->verify_tfm); mdev->verify_tfm = 0; crypto_free_hash(mdev->cram_hmac_tfm); mdev->cram_hmac_tfm = 0; crypto_free_hash(mdev->integrity_w_tfm); mdev->integrity_w_tfm = 0; crypto_free_hash(mdev->integrity_r_tfm); mdev->integrity_r_tfm = 0; drbd_free_sock(mdev); drbd_free_bc(mdev->ldev); mdev->ldev = 0; return; } } void drbd_md_sync(struct drbd_conf *mdev ) { struct meta_data_on_disk *buffer ; sector_t sector ; int i ; int tmp ; int tmp___0 ; void *tmp___1 ; sector_t tmp___2 ; __u64 tmp___3 ; __u64 tmp___4 ; __u32 tmp___5 ; __u32 tmp___6 ; __u32 tmp___7 ; __u32 tmp___8 ; __u64 tmp___9 ; __u32 tmp___10 ; char const *tmp___11 ; char const *tmp___12 ; sector_t tmp___13 ; char const *tmp___14 ; char const *tmp___15 ; int tmp___16 ; sector_t tmp___17 ; { tmp = test_and_clear_bit(6, (unsigned long volatile *)(& mdev->flags)); if (tmp == 0) { return; } else { } del_timer(& mdev->md_sync_timer); tmp___0 = _get_ldev_if_state(mdev, D_FAILED); if (tmp___0 == 0) { return; } else { } ldv_mutex_lock_106(& mdev->md_io_mutex); tmp___1 = lowmem_page_address(mdev->md_io_page); buffer = (struct meta_data_on_disk *)tmp___1; memset((void *)buffer, 0, 512UL); tmp___2 = drbd_get_capacity(mdev->this_bdev); tmp___3 = __fswab64((__u64 )tmp___2); buffer->la_size = tmp___3; i = 0; goto ldv_43924; ldv_43923: tmp___4 = __fswab64((mdev->ldev)->md.uuid[i]); buffer->uuid[i] = tmp___4; i = i + 1; ldv_43924: ; if (i <= 3) { goto ldv_43923; } else { } tmp___5 = __fswab32((mdev->ldev)->md.flags); buffer->flags = tmp___5; buffer->magic = 1795323011U; tmp___6 = __fswab32((mdev->ldev)->md.md_size_sect); buffer->md_size_sect = tmp___6; tmp___7 = __fswab32((__u32 )(mdev->ldev)->md.al_offset); buffer->al_offset = tmp___7; tmp___8 = __fswab32((mdev->act_log)->nr_elements); buffer->al_nr_extents = tmp___8; buffer->bm_bytes_per_bit = 1048576U; tmp___9 = __fswab64((mdev->ldev)->md.device_uuid); buffer->device_uuid = tmp___9; tmp___10 = __fswab32((__u32 )(mdev->ldev)->md.bm_offset); buffer->bm_offset = tmp___10; tmp___13 = drbd_md_ss__(mdev, mdev->ldev); if ((unsigned long long )tmp___13 != (mdev->ldev)->md.md_offset) { tmp___11 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___12 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( drbd_md_ss__(mdev, mdev->ldev) == mdev->ldev->md.md_offset ) in %s:%d\n", tmp___12, tmp___11, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 3423); } else { } sector = (sector_t )(mdev->ldev)->md.md_offset; tmp___16 = drbd_md_sync_page_io(mdev, mdev->ldev, sector, 1); if (tmp___16 != 0) { clear_bit(6, (unsigned long volatile *)(& mdev->flags)); } else { tmp___14 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___15 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: meta data update failed!\n", tmp___15, tmp___14); drbd_chk_io_error____1(mdev, 1, 1, "drbd_md_sync"); } tmp___17 = drbd_get_capacity(mdev->this_bdev); (mdev->ldev)->md.la_size_sect = (u64 )tmp___17; ldv_mutex_unlock_107(& mdev->md_io_mutex); put_ldev(mdev); return; } } int drbd_md_read(struct drbd_conf *mdev , struct drbd_backing_dev *bdev ) { struct meta_data_on_disk *buffer ; int i ; int rv ; int tmp ; void *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; int tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; __u32 tmp___6 ; __u32 tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; __u32 tmp___10 ; __u32 tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; __u32 tmp___14 ; __u32 tmp___15 ; char const *tmp___16 ; char const *tmp___17 ; __u32 tmp___18 ; __u32 tmp___19 ; char const *tmp___20 ; char const *tmp___21 ; __u32 tmp___22 ; __u64 tmp___23 ; __u64 tmp___24 ; __u32 tmp___25 ; __u32 tmp___26 ; __u64 tmp___27 ; { rv = 101; tmp = _get_ldev_if_state(mdev, D_ATTACHING); if (tmp == 0) { return (118); } else { } ldv_mutex_lock_108(& mdev->md_io_mutex); tmp___0 = lowmem_page_address(mdev->md_io_page); buffer = (struct meta_data_on_disk *)tmp___0; tmp___3 = drbd_md_sync_page_io(mdev, bdev, (sector_t )bdev->md.md_offset, 0); if (tmp___3 == 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Error while reading metadata.\n", tmp___2, tmp___1); rv = 118; goto err; } else { } tmp___6 = __fswab32(buffer->magic); if (tmp___6 != 2205418091U) { tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Error while reading metadata, magic not found.\n", tmp___5, tmp___4); rv = 119; goto err; } else { } tmp___10 = __fswab32(buffer->al_offset); if (tmp___10 != (unsigned int )bdev->md.al_offset) { tmp___7 = __fswab32(buffer->al_offset); tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: unexpected al_offset: %d (expected %d)\n", tmp___9, tmp___8, tmp___7, bdev->md.al_offset); rv = 119; goto err; } else { } tmp___14 = __fswab32(buffer->bm_offset); if (tmp___14 != (unsigned int )bdev->md.bm_offset) { tmp___11 = __fswab32(buffer->bm_offset); tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: unexpected bm_offset: %d (expected %d)\n", tmp___13, tmp___12, tmp___11, bdev->md.bm_offset); rv = 119; goto err; } else { } tmp___18 = __fswab32(buffer->md_size_sect); if (tmp___18 != bdev->md.md_size_sect) { tmp___15 = __fswab32(buffer->md_size_sect); tmp___16 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___17 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: unexpected md_size: %u (expected %u)\n", tmp___17, tmp___16, tmp___15, bdev->md.md_size_sect); rv = 119; goto err; } else { } tmp___22 = __fswab32(buffer->bm_bytes_per_bit); if (tmp___22 != 4096U) { tmp___19 = __fswab32(buffer->bm_bytes_per_bit); tmp___20 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___21 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: unexpected bm_bytes_per_bit: %u (expected %u)\n", tmp___21, tmp___20, tmp___19, 4096); rv = 119; goto err; } else { } tmp___23 = __fswab64(buffer->la_size); bdev->md.la_size_sect = tmp___23; i = 0; goto ldv_43936; ldv_43935: tmp___24 = __fswab64(buffer->uuid[i]); bdev->md.uuid[i] = tmp___24; i = i + 1; ldv_43936: ; if (i <= 3) { goto ldv_43935; } else { } tmp___25 = __fswab32(buffer->flags); bdev->md.flags = tmp___25; tmp___26 = __fswab32(buffer->al_nr_extents); mdev->sync_conf.al_extents = (int )tmp___26; tmp___27 = __fswab64(buffer->device_uuid); bdev->md.device_uuid = tmp___27; if (mdev->sync_conf.al_extents <= 6) { mdev->sync_conf.al_extents = 127; } else { } err: ldv_mutex_unlock_109(& mdev->md_io_mutex); put_ldev(mdev); return (rv); } } void drbd_md_mark_dirty(struct drbd_conf *mdev ) { { set_bit(6U, (unsigned long volatile *)(& mdev->flags)); mod_timer(& mdev->md_sync_timer, (unsigned long )jiffies + 1250UL); return; } } static void drbd_uuid_move_history(struct drbd_conf *mdev ) { int i ; { i = 2; goto ldv_43946; ldv_43945: (mdev->ldev)->md.uuid[i + 1] = (mdev->ldev)->md.uuid[i]; i = i + 1; ldv_43946: ; if (i <= 2) { goto ldv_43945; } else { } return; } } void _drbd_uuid_set(struct drbd_conf *mdev , int idx , u64 val ) { { if (idx == 0) { if ((unsigned int )*((unsigned char *)mdev + 1988UL) == 1U) { val = val | 1ULL; } else { val = val & 0xfffffffffffffffeULL; } drbd_set_ed_uuid(mdev, val); } else { } (mdev->ldev)->md.uuid[idx] = val; drbd_md_mark_dirty(mdev); return; } } void drbd_uuid_set(struct drbd_conf *mdev , int idx , u64 val ) { { if ((mdev->ldev)->md.uuid[idx] != 0ULL) { drbd_uuid_move_history(mdev); (mdev->ldev)->md.uuid[2] = (mdev->ldev)->md.uuid[idx]; } else { } _drbd_uuid_set(mdev, idx, val); return; } } void drbd_uuid_new_current(struct drbd_conf *mdev ) { u64 val ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Creating new current UUID\n", tmp___0, tmp); if ((mdev->ldev)->md.uuid[1] != 0ULL) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->ldev->md.uuid[UI_BITMAP] == 0 ) in %s:%d\n", tmp___2, tmp___1, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 3578); } else { } (mdev->ldev)->md.uuid[1] = (mdev->ldev)->md.uuid[0]; get_random_bytes((void *)(& val), 8); _drbd_uuid_set(mdev, 0, val); return; } } void drbd_uuid_set_bm(struct drbd_conf *mdev , u64 val ) { char const *tmp ; char const *tmp___0 ; { if ((mdev->ldev)->md.uuid[1] == 0ULL && val == 0ULL) { return; } else { } if (val == 0ULL) { drbd_uuid_move_history(mdev); (mdev->ldev)->md.uuid[2] = (mdev->ldev)->md.uuid[1]; (mdev->ldev)->md.uuid[1] = 0ULL; } else { if ((mdev->ldev)->md.uuid[1] != 0ULL) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: bm UUID already set", tmp___0, tmp); } else { } (mdev->ldev)->md.uuid[1] = val; (mdev->ldev)->md.uuid[1] = (mdev->ldev)->md.uuid[1] & 0xfffffffffffffffeULL; } drbd_md_mark_dirty(mdev); return; } } int drbd_bmio_set_n_write(struct drbd_conf *mdev ) { int rv ; int tmp ; { rv = -5; tmp = _get_ldev_if_state(mdev, D_ATTACHING); if (tmp != 0) { drbd_md_set_flag(mdev, 8); drbd_md_sync(mdev); drbd_bm_set_all(mdev); rv = drbd_bm_write(mdev); if (rv == 0) { drbd_md_clear_flag(mdev, 8); drbd_md_sync(mdev); } else { } put_ldev(mdev); } else { } return (rv); } } int drbd_bmio_clear_n_write(struct drbd_conf *mdev ) { int rv ; int tmp ; { rv = -5; tmp = _get_ldev_if_state(mdev, D_ATTACHING); if (tmp != 0) { drbd_bm_clear_all(mdev); rv = drbd_bm_write(mdev); put_ldev(mdev); } else { } return (rv); } } static int w_bitmap_io(struct drbd_conf *mdev , struct drbd_work *w , int unused ) { struct bm_io_work *work ; struct drbd_work const *__mptr ; int rv ; char const *tmp ; char const *tmp___0 ; int tmp___1 ; { __mptr = (struct drbd_work const *)w; work = (struct bm_io_work *)__mptr; tmp___1 = atomic_read((atomic_t const *)(& mdev->ap_bio_cnt)); if (tmp___1 != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( atomic_read(&mdev->ap_bio_cnt) == 0 ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 3657); } else { } drbd_bm_lock(mdev, work->why); rv = (*(work->io_fn))(mdev); drbd_bm_unlock(mdev); clear_bit(18, (unsigned long volatile *)(& mdev->flags)); __wake_up(& mdev->misc_wait, 3U, 1, 0); if ((unsigned long )work->done != (unsigned long )((void (*)(struct drbd_conf * , int ))0)) { (*(work->done))(mdev, rv); } else { } clear_bit(19, (unsigned long volatile *)(& mdev->flags)); work->why = 0; return (1); } } void drbd_queue_bitmap_io(struct drbd_conf *mdev , int (*io_fn)(struct drbd_conf * ) , void (*done)(struct drbd_conf * , int ) , char *why ) { char const *tmp ; char const *tmp___0 ; struct task_struct *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; int tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; int tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; int tmp___10 ; char const *tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; char const *tmp___14 ; int tmp___15 ; int tmp___16 ; { tmp___1 = get_current(); if ((unsigned long )tmp___1 != (unsigned long )mdev->worker.task) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( current == mdev->worker.task ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 3692); } else { } tmp___4 = constant_test_bit(19U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___4 != 0) { tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( !test_bit(BITMAP_IO_QUEUED, &mdev->flags) ) in %s:%d\n", tmp___3, tmp___2, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 3694); } else { } tmp___7 = constant_test_bit(18U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___7 != 0) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( !test_bit(BITMAP_IO, &mdev->flags) ) in %s:%d\n", tmp___6, tmp___5, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 3695); } else { } tmp___10 = list_empty((struct list_head const *)(& mdev->bm_io_work.w.list)); if (tmp___10 == 0) { tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( list_empty(&mdev->bm_io_work.w.list) ) in %s:%d\n", tmp___9, tmp___8, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 3696); } else { } if ((unsigned long )mdev->bm_io_work.why != (unsigned long )((char *)0)) { tmp___11 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___12 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: FIXME going to queue \'%s\' but \'%s\' still pending?\n", tmp___12, tmp___11, why, mdev->bm_io_work.why); } else { } mdev->bm_io_work.io_fn = io_fn; mdev->bm_io_work.done = done; mdev->bm_io_work.why = why; set_bit(18U, (unsigned long volatile *)(& mdev->flags)); tmp___16 = atomic_read((atomic_t const *)(& mdev->ap_bio_cnt)); if (tmp___16 == 0) { tmp___15 = list_empty((struct list_head const *)(& mdev->bm_io_work.w.list)); if (tmp___15 != 0) { set_bit(19U, (unsigned long volatile *)(& mdev->flags)); drbd_queue_work(& mdev->data.work, & mdev->bm_io_work.w); } else { tmp___13 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___14 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: FIXME avoided double queuing bm_io_work\n", tmp___14, tmp___13); } } else { } return; } } int drbd_bitmap_io(struct drbd_conf *mdev , int (*io_fn)(struct drbd_conf * ) , char *why ) { int rv ; char const *tmp ; char const *tmp___0 ; struct task_struct *tmp___1 ; { tmp___1 = get_current(); if ((unsigned long )tmp___1 == (unsigned long )mdev->worker.task) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( current != mdev->worker.task ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_main.c.prepared", 3728); } else { } drbd_suspend_io(mdev); drbd_bm_lock(mdev, why); rv = (*io_fn)(mdev); drbd_bm_unlock(mdev); drbd_resume_io(mdev); return (rv); } } void drbd_md_set_flag(struct drbd_conf *mdev , int flag ) { { if (((mdev->ldev)->md.flags & (u32 )flag) != (u32 )flag) { drbd_md_mark_dirty(mdev); (mdev->ldev)->md.flags = (mdev->ldev)->md.flags | (u32 )flag; } else { } return; } } void drbd_md_clear_flag(struct drbd_conf *mdev , int flag ) { { if (((mdev->ldev)->md.flags & (u32 )flag) != 0U) { drbd_md_mark_dirty(mdev); (mdev->ldev)->md.flags = (mdev->ldev)->md.flags & (u32 )(~ flag); } else { } return; } } int drbd_md_test_flag(struct drbd_backing_dev *bdev , int flag ) { { return ((bdev->md.flags & (u32 )flag) != 0U); } } static void md_sync_timer_fn(unsigned long data ) { struct drbd_conf *mdev ; { mdev = (struct drbd_conf *)data; drbd_queue_work_front(& mdev->data.work, & mdev->md_sync_work); return; } } static int w_md_sync(struct drbd_conf *mdev , struct drbd_work *w , int unused ) { char const *tmp ; char const *tmp___0 ; { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: md_sync_timer expired! Worker calls drbd_md_sync().\n", tmp___0, tmp); drbd_md_sync(mdev); return (1); } } static unsigned long _drbd_fault_random(struct fault_random_state *rsp ) { long refresh ; unsigned long tmp ; __u32 tmp___0 ; { tmp = rsp->count; rsp->count = rsp->count - 1UL; if (tmp == 0UL) { get_random_bytes((void *)(& refresh), 8); rsp->state = rsp->state + (unsigned long )refresh; rsp->count = 10000UL; } else { } rsp->state = rsp->state * 39916801UL + 479001701UL; tmp___0 = __fswahw32((__u32 )rsp->state); return ((unsigned long )tmp___0); } } static char *_drbd_fault_str(unsigned int type ) { char *_faults[10U] ; { _faults[0] = (char *)"Meta-data write"; _faults[1] = (char *)"Meta-data read"; _faults[2] = (char *)"Resync write"; _faults[3] = (char *)"Resync read"; _faults[4] = (char *)"Data write"; _faults[5] = (char *)"Data read"; _faults[6] = (char *)"Data read ahead"; _faults[7] = (char *)"BM allocation"; _faults[8] = (char *)"EE allocation"; _faults[9] = (char *)"receive data corruption"; return (type <= 9U ? _faults[type] : (char *)"**Unknown**"); } } unsigned int _drbd_insert_fault(struct drbd_conf *mdev , unsigned int type ) { struct fault_random_state rrs ; unsigned int ret ; unsigned int tmp ; unsigned long tmp___0 ; int tmp___1 ; char *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; int tmp___5 ; { rrs.state = 0UL; rrs.count = 0UL; if (fault_devs == 0) { goto _L; } else { tmp = mdev_to_minor(mdev); if ((fault_devs >> (int )tmp) & 1) { _L: /* CIL Label */ tmp___0 = _drbd_fault_random(& rrs); if (tmp___0 % 100UL + 1UL <= (unsigned long )fault_rate) { tmp___1 = 1; } else { tmp___1 = 0; } } else { tmp___1 = 0; } } ret = (unsigned int )tmp___1; if (ret != 0U) { fault_count = fault_count + 1; tmp___5 = __printk_ratelimit("_drbd_insert_fault"); if (tmp___5 != 0) { tmp___2 = _drbd_fault_str(type); tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: ***Simulating %s failure\n", tmp___4, tmp___3, tmp___2); } else { } } else { } return (ret); } } char const *drbd_buildtag(void) { char buildtag[38U] ; unsigned int tmp ; { buildtag[0] = '\000'; tmp = 1U; while (1) { if (tmp >= 38U) { break; } else { } buildtag[tmp] = (char)0; tmp = tmp + 1U; } if ((int )((signed char )buildtag[0]) == 0) { if ((unsigned long )(& __this_module) != (unsigned long )((struct module *)0)) { sprintf((char *)(& buildtag), "srcversion: %-24s", __this_module.srcversion); } else { buildtag[0] = 98; } } else { } return ((char const *)(& buildtag)); } } void ldv_main6_sequence_infinite_withcheck_stateful(void) { struct block_device *var_group1 ; fmode_t var_drbd_open_67_p1 ; int res_drbd_open_67 ; struct gendisk *var_group2 ; fmode_t var_drbd_release_68_p1 ; struct notifier_block *var_group3 ; unsigned long var_drbd_notify_sys_75_p1 ; void *var_drbd_notify_sys_75_p2 ; unsigned long var_md_sync_timer_fn_100_p0 ; unsigned long var_delay_probe_timer_fn_63_p0 ; int ldv_s_drbd_ops_block_device_operations ; int tmp ; int tmp___0 ; int tmp___1 ; { ldv_s_drbd_ops_block_device_operations = 0; LDV_IN_INTERRUPT = 1; ldv_initialize(); ldv_handler_precall(); tmp = drbd_init(); if (tmp != 0) { goto ldv_final; } else { } goto ldv_44109; ldv_44108: tmp___0 = nondet_int(); switch (tmp___0) { case 0: ; if (ldv_s_drbd_ops_block_device_operations == 0) { ldv_handler_precall(); res_drbd_open_67 = drbd_open(var_group1, var_drbd_open_67_p1); ldv_check_return_value(res_drbd_open_67); if (res_drbd_open_67 != 0) { goto ldv_module_exit; } else { } ldv_s_drbd_ops_block_device_operations = ldv_s_drbd_ops_block_device_operations + 1; } else { } goto ldv_44102; case 1: ; if (ldv_s_drbd_ops_block_device_operations == 1) { ldv_handler_precall(); drbd_release(var_group2, var_drbd_release_68_p1); ldv_s_drbd_ops_block_device_operations = 0; } else { } goto ldv_44102; case 2: ldv_handler_precall(); drbd_notify_sys(var_group3, var_drbd_notify_sys_75_p1, var_drbd_notify_sys_75_p2); goto ldv_44102; case 3: ldv_handler_precall(); md_sync_timer_fn(var_md_sync_timer_fn_100_p0); goto ldv_44102; case 4: ldv_handler_precall(); delay_probe_timer_fn(var_delay_probe_timer_fn_63_p0); goto ldv_44102; default: ; goto ldv_44102; } ldv_44102: ; ldv_44109: tmp___1 = nondet_int(); if (tmp___1 != 0 || ldv_s_drbd_ops_block_device_operations != 0) { goto ldv_44108; } else { } ldv_module_exit: ldv_handler_precall(); drbd_cleanup(); ldv_final: ldv_check_final_state(); return; } } void ldv_mutex_lock_85(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_86(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_87(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_88(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_state_mutex_of_drbd_conf(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_89(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_state_mutex_of_drbd_conf(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_90(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_lock_91(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_92(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_93(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_94(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_95(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_96(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_97(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_98(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_99(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_100(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_101(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_102(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_103(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_104(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_105(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_106(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_md_io_mutex_of_drbd_conf(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_107(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_md_io_mutex_of_drbd_conf(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_108(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_md_io_mutex_of_drbd_conf(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_109(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_md_io_mutex_of_drbd_conf(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } static char const *drbd_conn_s_names[22U] = { "StandAlone", "Disconnecting", "Unconnected", "Timeout", "BrokenPipe", "NetworkFailure", "ProtocolError", "TearDown", "WFConnection", "WFReportParams", "Connected", "StartingSyncS", "StartingSyncT", "WFBitMapS", "WFBitMapT", "WFSyncUUID", "SyncSource", "SyncTarget", "VerifyS", "VerifyT", "PausedSyncS", "PausedSyncT"}; static char const *drbd_role_s_names[3U] = { "Unknown", "Primary", "Secondary"}; static char const *drbd_disk_s_names[9U] = { "Diskless", "Attaching", "Failed", "Negotiating", "Inconsistent", "Outdated", "DUnknown", "Consistent", "UpToDate"}; static char const *drbd_state_sw_errors[20U] = { 0, "Multiple primaries not allowed by config", "Need access to UpToDate data", 0, "Can not resync without local disk", "Can not resync without remote disk", "Refusing to be Outdated while Connected", "Refusing to be Primary while peer is not outdated", "Can not start OV/resync since it is already active", "Can not disconnect a StandAlone device", "State change was refused by peer node", "Device is diskless, the requested operation requires a disk", "Device is held open by someone", "Have no net/connection configuration", "Need a verify algorithm to start online verify", "Need a connection to start verify or resync", "Disk state is lower than outdated", "Peer does not support protocol", "In transient state, retry after next state change", "Concurrent state changes detected and aborted"}; char const *drbd_conn_str(enum drbd_conns s ) { { return ((unsigned int )s <= 21U ? drbd_conn_s_names[(unsigned int )s] : "TOO_LARGE"); } } char const *drbd_role_str(enum drbd_role s ) { { return ((unsigned int )s <= 2U ? drbd_role_s_names[(unsigned int )s] : "TOO_LARGE"); } } char const *drbd_disk_str(enum drbd_disk_state s ) { { return ((unsigned int )s <= 8U ? drbd_disk_s_names[(unsigned int )s] : "TOO_LARGE"); } } char const *drbd_set_st_err_str(enum drbd_state_ret_codes err ) { { return ((int )err >= -19 ? ((int )err < 0 ? drbd_state_sw_errors[- ((int )err)] : "TOO_LARGE") : "TOO_SMALL"); } } __inline static __u64 __le64_to_cpup(__le64 const *p ) { { return ((__u64 )*p); } } __inline static __u32 __le32_to_cpup(__le32 const *p ) { { return ((__u32 )*p); } } __inline static __u16 __le16_to_cpup(__le16 const *p ) { { return ((__u16 )*p); } } extern int snprintf(char * , size_t , char const * , ...) ; extern int __bitmap_equal(unsigned long const * , unsigned long const * , int ) ; extern int __bitmap_parse(char const * , unsigned int , int , unsigned long * , int ) ; __inline static void bitmap_copy(unsigned long *dst , unsigned long const *src , int nbits ) { int len ; size_t __len ; void *__ret ; { len = (int )((unsigned int )(((unsigned long )nbits + 63UL) / 64UL) * 8U); __len = (size_t )len; __ret = memcpy((void *)dst, (void const *)src, __len); return; } } __inline static int bitmap_equal(unsigned long const *src1 , unsigned long const *src2 , int nbits ) { int tmp ; { tmp = __bitmap_equal(src1, src2, nbits); return (tmp); } } __inline static bool cpumask_equal(struct cpumask const *src1p , struct cpumask const *src2p ) { int tmp ; { tmp = bitmap_equal((unsigned long const *)(& src1p->bits), (unsigned long const *)(& src2p->bits), nr_cpu_ids); return (tmp != 0); } } __inline static void cpumask_copy(struct cpumask *dstp , struct cpumask const *srcp ) { { bitmap_copy((unsigned long *)(& dstp->bits), (unsigned long const *)(& srcp->bits), nr_cpu_ids); return; } } void ldv_mutex_unlock_136(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_137(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_139(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_141(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_135(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_138(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_140(struct mutex *ldv_func_arg1 ) ; __inline static struct thread_info *current_thread_info___2(void) { struct thread_info *ti ; unsigned long pfo_ret__ ; { switch (8UL) { case 1UL: __asm__ ("movb %%gs:%P1,%0": "=q" (pfo_ret__): "p" (& kernel_stack)); goto ldv_5814; case 2UL: __asm__ ("movw %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& kernel_stack)); goto ldv_5814; case 4UL: __asm__ ("movl %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& kernel_stack)); goto ldv_5814; case 8UL: __asm__ ("movq %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& kernel_stack)); goto ldv_5814; default: __bad_percpu_size(); } ldv_5814: ti = (struct thread_info *)(pfo_ret__ - 8152UL); return (ti); } } extern struct subprocess_info *call_usermodehelper_setup(char * , char ** , char ** , gfp_t ) ; extern int call_usermodehelper_exec(struct subprocess_info * , enum umh_wait ) ; __inline static int call_usermodehelper(char *path , char **argv , char **envp , enum umh_wait wait ) { struct subprocess_info *info ; gfp_t gfp_mask ; int tmp ; { gfp_mask = (int )wait == -1 ? 32U : 208U; info = call_usermodehelper_setup(path, argv, envp, gfp_mask); if ((unsigned long )info == (unsigned long )((struct subprocess_info *)0)) { return (-12); } else { } tmp = call_usermodehelper_exec(info, wait); return (tmp); } } extern int kobject_uevent(struct kobject * , enum kobject_action ) ; __inline static void trace_module_get___0(struct module *mod , unsigned long ip , int refcnt ) { void **it_func ; int tmp ; int tmp___0 ; void **_________p1 ; long tmp___1 ; { tmp___1 = ldv__builtin_expect(__tracepoint_module_get.state != 0, 0L); if (tmp___1 != 0L) { rcu_read_lock_sched_notrace(); tmp = debug_lockdep_rcu_enabled(); if (tmp != 0) { tmp___0 = rcu_read_lock_sched_held(); if (tmp___0 == 0) { lockdep_rcu_dereference("include/trace/events/module.h", 81); } else { } } else { } _________p1 = *((void ** volatile *)(& __tracepoint_module_get.funcs)); it_func = _________p1; if ((unsigned long )it_func != (unsigned long )((void **)0)) { ldv_11109: (*((void (*)(struct module * , unsigned long , int ))*it_func))(mod, ip, refcnt); it_func = it_func + 1; if ((unsigned long )*it_func != (unsigned long )((void *)0)) { goto ldv_11109; } else { } } else { } rcu_read_lock_sched_notrace(); } else { } return; } } __inline static int try_module_get___0(struct module *module ) { int ret ; void const *__vpp_verify ; int pao_ID__ ; int pao_ID_____0 ; int pao_ID_____1 ; int pao_ID_____2 ; unsigned int pscr_ret__ ; void const *__vpp_verify___0 ; unsigned int pfo_ret__ ; unsigned int pfo_ret_____0 ; unsigned int pfo_ret_____1 ; unsigned int pfo_ret_____2 ; int tmp ; long tmp___0 ; { ret = 1; if ((unsigned long )module != (unsigned long )((struct module *)0)) { tmp = module_is_live(module); tmp___0 = ldv__builtin_expect(tmp != 0, 1L); if (tmp___0 != 0L) { __vpp_verify = 0; switch (4UL) { case 1UL: pao_ID__ = 1; switch (4UL) { case 1UL: ; if (pao_ID__ == 1) { __asm__ ("incb %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID__ == -1) { __asm__ ("decb %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addb %1, %%gs:%P0": "+m" ((module->refptr)->incs): "qi" (1U)); } goto ldv_11476; case 2UL: ; if (pao_ID__ == 1) { __asm__ ("incw %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID__ == -1) { __asm__ ("decw %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addw %1, %%gs:%P0": "+m" ((module->refptr)->incs): "ri" (1U)); } goto ldv_11476; case 4UL: ; if (pao_ID__ == 1) { __asm__ ("incl %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID__ == -1) { __asm__ ("decl %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addl %1, %%gs:%P0": "+m" ((module->refptr)->incs): "ri" (1U)); } goto ldv_11476; case 8UL: ; if (pao_ID__ == 1) { __asm__ ("incq %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID__ == -1) { __asm__ ("decq %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addq %1, %%gs:%P0": "+m" ((module->refptr)->incs): "re" (1U)); } goto ldv_11476; default: __bad_percpu_size(); } ldv_11476: ; goto ldv_11481; case 2UL: pao_ID_____0 = 1; switch (4UL) { case 1UL: ; if (pao_ID_____0 == 1) { __asm__ ("incb %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____0 == -1) { __asm__ ("decb %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addb %1, %%gs:%P0": "+m" ((module->refptr)->incs): "qi" (1U)); } goto ldv_11487; case 2UL: ; if (pao_ID_____0 == 1) { __asm__ ("incw %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____0 == -1) { __asm__ ("decw %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addw %1, %%gs:%P0": "+m" ((module->refptr)->incs): "ri" (1U)); } goto ldv_11487; case 4UL: ; if (pao_ID_____0 == 1) { __asm__ ("incl %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____0 == -1) { __asm__ ("decl %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addl %1, %%gs:%P0": "+m" ((module->refptr)->incs): "ri" (1U)); } goto ldv_11487; case 8UL: ; if (pao_ID_____0 == 1) { __asm__ ("incq %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____0 == -1) { __asm__ ("decq %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addq %1, %%gs:%P0": "+m" ((module->refptr)->incs): "re" (1U)); } goto ldv_11487; default: __bad_percpu_size(); } ldv_11487: ; goto ldv_11481; case 4UL: pao_ID_____1 = 1; switch (4UL) { case 1UL: ; if (pao_ID_____1 == 1) { __asm__ ("incb %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____1 == -1) { __asm__ ("decb %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addb %1, %%gs:%P0": "+m" ((module->refptr)->incs): "qi" (1U)); } goto ldv_11497; case 2UL: ; if (pao_ID_____1 == 1) { __asm__ ("incw %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____1 == -1) { __asm__ ("decw %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addw %1, %%gs:%P0": "+m" ((module->refptr)->incs): "ri" (1U)); } goto ldv_11497; case 4UL: ; if (pao_ID_____1 == 1) { __asm__ ("incl %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____1 == -1) { __asm__ ("decl %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addl %1, %%gs:%P0": "+m" ((module->refptr)->incs): "ri" (1U)); } goto ldv_11497; case 8UL: ; if (pao_ID_____1 == 1) { __asm__ ("incq %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____1 == -1) { __asm__ ("decq %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addq %1, %%gs:%P0": "+m" ((module->refptr)->incs): "re" (1U)); } goto ldv_11497; default: __bad_percpu_size(); } ldv_11497: ; goto ldv_11481; case 8UL: pao_ID_____2 = 1; switch (4UL) { case 1UL: ; if (pao_ID_____2 == 1) { __asm__ ("incb %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____2 == -1) { __asm__ ("decb %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addb %1, %%gs:%P0": "+m" ((module->refptr)->incs): "qi" (1U)); } goto ldv_11507; case 2UL: ; if (pao_ID_____2 == 1) { __asm__ ("incw %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____2 == -1) { __asm__ ("decw %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addw %1, %%gs:%P0": "+m" ((module->refptr)->incs): "ri" (1U)); } goto ldv_11507; case 4UL: ; if (pao_ID_____2 == 1) { __asm__ ("incl %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____2 == -1) { __asm__ ("decl %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addl %1, %%gs:%P0": "+m" ((module->refptr)->incs): "ri" (1U)); } goto ldv_11507; case 8UL: ; if (pao_ID_____2 == 1) { __asm__ ("incq %%gs:%P0": "+m" ((module->refptr)->incs)); } else if (pao_ID_____2 == -1) { __asm__ ("decq %%gs:%P0": "+m" ((module->refptr)->incs)); } else { __asm__ ("addq %1, %%gs:%P0": "+m" ((module->refptr)->incs): "re" (1U)); } goto ldv_11507; default: __bad_percpu_size(); } ldv_11507: ; goto ldv_11481; default: __bad_size_call_parameter(); goto ldv_11481; } ldv_11481: __vpp_verify___0 = 0; switch (4UL) { case 1UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%P1,%0": "=q" (pfo_ret__): "m" ((module->refptr)->incs)); goto ldv_11520; case 2UL: __asm__ ("movw %%gs:%P1,%0": "=r" (pfo_ret__): "m" ((module->refptr)->incs)); goto ldv_11520; case 4UL: __asm__ ("movl %%gs:%P1,%0": "=r" (pfo_ret__): "m" ((module->refptr)->incs)); goto ldv_11520; case 8UL: __asm__ ("movq %%gs:%P1,%0": "=r" (pfo_ret__): "m" ((module->refptr)->incs)); goto ldv_11520; default: __bad_percpu_size(); } ldv_11520: pscr_ret__ = pfo_ret__; goto ldv_11526; case 2UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%P1,%0": "=q" (pfo_ret_____0): "m" ((module->refptr)->incs)); goto ldv_11530; case 2UL: __asm__ ("movw %%gs:%P1,%0": "=r" (pfo_ret_____0): "m" ((module->refptr)->incs)); goto ldv_11530; case 4UL: __asm__ ("movl %%gs:%P1,%0": "=r" (pfo_ret_____0): "m" ((module->refptr)->incs)); goto ldv_11530; case 8UL: __asm__ ("movq %%gs:%P1,%0": "=r" (pfo_ret_____0): "m" ((module->refptr)->incs)); goto ldv_11530; default: __bad_percpu_size(); } ldv_11530: pscr_ret__ = pfo_ret_____0; goto ldv_11526; case 4UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%P1,%0": "=q" (pfo_ret_____1): "m" ((module->refptr)->incs)); goto ldv_11539; case 2UL: __asm__ ("movw %%gs:%P1,%0": "=r" (pfo_ret_____1): "m" ((module->refptr)->incs)); goto ldv_11539; case 4UL: __asm__ ("movl %%gs:%P1,%0": "=r" (pfo_ret_____1): "m" ((module->refptr)->incs)); goto ldv_11539; case 8UL: __asm__ ("movq %%gs:%P1,%0": "=r" (pfo_ret_____1): "m" ((module->refptr)->incs)); goto ldv_11539; default: __bad_percpu_size(); } ldv_11539: pscr_ret__ = pfo_ret_____1; goto ldv_11526; case 8UL: ; switch (4UL) { case 1UL: __asm__ ("movb %%gs:%P1,%0": "=q" (pfo_ret_____2): "m" ((module->refptr)->incs)); goto ldv_11548; case 2UL: __asm__ ("movw %%gs:%P1,%0": "=r" (pfo_ret_____2): "m" ((module->refptr)->incs)); goto ldv_11548; case 4UL: __asm__ ("movl %%gs:%P1,%0": "=r" (pfo_ret_____2): "m" ((module->refptr)->incs)); goto ldv_11548; case 8UL: __asm__ ("movq %%gs:%P1,%0": "=r" (pfo_ret_____2): "m" ((module->refptr)->incs)); goto ldv_11548; default: __bad_percpu_size(); } ldv_11548: pscr_ret__ = pfo_ret_____2; goto ldv_11526; default: __bad_size_call_parameter(); goto ldv_11526; } ldv_11526: ; trace_module_get___0(module, (unsigned long )((void *)0), (int )pscr_ret__); } else { ret = 0; } } else { } return (ret); } } __inline static void trace_kmalloc___5(unsigned long call_site , void const *ptr , size_t bytes_req , size_t bytes_alloc , gfp_t gfp_flags ) { void **it_func ; int tmp ; int tmp___0 ; void **_________p1 ; long tmp___1 ; { tmp___1 = ldv__builtin_expect(__tracepoint_kmalloc.state != 0, 0L); if (tmp___1 != 0L) { rcu_read_lock_sched_notrace(); tmp = debug_lockdep_rcu_enabled(); if (tmp != 0) { tmp___0 = rcu_read_lock_sched_held(); if (tmp___0 == 0) { lockdep_rcu_dereference("include/trace/events/kmem.h", 87); } else { } } else { } _________p1 = *((void ** volatile *)(& __tracepoint_kmalloc.funcs)); it_func = _________p1; if ((unsigned long )it_func != (unsigned long )((void **)0)) { ldv_13346: (*((void (*)(unsigned long , void const * , size_t , size_t , gfp_t ))*it_func))(call_site, ptr, bytes_req, bytes_alloc, gfp_flags); it_func = it_func + 1; if ((unsigned long )*it_func != (unsigned long )((void *)0)) { goto ldv_13346; } else { } } else { } rcu_read_lock_sched_notrace(); } else { } return; } } __inline static void *kmalloc_large___5(size_t size , gfp_t flags ) { unsigned int order ; int tmp ; void *ret ; unsigned long tmp___0 ; { tmp = get_order(size); order = (unsigned int )tmp; tmp___0 = __get_free_pages(flags | 16384U, order); ret = (void *)tmp___0; kmemleak_alloc((void const *)ret, size, 1, flags); trace_kmalloc___5((unsigned long )((void *)0), (void const *)ret, size, 4096UL << (int )order, flags); return (ret); } } __inline static void *kmalloc___5(size_t size , gfp_t flags ) { void *ret ; void *tmp ; struct kmem_cache *s ; struct kmem_cache *tmp___0 ; void *tmp___1 ; { if (0) { if (size > 8192UL) { tmp = kmalloc_large___5(size, flags); return (tmp); } else { } if ((flags & 1U) == 0U) { tmp___0 = kmalloc_slab(size); s = tmp___0; if ((unsigned long )s == (unsigned long )((struct kmem_cache *)0)) { return (16); } else { } ret = kmem_cache_alloc_notrace(s, flags); trace_kmalloc___5((unsigned long )((void *)0), (void const *)ret, size, (size_t )s->size, flags); return (ret); } else { } } else { } tmp___1 = __kmalloc(size, flags); return (tmp___1); } } __inline static void *kzalloc___2(size_t size , gfp_t flags ) { void *tmp ; { tmp = kmalloc___5(size, flags | 32768U); return (tmp); } } extern struct file *filp_open(char const * , int , int ) ; extern int bd_claim(struct block_device * , void * ) ; extern int cn_add_callback(struct cb_id * , char * , void (*)(struct cn_msg * , struct netlink_skb_parms * ) ) ; extern void cn_del_callback(struct cb_id * ) ; extern int cn_netlink_send(struct cn_msg * , u32 , gfp_t ) ; __inline static void pagefault_disable___0(void) { struct thread_info *tmp ; { tmp = current_thread_info___2(); tmp->preempt_count = tmp->preempt_count + 1; __asm__ volatile ("": : : "memory"); return; } } __inline static void pagefault_enable___0(void) { struct thread_info *tmp ; { __asm__ volatile ("": : : "memory"); tmp = current_thread_info___2(); tmp->preempt_count = tmp->preempt_count + -1; __asm__ volatile ("": : : "memory"); return; } } extern void add_disk(struct gendisk * ) ; __inline static void *kmap_atomic___0(struct page *page , enum km_type idx ) { void *tmp ; { pagefault_disable___0(); tmp = lowmem_page_address(page); return (tmp); } } extern void blk_queue_max_hw_sectors(struct request_queue * , unsigned int ) ; extern void blk_queue_max_segments(struct request_queue * , unsigned short ) ; extern void blk_queue_logical_block_size(struct request_queue * , unsigned short ) ; extern int blk_stack_limits(struct queue_limits * , struct queue_limits * , sector_t ) ; extern void blk_queue_segment_boundary(struct request_queue * , unsigned long ) ; __inline static unsigned int queue_max_sectors(struct request_queue *q ) { { return (q->limits.max_sectors); } } extern struct lru_cache *lc_create(char const * , struct kmem_cache * , unsigned int , size_t , size_t ) ; __inline static sector_t drbd_get_max_capacity___1(struct drbd_backing_dev *bdev ) { sector_t s ; sector_t __min1 ; sector_t __min2 ; sector_t tmp___0 ; sector_t tmp___1 ; sector_t __min1___0 ; sector_t __min2___0 ; sector_t tmp___2 ; sector_t __min1___1 ; sector_t __min2___1 ; sector_t __min1___2 ; sector_t __min2___2 ; sector_t tmp___3 ; { switch (bdev->dc.meta_dev_idx) { case -1: ; case -3: tmp___1 = drbd_get_capacity(bdev->backing_bdev); if (tmp___1 != 0UL) { __min1 = 34359738368UL; tmp___0 = drbd_md_first_sector(bdev); __min2 = tmp___0; s = __min1 < __min2 ? __min1 : __min2; } else { s = 0UL; } goto ldv_41762; case -2: __min1___0 = 34359738368UL; tmp___2 = drbd_get_capacity(bdev->backing_bdev); __min2___0 = tmp___2; s = __min1___0 < __min2___0 ? __min1___0 : __min2___0; __min1___1 = s; __min2___1 = (unsigned long )(bdev->md.md_size_sect - (u32 )bdev->md.bm_offset) << 15; s = __min1___1 < __min2___1 ? __min1___1 : __min2___1; goto ldv_41762; default: __min1___2 = 8587575296UL; tmp___3 = drbd_get_capacity(bdev->backing_bdev); __min2___2 = tmp___3; s = __min1___2 < __min2___2 ? __min1___2 : __min2___2; } ldv_41762: ; return (s); } } __inline static u16 get_unaligned_le16(void const *p ) { __u16 tmp ; { tmp = __le16_to_cpup((__le16 const *)p); return (tmp); } } __inline static u32 get_unaligned_le32(void const *p ) { __u32 tmp ; { tmp = __le32_to_cpup((__le32 const *)p); return (tmp); } } __inline static u64 get_unaligned_le64(void const *p ) { __u64 tmp ; { tmp = __le64_to_cpup((__le64 const *)p); return (tmp); } } __inline static void put_unaligned_le16(u16 val , void *p ) { { *((__le16 *)p) = val; return; } } __inline static void put_unaligned_le32(u32 val , void *p ) { { *((__le32 *)p) = val; return; } } __inline static void put_unaligned_le64(u64 val , void *p ) { { *((__le64 *)p) = val; return; } } extern void __bad_unaligned_access_size(void) ; static struct tag const tag_descriptions[75U] = { {0, 0, 0}, {"primary_force", 32768, 4}, {"disk_size", 16384, 8}, {"backing_dev", 57344, 128}, {"meta_dev", 57344, 128}, {"meta_dev_idx", 8192, 4}, {"on_io_error", 0, 4}, {"fencing", 0, 4}, {"my_addr", 57344, 128}, {"peer_addr", 57344, 128}, {"shared_secret", 49152, 64}, {"cram_hmac_alg", 49152, 64}, {0, 0, 0}, {0, 0, 0}, {"timeout", 0, 4}, {"wire_protocol", 8192, 4}, {"try_connect_int", 0, 4}, {"ping_int", 0, 4}, {"max_epoch_size", 0, 4}, {"max_buffers", 0, 4}, {"unplug_watermark", 0, 4}, {"sndbuf_size", 0, 4}, {"ko_count", 0, 4}, {0, 0, 0}, {"after_sb_0p", 0, 4}, {"after_sb_1p", 0, 4}, {"after_sb_2p", 0, 4}, {"want_lose", 32768, 4}, {"two_primaries", 32768, 4}, {"resize_size", 16384, 8}, {"rate", 0, 4}, {"after", 0, 4}, {"al_extents", 0, 4}, {"state_i", 0, 4}, {"uuids", 49152, 32}, {"uuids_flags", 0, 4}, {"use_degraded", 32768, 4}, {"use_bmbv", 32768, 4}, {"helper", 49152, 32}, {"rr_conflict", 0, 4}, {"ping_timeo", 0, 4}, {"always_asbp", 32768, 4}, {0, 0, 0}, {"sync_progress", 0, 4}, {"integrity_alg", 49152, 64}, {"dump_ee_reason", 49152, 32}, {"seen_digest", 49152, 64}, {"calc_digest", 49152, 64}, {"ee_sector", 16384, 8}, {"ee_block_id", 16384, 8}, {"ee_data", 49152, 32768}, {"cpu_mask", 49152, 32}, {"verify_alg", 49152, 64}, {"no_disk_flush", 32768, 4}, {"no_md_flush", 32768, 4}, {0, 0, 0}, {"max_bio_bvecs", 0, 4}, {"no_disk_barrier", 32768, 4}, {"no_disk_drain", 32768, 4}, {0, 0, 0}, {"mind_af", 40960, 4}, {"no_cork", 32768, 4}, {"auto_sndbuf_size", 40960, 4}, {"clear_bm", 40960, 4}, {"csums_alg", 49152, 64}, {"use_rle", 32768, 4}, {"start_sector", 16384, 8}, {"rcvbuf_size", 0, 4}, {"resize_force", 32768, 4}, {"no_resync", 40960, 4}, {"dry_run", 40960, 4}, {"dp_volume", 0, 4}, {"dp_interval", 0, 4}, {"throttle_th", 0, 4}, {"hold_off_th", 0, 4}}; static unsigned short *tl_add_blob(unsigned short *tl , enum drbd_tags tag , void const *data , int len ) ; static unsigned short *tl_add_str(unsigned short *tl , enum drbd_tags tag , char const *str ) ; static unsigned short *tl_add_int(unsigned short *tl , enum drbd_tags tag , void const *val ) ; static char *drbd_m_holder = (char *)"Hands off! this is DRBD\'s meta data device."; static int primary_from_tags(struct drbd_conf *mdev , unsigned short *tags , struct primary *arg ) ; static int primary_from_tags(struct drbd_conf *mdev , unsigned short *tags , struct primary *arg ) { int tag ; int dlen ; unsigned short *tmp ; u16 tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; unsigned short *tmp___3 ; u16 tmp___4 ; { goto ldv_42336; ldv_42335: tmp = tags; tags = tags + 1; tmp___0 = get_unaligned_le16((void const *)tmp); dlen = (int )tmp___0; switch (tag & 8191) { case 1: arg->primary_force = (int )((signed char )*((char *)tags)) != 0; goto ldv_42333; default: ; if ((tag & 8192) != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Unknown tag: %d\n", tmp___2, tmp___1, tag & 8191); return (0); } else { } } ldv_42333: tags = tags + (unsigned long )dlen; ldv_42336: tmp___3 = tags; tags = tags + 1; tmp___4 = get_unaligned_le16((void const *)tmp___3); tag = (int )tmp___4; if (tag != 0) { goto ldv_42335; } else { } return (1); } } static int disk_conf_from_tags(struct drbd_conf *mdev , unsigned short *tags , struct disk_conf *arg ) ; static int disk_conf_from_tags(struct drbd_conf *mdev , unsigned short *tags , struct disk_conf *arg ) { int tag ; int dlen ; unsigned short *tmp ; u16 tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; size_t __len ; size_t __min1 ; size_t __min2 ; void *__ret ; char const *tmp___3 ; char const *tmp___4 ; size_t __len___0 ; size_t __min1___0 ; size_t __min2___0 ; void *__ret___0 ; u32 tmp___5 ; u32 tmp___6 ; u32 tmp___7 ; u32 tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; unsigned short *tmp___11 ; u16 tmp___12 ; { goto ldv_42397; ldv_42396: tmp = tags; tags = tags + 1; tmp___0 = get_unaligned_le16((void const *)tmp); dlen = (int )tmp___0; switch (tag & 8191) { case 2: arg->disk_size = get_unaligned_le64((void const *)tags); goto ldv_42365; case 3: ; if (dlen > 128) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: arg too long: %s (%u wanted, max len: %u bytes)\n", tmp___2, tmp___1, (char *)"backing_dev", dlen, 128U); return (0); } else { } arg->backing_dev_len = dlen; __min1 = (size_t )dlen; __min2 = 128UL; __len = __min1 < __min2 ? __min1 : __min2; __ret = memcpy((void *)(& arg->backing_dev), (void const *)tags, __len); goto ldv_42365; case 4: ; if (dlen > 128) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: arg too long: %s (%u wanted, max len: %u bytes)\n", tmp___4, tmp___3, (char *)"meta_dev", dlen, 128U); return (0); } else { } arg->meta_dev_len = dlen; __min1___0 = (size_t )dlen; __min2___0 = 128UL; __len___0 = __min1___0 < __min2___0 ? __min1___0 : __min2___0; __ret___0 = memcpy((void *)(& arg->meta_dev), (void const *)tags, __len___0); goto ldv_42365; case 5: tmp___5 = get_unaligned_le32((void const *)tags); arg->meta_dev_idx = (int )tmp___5; goto ldv_42365; case 6: tmp___6 = get_unaligned_le32((void const *)tags); arg->on_io_error = (int )tmp___6; goto ldv_42365; case 7: tmp___7 = get_unaligned_le32((void const *)tags); arg->fencing = (int )tmp___7; goto ldv_42365; case 37: arg->use_bmbv = (int )((signed char )*((char *)tags)) != 0; goto ldv_42365; case 53: arg->no_disk_flush = (int )((signed char )*((char *)tags)) != 0; goto ldv_42365; case 54: arg->no_md_flush = (int )((signed char )*((char *)tags)) != 0; goto ldv_42365; case 56: tmp___8 = get_unaligned_le32((void const *)tags); arg->max_bio_bvecs = (int )tmp___8; goto ldv_42365; case 57: arg->no_disk_barrier = (int )((signed char )*((char *)tags)) != 0; goto ldv_42365; case 58: arg->no_disk_drain = (int )((signed char )*((char *)tags)) != 0; goto ldv_42365; default: ; if ((tag & 8192) != 0) { tmp___9 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___10 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Unknown tag: %d\n", tmp___10, tmp___9, tag & 8191); return (0); } else { } } ldv_42365: tags = tags + (unsigned long )dlen; ldv_42397: tmp___11 = tags; tags = tags + 1; tmp___12 = get_unaligned_le16((void const *)tmp___11); tag = (int )tmp___12; if (tag != 0) { goto ldv_42396; } else { } return (1); } } static int net_conf_from_tags(struct drbd_conf *mdev , unsigned short *tags , struct net_conf *arg ) ; static int net_conf_from_tags(struct drbd_conf *mdev , unsigned short *tags , struct net_conf *arg ) { int tag ; int dlen ; unsigned short *tmp ; u16 tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; size_t __len ; size_t __min1 ; size_t __min2 ; void *__ret ; char const *tmp___3 ; char const *tmp___4 ; size_t __len___0 ; size_t __min1___0 ; size_t __min2___0 ; void *__ret___0 ; char const *tmp___5 ; char const *tmp___6 ; size_t __len___1 ; size_t __min1___1 ; size_t __min2___1 ; void *__ret___1 ; char const *tmp___7 ; char const *tmp___8 ; size_t __len___2 ; size_t __min1___2 ; size_t __min2___2 ; void *__ret___2 ; char const *tmp___9 ; char const *tmp___10 ; size_t __len___3 ; size_t __min1___3 ; size_t __min2___3 ; void *__ret___3 ; u32 tmp___11 ; u32 tmp___12 ; u32 tmp___13 ; u32 tmp___14 ; u32 tmp___15 ; u32 tmp___16 ; u32 tmp___17 ; u32 tmp___18 ; u32 tmp___19 ; u32 tmp___20 ; u32 tmp___21 ; u32 tmp___22 ; u32 tmp___23 ; u32 tmp___24 ; u32 tmp___25 ; char const *tmp___26 ; char const *tmp___27 ; unsigned short *tmp___28 ; u16 tmp___29 ; { goto ldv_42500; ldv_42499: tmp = tags; tags = tags + 1; tmp___0 = get_unaligned_le16((void const *)tmp); dlen = (int )tmp___0; switch (tag & 8191) { case 8: ; if (dlen > 128) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: arg too long: %s (%u wanted, max len: %u bytes)\n", tmp___2, tmp___1, (char *)"my_addr", dlen, 128U); return (0); } else { } arg->my_addr_len = dlen; __min1 = (size_t )dlen; __min2 = 128UL; __len = __min1 < __min2 ? __min1 : __min2; __ret = memcpy((void *)(& arg->my_addr), (void const *)tags, __len); goto ldv_42435; case 9: ; if (dlen > 128) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: arg too long: %s (%u wanted, max len: %u bytes)\n", tmp___4, tmp___3, (char *)"peer_addr", dlen, 128U); return (0); } else { } arg->peer_addr_len = dlen; __min1___0 = (size_t )dlen; __min2___0 = 128UL; __len___0 = __min1___0 < __min2___0 ? __min1___0 : __min2___0; __ret___0 = memcpy((void *)(& arg->peer_addr), (void const *)tags, __len___0); goto ldv_42435; case 10: ; if (dlen > 64) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: arg too long: %s (%u wanted, max len: %u bytes)\n", tmp___6, tmp___5, (char *)"shared_secret", dlen, 64U); return (0); } else { } arg->shared_secret_len = dlen; __min1___1 = (size_t )dlen; __min2___1 = 64UL; __len___1 = __min1___1 < __min2___1 ? __min1___1 : __min2___1; __ret___1 = memcpy((void *)(& arg->shared_secret), (void const *)tags, __len___1); goto ldv_42435; case 11: ; if (dlen > 64) { tmp___7 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___8 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: arg too long: %s (%u wanted, max len: %u bytes)\n", tmp___8, tmp___7, (char *)"cram_hmac_alg", dlen, 64U); return (0); } else { } arg->cram_hmac_alg_len = dlen; __min1___2 = (size_t )dlen; __min2___2 = 64UL; __len___2 = __min1___2 < __min2___2 ? __min1___2 : __min2___2; __ret___2 = memcpy((void *)(& arg->cram_hmac_alg), (void const *)tags, __len___2); goto ldv_42435; case 44: ; if (dlen > 64) { tmp___9 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___10 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: arg too long: %s (%u wanted, max len: %u bytes)\n", tmp___10, tmp___9, (char *)"integrity_alg", dlen, 64U); return (0); } else { } arg->integrity_alg_len = dlen; __min1___3 = (size_t )dlen; __min2___3 = 64UL; __len___3 = __min1___3 < __min2___3 ? __min1___3 : __min2___3; __ret___3 = memcpy((void *)(& arg->integrity_alg), (void const *)tags, __len___3); goto ldv_42435; case 14: tmp___11 = get_unaligned_le32((void const *)tags); arg->timeout = (int )tmp___11; goto ldv_42435; case 15: tmp___12 = get_unaligned_le32((void const *)tags); arg->wire_protocol = (int )tmp___12; goto ldv_42435; case 16: tmp___13 = get_unaligned_le32((void const *)tags); arg->try_connect_int = (int )tmp___13; goto ldv_42435; case 17: tmp___14 = get_unaligned_le32((void const *)tags); arg->ping_int = (int )tmp___14; goto ldv_42435; case 18: tmp___15 = get_unaligned_le32((void const *)tags); arg->max_epoch_size = (int )tmp___15; goto ldv_42435; case 19: tmp___16 = get_unaligned_le32((void const *)tags); arg->max_buffers = (int )tmp___16; goto ldv_42435; case 20: tmp___17 = get_unaligned_le32((void const *)tags); arg->unplug_watermark = (int )tmp___17; goto ldv_42435; case 21: tmp___18 = get_unaligned_le32((void const *)tags); arg->sndbuf_size = (int )tmp___18; goto ldv_42435; case 22: tmp___19 = get_unaligned_le32((void const *)tags); arg->ko_count = (int )tmp___19; goto ldv_42435; case 24: tmp___20 = get_unaligned_le32((void const *)tags); arg->after_sb_0p = (int )tmp___20; goto ldv_42435; case 25: tmp___21 = get_unaligned_le32((void const *)tags); arg->after_sb_1p = (int )tmp___21; goto ldv_42435; case 26: tmp___22 = get_unaligned_le32((void const *)tags); arg->after_sb_2p = (int )tmp___22; goto ldv_42435; case 39: tmp___23 = get_unaligned_le32((void const *)tags); arg->rr_conflict = (int )tmp___23; goto ldv_42435; case 40: tmp___24 = get_unaligned_le32((void const *)tags); arg->ping_timeo = (int )tmp___24; goto ldv_42435; case 67: tmp___25 = get_unaligned_le32((void const *)tags); arg->rcvbuf_size = (int )tmp___25; goto ldv_42435; case 60: arg->mind_af = (int )((signed char )*((char *)tags)) != 0; goto ldv_42435; case 27: arg->want_lose = (int )((signed char )*((char *)tags)) != 0; goto ldv_42435; case 28: arg->two_primaries = (int )((signed char )*((char *)tags)) != 0; goto ldv_42435; case 41: arg->always_asbp = (int )((signed char )*((char *)tags)) != 0; goto ldv_42435; case 61: arg->no_cork = (int )((signed char )*((char *)tags)) != 0; goto ldv_42435; case 62: arg->auto_sndbuf_size = (int )((signed char )*((char *)tags)) != 0; goto ldv_42435; case 70: arg->dry_run = (int )((signed char )*((char *)tags)) != 0; goto ldv_42435; default: ; if ((tag & 8192) != 0) { tmp___26 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___27 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Unknown tag: %d\n", tmp___27, tmp___26, tag & 8191); return (0); } else { } } ldv_42435: tags = tags + (unsigned long )dlen; ldv_42500: tmp___28 = tags; tags = tags + 1; tmp___29 = get_unaligned_le16((void const *)tmp___28); tag = (int )tmp___29; if (tag != 0) { goto ldv_42499; } else { } return (1); } } static int resize_from_tags(struct drbd_conf *mdev , unsigned short *tags , struct resize *arg ) ; static int resize_from_tags(struct drbd_conf *mdev , unsigned short *tags , struct resize *arg ) { int tag ; int dlen ; unsigned short *tmp ; u16 tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; unsigned short *tmp___3 ; u16 tmp___4 ; { goto ldv_42534; ldv_42533: tmp = tags; tags = tags + 1; tmp___0 = get_unaligned_le16((void const *)tmp); dlen = (int )tmp___0; switch (tag & 8191) { case 29: arg->resize_size = get_unaligned_le64((void const *)tags); goto ldv_42529; case 68: arg->resize_force = (int )((signed char )*((char *)tags)) != 0; goto ldv_42529; case 69: arg->no_resync = (int )((signed char )*((char *)tags)) != 0; goto ldv_42529; default: ; if ((tag & 8192) != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Unknown tag: %d\n", tmp___2, tmp___1, tag & 8191); return (0); } else { } } ldv_42529: tags = tags + (unsigned long )dlen; ldv_42534: tmp___3 = tags; tags = tags + 1; tmp___4 = get_unaligned_le16((void const *)tmp___3); tag = (int )tmp___4; if (tag != 0) { goto ldv_42533; } else { } return (1); } } static int syncer_conf_from_tags(struct drbd_conf *mdev , unsigned short *tags , struct syncer_conf *arg ) ; static int syncer_conf_from_tags(struct drbd_conf *mdev , unsigned short *tags , struct syncer_conf *arg ) { int tag ; int dlen ; unsigned short *tmp ; u16 tmp___0 ; u32 tmp___1 ; u32 tmp___2 ; u32 tmp___3 ; u32 tmp___4 ; u32 tmp___5 ; u32 tmp___6 ; u32 tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; size_t __len ; size_t __min1 ; size_t __min2 ; void *__ret ; char const *tmp___10 ; char const *tmp___11 ; size_t __len___0 ; size_t __min1___0 ; size_t __min2___0 ; void *__ret___0 ; char const *tmp___12 ; char const *tmp___13 ; size_t __len___1 ; size_t __min1___1 ; size_t __min2___1 ; void *__ret___1 ; char const *tmp___14 ; char const *tmp___15 ; unsigned short *tmp___16 ; u16 tmp___17 ; { goto ldv_42588; ldv_42587: tmp = tags; tags = tags + 1; tmp___0 = get_unaligned_le16((void const *)tmp); dlen = (int )tmp___0; switch (tag & 8191) { case 30: tmp___1 = get_unaligned_le32((void const *)tags); arg->rate = (int )tmp___1; goto ldv_42548; case 31: tmp___2 = get_unaligned_le32((void const *)tags); arg->after = (int )tmp___2; goto ldv_42548; case 32: tmp___3 = get_unaligned_le32((void const *)tags); arg->al_extents = (int )tmp___3; goto ldv_42548; case 71: tmp___4 = get_unaligned_le32((void const *)tags); arg->dp_volume = (int )tmp___4; goto ldv_42548; case 72: tmp___5 = get_unaligned_le32((void const *)tags); arg->dp_interval = (int )tmp___5; goto ldv_42548; case 73: tmp___6 = get_unaligned_le32((void const *)tags); arg->throttle_th = (int )tmp___6; goto ldv_42548; case 74: tmp___7 = get_unaligned_le32((void const *)tags); arg->hold_off_th = (int )tmp___7; goto ldv_42548; case 52: ; if (dlen > 64) { tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: arg too long: %s (%u wanted, max len: %u bytes)\n", tmp___9, tmp___8, (char *)"verify_alg", dlen, 64U); return (0); } else { } arg->verify_alg_len = dlen; __min1 = (size_t )dlen; __min2 = 64UL; __len = __min1 < __min2 ? __min1 : __min2; __ret = memcpy((void *)(& arg->verify_alg), (void const *)tags, __len); goto ldv_42548; case 51: ; if (dlen > 32) { tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: arg too long: %s (%u wanted, max len: %u bytes)\n", tmp___11, tmp___10, (char *)"cpu_mask", dlen, 32U); return (0); } else { } arg->cpu_mask_len = dlen; __min1___0 = (size_t )dlen; __min2___0 = 32UL; __len___0 = __min1___0 < __min2___0 ? __min1___0 : __min2___0; __ret___0 = memcpy((void *)(& arg->cpu_mask), (void const *)tags, __len___0); goto ldv_42548; case 64: ; if (dlen > 64) { tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: arg too long: %s (%u wanted, max len: %u bytes)\n", tmp___13, tmp___12, (char *)"csums_alg", dlen, 64U); return (0); } else { } arg->csums_alg_len = dlen; __min1___1 = (size_t )dlen; __min2___1 = 64UL; __len___1 = __min1___1 < __min2___1 ? __min1___1 : __min2___1; __ret___1 = memcpy((void *)(& arg->csums_alg), (void const *)tags, __len___1); goto ldv_42548; case 65: arg->use_rle = (int )((signed char )*((char *)tags)) != 0; goto ldv_42548; default: ; if ((tag & 8192) != 0) { tmp___14 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___15 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Unknown tag: %d\n", tmp___15, tmp___14, tag & 8191); return (0); } else { } } ldv_42548: tags = tags + (unsigned long )dlen; ldv_42588: tmp___16 = tags; tags = tags + 1; tmp___17 = get_unaligned_le16((void const *)tmp___16); tag = (int )tmp___17; if (tag != 0) { goto ldv_42587; } else { } return (1); } } static int start_ov_from_tags(struct drbd_conf *mdev , unsigned short *tags , struct start_ov *arg ) ; static int start_ov_from_tags(struct drbd_conf *mdev , unsigned short *tags , struct start_ov *arg ) { int tag ; int dlen ; unsigned short *tmp ; u16 tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; unsigned short *tmp___3 ; u16 tmp___4 ; { goto ldv_42887; ldv_42886: tmp = tags; tags = tags + 1; tmp___0 = get_unaligned_le16((void const *)tmp); dlen = (int )tmp___0; switch (tag & 8191) { case 66: arg->start_sector = get_unaligned_le64((void const *)tags); goto ldv_42884; default: ; if ((tag & 8192) != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Unknown tag: %d\n", tmp___2, tmp___1, tag & 8191); return (0); } else { } } ldv_42884: tags = tags + (unsigned long )dlen; ldv_42887: tmp___3 = tags; tags = tags + 1; tmp___4 = get_unaligned_le16((void const *)tmp___3); tag = (int )tmp___4; if (tag != 0) { goto ldv_42886; } else { } return (1); } } static int new_c_uuid_from_tags(struct drbd_conf *mdev , unsigned short *tags , struct new_c_uuid *arg ) ; static int new_c_uuid_from_tags(struct drbd_conf *mdev , unsigned short *tags , struct new_c_uuid *arg ) { int tag ; int dlen ; unsigned short *tmp ; u16 tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; unsigned short *tmp___3 ; u16 tmp___4 ; { goto ldv_42904; ldv_42903: tmp = tags; tags = tags + 1; tmp___0 = get_unaligned_le16((void const *)tmp); dlen = (int )tmp___0; switch (tag & 8191) { case 63: arg->clear_bm = (int )((signed char )*((char *)tags)) != 0; goto ldv_42901; default: ; if ((tag & 8192) != 0) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Unknown tag: %d\n", tmp___2, tmp___1, tag & 8191); return (0); } else { } } ldv_42901: tags = tags + (unsigned long )dlen; ldv_42904: tmp___3 = tags; tags = tags + 1; tmp___4 = get_unaligned_le16((void const *)tmp___3); tag = (int )tmp___4; if (tag != 0) { goto ldv_42903; } else { } return (1); } } static unsigned short *disk_conf_to_tags(struct drbd_conf *mdev , struct disk_conf *arg , unsigned short *tags ) ; static unsigned short *disk_conf_to_tags(struct drbd_conf *mdev , struct disk_conf *arg , unsigned short *tags ) { void *__gu_p ; unsigned short *tmp ; void *__gu_p___0 ; unsigned short *tmp___0 ; void *__gu_p___1 ; void *__gu_p___2 ; unsigned short *tmp___1 ; void *__gu_p___3 ; unsigned short *tmp___2 ; size_t __len ; void *__ret ; void *__gu_p___4 ; unsigned short *tmp___3 ; void *__gu_p___5 ; unsigned short *tmp___4 ; size_t __len___0 ; void *__ret___0 ; void *__gu_p___6 ; unsigned short *tmp___5 ; void *__gu_p___7 ; unsigned short *tmp___6 ; void *__gu_p___8 ; void *__gu_p___9 ; unsigned short *tmp___7 ; void *__gu_p___10 ; unsigned short *tmp___8 ; void *__gu_p___11 ; void *__gu_p___12 ; unsigned short *tmp___9 ; void *__gu_p___13 ; unsigned short *tmp___10 ; void *__gu_p___14 ; void *__gu_p___15 ; unsigned short *tmp___11 ; void *__gu_p___16 ; unsigned short *tmp___12 ; void *__gu_p___17 ; unsigned short *tmp___13 ; void *__gu_p___18 ; unsigned short *tmp___14 ; void *__gu_p___19 ; unsigned short *tmp___15 ; void *__gu_p___20 ; unsigned short *tmp___16 ; void *__gu_p___21 ; unsigned short *tmp___17 ; void *__gu_p___22 ; unsigned short *tmp___18 ; void *__gu_p___23 ; void *__gu_p___24 ; unsigned short *tmp___19 ; void *__gu_p___25 ; unsigned short *tmp___20 ; void *__gu_p___26 ; unsigned short *tmp___21 ; void *__gu_p___27 ; unsigned short *tmp___22 ; { tmp = tags; tags = tags + 1; __gu_p = (void *)tmp; switch (2UL) { case 1UL: *((u8 *)__gu_p) = 2U; goto ldv_42949; case 2UL: put_unaligned_le16(16386, __gu_p); goto ldv_42949; case 4UL: put_unaligned_le32(16386U, __gu_p); goto ldv_42949; case 8UL: put_unaligned_le64(16386ULL, __gu_p); goto ldv_42949; default: __bad_unaligned_access_size(); goto ldv_42949; } ldv_42949: tmp___0 = tags; tags = tags + 1; __gu_p___0 = (void *)tmp___0; switch (2UL) { case 1UL: *((u8 *)__gu_p___0) = 8U; goto ldv_42956; case 2UL: put_unaligned_le16(8, __gu_p___0); goto ldv_42956; case 4UL: put_unaligned_le32(8U, __gu_p___0); goto ldv_42956; case 8UL: put_unaligned_le64(8ULL, __gu_p___0); goto ldv_42956; default: __bad_unaligned_access_size(); goto ldv_42956; } ldv_42956: __gu_p___1 = (void *)tags; switch (8UL) { case 1UL: *((u8 *)__gu_p___1) = (unsigned char )arg->disk_size; goto ldv_42963; case 2UL: put_unaligned_le16((int )((unsigned short )arg->disk_size), __gu_p___1); goto ldv_42963; case 4UL: put_unaligned_le32((unsigned int )arg->disk_size, __gu_p___1); goto ldv_42963; case 8UL: put_unaligned_le64(arg->disk_size, __gu_p___1); goto ldv_42963; default: __bad_unaligned_access_size(); goto ldv_42963; } ldv_42963: tags = tags + 8U; tmp___1 = tags; tags = tags + 1; __gu_p___2 = (void *)tmp___1; switch (2UL) { case 1UL: *((u8 *)__gu_p___2) = 3U; goto ldv_42970; case 2UL: put_unaligned_le16(57347, __gu_p___2); goto ldv_42970; case 4UL: put_unaligned_le32(57347U, __gu_p___2); goto ldv_42970; case 8UL: put_unaligned_le64(57347ULL, __gu_p___2); goto ldv_42970; default: __bad_unaligned_access_size(); goto ldv_42970; } ldv_42970: tmp___2 = tags; tags = tags + 1; __gu_p___3 = (void *)tmp___2; switch (2UL) { case 1UL: *((u8 *)__gu_p___3) = (unsigned char )arg->backing_dev_len; goto ldv_42977; case 2UL: put_unaligned_le16((int )((unsigned short )arg->backing_dev_len), __gu_p___3); goto ldv_42977; case 4UL: put_unaligned_le32((unsigned int )arg->backing_dev_len, __gu_p___3); goto ldv_42977; case 8UL: put_unaligned_le64((unsigned long long )arg->backing_dev_len, __gu_p___3); goto ldv_42977; default: __bad_unaligned_access_size(); goto ldv_42977; } ldv_42977: __len = (size_t )arg->backing_dev_len; __ret = memcpy((void *)tags, (void const *)(& arg->backing_dev), __len); tags = tags + (unsigned long )arg->backing_dev_len; tmp___3 = tags; tags = tags + 1; __gu_p___4 = (void *)tmp___3; switch (2UL) { case 1UL: *((u8 *)__gu_p___4) = 4U; goto ldv_42987; case 2UL: put_unaligned_le16(57348, __gu_p___4); goto ldv_42987; case 4UL: put_unaligned_le32(57348U, __gu_p___4); goto ldv_42987; case 8UL: put_unaligned_le64(57348ULL, __gu_p___4); goto ldv_42987; default: __bad_unaligned_access_size(); goto ldv_42987; } ldv_42987: tmp___4 = tags; tags = tags + 1; __gu_p___5 = (void *)tmp___4; switch (2UL) { case 1UL: *((u8 *)__gu_p___5) = (unsigned char )arg->meta_dev_len; goto ldv_42994; case 2UL: put_unaligned_le16((int )((unsigned short )arg->meta_dev_len), __gu_p___5); goto ldv_42994; case 4UL: put_unaligned_le32((unsigned int )arg->meta_dev_len, __gu_p___5); goto ldv_42994; case 8UL: put_unaligned_le64((unsigned long long )arg->meta_dev_len, __gu_p___5); goto ldv_42994; default: __bad_unaligned_access_size(); goto ldv_42994; } ldv_42994: __len___0 = (size_t )arg->meta_dev_len; __ret___0 = memcpy((void *)tags, (void const *)(& arg->meta_dev), __len___0); tags = tags + (unsigned long )arg->meta_dev_len; tmp___5 = tags; tags = tags + 1; __gu_p___6 = (void *)tmp___5; switch (2UL) { case 1UL: *((u8 *)__gu_p___6) = 5U; goto ldv_43004; case 2UL: put_unaligned_le16(8197, __gu_p___6); goto ldv_43004; case 4UL: put_unaligned_le32(8197U, __gu_p___6); goto ldv_43004; case 8UL: put_unaligned_le64(8197ULL, __gu_p___6); goto ldv_43004; default: __bad_unaligned_access_size(); goto ldv_43004; } ldv_43004: tmp___6 = tags; tags = tags + 1; __gu_p___7 = (void *)tmp___6; switch (2UL) { case 1UL: *((u8 *)__gu_p___7) = 4U; goto ldv_43011; case 2UL: put_unaligned_le16(4, __gu_p___7); goto ldv_43011; case 4UL: put_unaligned_le32(4U, __gu_p___7); goto ldv_43011; case 8UL: put_unaligned_le64(4ULL, __gu_p___7); goto ldv_43011; default: __bad_unaligned_access_size(); goto ldv_43011; } ldv_43011: __gu_p___8 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___8) = (unsigned char )arg->meta_dev_idx; goto ldv_43018; case 2UL: put_unaligned_le16((int )((unsigned short )arg->meta_dev_idx), __gu_p___8); goto ldv_43018; case 4UL: put_unaligned_le32((unsigned int )arg->meta_dev_idx, __gu_p___8); goto ldv_43018; case 8UL: put_unaligned_le64((unsigned long long )arg->meta_dev_idx, __gu_p___8); goto ldv_43018; default: __bad_unaligned_access_size(); goto ldv_43018; } ldv_43018: tags = tags + 4U; tmp___7 = tags; tags = tags + 1; __gu_p___9 = (void *)tmp___7; switch (2UL) { case 1UL: *((u8 *)__gu_p___9) = 6U; goto ldv_43025; case 2UL: put_unaligned_le16(6, __gu_p___9); goto ldv_43025; case 4UL: put_unaligned_le32(6U, __gu_p___9); goto ldv_43025; case 8UL: put_unaligned_le64(6ULL, __gu_p___9); goto ldv_43025; default: __bad_unaligned_access_size(); goto ldv_43025; } ldv_43025: tmp___8 = tags; tags = tags + 1; __gu_p___10 = (void *)tmp___8; switch (2UL) { case 1UL: *((u8 *)__gu_p___10) = 4U; goto ldv_43032; case 2UL: put_unaligned_le16(4, __gu_p___10); goto ldv_43032; case 4UL: put_unaligned_le32(4U, __gu_p___10); goto ldv_43032; case 8UL: put_unaligned_le64(4ULL, __gu_p___10); goto ldv_43032; default: __bad_unaligned_access_size(); goto ldv_43032; } ldv_43032: __gu_p___11 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___11) = (unsigned char )arg->on_io_error; goto ldv_43039; case 2UL: put_unaligned_le16((int )((unsigned short )arg->on_io_error), __gu_p___11); goto ldv_43039; case 4UL: put_unaligned_le32((unsigned int )arg->on_io_error, __gu_p___11); goto ldv_43039; case 8UL: put_unaligned_le64((unsigned long long )arg->on_io_error, __gu_p___11); goto ldv_43039; default: __bad_unaligned_access_size(); goto ldv_43039; } ldv_43039: tags = tags + 4U; tmp___9 = tags; tags = tags + 1; __gu_p___12 = (void *)tmp___9; switch (2UL) { case 1UL: *((u8 *)__gu_p___12) = 7U; goto ldv_43046; case 2UL: put_unaligned_le16(7, __gu_p___12); goto ldv_43046; case 4UL: put_unaligned_le32(7U, __gu_p___12); goto ldv_43046; case 8UL: put_unaligned_le64(7ULL, __gu_p___12); goto ldv_43046; default: __bad_unaligned_access_size(); goto ldv_43046; } ldv_43046: tmp___10 = tags; tags = tags + 1; __gu_p___13 = (void *)tmp___10; switch (2UL) { case 1UL: *((u8 *)__gu_p___13) = 4U; goto ldv_43053; case 2UL: put_unaligned_le16(4, __gu_p___13); goto ldv_43053; case 4UL: put_unaligned_le32(4U, __gu_p___13); goto ldv_43053; case 8UL: put_unaligned_le64(4ULL, __gu_p___13); goto ldv_43053; default: __bad_unaligned_access_size(); goto ldv_43053; } ldv_43053: __gu_p___14 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___14) = (unsigned char )arg->fencing; goto ldv_43060; case 2UL: put_unaligned_le16((int )((unsigned short )arg->fencing), __gu_p___14); goto ldv_43060; case 4UL: put_unaligned_le32((unsigned int )arg->fencing, __gu_p___14); goto ldv_43060; case 8UL: put_unaligned_le64((unsigned long long )arg->fencing, __gu_p___14); goto ldv_43060; default: __bad_unaligned_access_size(); goto ldv_43060; } ldv_43060: tags = tags + 4U; tmp___11 = tags; tags = tags + 1; __gu_p___15 = (void *)tmp___11; switch (2UL) { case 1UL: *((u8 *)__gu_p___15) = 37U; goto ldv_43067; case 2UL: put_unaligned_le16(32805, __gu_p___15); goto ldv_43067; case 4UL: put_unaligned_le32(32805U, __gu_p___15); goto ldv_43067; case 8UL: put_unaligned_le64(32805ULL, __gu_p___15); goto ldv_43067; default: __bad_unaligned_access_size(); goto ldv_43067; } ldv_43067: tmp___12 = tags; tags = tags + 1; __gu_p___16 = (void *)tmp___12; switch (2UL) { case 1UL: *((u8 *)__gu_p___16) = 1U; goto ldv_43074; case 2UL: put_unaligned_le16(1, __gu_p___16); goto ldv_43074; case 4UL: put_unaligned_le32(1U, __gu_p___16); goto ldv_43074; case 8UL: put_unaligned_le64(1ULL, __gu_p___16); goto ldv_43074; default: __bad_unaligned_access_size(); goto ldv_43074; } ldv_43074: *((char *)tags) = (char )arg->use_bmbv; tags = tags + 1U; tmp___13 = tags; tags = tags + 1; __gu_p___17 = (void *)tmp___13; switch (2UL) { case 1UL: *((u8 *)__gu_p___17) = 53U; goto ldv_43081; case 2UL: put_unaligned_le16(32821, __gu_p___17); goto ldv_43081; case 4UL: put_unaligned_le32(32821U, __gu_p___17); goto ldv_43081; case 8UL: put_unaligned_le64(32821ULL, __gu_p___17); goto ldv_43081; default: __bad_unaligned_access_size(); goto ldv_43081; } ldv_43081: tmp___14 = tags; tags = tags + 1; __gu_p___18 = (void *)tmp___14; switch (2UL) { case 1UL: *((u8 *)__gu_p___18) = 1U; goto ldv_43088; case 2UL: put_unaligned_le16(1, __gu_p___18); goto ldv_43088; case 4UL: put_unaligned_le32(1U, __gu_p___18); goto ldv_43088; case 8UL: put_unaligned_le64(1ULL, __gu_p___18); goto ldv_43088; default: __bad_unaligned_access_size(); goto ldv_43088; } ldv_43088: *((char *)tags) = (char )arg->no_disk_flush; tags = tags + 1U; tmp___15 = tags; tags = tags + 1; __gu_p___19 = (void *)tmp___15; switch (2UL) { case 1UL: *((u8 *)__gu_p___19) = 54U; goto ldv_43095; case 2UL: put_unaligned_le16(32822, __gu_p___19); goto ldv_43095; case 4UL: put_unaligned_le32(32822U, __gu_p___19); goto ldv_43095; case 8UL: put_unaligned_le64(32822ULL, __gu_p___19); goto ldv_43095; default: __bad_unaligned_access_size(); goto ldv_43095; } ldv_43095: tmp___16 = tags; tags = tags + 1; __gu_p___20 = (void *)tmp___16; switch (2UL) { case 1UL: *((u8 *)__gu_p___20) = 1U; goto ldv_43102; case 2UL: put_unaligned_le16(1, __gu_p___20); goto ldv_43102; case 4UL: put_unaligned_le32(1U, __gu_p___20); goto ldv_43102; case 8UL: put_unaligned_le64(1ULL, __gu_p___20); goto ldv_43102; default: __bad_unaligned_access_size(); goto ldv_43102; } ldv_43102: *((char *)tags) = (char )arg->no_md_flush; tags = tags + 1U; tmp___17 = tags; tags = tags + 1; __gu_p___21 = (void *)tmp___17; switch (2UL) { case 1UL: *((u8 *)__gu_p___21) = 56U; goto ldv_43109; case 2UL: put_unaligned_le16(56, __gu_p___21); goto ldv_43109; case 4UL: put_unaligned_le32(56U, __gu_p___21); goto ldv_43109; case 8UL: put_unaligned_le64(56ULL, __gu_p___21); goto ldv_43109; default: __bad_unaligned_access_size(); goto ldv_43109; } ldv_43109: tmp___18 = tags; tags = tags + 1; __gu_p___22 = (void *)tmp___18; switch (2UL) { case 1UL: *((u8 *)__gu_p___22) = 4U; goto ldv_43116; case 2UL: put_unaligned_le16(4, __gu_p___22); goto ldv_43116; case 4UL: put_unaligned_le32(4U, __gu_p___22); goto ldv_43116; case 8UL: put_unaligned_le64(4ULL, __gu_p___22); goto ldv_43116; default: __bad_unaligned_access_size(); goto ldv_43116; } ldv_43116: __gu_p___23 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___23) = (unsigned char )arg->max_bio_bvecs; goto ldv_43123; case 2UL: put_unaligned_le16((int )((unsigned short )arg->max_bio_bvecs), __gu_p___23); goto ldv_43123; case 4UL: put_unaligned_le32((unsigned int )arg->max_bio_bvecs, __gu_p___23); goto ldv_43123; case 8UL: put_unaligned_le64((unsigned long long )arg->max_bio_bvecs, __gu_p___23); goto ldv_43123; default: __bad_unaligned_access_size(); goto ldv_43123; } ldv_43123: tags = tags + 4U; tmp___19 = tags; tags = tags + 1; __gu_p___24 = (void *)tmp___19; switch (2UL) { case 1UL: *((u8 *)__gu_p___24) = 57U; goto ldv_43130; case 2UL: put_unaligned_le16(32825, __gu_p___24); goto ldv_43130; case 4UL: put_unaligned_le32(32825U, __gu_p___24); goto ldv_43130; case 8UL: put_unaligned_le64(32825ULL, __gu_p___24); goto ldv_43130; default: __bad_unaligned_access_size(); goto ldv_43130; } ldv_43130: tmp___20 = tags; tags = tags + 1; __gu_p___25 = (void *)tmp___20; switch (2UL) { case 1UL: *((u8 *)__gu_p___25) = 1U; goto ldv_43137; case 2UL: put_unaligned_le16(1, __gu_p___25); goto ldv_43137; case 4UL: put_unaligned_le32(1U, __gu_p___25); goto ldv_43137; case 8UL: put_unaligned_le64(1ULL, __gu_p___25); goto ldv_43137; default: __bad_unaligned_access_size(); goto ldv_43137; } ldv_43137: *((char *)tags) = (char )arg->no_disk_barrier; tags = tags + 1U; tmp___21 = tags; tags = tags + 1; __gu_p___26 = (void *)tmp___21; switch (2UL) { case 1UL: *((u8 *)__gu_p___26) = 58U; goto ldv_43144; case 2UL: put_unaligned_le16(32826, __gu_p___26); goto ldv_43144; case 4UL: put_unaligned_le32(32826U, __gu_p___26); goto ldv_43144; case 8UL: put_unaligned_le64(32826ULL, __gu_p___26); goto ldv_43144; default: __bad_unaligned_access_size(); goto ldv_43144; } ldv_43144: tmp___22 = tags; tags = tags + 1; __gu_p___27 = (void *)tmp___22; switch (2UL) { case 1UL: *((u8 *)__gu_p___27) = 1U; goto ldv_43151; case 2UL: put_unaligned_le16(1, __gu_p___27); goto ldv_43151; case 4UL: put_unaligned_le32(1U, __gu_p___27); goto ldv_43151; case 8UL: put_unaligned_le64(1ULL, __gu_p___27); goto ldv_43151; default: __bad_unaligned_access_size(); goto ldv_43151; } ldv_43151: *((char *)tags) = (char )arg->no_disk_drain; tags = tags + 1U; return (tags); } } static unsigned short *net_conf_to_tags(struct drbd_conf *mdev , struct net_conf *arg , unsigned short *tags ) ; static unsigned short *net_conf_to_tags(struct drbd_conf *mdev , struct net_conf *arg , unsigned short *tags ) { void *__gu_p ; unsigned short *tmp ; void *__gu_p___0 ; unsigned short *tmp___0 ; size_t __len ; void *__ret ; void *__gu_p___1 ; unsigned short *tmp___1 ; void *__gu_p___2 ; unsigned short *tmp___2 ; size_t __len___0 ; void *__ret___0 ; void *__gu_p___3 ; unsigned short *tmp___3 ; void *__gu_p___4 ; unsigned short *tmp___4 ; size_t __len___1 ; void *__ret___1 ; void *__gu_p___5 ; unsigned short *tmp___5 ; void *__gu_p___6 ; unsigned short *tmp___6 ; size_t __len___2 ; void *__ret___2 ; void *__gu_p___7 ; unsigned short *tmp___7 ; void *__gu_p___8 ; unsigned short *tmp___8 ; size_t __len___3 ; void *__ret___3 ; void *__gu_p___9 ; unsigned short *tmp___9 ; void *__gu_p___10 ; unsigned short *tmp___10 ; void *__gu_p___11 ; void *__gu_p___12 ; unsigned short *tmp___11 ; void *__gu_p___13 ; unsigned short *tmp___12 ; void *__gu_p___14 ; void *__gu_p___15 ; unsigned short *tmp___13 ; void *__gu_p___16 ; unsigned short *tmp___14 ; void *__gu_p___17 ; void *__gu_p___18 ; unsigned short *tmp___15 ; void *__gu_p___19 ; unsigned short *tmp___16 ; void *__gu_p___20 ; void *__gu_p___21 ; unsigned short *tmp___17 ; void *__gu_p___22 ; unsigned short *tmp___18 ; void *__gu_p___23 ; void *__gu_p___24 ; unsigned short *tmp___19 ; void *__gu_p___25 ; unsigned short *tmp___20 ; void *__gu_p___26 ; void *__gu_p___27 ; unsigned short *tmp___21 ; void *__gu_p___28 ; unsigned short *tmp___22 ; void *__gu_p___29 ; void *__gu_p___30 ; unsigned short *tmp___23 ; void *__gu_p___31 ; unsigned short *tmp___24 ; void *__gu_p___32 ; void *__gu_p___33 ; unsigned short *tmp___25 ; void *__gu_p___34 ; unsigned short *tmp___26 ; void *__gu_p___35 ; void *__gu_p___36 ; unsigned short *tmp___27 ; void *__gu_p___37 ; unsigned short *tmp___28 ; void *__gu_p___38 ; void *__gu_p___39 ; unsigned short *tmp___29 ; void *__gu_p___40 ; unsigned short *tmp___30 ; void *__gu_p___41 ; void *__gu_p___42 ; unsigned short *tmp___31 ; void *__gu_p___43 ; unsigned short *tmp___32 ; void *__gu_p___44 ; void *__gu_p___45 ; unsigned short *tmp___33 ; void *__gu_p___46 ; unsigned short *tmp___34 ; void *__gu_p___47 ; void *__gu_p___48 ; unsigned short *tmp___35 ; void *__gu_p___49 ; unsigned short *tmp___36 ; void *__gu_p___50 ; void *__gu_p___51 ; unsigned short *tmp___37 ; void *__gu_p___52 ; unsigned short *tmp___38 ; void *__gu_p___53 ; void *__gu_p___54 ; unsigned short *tmp___39 ; void *__gu_p___55 ; unsigned short *tmp___40 ; void *__gu_p___56 ; unsigned short *tmp___41 ; void *__gu_p___57 ; unsigned short *tmp___42 ; void *__gu_p___58 ; unsigned short *tmp___43 ; void *__gu_p___59 ; unsigned short *tmp___44 ; void *__gu_p___60 ; unsigned short *tmp___45 ; void *__gu_p___61 ; unsigned short *tmp___46 ; void *__gu_p___62 ; unsigned short *tmp___47 ; void *__gu_p___63 ; unsigned short *tmp___48 ; void *__gu_p___64 ; unsigned short *tmp___49 ; void *__gu_p___65 ; unsigned short *tmp___50 ; void *__gu_p___66 ; unsigned short *tmp___51 ; void *__gu_p___67 ; unsigned short *tmp___52 ; { tmp = tags; tags = tags + 1; __gu_p = (void *)tmp; switch (2UL) { case 1UL: *((u8 *)__gu_p) = 8U; goto ldv_43176; case 2UL: put_unaligned_le16(57352, __gu_p); goto ldv_43176; case 4UL: put_unaligned_le32(57352U, __gu_p); goto ldv_43176; case 8UL: put_unaligned_le64(57352ULL, __gu_p); goto ldv_43176; default: __bad_unaligned_access_size(); goto ldv_43176; } ldv_43176: tmp___0 = tags; tags = tags + 1; __gu_p___0 = (void *)tmp___0; switch (2UL) { case 1UL: *((u8 *)__gu_p___0) = (unsigned char )arg->my_addr_len; goto ldv_43183; case 2UL: put_unaligned_le16((int )((unsigned short )arg->my_addr_len), __gu_p___0); goto ldv_43183; case 4UL: put_unaligned_le32((unsigned int )arg->my_addr_len, __gu_p___0); goto ldv_43183; case 8UL: put_unaligned_le64((unsigned long long )arg->my_addr_len, __gu_p___0); goto ldv_43183; default: __bad_unaligned_access_size(); goto ldv_43183; } ldv_43183: __len = (size_t )arg->my_addr_len; __ret = memcpy((void *)tags, (void const *)(& arg->my_addr), __len); tags = tags + (unsigned long )arg->my_addr_len; tmp___1 = tags; tags = tags + 1; __gu_p___1 = (void *)tmp___1; switch (2UL) { case 1UL: *((u8 *)__gu_p___1) = 9U; goto ldv_43193; case 2UL: put_unaligned_le16(57353, __gu_p___1); goto ldv_43193; case 4UL: put_unaligned_le32(57353U, __gu_p___1); goto ldv_43193; case 8UL: put_unaligned_le64(57353ULL, __gu_p___1); goto ldv_43193; default: __bad_unaligned_access_size(); goto ldv_43193; } ldv_43193: tmp___2 = tags; tags = tags + 1; __gu_p___2 = (void *)tmp___2; switch (2UL) { case 1UL: *((u8 *)__gu_p___2) = (unsigned char )arg->peer_addr_len; goto ldv_43200; case 2UL: put_unaligned_le16((int )((unsigned short )arg->peer_addr_len), __gu_p___2); goto ldv_43200; case 4UL: put_unaligned_le32((unsigned int )arg->peer_addr_len, __gu_p___2); goto ldv_43200; case 8UL: put_unaligned_le64((unsigned long long )arg->peer_addr_len, __gu_p___2); goto ldv_43200; default: __bad_unaligned_access_size(); goto ldv_43200; } ldv_43200: __len___0 = (size_t )arg->peer_addr_len; __ret___0 = memcpy((void *)tags, (void const *)(& arg->peer_addr), __len___0); tags = tags + (unsigned long )arg->peer_addr_len; tmp___3 = tags; tags = tags + 1; __gu_p___3 = (void *)tmp___3; switch (2UL) { case 1UL: *((u8 *)__gu_p___3) = 10U; goto ldv_43210; case 2UL: put_unaligned_le16(49162, __gu_p___3); goto ldv_43210; case 4UL: put_unaligned_le32(49162U, __gu_p___3); goto ldv_43210; case 8UL: put_unaligned_le64(49162ULL, __gu_p___3); goto ldv_43210; default: __bad_unaligned_access_size(); goto ldv_43210; } ldv_43210: tmp___4 = tags; tags = tags + 1; __gu_p___4 = (void *)tmp___4; switch (2UL) { case 1UL: *((u8 *)__gu_p___4) = (unsigned char )arg->shared_secret_len; goto ldv_43217; case 2UL: put_unaligned_le16((int )((unsigned short )arg->shared_secret_len), __gu_p___4); goto ldv_43217; case 4UL: put_unaligned_le32((unsigned int )arg->shared_secret_len, __gu_p___4); goto ldv_43217; case 8UL: put_unaligned_le64((unsigned long long )arg->shared_secret_len, __gu_p___4); goto ldv_43217; default: __bad_unaligned_access_size(); goto ldv_43217; } ldv_43217: __len___1 = (size_t )arg->shared_secret_len; __ret___1 = memcpy((void *)tags, (void const *)(& arg->shared_secret), __len___1); tags = tags + (unsigned long )arg->shared_secret_len; tmp___5 = tags; tags = tags + 1; __gu_p___5 = (void *)tmp___5; switch (2UL) { case 1UL: *((u8 *)__gu_p___5) = 11U; goto ldv_43227; case 2UL: put_unaligned_le16(49163, __gu_p___5); goto ldv_43227; case 4UL: put_unaligned_le32(49163U, __gu_p___5); goto ldv_43227; case 8UL: put_unaligned_le64(49163ULL, __gu_p___5); goto ldv_43227; default: __bad_unaligned_access_size(); goto ldv_43227; } ldv_43227: tmp___6 = tags; tags = tags + 1; __gu_p___6 = (void *)tmp___6; switch (2UL) { case 1UL: *((u8 *)__gu_p___6) = (unsigned char )arg->cram_hmac_alg_len; goto ldv_43234; case 2UL: put_unaligned_le16((int )((unsigned short )arg->cram_hmac_alg_len), __gu_p___6); goto ldv_43234; case 4UL: put_unaligned_le32((unsigned int )arg->cram_hmac_alg_len, __gu_p___6); goto ldv_43234; case 8UL: put_unaligned_le64((unsigned long long )arg->cram_hmac_alg_len, __gu_p___6); goto ldv_43234; default: __bad_unaligned_access_size(); goto ldv_43234; } ldv_43234: __len___2 = (size_t )arg->cram_hmac_alg_len; __ret___2 = memcpy((void *)tags, (void const *)(& arg->cram_hmac_alg), __len___2); tags = tags + (unsigned long )arg->cram_hmac_alg_len; tmp___7 = tags; tags = tags + 1; __gu_p___7 = (void *)tmp___7; switch (2UL) { case 1UL: *((u8 *)__gu_p___7) = 44U; goto ldv_43244; case 2UL: put_unaligned_le16(49196, __gu_p___7); goto ldv_43244; case 4UL: put_unaligned_le32(49196U, __gu_p___7); goto ldv_43244; case 8UL: put_unaligned_le64(49196ULL, __gu_p___7); goto ldv_43244; default: __bad_unaligned_access_size(); goto ldv_43244; } ldv_43244: tmp___8 = tags; tags = tags + 1; __gu_p___8 = (void *)tmp___8; switch (2UL) { case 1UL: *((u8 *)__gu_p___8) = (unsigned char )arg->integrity_alg_len; goto ldv_43251; case 2UL: put_unaligned_le16((int )((unsigned short )arg->integrity_alg_len), __gu_p___8); goto ldv_43251; case 4UL: put_unaligned_le32((unsigned int )arg->integrity_alg_len, __gu_p___8); goto ldv_43251; case 8UL: put_unaligned_le64((unsigned long long )arg->integrity_alg_len, __gu_p___8); goto ldv_43251; default: __bad_unaligned_access_size(); goto ldv_43251; } ldv_43251: __len___3 = (size_t )arg->integrity_alg_len; __ret___3 = memcpy((void *)tags, (void const *)(& arg->integrity_alg), __len___3); tags = tags + (unsigned long )arg->integrity_alg_len; tmp___9 = tags; tags = tags + 1; __gu_p___9 = (void *)tmp___9; switch (2UL) { case 1UL: *((u8 *)__gu_p___9) = 14U; goto ldv_43261; case 2UL: put_unaligned_le16(14, __gu_p___9); goto ldv_43261; case 4UL: put_unaligned_le32(14U, __gu_p___9); goto ldv_43261; case 8UL: put_unaligned_le64(14ULL, __gu_p___9); goto ldv_43261; default: __bad_unaligned_access_size(); goto ldv_43261; } ldv_43261: tmp___10 = tags; tags = tags + 1; __gu_p___10 = (void *)tmp___10; switch (2UL) { case 1UL: *((u8 *)__gu_p___10) = 4U; goto ldv_43268; case 2UL: put_unaligned_le16(4, __gu_p___10); goto ldv_43268; case 4UL: put_unaligned_le32(4U, __gu_p___10); goto ldv_43268; case 8UL: put_unaligned_le64(4ULL, __gu_p___10); goto ldv_43268; default: __bad_unaligned_access_size(); goto ldv_43268; } ldv_43268: __gu_p___11 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___11) = (unsigned char )arg->timeout; goto ldv_43275; case 2UL: put_unaligned_le16((int )((unsigned short )arg->timeout), __gu_p___11); goto ldv_43275; case 4UL: put_unaligned_le32((unsigned int )arg->timeout, __gu_p___11); goto ldv_43275; case 8UL: put_unaligned_le64((unsigned long long )arg->timeout, __gu_p___11); goto ldv_43275; default: __bad_unaligned_access_size(); goto ldv_43275; } ldv_43275: tags = tags + 4U; tmp___11 = tags; tags = tags + 1; __gu_p___12 = (void *)tmp___11; switch (2UL) { case 1UL: *((u8 *)__gu_p___12) = 15U; goto ldv_43282; case 2UL: put_unaligned_le16(8207, __gu_p___12); goto ldv_43282; case 4UL: put_unaligned_le32(8207U, __gu_p___12); goto ldv_43282; case 8UL: put_unaligned_le64(8207ULL, __gu_p___12); goto ldv_43282; default: __bad_unaligned_access_size(); goto ldv_43282; } ldv_43282: tmp___12 = tags; tags = tags + 1; __gu_p___13 = (void *)tmp___12; switch (2UL) { case 1UL: *((u8 *)__gu_p___13) = 4U; goto ldv_43289; case 2UL: put_unaligned_le16(4, __gu_p___13); goto ldv_43289; case 4UL: put_unaligned_le32(4U, __gu_p___13); goto ldv_43289; case 8UL: put_unaligned_le64(4ULL, __gu_p___13); goto ldv_43289; default: __bad_unaligned_access_size(); goto ldv_43289; } ldv_43289: __gu_p___14 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___14) = (unsigned char )arg->wire_protocol; goto ldv_43296; case 2UL: put_unaligned_le16((int )((unsigned short )arg->wire_protocol), __gu_p___14); goto ldv_43296; case 4UL: put_unaligned_le32((unsigned int )arg->wire_protocol, __gu_p___14); goto ldv_43296; case 8UL: put_unaligned_le64((unsigned long long )arg->wire_protocol, __gu_p___14); goto ldv_43296; default: __bad_unaligned_access_size(); goto ldv_43296; } ldv_43296: tags = tags + 4U; tmp___13 = tags; tags = tags + 1; __gu_p___15 = (void *)tmp___13; switch (2UL) { case 1UL: *((u8 *)__gu_p___15) = 16U; goto ldv_43303; case 2UL: put_unaligned_le16(16, __gu_p___15); goto ldv_43303; case 4UL: put_unaligned_le32(16U, __gu_p___15); goto ldv_43303; case 8UL: put_unaligned_le64(16ULL, __gu_p___15); goto ldv_43303; default: __bad_unaligned_access_size(); goto ldv_43303; } ldv_43303: tmp___14 = tags; tags = tags + 1; __gu_p___16 = (void *)tmp___14; switch (2UL) { case 1UL: *((u8 *)__gu_p___16) = 4U; goto ldv_43310; case 2UL: put_unaligned_le16(4, __gu_p___16); goto ldv_43310; case 4UL: put_unaligned_le32(4U, __gu_p___16); goto ldv_43310; case 8UL: put_unaligned_le64(4ULL, __gu_p___16); goto ldv_43310; default: __bad_unaligned_access_size(); goto ldv_43310; } ldv_43310: __gu_p___17 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___17) = (unsigned char )arg->try_connect_int; goto ldv_43317; case 2UL: put_unaligned_le16((int )((unsigned short )arg->try_connect_int), __gu_p___17); goto ldv_43317; case 4UL: put_unaligned_le32((unsigned int )arg->try_connect_int, __gu_p___17); goto ldv_43317; case 8UL: put_unaligned_le64((unsigned long long )arg->try_connect_int, __gu_p___17); goto ldv_43317; default: __bad_unaligned_access_size(); goto ldv_43317; } ldv_43317: tags = tags + 4U; tmp___15 = tags; tags = tags + 1; __gu_p___18 = (void *)tmp___15; switch (2UL) { case 1UL: *((u8 *)__gu_p___18) = 17U; goto ldv_43324; case 2UL: put_unaligned_le16(17, __gu_p___18); goto ldv_43324; case 4UL: put_unaligned_le32(17U, __gu_p___18); goto ldv_43324; case 8UL: put_unaligned_le64(17ULL, __gu_p___18); goto ldv_43324; default: __bad_unaligned_access_size(); goto ldv_43324; } ldv_43324: tmp___16 = tags; tags = tags + 1; __gu_p___19 = (void *)tmp___16; switch (2UL) { case 1UL: *((u8 *)__gu_p___19) = 4U; goto ldv_43331; case 2UL: put_unaligned_le16(4, __gu_p___19); goto ldv_43331; case 4UL: put_unaligned_le32(4U, __gu_p___19); goto ldv_43331; case 8UL: put_unaligned_le64(4ULL, __gu_p___19); goto ldv_43331; default: __bad_unaligned_access_size(); goto ldv_43331; } ldv_43331: __gu_p___20 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___20) = (unsigned char )arg->ping_int; goto ldv_43338; case 2UL: put_unaligned_le16((int )((unsigned short )arg->ping_int), __gu_p___20); goto ldv_43338; case 4UL: put_unaligned_le32((unsigned int )arg->ping_int, __gu_p___20); goto ldv_43338; case 8UL: put_unaligned_le64((unsigned long long )arg->ping_int, __gu_p___20); goto ldv_43338; default: __bad_unaligned_access_size(); goto ldv_43338; } ldv_43338: tags = tags + 4U; tmp___17 = tags; tags = tags + 1; __gu_p___21 = (void *)tmp___17; switch (2UL) { case 1UL: *((u8 *)__gu_p___21) = 18U; goto ldv_43345; case 2UL: put_unaligned_le16(18, __gu_p___21); goto ldv_43345; case 4UL: put_unaligned_le32(18U, __gu_p___21); goto ldv_43345; case 8UL: put_unaligned_le64(18ULL, __gu_p___21); goto ldv_43345; default: __bad_unaligned_access_size(); goto ldv_43345; } ldv_43345: tmp___18 = tags; tags = tags + 1; __gu_p___22 = (void *)tmp___18; switch (2UL) { case 1UL: *((u8 *)__gu_p___22) = 4U; goto ldv_43352; case 2UL: put_unaligned_le16(4, __gu_p___22); goto ldv_43352; case 4UL: put_unaligned_le32(4U, __gu_p___22); goto ldv_43352; case 8UL: put_unaligned_le64(4ULL, __gu_p___22); goto ldv_43352; default: __bad_unaligned_access_size(); goto ldv_43352; } ldv_43352: __gu_p___23 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___23) = (unsigned char )arg->max_epoch_size; goto ldv_43359; case 2UL: put_unaligned_le16((int )((unsigned short )arg->max_epoch_size), __gu_p___23); goto ldv_43359; case 4UL: put_unaligned_le32((unsigned int )arg->max_epoch_size, __gu_p___23); goto ldv_43359; case 8UL: put_unaligned_le64((unsigned long long )arg->max_epoch_size, __gu_p___23); goto ldv_43359; default: __bad_unaligned_access_size(); goto ldv_43359; } ldv_43359: tags = tags + 4U; tmp___19 = tags; tags = tags + 1; __gu_p___24 = (void *)tmp___19; switch (2UL) { case 1UL: *((u8 *)__gu_p___24) = 19U; goto ldv_43366; case 2UL: put_unaligned_le16(19, __gu_p___24); goto ldv_43366; case 4UL: put_unaligned_le32(19U, __gu_p___24); goto ldv_43366; case 8UL: put_unaligned_le64(19ULL, __gu_p___24); goto ldv_43366; default: __bad_unaligned_access_size(); goto ldv_43366; } ldv_43366: tmp___20 = tags; tags = tags + 1; __gu_p___25 = (void *)tmp___20; switch (2UL) { case 1UL: *((u8 *)__gu_p___25) = 4U; goto ldv_43373; case 2UL: put_unaligned_le16(4, __gu_p___25); goto ldv_43373; case 4UL: put_unaligned_le32(4U, __gu_p___25); goto ldv_43373; case 8UL: put_unaligned_le64(4ULL, __gu_p___25); goto ldv_43373; default: __bad_unaligned_access_size(); goto ldv_43373; } ldv_43373: __gu_p___26 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___26) = (unsigned char )arg->max_buffers; goto ldv_43380; case 2UL: put_unaligned_le16((int )((unsigned short )arg->max_buffers), __gu_p___26); goto ldv_43380; case 4UL: put_unaligned_le32((unsigned int )arg->max_buffers, __gu_p___26); goto ldv_43380; case 8UL: put_unaligned_le64((unsigned long long )arg->max_buffers, __gu_p___26); goto ldv_43380; default: __bad_unaligned_access_size(); goto ldv_43380; } ldv_43380: tags = tags + 4U; tmp___21 = tags; tags = tags + 1; __gu_p___27 = (void *)tmp___21; switch (2UL) { case 1UL: *((u8 *)__gu_p___27) = 20U; goto ldv_43387; case 2UL: put_unaligned_le16(20, __gu_p___27); goto ldv_43387; case 4UL: put_unaligned_le32(20U, __gu_p___27); goto ldv_43387; case 8UL: put_unaligned_le64(20ULL, __gu_p___27); goto ldv_43387; default: __bad_unaligned_access_size(); goto ldv_43387; } ldv_43387: tmp___22 = tags; tags = tags + 1; __gu_p___28 = (void *)tmp___22; switch (2UL) { case 1UL: *((u8 *)__gu_p___28) = 4U; goto ldv_43394; case 2UL: put_unaligned_le16(4, __gu_p___28); goto ldv_43394; case 4UL: put_unaligned_le32(4U, __gu_p___28); goto ldv_43394; case 8UL: put_unaligned_le64(4ULL, __gu_p___28); goto ldv_43394; default: __bad_unaligned_access_size(); goto ldv_43394; } ldv_43394: __gu_p___29 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___29) = (unsigned char )arg->unplug_watermark; goto ldv_43401; case 2UL: put_unaligned_le16((int )((unsigned short )arg->unplug_watermark), __gu_p___29); goto ldv_43401; case 4UL: put_unaligned_le32((unsigned int )arg->unplug_watermark, __gu_p___29); goto ldv_43401; case 8UL: put_unaligned_le64((unsigned long long )arg->unplug_watermark, __gu_p___29); goto ldv_43401; default: __bad_unaligned_access_size(); goto ldv_43401; } ldv_43401: tags = tags + 4U; tmp___23 = tags; tags = tags + 1; __gu_p___30 = (void *)tmp___23; switch (2UL) { case 1UL: *((u8 *)__gu_p___30) = 21U; goto ldv_43408; case 2UL: put_unaligned_le16(21, __gu_p___30); goto ldv_43408; case 4UL: put_unaligned_le32(21U, __gu_p___30); goto ldv_43408; case 8UL: put_unaligned_le64(21ULL, __gu_p___30); goto ldv_43408; default: __bad_unaligned_access_size(); goto ldv_43408; } ldv_43408: tmp___24 = tags; tags = tags + 1; __gu_p___31 = (void *)tmp___24; switch (2UL) { case 1UL: *((u8 *)__gu_p___31) = 4U; goto ldv_43415; case 2UL: put_unaligned_le16(4, __gu_p___31); goto ldv_43415; case 4UL: put_unaligned_le32(4U, __gu_p___31); goto ldv_43415; case 8UL: put_unaligned_le64(4ULL, __gu_p___31); goto ldv_43415; default: __bad_unaligned_access_size(); goto ldv_43415; } ldv_43415: __gu_p___32 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___32) = (unsigned char )arg->sndbuf_size; goto ldv_43422; case 2UL: put_unaligned_le16((int )((unsigned short )arg->sndbuf_size), __gu_p___32); goto ldv_43422; case 4UL: put_unaligned_le32((unsigned int )arg->sndbuf_size, __gu_p___32); goto ldv_43422; case 8UL: put_unaligned_le64((unsigned long long )arg->sndbuf_size, __gu_p___32); goto ldv_43422; default: __bad_unaligned_access_size(); goto ldv_43422; } ldv_43422: tags = tags + 4U; tmp___25 = tags; tags = tags + 1; __gu_p___33 = (void *)tmp___25; switch (2UL) { case 1UL: *((u8 *)__gu_p___33) = 22U; goto ldv_43429; case 2UL: put_unaligned_le16(22, __gu_p___33); goto ldv_43429; case 4UL: put_unaligned_le32(22U, __gu_p___33); goto ldv_43429; case 8UL: put_unaligned_le64(22ULL, __gu_p___33); goto ldv_43429; default: __bad_unaligned_access_size(); goto ldv_43429; } ldv_43429: tmp___26 = tags; tags = tags + 1; __gu_p___34 = (void *)tmp___26; switch (2UL) { case 1UL: *((u8 *)__gu_p___34) = 4U; goto ldv_43436; case 2UL: put_unaligned_le16(4, __gu_p___34); goto ldv_43436; case 4UL: put_unaligned_le32(4U, __gu_p___34); goto ldv_43436; case 8UL: put_unaligned_le64(4ULL, __gu_p___34); goto ldv_43436; default: __bad_unaligned_access_size(); goto ldv_43436; } ldv_43436: __gu_p___35 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___35) = (unsigned char )arg->ko_count; goto ldv_43443; case 2UL: put_unaligned_le16((int )((unsigned short )arg->ko_count), __gu_p___35); goto ldv_43443; case 4UL: put_unaligned_le32((unsigned int )arg->ko_count, __gu_p___35); goto ldv_43443; case 8UL: put_unaligned_le64((unsigned long long )arg->ko_count, __gu_p___35); goto ldv_43443; default: __bad_unaligned_access_size(); goto ldv_43443; } ldv_43443: tags = tags + 4U; tmp___27 = tags; tags = tags + 1; __gu_p___36 = (void *)tmp___27; switch (2UL) { case 1UL: *((u8 *)__gu_p___36) = 24U; goto ldv_43450; case 2UL: put_unaligned_le16(24, __gu_p___36); goto ldv_43450; case 4UL: put_unaligned_le32(24U, __gu_p___36); goto ldv_43450; case 8UL: put_unaligned_le64(24ULL, __gu_p___36); goto ldv_43450; default: __bad_unaligned_access_size(); goto ldv_43450; } ldv_43450: tmp___28 = tags; tags = tags + 1; __gu_p___37 = (void *)tmp___28; switch (2UL) { case 1UL: *((u8 *)__gu_p___37) = 4U; goto ldv_43457; case 2UL: put_unaligned_le16(4, __gu_p___37); goto ldv_43457; case 4UL: put_unaligned_le32(4U, __gu_p___37); goto ldv_43457; case 8UL: put_unaligned_le64(4ULL, __gu_p___37); goto ldv_43457; default: __bad_unaligned_access_size(); goto ldv_43457; } ldv_43457: __gu_p___38 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___38) = (unsigned char )arg->after_sb_0p; goto ldv_43464; case 2UL: put_unaligned_le16((int )((unsigned short )arg->after_sb_0p), __gu_p___38); goto ldv_43464; case 4UL: put_unaligned_le32((unsigned int )arg->after_sb_0p, __gu_p___38); goto ldv_43464; case 8UL: put_unaligned_le64((unsigned long long )arg->after_sb_0p, __gu_p___38); goto ldv_43464; default: __bad_unaligned_access_size(); goto ldv_43464; } ldv_43464: tags = tags + 4U; tmp___29 = tags; tags = tags + 1; __gu_p___39 = (void *)tmp___29; switch (2UL) { case 1UL: *((u8 *)__gu_p___39) = 25U; goto ldv_43471; case 2UL: put_unaligned_le16(25, __gu_p___39); goto ldv_43471; case 4UL: put_unaligned_le32(25U, __gu_p___39); goto ldv_43471; case 8UL: put_unaligned_le64(25ULL, __gu_p___39); goto ldv_43471; default: __bad_unaligned_access_size(); goto ldv_43471; } ldv_43471: tmp___30 = tags; tags = tags + 1; __gu_p___40 = (void *)tmp___30; switch (2UL) { case 1UL: *((u8 *)__gu_p___40) = 4U; goto ldv_43478; case 2UL: put_unaligned_le16(4, __gu_p___40); goto ldv_43478; case 4UL: put_unaligned_le32(4U, __gu_p___40); goto ldv_43478; case 8UL: put_unaligned_le64(4ULL, __gu_p___40); goto ldv_43478; default: __bad_unaligned_access_size(); goto ldv_43478; } ldv_43478: __gu_p___41 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___41) = (unsigned char )arg->after_sb_1p; goto ldv_43485; case 2UL: put_unaligned_le16((int )((unsigned short )arg->after_sb_1p), __gu_p___41); goto ldv_43485; case 4UL: put_unaligned_le32((unsigned int )arg->after_sb_1p, __gu_p___41); goto ldv_43485; case 8UL: put_unaligned_le64((unsigned long long )arg->after_sb_1p, __gu_p___41); goto ldv_43485; default: __bad_unaligned_access_size(); goto ldv_43485; } ldv_43485: tags = tags + 4U; tmp___31 = tags; tags = tags + 1; __gu_p___42 = (void *)tmp___31; switch (2UL) { case 1UL: *((u8 *)__gu_p___42) = 26U; goto ldv_43492; case 2UL: put_unaligned_le16(26, __gu_p___42); goto ldv_43492; case 4UL: put_unaligned_le32(26U, __gu_p___42); goto ldv_43492; case 8UL: put_unaligned_le64(26ULL, __gu_p___42); goto ldv_43492; default: __bad_unaligned_access_size(); goto ldv_43492; } ldv_43492: tmp___32 = tags; tags = tags + 1; __gu_p___43 = (void *)tmp___32; switch (2UL) { case 1UL: *((u8 *)__gu_p___43) = 4U; goto ldv_43499; case 2UL: put_unaligned_le16(4, __gu_p___43); goto ldv_43499; case 4UL: put_unaligned_le32(4U, __gu_p___43); goto ldv_43499; case 8UL: put_unaligned_le64(4ULL, __gu_p___43); goto ldv_43499; default: __bad_unaligned_access_size(); goto ldv_43499; } ldv_43499: __gu_p___44 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___44) = (unsigned char )arg->after_sb_2p; goto ldv_43506; case 2UL: put_unaligned_le16((int )((unsigned short )arg->after_sb_2p), __gu_p___44); goto ldv_43506; case 4UL: put_unaligned_le32((unsigned int )arg->after_sb_2p, __gu_p___44); goto ldv_43506; case 8UL: put_unaligned_le64((unsigned long long )arg->after_sb_2p, __gu_p___44); goto ldv_43506; default: __bad_unaligned_access_size(); goto ldv_43506; } ldv_43506: tags = tags + 4U; tmp___33 = tags; tags = tags + 1; __gu_p___45 = (void *)tmp___33; switch (2UL) { case 1UL: *((u8 *)__gu_p___45) = 39U; goto ldv_43513; case 2UL: put_unaligned_le16(39, __gu_p___45); goto ldv_43513; case 4UL: put_unaligned_le32(39U, __gu_p___45); goto ldv_43513; case 8UL: put_unaligned_le64(39ULL, __gu_p___45); goto ldv_43513; default: __bad_unaligned_access_size(); goto ldv_43513; } ldv_43513: tmp___34 = tags; tags = tags + 1; __gu_p___46 = (void *)tmp___34; switch (2UL) { case 1UL: *((u8 *)__gu_p___46) = 4U; goto ldv_43520; case 2UL: put_unaligned_le16(4, __gu_p___46); goto ldv_43520; case 4UL: put_unaligned_le32(4U, __gu_p___46); goto ldv_43520; case 8UL: put_unaligned_le64(4ULL, __gu_p___46); goto ldv_43520; default: __bad_unaligned_access_size(); goto ldv_43520; } ldv_43520: __gu_p___47 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___47) = (unsigned char )arg->rr_conflict; goto ldv_43527; case 2UL: put_unaligned_le16((int )((unsigned short )arg->rr_conflict), __gu_p___47); goto ldv_43527; case 4UL: put_unaligned_le32((unsigned int )arg->rr_conflict, __gu_p___47); goto ldv_43527; case 8UL: put_unaligned_le64((unsigned long long )arg->rr_conflict, __gu_p___47); goto ldv_43527; default: __bad_unaligned_access_size(); goto ldv_43527; } ldv_43527: tags = tags + 4U; tmp___35 = tags; tags = tags + 1; __gu_p___48 = (void *)tmp___35; switch (2UL) { case 1UL: *((u8 *)__gu_p___48) = 40U; goto ldv_43534; case 2UL: put_unaligned_le16(40, __gu_p___48); goto ldv_43534; case 4UL: put_unaligned_le32(40U, __gu_p___48); goto ldv_43534; case 8UL: put_unaligned_le64(40ULL, __gu_p___48); goto ldv_43534; default: __bad_unaligned_access_size(); goto ldv_43534; } ldv_43534: tmp___36 = tags; tags = tags + 1; __gu_p___49 = (void *)tmp___36; switch (2UL) { case 1UL: *((u8 *)__gu_p___49) = 4U; goto ldv_43541; case 2UL: put_unaligned_le16(4, __gu_p___49); goto ldv_43541; case 4UL: put_unaligned_le32(4U, __gu_p___49); goto ldv_43541; case 8UL: put_unaligned_le64(4ULL, __gu_p___49); goto ldv_43541; default: __bad_unaligned_access_size(); goto ldv_43541; } ldv_43541: __gu_p___50 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___50) = (unsigned char )arg->ping_timeo; goto ldv_43548; case 2UL: put_unaligned_le16((int )((unsigned short )arg->ping_timeo), __gu_p___50); goto ldv_43548; case 4UL: put_unaligned_le32((unsigned int )arg->ping_timeo, __gu_p___50); goto ldv_43548; case 8UL: put_unaligned_le64((unsigned long long )arg->ping_timeo, __gu_p___50); goto ldv_43548; default: __bad_unaligned_access_size(); goto ldv_43548; } ldv_43548: tags = tags + 4U; tmp___37 = tags; tags = tags + 1; __gu_p___51 = (void *)tmp___37; switch (2UL) { case 1UL: *((u8 *)__gu_p___51) = 67U; goto ldv_43555; case 2UL: put_unaligned_le16(67, __gu_p___51); goto ldv_43555; case 4UL: put_unaligned_le32(67U, __gu_p___51); goto ldv_43555; case 8UL: put_unaligned_le64(67ULL, __gu_p___51); goto ldv_43555; default: __bad_unaligned_access_size(); goto ldv_43555; } ldv_43555: tmp___38 = tags; tags = tags + 1; __gu_p___52 = (void *)tmp___38; switch (2UL) { case 1UL: *((u8 *)__gu_p___52) = 4U; goto ldv_43562; case 2UL: put_unaligned_le16(4, __gu_p___52); goto ldv_43562; case 4UL: put_unaligned_le32(4U, __gu_p___52); goto ldv_43562; case 8UL: put_unaligned_le64(4ULL, __gu_p___52); goto ldv_43562; default: __bad_unaligned_access_size(); goto ldv_43562; } ldv_43562: __gu_p___53 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___53) = (unsigned char )arg->rcvbuf_size; goto ldv_43569; case 2UL: put_unaligned_le16((int )((unsigned short )arg->rcvbuf_size), __gu_p___53); goto ldv_43569; case 4UL: put_unaligned_le32((unsigned int )arg->rcvbuf_size, __gu_p___53); goto ldv_43569; case 8UL: put_unaligned_le64((unsigned long long )arg->rcvbuf_size, __gu_p___53); goto ldv_43569; default: __bad_unaligned_access_size(); goto ldv_43569; } ldv_43569: tags = tags + 4U; tmp___39 = tags; tags = tags + 1; __gu_p___54 = (void *)tmp___39; switch (2UL) { case 1UL: *((u8 *)__gu_p___54) = 60U; goto ldv_43576; case 2UL: put_unaligned_le16(41020, __gu_p___54); goto ldv_43576; case 4UL: put_unaligned_le32(41020U, __gu_p___54); goto ldv_43576; case 8UL: put_unaligned_le64(41020ULL, __gu_p___54); goto ldv_43576; default: __bad_unaligned_access_size(); goto ldv_43576; } ldv_43576: tmp___40 = tags; tags = tags + 1; __gu_p___55 = (void *)tmp___40; switch (2UL) { case 1UL: *((u8 *)__gu_p___55) = 1U; goto ldv_43583; case 2UL: put_unaligned_le16(1, __gu_p___55); goto ldv_43583; case 4UL: put_unaligned_le32(1U, __gu_p___55); goto ldv_43583; case 8UL: put_unaligned_le64(1ULL, __gu_p___55); goto ldv_43583; default: __bad_unaligned_access_size(); goto ldv_43583; } ldv_43583: *((char *)tags) = (char )arg->mind_af; tags = tags + 1U; tmp___41 = tags; tags = tags + 1; __gu_p___56 = (void *)tmp___41; switch (2UL) { case 1UL: *((u8 *)__gu_p___56) = 27U; goto ldv_43590; case 2UL: put_unaligned_le16(32795, __gu_p___56); goto ldv_43590; case 4UL: put_unaligned_le32(32795U, __gu_p___56); goto ldv_43590; case 8UL: put_unaligned_le64(32795ULL, __gu_p___56); goto ldv_43590; default: __bad_unaligned_access_size(); goto ldv_43590; } ldv_43590: tmp___42 = tags; tags = tags + 1; __gu_p___57 = (void *)tmp___42; switch (2UL) { case 1UL: *((u8 *)__gu_p___57) = 1U; goto ldv_43597; case 2UL: put_unaligned_le16(1, __gu_p___57); goto ldv_43597; case 4UL: put_unaligned_le32(1U, __gu_p___57); goto ldv_43597; case 8UL: put_unaligned_le64(1ULL, __gu_p___57); goto ldv_43597; default: __bad_unaligned_access_size(); goto ldv_43597; } ldv_43597: *((char *)tags) = (char )arg->want_lose; tags = tags + 1U; tmp___43 = tags; tags = tags + 1; __gu_p___58 = (void *)tmp___43; switch (2UL) { case 1UL: *((u8 *)__gu_p___58) = 28U; goto ldv_43604; case 2UL: put_unaligned_le16(32796, __gu_p___58); goto ldv_43604; case 4UL: put_unaligned_le32(32796U, __gu_p___58); goto ldv_43604; case 8UL: put_unaligned_le64(32796ULL, __gu_p___58); goto ldv_43604; default: __bad_unaligned_access_size(); goto ldv_43604; } ldv_43604: tmp___44 = tags; tags = tags + 1; __gu_p___59 = (void *)tmp___44; switch (2UL) { case 1UL: *((u8 *)__gu_p___59) = 1U; goto ldv_43611; case 2UL: put_unaligned_le16(1, __gu_p___59); goto ldv_43611; case 4UL: put_unaligned_le32(1U, __gu_p___59); goto ldv_43611; case 8UL: put_unaligned_le64(1ULL, __gu_p___59); goto ldv_43611; default: __bad_unaligned_access_size(); goto ldv_43611; } ldv_43611: *((char *)tags) = (char )arg->two_primaries; tags = tags + 1U; tmp___45 = tags; tags = tags + 1; __gu_p___60 = (void *)tmp___45; switch (2UL) { case 1UL: *((u8 *)__gu_p___60) = 41U; goto ldv_43618; case 2UL: put_unaligned_le16(32809, __gu_p___60); goto ldv_43618; case 4UL: put_unaligned_le32(32809U, __gu_p___60); goto ldv_43618; case 8UL: put_unaligned_le64(32809ULL, __gu_p___60); goto ldv_43618; default: __bad_unaligned_access_size(); goto ldv_43618; } ldv_43618: tmp___46 = tags; tags = tags + 1; __gu_p___61 = (void *)tmp___46; switch (2UL) { case 1UL: *((u8 *)__gu_p___61) = 1U; goto ldv_43625; case 2UL: put_unaligned_le16(1, __gu_p___61); goto ldv_43625; case 4UL: put_unaligned_le32(1U, __gu_p___61); goto ldv_43625; case 8UL: put_unaligned_le64(1ULL, __gu_p___61); goto ldv_43625; default: __bad_unaligned_access_size(); goto ldv_43625; } ldv_43625: *((char *)tags) = (char )arg->always_asbp; tags = tags + 1U; tmp___47 = tags; tags = tags + 1; __gu_p___62 = (void *)tmp___47; switch (2UL) { case 1UL: *((u8 *)__gu_p___62) = 61U; goto ldv_43632; case 2UL: put_unaligned_le16(32829, __gu_p___62); goto ldv_43632; case 4UL: put_unaligned_le32(32829U, __gu_p___62); goto ldv_43632; case 8UL: put_unaligned_le64(32829ULL, __gu_p___62); goto ldv_43632; default: __bad_unaligned_access_size(); goto ldv_43632; } ldv_43632: tmp___48 = tags; tags = tags + 1; __gu_p___63 = (void *)tmp___48; switch (2UL) { case 1UL: *((u8 *)__gu_p___63) = 1U; goto ldv_43639; case 2UL: put_unaligned_le16(1, __gu_p___63); goto ldv_43639; case 4UL: put_unaligned_le32(1U, __gu_p___63); goto ldv_43639; case 8UL: put_unaligned_le64(1ULL, __gu_p___63); goto ldv_43639; default: __bad_unaligned_access_size(); goto ldv_43639; } ldv_43639: *((char *)tags) = (char )arg->no_cork; tags = tags + 1U; tmp___49 = tags; tags = tags + 1; __gu_p___64 = (void *)tmp___49; switch (2UL) { case 1UL: *((u8 *)__gu_p___64) = 62U; goto ldv_43646; case 2UL: put_unaligned_le16(41022, __gu_p___64); goto ldv_43646; case 4UL: put_unaligned_le32(41022U, __gu_p___64); goto ldv_43646; case 8UL: put_unaligned_le64(41022ULL, __gu_p___64); goto ldv_43646; default: __bad_unaligned_access_size(); goto ldv_43646; } ldv_43646: tmp___50 = tags; tags = tags + 1; __gu_p___65 = (void *)tmp___50; switch (2UL) { case 1UL: *((u8 *)__gu_p___65) = 1U; goto ldv_43653; case 2UL: put_unaligned_le16(1, __gu_p___65); goto ldv_43653; case 4UL: put_unaligned_le32(1U, __gu_p___65); goto ldv_43653; case 8UL: put_unaligned_le64(1ULL, __gu_p___65); goto ldv_43653; default: __bad_unaligned_access_size(); goto ldv_43653; } ldv_43653: *((char *)tags) = (char )arg->auto_sndbuf_size; tags = tags + 1U; tmp___51 = tags; tags = tags + 1; __gu_p___66 = (void *)tmp___51; switch (2UL) { case 1UL: *((u8 *)__gu_p___66) = 70U; goto ldv_43660; case 2UL: put_unaligned_le16(41030, __gu_p___66); goto ldv_43660; case 4UL: put_unaligned_le32(41030U, __gu_p___66); goto ldv_43660; case 8UL: put_unaligned_le64(41030ULL, __gu_p___66); goto ldv_43660; default: __bad_unaligned_access_size(); goto ldv_43660; } ldv_43660: tmp___52 = tags; tags = tags + 1; __gu_p___67 = (void *)tmp___52; switch (2UL) { case 1UL: *((u8 *)__gu_p___67) = 1U; goto ldv_43667; case 2UL: put_unaligned_le16(1, __gu_p___67); goto ldv_43667; case 4UL: put_unaligned_le32(1U, __gu_p___67); goto ldv_43667; case 8UL: put_unaligned_le64(1ULL, __gu_p___67); goto ldv_43667; default: __bad_unaligned_access_size(); goto ldv_43667; } ldv_43667: *((char *)tags) = (char )arg->dry_run; tags = tags + 1U; return (tags); } } static unsigned short *syncer_conf_to_tags(struct drbd_conf *mdev , struct syncer_conf *arg , unsigned short *tags ) ; static unsigned short *syncer_conf_to_tags(struct drbd_conf *mdev , struct syncer_conf *arg , unsigned short *tags ) { void *__gu_p ; unsigned short *tmp ; void *__gu_p___0 ; unsigned short *tmp___0 ; void *__gu_p___1 ; void *__gu_p___2 ; unsigned short *tmp___1 ; void *__gu_p___3 ; unsigned short *tmp___2 ; void *__gu_p___4 ; void *__gu_p___5 ; unsigned short *tmp___3 ; void *__gu_p___6 ; unsigned short *tmp___4 ; void *__gu_p___7 ; void *__gu_p___8 ; unsigned short *tmp___5 ; void *__gu_p___9 ; unsigned short *tmp___6 ; void *__gu_p___10 ; void *__gu_p___11 ; unsigned short *tmp___7 ; void *__gu_p___12 ; unsigned short *tmp___8 ; void *__gu_p___13 ; void *__gu_p___14 ; unsigned short *tmp___9 ; void *__gu_p___15 ; unsigned short *tmp___10 ; void *__gu_p___16 ; void *__gu_p___17 ; unsigned short *tmp___11 ; void *__gu_p___18 ; unsigned short *tmp___12 ; void *__gu_p___19 ; void *__gu_p___20 ; unsigned short *tmp___13 ; void *__gu_p___21 ; unsigned short *tmp___14 ; size_t __len ; void *__ret ; void *__gu_p___22 ; unsigned short *tmp___15 ; void *__gu_p___23 ; unsigned short *tmp___16 ; size_t __len___0 ; void *__ret___0 ; void *__gu_p___24 ; unsigned short *tmp___17 ; void *__gu_p___25 ; unsigned short *tmp___18 ; size_t __len___1 ; void *__ret___1 ; void *__gu_p___26 ; unsigned short *tmp___19 ; void *__gu_p___27 ; unsigned short *tmp___20 ; { tmp = tags; tags = tags + 1; __gu_p = (void *)tmp; switch (2UL) { case 1UL: *((u8 *)__gu_p) = 30U; goto ldv_43750; case 2UL: put_unaligned_le16(30, __gu_p); goto ldv_43750; case 4UL: put_unaligned_le32(30U, __gu_p); goto ldv_43750; case 8UL: put_unaligned_le64(30ULL, __gu_p); goto ldv_43750; default: __bad_unaligned_access_size(); goto ldv_43750; } ldv_43750: tmp___0 = tags; tags = tags + 1; __gu_p___0 = (void *)tmp___0; switch (2UL) { case 1UL: *((u8 *)__gu_p___0) = 4U; goto ldv_43757; case 2UL: put_unaligned_le16(4, __gu_p___0); goto ldv_43757; case 4UL: put_unaligned_le32(4U, __gu_p___0); goto ldv_43757; case 8UL: put_unaligned_le64(4ULL, __gu_p___0); goto ldv_43757; default: __bad_unaligned_access_size(); goto ldv_43757; } ldv_43757: __gu_p___1 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___1) = (unsigned char )arg->rate; goto ldv_43764; case 2UL: put_unaligned_le16((int )((unsigned short )arg->rate), __gu_p___1); goto ldv_43764; case 4UL: put_unaligned_le32((unsigned int )arg->rate, __gu_p___1); goto ldv_43764; case 8UL: put_unaligned_le64((unsigned long long )arg->rate, __gu_p___1); goto ldv_43764; default: __bad_unaligned_access_size(); goto ldv_43764; } ldv_43764: tags = tags + 4U; tmp___1 = tags; tags = tags + 1; __gu_p___2 = (void *)tmp___1; switch (2UL) { case 1UL: *((u8 *)__gu_p___2) = 31U; goto ldv_43771; case 2UL: put_unaligned_le16(31, __gu_p___2); goto ldv_43771; case 4UL: put_unaligned_le32(31U, __gu_p___2); goto ldv_43771; case 8UL: put_unaligned_le64(31ULL, __gu_p___2); goto ldv_43771; default: __bad_unaligned_access_size(); goto ldv_43771; } ldv_43771: tmp___2 = tags; tags = tags + 1; __gu_p___3 = (void *)tmp___2; switch (2UL) { case 1UL: *((u8 *)__gu_p___3) = 4U; goto ldv_43778; case 2UL: put_unaligned_le16(4, __gu_p___3); goto ldv_43778; case 4UL: put_unaligned_le32(4U, __gu_p___3); goto ldv_43778; case 8UL: put_unaligned_le64(4ULL, __gu_p___3); goto ldv_43778; default: __bad_unaligned_access_size(); goto ldv_43778; } ldv_43778: __gu_p___4 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___4) = (unsigned char )arg->after; goto ldv_43785; case 2UL: put_unaligned_le16((int )((unsigned short )arg->after), __gu_p___4); goto ldv_43785; case 4UL: put_unaligned_le32((unsigned int )arg->after, __gu_p___4); goto ldv_43785; case 8UL: put_unaligned_le64((unsigned long long )arg->after, __gu_p___4); goto ldv_43785; default: __bad_unaligned_access_size(); goto ldv_43785; } ldv_43785: tags = tags + 4U; tmp___3 = tags; tags = tags + 1; __gu_p___5 = (void *)tmp___3; switch (2UL) { case 1UL: *((u8 *)__gu_p___5) = 32U; goto ldv_43792; case 2UL: put_unaligned_le16(32, __gu_p___5); goto ldv_43792; case 4UL: put_unaligned_le32(32U, __gu_p___5); goto ldv_43792; case 8UL: put_unaligned_le64(32ULL, __gu_p___5); goto ldv_43792; default: __bad_unaligned_access_size(); goto ldv_43792; } ldv_43792: tmp___4 = tags; tags = tags + 1; __gu_p___6 = (void *)tmp___4; switch (2UL) { case 1UL: *((u8 *)__gu_p___6) = 4U; goto ldv_43799; case 2UL: put_unaligned_le16(4, __gu_p___6); goto ldv_43799; case 4UL: put_unaligned_le32(4U, __gu_p___6); goto ldv_43799; case 8UL: put_unaligned_le64(4ULL, __gu_p___6); goto ldv_43799; default: __bad_unaligned_access_size(); goto ldv_43799; } ldv_43799: __gu_p___7 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___7) = (unsigned char )arg->al_extents; goto ldv_43806; case 2UL: put_unaligned_le16((int )((unsigned short )arg->al_extents), __gu_p___7); goto ldv_43806; case 4UL: put_unaligned_le32((unsigned int )arg->al_extents, __gu_p___7); goto ldv_43806; case 8UL: put_unaligned_le64((unsigned long long )arg->al_extents, __gu_p___7); goto ldv_43806; default: __bad_unaligned_access_size(); goto ldv_43806; } ldv_43806: tags = tags + 4U; tmp___5 = tags; tags = tags + 1; __gu_p___8 = (void *)tmp___5; switch (2UL) { case 1UL: *((u8 *)__gu_p___8) = 71U; goto ldv_43813; case 2UL: put_unaligned_le16(71, __gu_p___8); goto ldv_43813; case 4UL: put_unaligned_le32(71U, __gu_p___8); goto ldv_43813; case 8UL: put_unaligned_le64(71ULL, __gu_p___8); goto ldv_43813; default: __bad_unaligned_access_size(); goto ldv_43813; } ldv_43813: tmp___6 = tags; tags = tags + 1; __gu_p___9 = (void *)tmp___6; switch (2UL) { case 1UL: *((u8 *)__gu_p___9) = 4U; goto ldv_43820; case 2UL: put_unaligned_le16(4, __gu_p___9); goto ldv_43820; case 4UL: put_unaligned_le32(4U, __gu_p___9); goto ldv_43820; case 8UL: put_unaligned_le64(4ULL, __gu_p___9); goto ldv_43820; default: __bad_unaligned_access_size(); goto ldv_43820; } ldv_43820: __gu_p___10 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___10) = (unsigned char )arg->dp_volume; goto ldv_43827; case 2UL: put_unaligned_le16((int )((unsigned short )arg->dp_volume), __gu_p___10); goto ldv_43827; case 4UL: put_unaligned_le32((unsigned int )arg->dp_volume, __gu_p___10); goto ldv_43827; case 8UL: put_unaligned_le64((unsigned long long )arg->dp_volume, __gu_p___10); goto ldv_43827; default: __bad_unaligned_access_size(); goto ldv_43827; } ldv_43827: tags = tags + 4U; tmp___7 = tags; tags = tags + 1; __gu_p___11 = (void *)tmp___7; switch (2UL) { case 1UL: *((u8 *)__gu_p___11) = 72U; goto ldv_43834; case 2UL: put_unaligned_le16(72, __gu_p___11); goto ldv_43834; case 4UL: put_unaligned_le32(72U, __gu_p___11); goto ldv_43834; case 8UL: put_unaligned_le64(72ULL, __gu_p___11); goto ldv_43834; default: __bad_unaligned_access_size(); goto ldv_43834; } ldv_43834: tmp___8 = tags; tags = tags + 1; __gu_p___12 = (void *)tmp___8; switch (2UL) { case 1UL: *((u8 *)__gu_p___12) = 4U; goto ldv_43841; case 2UL: put_unaligned_le16(4, __gu_p___12); goto ldv_43841; case 4UL: put_unaligned_le32(4U, __gu_p___12); goto ldv_43841; case 8UL: put_unaligned_le64(4ULL, __gu_p___12); goto ldv_43841; default: __bad_unaligned_access_size(); goto ldv_43841; } ldv_43841: __gu_p___13 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___13) = (unsigned char )arg->dp_interval; goto ldv_43848; case 2UL: put_unaligned_le16((int )((unsigned short )arg->dp_interval), __gu_p___13); goto ldv_43848; case 4UL: put_unaligned_le32((unsigned int )arg->dp_interval, __gu_p___13); goto ldv_43848; case 8UL: put_unaligned_le64((unsigned long long )arg->dp_interval, __gu_p___13); goto ldv_43848; default: __bad_unaligned_access_size(); goto ldv_43848; } ldv_43848: tags = tags + 4U; tmp___9 = tags; tags = tags + 1; __gu_p___14 = (void *)tmp___9; switch (2UL) { case 1UL: *((u8 *)__gu_p___14) = 73U; goto ldv_43855; case 2UL: put_unaligned_le16(73, __gu_p___14); goto ldv_43855; case 4UL: put_unaligned_le32(73U, __gu_p___14); goto ldv_43855; case 8UL: put_unaligned_le64(73ULL, __gu_p___14); goto ldv_43855; default: __bad_unaligned_access_size(); goto ldv_43855; } ldv_43855: tmp___10 = tags; tags = tags + 1; __gu_p___15 = (void *)tmp___10; switch (2UL) { case 1UL: *((u8 *)__gu_p___15) = 4U; goto ldv_43862; case 2UL: put_unaligned_le16(4, __gu_p___15); goto ldv_43862; case 4UL: put_unaligned_le32(4U, __gu_p___15); goto ldv_43862; case 8UL: put_unaligned_le64(4ULL, __gu_p___15); goto ldv_43862; default: __bad_unaligned_access_size(); goto ldv_43862; } ldv_43862: __gu_p___16 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___16) = (unsigned char )arg->throttle_th; goto ldv_43869; case 2UL: put_unaligned_le16((int )((unsigned short )arg->throttle_th), __gu_p___16); goto ldv_43869; case 4UL: put_unaligned_le32((unsigned int )arg->throttle_th, __gu_p___16); goto ldv_43869; case 8UL: put_unaligned_le64((unsigned long long )arg->throttle_th, __gu_p___16); goto ldv_43869; default: __bad_unaligned_access_size(); goto ldv_43869; } ldv_43869: tags = tags + 4U; tmp___11 = tags; tags = tags + 1; __gu_p___17 = (void *)tmp___11; switch (2UL) { case 1UL: *((u8 *)__gu_p___17) = 74U; goto ldv_43876; case 2UL: put_unaligned_le16(74, __gu_p___17); goto ldv_43876; case 4UL: put_unaligned_le32(74U, __gu_p___17); goto ldv_43876; case 8UL: put_unaligned_le64(74ULL, __gu_p___17); goto ldv_43876; default: __bad_unaligned_access_size(); goto ldv_43876; } ldv_43876: tmp___12 = tags; tags = tags + 1; __gu_p___18 = (void *)tmp___12; switch (2UL) { case 1UL: *((u8 *)__gu_p___18) = 4U; goto ldv_43883; case 2UL: put_unaligned_le16(4, __gu_p___18); goto ldv_43883; case 4UL: put_unaligned_le32(4U, __gu_p___18); goto ldv_43883; case 8UL: put_unaligned_le64(4ULL, __gu_p___18); goto ldv_43883; default: __bad_unaligned_access_size(); goto ldv_43883; } ldv_43883: __gu_p___19 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___19) = (unsigned char )arg->hold_off_th; goto ldv_43890; case 2UL: put_unaligned_le16((int )((unsigned short )arg->hold_off_th), __gu_p___19); goto ldv_43890; case 4UL: put_unaligned_le32((unsigned int )arg->hold_off_th, __gu_p___19); goto ldv_43890; case 8UL: put_unaligned_le64((unsigned long long )arg->hold_off_th, __gu_p___19); goto ldv_43890; default: __bad_unaligned_access_size(); goto ldv_43890; } ldv_43890: tags = tags + 4U; tmp___13 = tags; tags = tags + 1; __gu_p___20 = (void *)tmp___13; switch (2UL) { case 1UL: *((u8 *)__gu_p___20) = 52U; goto ldv_43897; case 2UL: put_unaligned_le16(49204, __gu_p___20); goto ldv_43897; case 4UL: put_unaligned_le32(49204U, __gu_p___20); goto ldv_43897; case 8UL: put_unaligned_le64(49204ULL, __gu_p___20); goto ldv_43897; default: __bad_unaligned_access_size(); goto ldv_43897; } ldv_43897: tmp___14 = tags; tags = tags + 1; __gu_p___21 = (void *)tmp___14; switch (2UL) { case 1UL: *((u8 *)__gu_p___21) = (unsigned char )arg->verify_alg_len; goto ldv_43904; case 2UL: put_unaligned_le16((int )((unsigned short )arg->verify_alg_len), __gu_p___21); goto ldv_43904; case 4UL: put_unaligned_le32((unsigned int )arg->verify_alg_len, __gu_p___21); goto ldv_43904; case 8UL: put_unaligned_le64((unsigned long long )arg->verify_alg_len, __gu_p___21); goto ldv_43904; default: __bad_unaligned_access_size(); goto ldv_43904; } ldv_43904: __len = (size_t )arg->verify_alg_len; __ret = memcpy((void *)tags, (void const *)(& arg->verify_alg), __len); tags = tags + (unsigned long )arg->verify_alg_len; tmp___15 = tags; tags = tags + 1; __gu_p___22 = (void *)tmp___15; switch (2UL) { case 1UL: *((u8 *)__gu_p___22) = 51U; goto ldv_43914; case 2UL: put_unaligned_le16(49203, __gu_p___22); goto ldv_43914; case 4UL: put_unaligned_le32(49203U, __gu_p___22); goto ldv_43914; case 8UL: put_unaligned_le64(49203ULL, __gu_p___22); goto ldv_43914; default: __bad_unaligned_access_size(); goto ldv_43914; } ldv_43914: tmp___16 = tags; tags = tags + 1; __gu_p___23 = (void *)tmp___16; switch (2UL) { case 1UL: *((u8 *)__gu_p___23) = (unsigned char )arg->cpu_mask_len; goto ldv_43921; case 2UL: put_unaligned_le16((int )((unsigned short )arg->cpu_mask_len), __gu_p___23); goto ldv_43921; case 4UL: put_unaligned_le32((unsigned int )arg->cpu_mask_len, __gu_p___23); goto ldv_43921; case 8UL: put_unaligned_le64((unsigned long long )arg->cpu_mask_len, __gu_p___23); goto ldv_43921; default: __bad_unaligned_access_size(); goto ldv_43921; } ldv_43921: __len___0 = (size_t )arg->cpu_mask_len; __ret___0 = memcpy((void *)tags, (void const *)(& arg->cpu_mask), __len___0); tags = tags + (unsigned long )arg->cpu_mask_len; tmp___17 = tags; tags = tags + 1; __gu_p___24 = (void *)tmp___17; switch (2UL) { case 1UL: *((u8 *)__gu_p___24) = 64U; goto ldv_43931; case 2UL: put_unaligned_le16(49216, __gu_p___24); goto ldv_43931; case 4UL: put_unaligned_le32(49216U, __gu_p___24); goto ldv_43931; case 8UL: put_unaligned_le64(49216ULL, __gu_p___24); goto ldv_43931; default: __bad_unaligned_access_size(); goto ldv_43931; } ldv_43931: tmp___18 = tags; tags = tags + 1; __gu_p___25 = (void *)tmp___18; switch (2UL) { case 1UL: *((u8 *)__gu_p___25) = (unsigned char )arg->csums_alg_len; goto ldv_43938; case 2UL: put_unaligned_le16((int )((unsigned short )arg->csums_alg_len), __gu_p___25); goto ldv_43938; case 4UL: put_unaligned_le32((unsigned int )arg->csums_alg_len, __gu_p___25); goto ldv_43938; case 8UL: put_unaligned_le64((unsigned long long )arg->csums_alg_len, __gu_p___25); goto ldv_43938; default: __bad_unaligned_access_size(); goto ldv_43938; } ldv_43938: __len___1 = (size_t )arg->csums_alg_len; __ret___1 = memcpy((void *)tags, (void const *)(& arg->csums_alg), __len___1); tags = tags + (unsigned long )arg->csums_alg_len; tmp___19 = tags; tags = tags + 1; __gu_p___26 = (void *)tmp___19; switch (2UL) { case 1UL: *((u8 *)__gu_p___26) = 65U; goto ldv_43948; case 2UL: put_unaligned_le16(32833, __gu_p___26); goto ldv_43948; case 4UL: put_unaligned_le32(32833U, __gu_p___26); goto ldv_43948; case 8UL: put_unaligned_le64(32833ULL, __gu_p___26); goto ldv_43948; default: __bad_unaligned_access_size(); goto ldv_43948; } ldv_43948: tmp___20 = tags; tags = tags + 1; __gu_p___27 = (void *)tmp___20; switch (2UL) { case 1UL: *((u8 *)__gu_p___27) = 1U; goto ldv_43955; case 2UL: put_unaligned_le16(1, __gu_p___27); goto ldv_43955; case 4UL: put_unaligned_le32(1U, __gu_p___27); goto ldv_43955; case 8UL: put_unaligned_le64(1ULL, __gu_p___27); goto ldv_43955; default: __bad_unaligned_access_size(); goto ldv_43955; } ldv_43955: *((char *)tags) = (char )arg->use_rle; tags = tags + 1U; return (tags); } } static unsigned short *get_state_to_tags(struct drbd_conf *mdev , struct get_state *arg , unsigned short *tags ) ; static unsigned short *get_state_to_tags(struct drbd_conf *mdev , struct get_state *arg , unsigned short *tags ) { void *__gu_p ; unsigned short *tmp ; void *__gu_p___0 ; unsigned short *tmp___0 ; void *__gu_p___1 ; { tmp = tags; tags = tags + 1; __gu_p = (void *)tmp; switch (2UL) { case 1UL: *((u8 *)__gu_p) = 33U; goto ldv_44043; case 2UL: put_unaligned_le16(33, __gu_p); goto ldv_44043; case 4UL: put_unaligned_le32(33U, __gu_p); goto ldv_44043; case 8UL: put_unaligned_le64(33ULL, __gu_p); goto ldv_44043; default: __bad_unaligned_access_size(); goto ldv_44043; } ldv_44043: tmp___0 = tags; tags = tags + 1; __gu_p___0 = (void *)tmp___0; switch (2UL) { case 1UL: *((u8 *)__gu_p___0) = 4U; goto ldv_44050; case 2UL: put_unaligned_le16(4, __gu_p___0); goto ldv_44050; case 4UL: put_unaligned_le32(4U, __gu_p___0); goto ldv_44050; case 8UL: put_unaligned_le64(4ULL, __gu_p___0); goto ldv_44050; default: __bad_unaligned_access_size(); goto ldv_44050; } ldv_44050: __gu_p___1 = (void *)tags; switch (4UL) { case 1UL: *((u8 *)__gu_p___1) = (unsigned char )arg->state_i; goto ldv_44057; case 2UL: put_unaligned_le16((int )((unsigned short )arg->state_i), __gu_p___1); goto ldv_44057; case 4UL: put_unaligned_le32((unsigned int )arg->state_i, __gu_p___1); goto ldv_44057; case 8UL: put_unaligned_le64((unsigned long long )arg->state_i, __gu_p___1); goto ldv_44057; default: __bad_unaligned_access_size(); goto ldv_44057; } ldv_44057: tags = tags + 4U; return (tags); } } void drbd_bcast_ev_helper(struct drbd_conf *mdev , char *helper_name ) ; void drbd_nl_send_reply(struct cn_msg *req , int ret_code ) ; int drbd_khelper(struct drbd_conf *mdev , char *cmd ) { char *envp[6U] ; char mb[12U] ; char af[20U] ; char ad[60U] ; char *afs ; char *argv[4U] ; int ret ; unsigned int tmp ; int tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; { envp[0] = (char *)"HOME=/"; envp[1] = (char *)"TERM=linux"; envp[2] = (char *)"PATH=/sbin:/usr/sbin:/bin:/usr/bin"; envp[3] = 0; envp[4] = 0; envp[5] = 0; argv[0] = (char *)(& usermode_helper); argv[1] = cmd; argv[2] = (char *)(& mb); argv[3] = 0; tmp = mdev_to_minor(mdev); snprintf((char *)(& mb), 12UL, "minor-%d", tmp); tmp___0 = get_net_conf(mdev); if (tmp___0 != 0) { switch ((int )((struct sockaddr *)(& (mdev->net_conf)->peer_addr))->sa_family) { case 10: afs = (char *)"ipv6"; snprintf((char *)(& ad), 60UL, "DRBD_PEER_ADDRESS=%pI6", & ((struct sockaddr_in6 *)(& (mdev->net_conf)->peer_addr))->sin6_addr); goto ldv_44378; case 2: afs = (char *)"ipv4"; snprintf((char *)(& ad), 60UL, "DRBD_PEER_ADDRESS=%pI4", & ((struct sockaddr_in *)(& (mdev->net_conf)->peer_addr))->sin_addr); goto ldv_44378; default: afs = (char *)"ssocks"; snprintf((char *)(& ad), 60UL, "DRBD_PEER_ADDRESS=%pI4", & ((struct sockaddr_in *)(& (mdev->net_conf)->peer_addr))->sin_addr); } ldv_44378: snprintf((char *)(& af), 20UL, "DRBD_PEER_AF=%s", afs); envp[3] = (char *)(& af); envp[4] = (char *)(& ad); put_net_conf(mdev); } else { } tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: helper command: %s %s %s\n", tmp___2, tmp___1, (char *)(& usermode_helper), cmd, (char *)(& mb)); drbd_bcast_ev_helper(mdev, cmd); ret = call_usermodehelper((char *)(& usermode_helper), (char **)(& argv), (char **)(& envp), UMH_WAIT_PROC); if (ret != 0) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: helper command: %s %s %s exit code %u (0x%x)\n", tmp___4, tmp___3, (char *)(& usermode_helper), cmd, (char *)(& mb), (ret >> 8) & 255, ret); } else { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: helper command: %s %s %s exit code %u (0x%x)\n", tmp___6, tmp___5, (char *)(& usermode_helper), cmd, (char *)(& mb), (ret >> 8) & 255, ret); } if (ret < 0) { ret = 0; } else { } return (ret); } } enum drbd_disk_state drbd_try_outdate_peer(struct drbd_conf *mdev ) { char *ex_to_string ; int r ; enum drbd_disk_state nps ; enum drbd_fencing_p fp ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; int tmp___3 ; union drbd_state val ; union drbd_state mask ; char const *tmp___4 ; char const *tmp___5 ; union drbd_state val___0 ; union drbd_state mask___0 ; char const *tmp___6 ; char const *tmp___7 ; char const *tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; { if (*((unsigned int *)mdev + 497UL) != 49152U) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->state.pdsk == D_UNKNOWN ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_nl.c.prepared", 237); } else { } tmp___3 = _get_ldev_if_state(mdev, D_CONSISTENT); if (tmp___3 != 0) { fp = (enum drbd_fencing_p )(mdev->ldev)->dc.fencing; put_ldev(mdev); } else { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Not fencing peer, I\'m not even Consistent myself.\n", tmp___2, tmp___1); return ((enum drbd_disk_state )mdev->state.ldv_33381.pdsk); } if ((unsigned int )fp == 2U) { val.i = 0U; val.ldv_33381.susp = 1U; mask.i = 0U; mask.ldv_33381.susp = 1U; _drbd_request_state(mdev, mask, val, CS_WAIT_COMPLETE); } else { } r = drbd_khelper(mdev, (char *)"fence-peer"); switch ((r >> 8) & 255) { case 3: ex_to_string = (char *)"peer is inconsistent or worse"; nps = D_INCONSISTENT; goto ldv_44393; case 4: ex_to_string = (char *)"peer was fenced"; nps = D_OUTDATED; goto ldv_44393; case 5: ; if ((unsigned int )*((unsigned char *)mdev + 1989UL) == 16U) { ex_to_string = (char *)"peer is unreachable, assumed to be dead"; nps = D_OUTDATED; } else { ex_to_string = (char *)"peer unreachable, doing nothing since disk != UpToDate"; nps = (enum drbd_disk_state )mdev->state.ldv_33381.pdsk; } goto ldv_44393; case 6: ex_to_string = (char *)"peer is active"; tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Peer is primary, outdating myself.\n", tmp___5, tmp___4); nps = D_UNKNOWN; val___0.i = 0U; val___0.ldv_33381.disk = 5U; mask___0.i = 0U; mask___0.ldv_33381.disk = 15U; _drbd_request_state(mdev, mask___0, val___0, CS_WAIT_COMPLETE); goto ldv_44393; case 7: ; if ((unsigned int )fp != 2U) { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: fence-peer() = 7 && fencing != Stonith !!!\n", tmp___7, tmp___6); } else { } ex_to_string = (char *)"peer was stonithed"; nps = D_OUTDATED; goto ldv_44393; default: nps = D_UNKNOWN; tmp___8 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___9 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: fence-peer helper broken, returned %d\n", tmp___9, tmp___8, (r >> 8) & 255); return (nps); } ldv_44393: tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: fence-peer helper returned %d (%s)\n", tmp___11, tmp___10, (r >> 8) & 255, ex_to_string); return (nps); } } int drbd_set_role(struct drbd_conf *mdev , enum drbd_role new_role , int force ) { int max_tries ; int r ; int try ; int forced ; union drbd_state mask ; union drbd_state val ; enum drbd_disk_state nps ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; struct task_struct *tmp___3 ; int tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; int tmp___7 ; wait_queue_t __wait ; struct task_struct *tmp___8 ; int tmp___9 ; int tmp___10 ; int tmp___11 ; int tmp___12 ; int tmp___13 ; { max_tries = 4; r = 0; try = 0; forced = 0; if ((unsigned int )new_role == 1U) { request_ping(mdev); } else { } ldv_mutex_lock_138(& mdev->state_mutex); mask.i = 0U; mask.ldv_33381.role = 3U; val.i = 0U; val.ldv_33381.role = (unsigned char )new_role; goto ldv_44415; ldv_44418: r = _drbd_request_state(mdev, mask, val, CS_WAIT_COMPLETE); if (r == -10 && *((unsigned int *)(& mask) + 0UL) != 0U) { val.ldv_33381.pdsk = 0U; mask.ldv_33381.pdsk = 0U; goto ldv_44415; } else { } if ((r == -2 && force != 0) && ((int )mdev->state.ldv_33381.disk <= 7 && (int )mdev->state.ldv_33381.disk > 3)) { mask.ldv_33381.disk = 15U; val.ldv_33381.disk = 8U; forced = 1; goto ldv_44415; } else { } if ((r == -2 && (unsigned int )*((unsigned char *)mdev + 1989UL) == 14U) && *((unsigned int *)(& mask) + 0UL) == 0U) { if (*((unsigned int *)mdev + 497UL) != 49152U) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->state.pdsk == D_UNKNOWN ) in %s:%d\n", tmp___0, tmp, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_nl.c.prepared", 337); } else { } nps = drbd_try_outdate_peer(mdev); if ((unsigned int )nps == 5U || (unsigned int )nps == 4U) { val.ldv_33381.disk = 8U; mask.ldv_33381.disk = 15U; } else { } val.ldv_33381.pdsk = (unsigned char )nps; mask.ldv_33381.pdsk = 15U; goto ldv_44415; } else { } if (r == 2) { goto fail; } else { } if (r == -7 && *((unsigned int *)(& mask) + 0UL) == 0U) { nps = drbd_try_outdate_peer(mdev); if (force != 0 && (unsigned int )nps > 5U) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Forced into split brain situation!\n", tmp___2, tmp___1); nps = D_OUTDATED; } else { } mask.ldv_33381.pdsk = 15U; val.ldv_33381.pdsk = (unsigned char )nps; goto ldv_44415; } else { } if (r == -1) { tmp___3 = get_current(); tmp___3->state = 1L; schedule_timeout((long )((((mdev->net_conf)->ping_timeo + 1) * 250) / 10)); if (try < max_tries) { try = max_tries + -1; } else { } goto ldv_44415; } else { } if (r <= 0) { r = _drbd_request_state(mdev, mask, val, 6); if (r <= 0) { goto fail; } else { } } else { } goto ldv_44417; ldv_44415: tmp___4 = try; try = try + 1; if (tmp___4 < max_tries) { goto ldv_44418; } else { } ldv_44417: ; if (r <= 0) { goto fail; } else { } if (forced != 0) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Forced to consider local data as UpToDate!\n", tmp___6, tmp___5); } else { } tmp___7 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); if (tmp___7 == 0) { goto ldv_44419; } else { } tmp___8 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___8; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_44422: prepare_to_wait(& mdev->misc_wait, & __wait, 2); tmp___9 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); if (tmp___9 == 0) { goto ldv_44421; } else { } schedule(); goto ldv_44422; ldv_44421: finish_wait(& mdev->misc_wait, & __wait); ldv_44419: ; if ((unsigned int )new_role == 2U) { set_disk_ro(mdev->vdisk, 1); tmp___10 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___10 != 0) { (mdev->ldev)->md.uuid[0] = (mdev->ldev)->md.uuid[0] & 0xfffffffffffffffeULL; put_ldev(mdev); } else { } } else { tmp___11 = get_net_conf(mdev); if (tmp___11 != 0) { (mdev->net_conf)->want_lose = 0U; put_net_conf(mdev); } else { } set_disk_ro(mdev->vdisk, 0); tmp___12 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___12 != 0) { if ((((int )mdev->state.ldv_33381.conn <= 9 || (int )mdev->state.ldv_33381.pdsk <= 2) && (mdev->ldev)->md.uuid[1] == 0ULL) || forced != 0) { drbd_uuid_new_current(mdev); } else { } (mdev->ldev)->md.uuid[0] = (mdev->ldev)->md.uuid[0] | 1ULL; put_ldev(mdev); } else { } } if ((unsigned int )new_role == 2U) { tmp___13 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___13 != 0) { drbd_al_to_on_disk_bm(mdev); put_ldev(mdev); } else { } } else { } if ((int )mdev->state.ldv_33381.conn > 8) { if (forced != 0) { drbd_send_uuids(mdev); } else { } drbd_send_state(mdev); } else { } drbd_md_sync(mdev); kobject_uevent(& (mdev->vdisk)->part0.__dev.kobj, KOBJ_CHANGE); fail: ldv_mutex_unlock_139(& mdev->state_mutex); return (r); } } static int drbd_nl_primary(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { struct primary primary_args ; int tmp ; { memset((void *)(& primary_args), 0, 4UL); tmp = primary_from_tags(mdev, (unsigned short *)(& nlp->tag_list), & primary_args); if (tmp == 0) { reply->ret_code = 126; return (0); } else { } reply->ret_code = drbd_set_role(mdev, R_PRIMARY, (int )primary_args.primary_force); return (0); } } static int drbd_nl_secondary(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { { reply->ret_code = drbd_set_role(mdev, R_SECONDARY, 0); return (0); } } static void drbd_md_set_sector_offsets(struct drbd_conf *mdev , struct drbd_backing_dev *bdev ) { sector_t md_size_sect ; sector_t tmp ; sector_t tmp___0 ; sector_t tmp___1 ; { md_size_sect = 0UL; switch (bdev->dc.meta_dev_idx) { default: bdev->md.md_size_sect = 262144U; tmp = drbd_md_ss__(mdev, bdev); bdev->md.md_offset = (u64 )tmp; bdev->md.al_offset = 8; bdev->md.bm_offset = 72; goto ldv_44440; case -2: tmp___0 = drbd_get_capacity(bdev->md_bdev); bdev->md.md_size_sect = (u32 )tmp___0; bdev->md.md_offset = 0ULL; bdev->md.al_offset = 8; bdev->md.bm_offset = 72; goto ldv_44440; case -1: ; case -3: tmp___1 = drbd_md_ss__(mdev, bdev); bdev->md.md_offset = (u64 )tmp___1; bdev->md.al_offset = -64; md_size_sect = drbd_get_capacity(bdev->backing_bdev); md_size_sect = (md_size_sect + 32767UL) & 0xffffffffffff8000UL; md_size_sect = md_size_sect >> 15; md_size_sect = (md_size_sect + 7UL) & 0xfffffffffffffff8UL; md_size_sect = md_size_sect + 72UL; bdev->md.md_size_sect = (u32 )md_size_sect; bdev->md.bm_offset = (s32 )(8U - (unsigned int )md_size_sect); goto ldv_44440; } ldv_44440: ; return; } } char *ppsize(char *buf , unsigned long long size ) { char units[6U] ; int base ; { units[0] = 75; units[1] = 77; units[2] = 71; units[3] = 84; units[4] = 80; units[5] = 69; base = 0; goto ldv_44451; ldv_44450: size = (size >> 10) + (unsigned long long )((size & 512ULL) != 0ULL); base = base + 1; ldv_44451: ; if (size > 9999ULL) { goto ldv_44450; } else { } sprintf(buf, "%lu %cB", (long )size, (int )units[base]); return (buf); } } void drbd_suspend_io(struct drbd_conf *mdev ) { int tmp ; wait_queue_t __wait ; struct task_struct *tmp___0 ; int tmp___1 ; { set_bit(17U, (unsigned long volatile *)(& mdev->flags)); tmp = atomic_read((atomic_t const *)(& mdev->ap_bio_cnt)); if (tmp == 0) { goto ldv_44456; } else { } tmp___0 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___0; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_44459: prepare_to_wait(& mdev->misc_wait, & __wait, 2); tmp___1 = atomic_read((atomic_t const *)(& mdev->ap_bio_cnt)); if (tmp___1 == 0) { goto ldv_44458; } else { } schedule(); goto ldv_44459; ldv_44458: finish_wait(& mdev->misc_wait, & __wait); ldv_44456: ; return; } } void drbd_resume_io(struct drbd_conf *mdev ) { { clear_bit(17, (unsigned long volatile *)(& mdev->flags)); __wake_up(& mdev->misc_wait, 3U, 1, 0); return; } } enum determine_dev_size drbd_determin_dev_size(struct drbd_conf *mdev , enum dds_flags flags ) { sector_t prev_first_sect ; sector_t prev_size ; sector_t la_size ; sector_t size ; char ppb[10U] ; int md_moved ; int la_size_changed ; enum determine_dev_size rv ; int tmp ; wait_queue_t __wait ; struct task_struct *tmp___0 ; int tmp___1 ; int err ; sector_t tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; long tmp___7 ; char *tmp___8 ; char const *tmp___9 ; char const *tmp___10 ; sector_t tmp___11 ; sector_t tmp___12 ; sector_t tmp___13 ; char const *tmp___14 ; char const *tmp___15 ; int tmp___16 ; { rv = 0; drbd_suspend_io(mdev); tmp = lc_try_lock(mdev->act_log); if (tmp != 0) { goto ldv_44475; } else { } tmp___0 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___0; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_44478: prepare_to_wait(& mdev->al_wait, & __wait, 2); tmp___1 = lc_try_lock(mdev->act_log); if (tmp___1 != 0) { goto ldv_44477; } else { } schedule(); goto ldv_44478; ldv_44477: finish_wait(& mdev->al_wait, & __wait); ldv_44475: prev_first_sect = drbd_md_first_sector(mdev->ldev); prev_size = (sector_t )(mdev->ldev)->md.md_size_sect; la_size = (sector_t )(mdev->ldev)->md.la_size_sect; drbd_md_set_sector_offsets(mdev, mdev->ldev); size = drbd_new_dev_size(mdev, mdev->ldev, (int )flags & 1); tmp___11 = drbd_get_capacity(mdev->this_bdev); if (tmp___11 != size) { goto _L; } else { tmp___12 = drbd_bm_capacity(mdev); if (tmp___12 != size) { _L: /* CIL Label */ err = drbd_bm_resize(mdev, size, ((unsigned int )flags & 2U) == 0U); tmp___7 = ldv__builtin_expect(err != 0, 0L); if (tmp___7 != 0L) { tmp___2 = drbd_bm_capacity(mdev); size = tmp___2 >> 1; if (size == 0UL) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: OUT OF MEMORY! Could not allocate bitmap!\n", tmp___4, tmp___3); } else { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: BM resizing failed. Leaving size unchanged at size = %lu KB\n", tmp___6, tmp___5, size); } rv = dev_size_error; } else { } drbd_set_my_capacity(mdev, size); (mdev->ldev)->md.la_size_sect = (u64 )size; tmp___8 = ppsize((char *)(& ppb), (unsigned long long )(size >> 1)); tmp___9 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___10 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: size = %s (%llu KB)\n", tmp___10, tmp___9, tmp___8, (unsigned long long )size >> 1); } else { } } if ((int )rv == -1) { goto out; } else { } la_size_changed = (mdev->ldev)->md.la_size_sect != (unsigned long long )la_size; tmp___13 = drbd_md_first_sector(mdev->ldev); md_moved = tmp___13 != prev_first_sect || (sector_t )(mdev->ldev)->md.md_size_sect != prev_size; if (la_size_changed != 0 || md_moved != 0) { drbd_al_shrink(mdev); tmp___14 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___15 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Writing the whole bitmap, %s\n", tmp___15, tmp___14, la_size_changed == 0 || md_moved == 0 ? (la_size_changed != 0 ? (char *)"size changed" : (char *)"md moved") : (char *)"size changed and md moved"); tmp___16 = drbd_bitmap_io(mdev, & drbd_bm_write, (char *)"size changed"); rv = (enum determine_dev_size )tmp___16; drbd_md_mark_dirty(mdev); } else { } if (size > la_size) { rv = grew; } else { } if (size < la_size) { rv = shrunk; } else { } out: lc_unlock(mdev->act_log); __wake_up(& mdev->al_wait, 3U, 1, 0); drbd_resume_io(mdev); return (rv); } } sector_t drbd_new_dev_size(struct drbd_conf *mdev , struct drbd_backing_dev *bdev , int assume_peer_has_space ) { sector_t p_size ; sector_t la_size ; sector_t m_size ; sector_t u_size ; sector_t size ; char const *tmp ; char const *tmp___0 ; sector_t __min1 ; sector_t __min2 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; { p_size = mdev->p_size; la_size = (sector_t )bdev->md.la_size_sect; u_size = (sector_t )bdev->dc.disk_size; size = 0UL; m_size = drbd_get_max_capacity___1(bdev); if ((int )mdev->state.ldv_33381.conn <= 9 && assume_peer_has_space != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Resize while not connected was forced by the user!\n", tmp___0, tmp); p_size = m_size; } else { } if (p_size != 0UL && m_size != 0UL) { __min1 = p_size; __min2 = m_size; size = __min1 < __min2 ? __min1 : __min2; } else if (la_size != 0UL) { size = la_size; if (m_size != 0UL && m_size < size) { size = m_size; } else { } if (p_size != 0UL && p_size < size) { size = p_size; } else { } } else { if (m_size != 0UL) { size = m_size; } else { } if (p_size != 0UL) { size = p_size; } else { } } if (size == 0UL) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Both nodes diskless!\n", tmp___2, tmp___1); } else { } if (u_size != 0UL) { if (u_size > size) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Requested disk size is too big (%lu > %lu)\n", tmp___4, tmp___3, u_size >> 1, size >> 1); } else { size = u_size; } } else { } return (size); } } static int drbd_check_al_size(struct drbd_conf *mdev ) { struct lru_cache *n ; struct lru_cache *t ; struct lc_element *e ; unsigned int in_use ; int i ; int _b ; char const *tmp ; char const *tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; { _b = mdev->sync_conf.al_extents <= 6; if (_b != 0) { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___0, tmp, "drbd_check_al_size", (char *)"mdev->sync_conf.al_extents < 7", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_nl.c.prepared", 699); } else { } if (_b != 0) { mdev->sync_conf.al_extents = 127; } else { } if ((unsigned long )mdev->act_log != (unsigned long )((struct lru_cache *)0) && (mdev->act_log)->nr_elements == (unsigned int )mdev->sync_conf.al_extents) { return (0); } else { } in_use = 0U; t = mdev->act_log; n = lc_create("act_log", drbd_al_ext_cache, (unsigned int )mdev->sync_conf.al_extents, 48UL, 0UL); if ((unsigned long )n == (unsigned long )((struct lru_cache *)0)) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Cannot allocate act_log lru!\n", tmp___2, tmp___1); return (-12); } else { } spin_lock_irq(& mdev->al_lock); if ((unsigned long )t != (unsigned long )((struct lru_cache *)0)) { i = 0; goto ldv_44506; ldv_44505: e = lc_element_by_index(t, (unsigned int )i); if (e->refcnt != 0U) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: refcnt(%d)==%d\n", tmp___4, tmp___3, e->lc_number, e->refcnt); } else { } in_use = e->refcnt + in_use; i = i + 1; ldv_44506: ; if ((unsigned int )i < t->nr_elements) { goto ldv_44505; } else { } } else { } if (in_use == 0U) { mdev->act_log = n; } else { } spin_unlock_irq(& mdev->al_lock); if (in_use != 0U) { tmp___5 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___6 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Activity log still in use!\n", tmp___6, tmp___5); lc_destroy(n); return (-16); } else if ((unsigned long )t != (unsigned long )((struct lru_cache *)0)) { lc_destroy(t); } else { } drbd_md_mark_dirty(mdev); return (0); } } void drbd_setup_queue_param(struct drbd_conf *mdev , unsigned int max_seg_s ) { struct request_queue *q ; struct request_queue *b ; int max_segments ; unsigned int _min1 ; unsigned int tmp ; unsigned short tmp___0 ; unsigned int _min2 ; char const *tmp___1 ; char const *tmp___2 ; unsigned int tmp___3 ; char const *tmp___4 ; char const *tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; { q = mdev->rq_queue; b = (((mdev->ldev)->backing_bdev)->bd_disk)->queue; max_segments = (mdev->ldev)->dc.max_bio_bvecs; tmp = queue_max_sectors(b); tmp___0 = queue_logical_block_size(b); _min1 = tmp * (unsigned int )tmp___0; _min2 = max_seg_s; max_seg_s = _min1 < _min2 ? _min1 : _min2; blk_queue_max_hw_sectors(q, max_seg_s >> 9); blk_queue_max_segments(q, max_segments != 0 ? (int )((unsigned short )max_segments) : 128); blk_queue_max_segment_size(q, max_seg_s); blk_queue_logical_block_size(q, 512); blk_queue_segment_boundary(q, 4095UL); blk_stack_limits(& q->limits, & b->limits, 0UL); if ((unsigned long )b->merge_bvec_fn != (unsigned long )((merge_bvec_fn *)0)) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Backing device\'s merge_bvec_fn() = %p\n", tmp___2, tmp___1, b->merge_bvec_fn); } else { } tmp___3 = queue_max_segment_size(q); tmp___4 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___5 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: max_segment_size ( = BIO size ) = %u\n", tmp___5, tmp___4, tmp___3); if (q->backing_dev_info.ra_pages != b->backing_dev_info.ra_pages) { tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Adjusting my ra_pages to backing device\'s (%lu -> %lu)\n", tmp___7, tmp___6, q->backing_dev_info.ra_pages, b->backing_dev_info.ra_pages); q->backing_dev_info.ra_pages = b->backing_dev_info.ra_pages; } else { } return; } } static void drbd_reconfig_start(struct drbd_conf *mdev ) { int tmp ; wait_queue_t __wait ; struct task_struct *tmp___0 ; int tmp___1 ; int tmp___2 ; wait_queue_t __wait___0 ; struct task_struct *tmp___3 ; int tmp___4 ; { tmp = test_and_set_bit(22, (unsigned long volatile *)(& mdev->flags)); if (tmp == 0) { goto ldv_44521; } else { } tmp___0 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___0; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_44524: prepare_to_wait(& mdev->state_wait, & __wait, 2); tmp___1 = test_and_set_bit(22, (unsigned long volatile *)(& mdev->flags)); if (tmp___1 == 0) { goto ldv_44523; } else { } schedule(); goto ldv_44524; ldv_44523: finish_wait(& mdev->state_wait, & __wait); ldv_44521: tmp___2 = constant_test_bit(23U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___2 == 0) { goto ldv_44525; } else { } tmp___3 = get_current(); __wait___0.flags = 0U; __wait___0.private = (void *)tmp___3; __wait___0.func = & autoremove_wake_function; __wait___0.task_list.next = & __wait___0.task_list; __wait___0.task_list.prev = & __wait___0.task_list; ldv_44528: prepare_to_wait(& mdev->state_wait, & __wait___0, 2); tmp___4 = constant_test_bit(23U, (unsigned long const volatile *)(& mdev->flags)); if (tmp___4 == 0) { goto ldv_44527; } else { } schedule(); goto ldv_44528; ldv_44527: finish_wait(& mdev->state_wait, & __wait___0); ldv_44525: drbd_thread_start(& mdev->worker); return; } } static void drbd_reconfig_done(struct drbd_conf *mdev ) { { spin_lock_irq(& mdev->req_lock); if (((unsigned int )*((unsigned char *)mdev + 1989UL) == 0U && (unsigned int )*((unsigned short *)mdev + 994UL) == 0U) && (unsigned int )*((unsigned char *)mdev + 1988UL) == 2U) { set_bit(23U, (unsigned long volatile *)(& mdev->flags)); drbd_thread_stop_nowait(& mdev->worker); } else { clear_bit(22, (unsigned long volatile *)(& mdev->flags)); } spin_unlock_irq(& mdev->req_lock); __wake_up(& mdev->state_wait, 3U, 1, 0); return; } } static int drbd_nl_disk_conf(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { enum drbd_ret_codes retcode ; enum determine_dev_size dd ; sector_t max_possible_sectors ; sector_t min_md_device_sectors ; struct drbd_backing_dev *nbc ; struct inode *inode ; struct inode *inode2 ; struct lru_cache *resync_lru ; union drbd_state ns ; union drbd_state os ; int rv ; int cp_discovered ; int logical_block_size ; void *tmp ; int tmp___0 ; long tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; long tmp___4 ; long tmp___5 ; char const *tmp___6 ; char const *tmp___7 ; long tmp___8 ; int tmp___9 ; int tmp___10 ; sector_t tmp___11 ; char const *tmp___12 ; char const *tmp___13 ; sector_t tmp___14 ; char const *tmp___15 ; char const *tmp___16 ; sector_t tmp___17 ; sector_t tmp___18 ; sector_t tmp___19 ; char const *tmp___20 ; char const *tmp___21 ; char const *tmp___22 ; char const *tmp___23 ; int tmp___24 ; wait_queue_t __wait ; struct task_struct *tmp___25 ; int tmp___26 ; union drbd_state val ; union drbd_state mask ; int tmp___27 ; int tmp___28 ; unsigned short tmp___29 ; struct page *page ; struct page *tmp___30 ; char const *tmp___31 ; char const *tmp___32 ; char const *tmp___33 ; char const *tmp___34 ; int tmp___35 ; int tmp___36 ; char const *tmp___37 ; char const *tmp___38 ; int tmp___39 ; char const *tmp___40 ; char const *tmp___41 ; int tmp___42 ; sector_t tmp___43 ; int tmp___44 ; char const *tmp___45 ; char const *tmp___46 ; int tmp___47 ; int tmp___48 ; int tmp___49 ; int tmp___50 ; char const *tmp___51 ; char const *tmp___52 ; int tmp___53 ; int tmp___54 ; int tmp___55 ; int tmp___56 ; int tmp___57 ; int tmp___58 ; union drbd_state val___0 ; union drbd_state mask___0 ; { nbc = 0; resync_lru = 0; cp_discovered = 0; drbd_reconfig_start(mdev); if ((int )mdev->state.ldv_33381.disk > 0) { retcode = ERR_DISK_CONFIGURED; goto fail; } else { } tmp = kzalloc___2(408UL, 208U); nbc = (struct drbd_backing_dev *)tmp; if ((unsigned long )nbc == (unsigned long )((struct drbd_backing_dev *)0)) { retcode = ERR_NOMEM; goto fail; } else { } nbc->dc.disk_size = 0ULL; nbc->dc.on_io_error = 0; nbc->dc.fencing = 0; nbc->dc.max_bio_bvecs = 0; tmp___0 = disk_conf_from_tags(mdev, (unsigned short *)(& nlp->tag_list), & nbc->dc); if (tmp___0 == 0) { retcode = ERR_MANDATORY_TAG; goto fail; } else { } if (nbc->dc.meta_dev_idx < -3) { retcode = ERR_MD_IDX_INVALID; goto fail; } else { } nbc->lo_file = filp_open((char const *)(& nbc->dc.backing_dev), 2, 0); tmp___4 = IS_ERR((void const *)nbc->lo_file); if (tmp___4 != 0L) { tmp___1 = PTR_ERR((void const *)nbc->lo_file); tmp___2 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___3 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: open(\"%s\") failed with %ld\n", tmp___3, tmp___2, (unsigned char *)(& nbc->dc.backing_dev), tmp___1); nbc->lo_file = 0; retcode = ERR_OPEN_DISK; goto fail; } else { } inode = ((nbc->lo_file)->f_path.dentry)->d_inode; if (((int )inode->i_mode & 61440) != 24576) { retcode = ERR_DISK_NOT_BDEV; goto fail; } else { } nbc->md_file = filp_open((char const *)(& nbc->dc.meta_dev), 2, 0); tmp___8 = IS_ERR((void const *)nbc->md_file); if (tmp___8 != 0L) { tmp___5 = PTR_ERR((void const *)nbc->md_file); tmp___6 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___7 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: open(\"%s\") failed with %ld\n", tmp___7, tmp___6, (unsigned char *)(& nbc->dc.meta_dev), tmp___5); nbc->md_file = 0; retcode = ERR_OPEN_MD_DISK; goto fail; } else { } inode2 = ((nbc->md_file)->f_path.dentry)->d_inode; if (((int )inode2->i_mode & 61440) != 24576) { retcode = ERR_MD_NOT_BDEV; goto fail; } else { } nbc->backing_bdev = inode->ldv_22098.i_bdev; tmp___9 = bd_claim(nbc->backing_bdev, (void *)mdev); if (tmp___9 != 0) { printk("<3>drbd: bd_claim(%p,%p); failed [%p;%p;%u]\n", nbc->backing_bdev, mdev, (nbc->backing_bdev)->bd_holder, ((nbc->backing_bdev)->bd_contains)->bd_holder, (nbc->backing_bdev)->bd_holders); retcode = ERR_BDCLAIM_DISK; goto fail; } else { } resync_lru = lc_create("resync", drbd_bm_ext_cache, 61U, 64UL, 16UL); if ((unsigned long )resync_lru == (unsigned long )((struct lru_cache *)0)) { retcode = ERR_NOMEM; goto release_bdev_fail; } else { } nbc->md_bdev = inode2->ldv_22098.i_bdev; tmp___10 = bd_claim(nbc->md_bdev, nbc->dc.meta_dev_idx < 0 ? (void *)mdev : (void *)drbd_m_holder); if (tmp___10 != 0) { retcode = ERR_BDCLAIM_MD_DISK; goto release_bdev_fail; } else { } if (((unsigned long )nbc->backing_bdev == (unsigned long )nbc->md_bdev) ^ (int )((_Bool )(nbc->dc.meta_dev_idx == -1 || nbc->dc.meta_dev_idx == -3))) { retcode = ERR_MD_IDX_INVALID; goto release_bdev2_fail; } else { } drbd_md_set_sector_offsets(mdev, nbc); tmp___14 = drbd_get_max_capacity___1(nbc); if ((unsigned long long )tmp___14 < nbc->dc.disk_size) { tmp___11 = drbd_get_max_capacity___1(nbc); tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: max capacity %llu smaller than disk size %llu\n", tmp___13, tmp___12, (unsigned long long )tmp___11, nbc->dc.disk_size); retcode = ERR_DISK_TO_SMALL; goto release_bdev2_fail; } else { } if (nbc->dc.meta_dev_idx < 0) { max_possible_sectors = 34359738368UL; min_md_device_sectors = 2048UL; } else { max_possible_sectors = 8587575296UL; min_md_device_sectors = (unsigned long )(nbc->dc.meta_dev_idx + 1) * 262144UL; } tmp___17 = drbd_get_capacity(nbc->md_bdev); if (tmp___17 < min_md_device_sectors) { retcode = ERR_MD_DISK_TO_SMALL; tmp___15 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___16 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: refusing attach: md-device too small, at least %llu sectors needed for this meta-disk type\n", tmp___16, tmp___15, (unsigned long long )min_md_device_sectors); goto release_bdev2_fail; } else { } tmp___18 = drbd_get_max_capacity___1(nbc); tmp___19 = drbd_get_capacity(mdev->this_bdev); if (tmp___18 < tmp___19) { retcode = ERR_DISK_TO_SMALL; goto release_bdev2_fail; } else { } nbc->known_size = drbd_get_capacity(nbc->backing_bdev); if (nbc->known_size > max_possible_sectors) { tmp___20 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___21 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: ==> truncating very big lower level device to currently maximum possible %llu sectors <==\n", tmp___21, tmp___20, (unsigned long long )max_possible_sectors); if (nbc->dc.meta_dev_idx >= 0) { tmp___22 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___23 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: ==>> using internal or flexible meta data may help <<==\n", tmp___23, tmp___22); } else { } } else { } drbd_suspend_io(mdev); tmp___24 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); if (tmp___24 == 0) { goto ldv_44553; } else { } tmp___25 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___25; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_44556: prepare_to_wait(& mdev->misc_wait, & __wait, 2); tmp___26 = atomic_read((atomic_t const *)(& mdev->ap_pending_cnt)); if (tmp___26 == 0) { goto ldv_44555; } else { } schedule(); goto ldv_44556; ldv_44555: finish_wait(& mdev->misc_wait, & __wait); ldv_44553: drbd_flush_workqueue(mdev); val.i = 0U; val.ldv_33381.disk = 1U; mask.i = 0U; mask.ldv_33381.disk = 15U; tmp___27 = _drbd_request_state(mdev, mask, val, CS_VERBOSE); retcode = (enum drbd_ret_codes )tmp___27; drbd_resume_io(mdev); if ((unsigned int )retcode == 0U) { goto release_bdev2_fail; } else { } tmp___28 = _get_ldev_if_state(mdev, D_ATTACHING); if (tmp___28 == 0) { goto force_diskless; } else { } drbd_md_set_sector_offsets(mdev, nbc); tmp___29 = bdev_logical_block_size(nbc->md_bdev); logical_block_size = (int )tmp___29; if (logical_block_size == 0) { logical_block_size = 512; } else { } if (logical_block_size != 512) { if ((unsigned long )mdev->md_io_tmpp == (unsigned long )((struct page *)0)) { tmp___30 = alloc_pages(16U, 0U); page = tmp___30; if ((unsigned long )page == (unsigned long )((struct page *)0)) { goto force_diskless_dec; } else { } tmp___31 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___32 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Meta data\'s bdev logical_block_size = %d != %d\n", tmp___32, tmp___31, logical_block_size, 512); tmp___33 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___34 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: Workaround engaged (has performance impact).\n", tmp___34, tmp___33); mdev->md_io_tmpp = page; } else { } } else { } if ((unsigned long )mdev->bitmap == (unsigned long )((struct drbd_bitmap *)0)) { tmp___35 = drbd_bm_init(mdev); if (tmp___35 != 0) { retcode = ERR_NOMEM; goto force_diskless_dec; } else { } } else { } tmp___36 = drbd_md_read(mdev, nbc); retcode = (enum drbd_ret_codes )tmp___36; if ((unsigned int )retcode != 101U) { goto force_diskless_dec; } else { } if (((int )mdev->state.ldv_33381.conn <= 9 && (unsigned int )*((unsigned char *)mdev + 1988UL) == 1U) && ((mdev->ed_uuid ^ nbc->md.uuid[0]) & 0xfffffffffffffffeULL) != 0ULL) { tmp___37 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___38 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Can only attach to data with current UUID=%016llX\n", tmp___38, tmp___37, mdev->ed_uuid); retcode = ERR_DATA_NOT_CURRENT; goto force_diskless_dec; } else { } tmp___39 = drbd_check_al_size(mdev); if (tmp___39 != 0) { retcode = ERR_NOMEM; goto force_diskless_dec; } else { } tmp___42 = drbd_md_test_flag(nbc, 1); if (tmp___42 != 0) { tmp___43 = drbd_new_dev_size(mdev, nbc, 0); if ((unsigned long long )tmp___43 < nbc->md.la_size_sect) { tmp___40 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___41 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: refusing to truncate a consistent device\n", tmp___41, tmp___40); retcode = ERR_DISK_TO_SMALL; goto force_diskless_dec; } else { } } else { } tmp___44 = drbd_al_read_log(mdev, nbc); if (tmp___44 == 0) { retcode = ERR_IO_MD_DISK; goto force_diskless_dec; } else { } if ((unsigned int )*((unsigned char *)nbc + 388UL) != 0U) { set_bit(16U, (unsigned long volatile *)(& mdev->flags)); } else { clear_bit(16, (unsigned long volatile *)(& mdev->flags)); } if ((unsigned long )mdev->ldev != (unsigned long )((struct drbd_backing_dev *)0)) { tmp___45 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___46 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: ASSERT( mdev->ldev == NULL ) in %s:%d\n", tmp___46, tmp___45, (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_nl.c.prepared", 1049); } else { } mdev->ldev = nbc; mdev->resync = resync_lru; nbc = 0; resync_lru = 0; mdev->write_ordering = WO_bio_barrier; drbd_bump_write_ordering(mdev, WO_bio_barrier); tmp___47 = drbd_md_test_flag(mdev->ldev, 64); if (tmp___47 != 0) { set_bit(12U, (unsigned long volatile *)(& mdev->flags)); } else { clear_bit(12, (unsigned long volatile *)(& mdev->flags)); } tmp___48 = drbd_md_test_flag(mdev->ldev, 2); if (tmp___48 != 0) { set_bit(12U, (unsigned long volatile *)(& mdev->flags)); cp_discovered = 1; } else { } mdev->send_cnt = 0U; mdev->recv_cnt = 0U; mdev->read_cnt = 0U; mdev->writ_cnt = 0U; drbd_setup_queue_param(mdev, 32768U); clear_bit(8, (unsigned long volatile *)(& mdev->flags)); if ((unsigned int )*((unsigned char *)mdev + 1988UL) != 1U) { tmp___49 = drbd_md_test_flag(mdev->ldev, 2); if (tmp___49 != 0) { tmp___50 = drbd_md_test_flag(mdev->ldev, 4); if (tmp___50 == 0) { set_bit(8U, (unsigned long volatile *)(& mdev->flags)); } else { } } else { } } else { } dd = drbd_determin_dev_size(mdev, 0); if ((int )dd == -1) { retcode = ERR_NOMEM_BITMAP; goto force_diskless_dec; } else if ((int )dd == 2) { set_bit(20U, (unsigned long volatile *)(& mdev->flags)); } else { } tmp___55 = drbd_md_test_flag(mdev->ldev, 8); if (tmp___55 != 0) { tmp___51 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___52 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Assuming that all blocks are out of sync (aka FullSync)\n", tmp___52, tmp___51); tmp___53 = drbd_bitmap_io(mdev, & drbd_bmio_set_n_write, (char *)"set_n_write from attaching"); if (tmp___53 != 0) { retcode = ERR_IO_MD_DISK; goto force_diskless_dec; } else { } } else { tmp___54 = drbd_bitmap_io(mdev, & drbd_bm_read, (char *)"read from attaching"); if (tmp___54 < 0) { retcode = ERR_IO_MD_DISK; goto force_diskless_dec; } else { } } if (cp_discovered != 0) { drbd_al_apply_to_bm(mdev); drbd_al_to_on_disk_bm(mdev); } else { } spin_lock_irq(& mdev->req_lock); os = mdev->state; ns.i = os.i; tmp___57 = drbd_md_test_flag(mdev->ldev, 1); if (tmp___57 != 0) { tmp___56 = drbd_md_test_flag(mdev->ldev, 16); if (tmp___56 != 0) { ns.ldv_33381.disk = 7U; } else { ns.ldv_33381.disk = 5U; } } else { ns.ldv_33381.disk = 4U; } tmp___58 = drbd_md_test_flag(mdev->ldev, 32); if (tmp___58 != 0) { ns.ldv_33381.pdsk = 5U; } else { } if ((unsigned int )*((unsigned char *)(& ns) + 1UL) == 14U && (*((unsigned int *)(& ns) + 0UL) == 40960U || (mdev->ldev)->dc.fencing == 0)) { ns.ldv_33381.disk = 8U; } else { } if ((unsigned int )*((unsigned short *)mdev + 994UL) == 160U) { mdev->new_state_tmp.i = ns.i; ns.i = os.i; ns.ldv_33381.disk = 3U; } else { } rv = _drbd_set_state(mdev, ns, CS_VERBOSE, 0); ns = mdev->state; spin_unlock_irq(& mdev->req_lock); if (rv <= 0) { goto force_diskless_dec; } else { } if ((unsigned int )*((unsigned char *)mdev + 1988UL) == 1U) { (mdev->ldev)->md.uuid[0] = (mdev->ldev)->md.uuid[0] | 1ULL; } else { (mdev->ldev)->md.uuid[0] = (mdev->ldev)->md.uuid[0] & 0xfffffffffffffffeULL; } drbd_md_mark_dirty(mdev); drbd_md_sync(mdev); kobject_uevent(& (mdev->vdisk)->part0.__dev.kobj, KOBJ_CHANGE); put_ldev(mdev); reply->ret_code = (int )retcode; drbd_reconfig_done(mdev); return (0); force_diskless_dec: put_ldev(mdev); force_diskless: val___0.i = 0U; val___0.ldv_33381.disk = 0U; mask___0.i = 0U; mask___0.ldv_33381.disk = 15U; drbd_force_state(mdev, mask___0, val___0); drbd_md_sync(mdev); release_bdev2_fail: ; if ((unsigned long )nbc != (unsigned long )((struct drbd_backing_dev *)0)) { bd_release(nbc->md_bdev); } else { } release_bdev_fail: ; if ((unsigned long )nbc != (unsigned long )((struct drbd_backing_dev *)0)) { bd_release(nbc->backing_bdev); } else { } fail: ; if ((unsigned long )nbc != (unsigned long )((struct drbd_backing_dev *)0)) { if ((unsigned long )nbc->lo_file != (unsigned long )((struct file *)0)) { fput(nbc->lo_file); } else { } if ((unsigned long )nbc->md_file != (unsigned long )((struct file *)0)) { fput(nbc->md_file); } else { } kfree((void const *)nbc); } else { } lc_destroy(resync_lru); reply->ret_code = (int )retcode; drbd_reconfig_done(mdev); return (0); } } static int drbd_nl_detach(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { union drbd_state val ; union drbd_state mask ; { val.i = 0U; val.ldv_33381.disk = 0U; mask.i = 0U; mask.ldv_33381.disk = 15U; reply->ret_code = drbd_request_state(mdev, mask, val); return (0); } } static int drbd_nl_net_conf(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { int i ; int ns ; enum drbd_ret_codes retcode ; struct net_conf *new_conf ; struct crypto_hash *tfm ; struct crypto_hash *integrity_w_tfm ; struct crypto_hash *integrity_r_tfm ; struct hlist_head *new_tl_hash ; struct hlist_head *new_ee_hash ; struct drbd_conf *odev ; char hmac_name[64U] ; void *int_dig_out ; void *int_dig_in ; void *int_dig_vv ; struct sockaddr *new_my_addr ; struct sockaddr *new_peer_addr ; struct sockaddr *taken_addr ; void *tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; long tmp___4 ; struct crypto_tfm *tmp___5 ; int tmp___6 ; long tmp___7 ; struct crypto_tfm *tmp___8 ; int tmp___9 ; long tmp___10 ; void *tmp___11 ; void *tmp___12 ; unsigned int tmp___13 ; int tmp___14 ; union drbd_state val ; union drbd_state mask ; int tmp___15 ; { new_conf = 0; tfm = 0; integrity_w_tfm = 0; integrity_r_tfm = 0; new_tl_hash = 0; new_ee_hash = 0; int_dig_out = 0; int_dig_in = 0; int_dig_vv = 0; drbd_reconfig_start(mdev); if ((int )mdev->state.ldv_33381.conn > 0) { retcode = ERR_NET_CONFIGURED; goto fail; } else { } tmp = kmalloc___5(532UL, 208U); new_conf = (struct net_conf *)tmp; if ((unsigned long )new_conf == (unsigned long )((struct net_conf *)0)) { retcode = ERR_NOMEM; goto fail; } else { } memset((void *)new_conf, 0, 532UL); new_conf->timeout = 60; new_conf->try_connect_int = 10; new_conf->ping_int = 10; new_conf->max_epoch_size = 2048; new_conf->max_buffers = 2048; new_conf->unplug_watermark = 128; new_conf->sndbuf_size = 0; new_conf->rcvbuf_size = 0; new_conf->ko_count = 0; new_conf->after_sb_0p = 0; new_conf->after_sb_1p = 0; new_conf->after_sb_2p = 0; new_conf->want_lose = 0U; new_conf->two_primaries = 0U; new_conf->wire_protocol = 3; new_conf->ping_timeo = 5; new_conf->rr_conflict = 0; tmp___0 = net_conf_from_tags(mdev, (unsigned short *)(& nlp->tag_list), new_conf); if (tmp___0 == 0) { retcode = ERR_MANDATORY_TAG; goto fail; } else { } if ((unsigned int )*((unsigned char *)new_conf + 528UL) != 0U && new_conf->wire_protocol != 3) { retcode = ERR_NOT_PROTO_C; goto fail; } else { } if ((unsigned int )*((unsigned char *)mdev + 1988UL) == 1U && (unsigned int )*((unsigned char *)new_conf + 528UL) != 0U) { retcode = ERR_DISCARD; goto fail; } else { } retcode = NO_ERROR; new_my_addr = (struct sockaddr *)(& new_conf->my_addr); new_peer_addr = (struct sockaddr *)(& new_conf->peer_addr); i = 0; goto ldv_44602; ldv_44601: odev = minor_to_mdev((unsigned int )i); if ((unsigned long )odev == (unsigned long )((struct drbd_conf *)0) || (unsigned long )odev == (unsigned long )mdev) { goto ldv_44600; } else { } tmp___3 = get_net_conf(odev); if (tmp___3 != 0) { taken_addr = (struct sockaddr *)(& (odev->net_conf)->my_addr); if (new_conf->my_addr_len == (odev->net_conf)->my_addr_len) { tmp___1 = memcmp((void const *)new_my_addr, (void const *)taken_addr, (size_t )new_conf->my_addr_len); if (tmp___1 == 0) { retcode = ERR_LOCAL_ADDR; } else { } } else { } taken_addr = (struct sockaddr *)(& (odev->net_conf)->peer_addr); if (new_conf->peer_addr_len == (odev->net_conf)->peer_addr_len) { tmp___2 = memcmp((void const *)new_peer_addr, (void const *)taken_addr, (size_t )new_conf->peer_addr_len); if (tmp___2 == 0) { retcode = ERR_PEER_ADDR; } else { } } else { } put_net_conf(odev); if ((unsigned int )retcode != 101U) { goto fail; } else { } } else { } ldv_44600: i = i + 1; ldv_44602: ; if ((unsigned int )i < minor_count) { goto ldv_44601; } else { } if ((unsigned int )new_conf->cram_hmac_alg[0] != 0U) { snprintf((char *)(& hmac_name), 64UL, "hmac(%s)", (unsigned char *)(& new_conf->cram_hmac_alg)); tfm = crypto_alloc_hash((char const *)(& hmac_name), 0U, 128U); tmp___4 = IS_ERR((void const *)tfm); if (tmp___4 != 0L) { tfm = 0; retcode = ERR_AUTH_ALG; goto fail; } else { } tmp___5 = crypto_hash_tfm(tfm); tmp___6 = drbd_crypto_is_hash(tmp___5); if (tmp___6 == 0) { retcode = ERR_AUTH_ALG_ND; goto fail; } else { } } else { } if ((unsigned int )new_conf->integrity_alg[0] != 0U) { integrity_w_tfm = crypto_alloc_hash((char const *)(& new_conf->integrity_alg), 0U, 128U); tmp___7 = IS_ERR((void const *)integrity_w_tfm); if (tmp___7 != 0L) { integrity_w_tfm = 0; retcode = ERR_INTEGRITY_ALG; goto fail; } else { } tmp___8 = crypto_hash_tfm(integrity_w_tfm); tmp___9 = drbd_crypto_is_hash(tmp___8); if (tmp___9 == 0) { retcode = ERR_INTEGRITY_ALG_ND; goto fail; } else { } integrity_r_tfm = crypto_alloc_hash((char const *)(& new_conf->integrity_alg), 0U, 128U); tmp___10 = IS_ERR((void const *)integrity_r_tfm); if (tmp___10 != 0L) { integrity_r_tfm = 0; retcode = ERR_INTEGRITY_ALG; goto fail; } else { } } else { } ns = new_conf->max_epoch_size / 8; if (mdev->tl_hash_s != (unsigned int )ns) { tmp___11 = kzalloc___2((unsigned long )ns * 8UL, 208U); new_tl_hash = (struct hlist_head *)tmp___11; if ((unsigned long )new_tl_hash == (unsigned long )((struct hlist_head *)0)) { retcode = ERR_NOMEM; goto fail; } else { } } else { } ns = new_conf->max_buffers / 8; if ((unsigned int )*((unsigned char *)new_conf + 528UL) != 0U && mdev->ee_hash_s != (unsigned int )ns) { tmp___12 = kzalloc___2((unsigned long )ns * 8UL, 208U); new_ee_hash = (struct hlist_head *)tmp___12; if ((unsigned long )new_ee_hash == (unsigned long )((struct hlist_head *)0)) { retcode = ERR_NOMEM; goto fail; } else { } } else { } *((char *)(& new_conf->shared_secret) + 63UL) = 0; if ((unsigned long )integrity_w_tfm != (unsigned long )((struct crypto_hash *)0)) { tmp___13 = crypto_hash_digestsize(integrity_w_tfm); i = (int )tmp___13; int_dig_out = kmalloc___5((size_t )i, 208U); if ((unsigned long )int_dig_out == (unsigned long )((void *)0)) { retcode = ERR_NOMEM; goto fail; } else { } int_dig_in = kmalloc___5((size_t )i, 208U); if ((unsigned long )int_dig_in == (unsigned long )((void *)0)) { retcode = ERR_NOMEM; goto fail; } else { } int_dig_vv = kmalloc___5((size_t )i, 208U); if ((unsigned long )int_dig_vv == (unsigned long )((void *)0)) { retcode = ERR_NOMEM; goto fail; } else { } } else { } if ((unsigned long )mdev->bitmap == (unsigned long )((struct drbd_bitmap *)0)) { tmp___14 = drbd_bm_init(mdev); if (tmp___14 != 0) { retcode = ERR_NOMEM; goto fail; } else { } } else { } spin_lock_irq(& mdev->req_lock); if ((unsigned long )mdev->net_conf != (unsigned long )((struct net_conf *)0)) { retcode = ERR_NET_CONFIGURED; spin_unlock_irq(& mdev->req_lock); goto fail; } else { } mdev->net_conf = new_conf; mdev->send_cnt = 0U; mdev->recv_cnt = 0U; if ((unsigned long )new_tl_hash != (unsigned long )((struct hlist_head *)0)) { kfree((void const *)mdev->tl_hash); mdev->tl_hash_s = (unsigned int )((mdev->net_conf)->max_epoch_size / 8); mdev->tl_hash = new_tl_hash; } else { } if ((unsigned long )new_ee_hash != (unsigned long )((struct hlist_head *)0)) { kfree((void const *)mdev->ee_hash); mdev->ee_hash_s = (unsigned int )((mdev->net_conf)->max_buffers / 8); mdev->ee_hash = new_ee_hash; } else { } crypto_free_hash(mdev->cram_hmac_tfm); mdev->cram_hmac_tfm = tfm; crypto_free_hash(mdev->integrity_w_tfm); mdev->integrity_w_tfm = integrity_w_tfm; crypto_free_hash(mdev->integrity_r_tfm); mdev->integrity_r_tfm = integrity_r_tfm; kfree((void const *)mdev->int_dig_out); kfree((void const *)mdev->int_dig_in); kfree((void const *)mdev->int_dig_vv); mdev->int_dig_out = int_dig_out; mdev->int_dig_in = int_dig_in; mdev->int_dig_vv = int_dig_vv; spin_unlock_irq(& mdev->req_lock); val.i = 0U; val.ldv_33381.conn = 2U; mask.i = 0U; mask.ldv_33381.conn = 31U; tmp___15 = _drbd_request_state(mdev, mask, val, CS_VERBOSE); retcode = (enum drbd_ret_codes )tmp___15; kobject_uevent(& (mdev->vdisk)->part0.__dev.kobj, KOBJ_CHANGE); reply->ret_code = (int )retcode; drbd_reconfig_done(mdev); return (0); fail: kfree((void const *)int_dig_out); kfree((void const *)int_dig_in); kfree((void const *)int_dig_vv); crypto_free_hash(tfm); crypto_free_hash(integrity_w_tfm); crypto_free_hash(integrity_r_tfm); kfree((void const *)new_tl_hash); kfree((void const *)new_ee_hash); kfree((void const *)new_conf); reply->ret_code = (int )retcode; drbd_reconfig_done(mdev); return (0); } } static int drbd_nl_disconnect(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { int retcode ; union drbd_state val ; union drbd_state mask ; union drbd_state val___0 ; union drbd_state mask___0 ; union drbd_state val___1 ; union drbd_state mask___1 ; union drbd_state val___2 ; union drbd_state mask___2 ; int __ret ; wait_queue_t __wait ; struct task_struct *tmp ; struct task_struct *tmp___0 ; int tmp___1 ; { val.i = 0U; val.ldv_33381.conn = 1U; mask.i = 0U; mask.ldv_33381.conn = 31U; retcode = _drbd_request_state(mdev, mask, val, CS_ORDERED); if (retcode == 2) { goto done; } else if (retcode == -9) { goto done; } else if (retcode == -7) { val___0.i = 0U; val___0.ldv_33381.conn = 1U; val___0.ldv_33381.pdsk = 5U; mask___0.i = 0U; mask___0.ldv_33381.conn = 31U; mask___0.ldv_33381.pdsk = 15U; retcode = drbd_request_state(mdev, mask___0, val___0); } else if (retcode == -10) { val___1.i = 0U; val___1.ldv_33381.conn = 1U; val___1.ldv_33381.disk = 5U; mask___1.i = 0U; mask___1.ldv_33381.conn = 31U; mask___1.ldv_33381.disk = 15U; retcode = _drbd_request_state(mdev, mask___1, val___1, CS_ORDERED); if (retcode == -11 || retcode == -16) { val___2.i = 0U; val___2.ldv_33381.conn = 1U; mask___2.i = 0U; mask___2.ldv_33381.conn = 31U; drbd_force_state(mdev, mask___2, val___2); retcode = 1; } else { } } else { } if (retcode <= 0) { goto fail; } else { } __ret = 0; if ((unsigned int )*((unsigned short *)mdev + 994UL) == 16U) { tmp = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_44636: prepare_to_wait(& mdev->state_wait, & __wait, 1); if ((unsigned int )*((unsigned short *)mdev + 994UL) != 16U) { goto ldv_44634; } else { } tmp___0 = get_current(); tmp___1 = signal_pending(tmp___0); if (tmp___1 == 0) { schedule(); goto ldv_44635; } else { } __ret = -512; goto ldv_44634; ldv_44635: ; goto ldv_44636; ldv_44634: finish_wait(& mdev->state_wait, & __wait); } else { } if (__ret != 0) { retcode = 129; goto fail; } else { } done: retcode = 101; fail: drbd_md_sync(mdev); reply->ret_code = retcode; return (0); } } void resync_after_online_grow(struct drbd_conf *mdev ) { int iass ; char const *tmp ; char const *tmp___0 ; union drbd_state val ; union drbd_state mask ; { tmp = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___0 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Resync of new storage after online grow\n", tmp___0, tmp); if ((int )mdev->state.ldv_33381.role != (int )mdev->state.ldv_33381.peer) { iass = (unsigned int )*((unsigned char *)mdev + 1988UL) == 1U; } else { iass = constant_test_bit(7U, (unsigned long const volatile *)(& mdev->flags)); } if (iass != 0) { drbd_start_resync(mdev, C_SYNC_SOURCE); } else { val.i = 0U; val.ldv_33381.conn = 15U; mask.i = 0U; mask.ldv_33381.conn = 31U; _drbd_request_state(mdev, mask, val, 10); } return; } } static int drbd_nl_resize(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { struct resize rs ; int retcode ; enum determine_dev_size dd ; enum dds_flags ddsf ; int tmp ; int tmp___0 ; sector_t tmp___1 ; { retcode = 101; memset((void *)(& rs), 0, 16UL); tmp = resize_from_tags(mdev, (unsigned short *)(& nlp->tag_list), & rs); if (tmp == 0) { retcode = 126; goto fail; } else { } if ((int )mdev->state.ldv_33381.conn > 10) { retcode = 130; goto fail; } else { } if ((unsigned int )*((unsigned char *)mdev + 1988UL) == 2U && (unsigned int )*((unsigned char *)mdev + 1988UL) == 8U) { retcode = 131; goto fail; } else { } tmp___0 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___0 == 0) { retcode = 138; goto fail; } else { } if ((unsigned int )*((unsigned char *)(& rs) + 8UL) != 0U && mdev->agreed_pro_version <= 92) { retcode = 153; goto fail; } else { } tmp___1 = drbd_get_capacity((mdev->ldev)->backing_bdev); if ((mdev->ldev)->known_size != tmp___1) { (mdev->ldev)->known_size = drbd_get_capacity((mdev->ldev)->backing_bdev); } else { } (mdev->ldev)->dc.disk_size = rs.resize_size; ddsf = (enum dds_flags )(((unsigned int )*((unsigned char *)(& rs) + 8UL) != 0U) | ((int )*((unsigned char *)(& rs) + 8UL) & 2)); dd = drbd_determin_dev_size(mdev, ddsf); drbd_md_sync(mdev); put_ldev(mdev); if ((int )dd == -1) { retcode = 140; goto fail; } else { } if ((unsigned int )*((unsigned short *)mdev + 994UL) == 160U) { if ((int )dd == 2) { set_bit(24U, (unsigned long volatile *)(& mdev->flags)); } else { } drbd_send_uuids(mdev); drbd_send_sizes(mdev, 1, ddsf); } else { } fail: reply->ret_code = retcode; return (0); } } static int drbd_nl_syncer_conf(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { int retcode ; int err ; int ovr ; int rsr ; struct crypto_hash *verify_tfm ; struct crypto_hash *csums_tfm ; struct syncer_conf sc ; cpumask_var_t new_cpu_mask ; bool tmp ; int tmp___0 ; size_t __len ; void *__ret ; int tmp___1 ; int tmp___2 ; long tmp___3 ; struct crypto_tfm *tmp___4 ; int tmp___5 ; int tmp___6 ; long tmp___7 ; struct crypto_tfm *tmp___8 ; int tmp___9 ; char const *tmp___10 ; char const *tmp___11 ; int _b ; char const *tmp___12 ; char const *tmp___13 ; int _b___0 ; char const *tmp___14 ; char const *tmp___15 ; char const *tmp___16 ; char const *tmp___17 ; int tmp___18 ; wait_queue_t __wait ; struct task_struct *tmp___19 ; int tmp___20 ; int tmp___21 ; bool tmp___22 ; int tmp___23 ; { retcode = 101; verify_tfm = 0; csums_tfm = 0; tmp = zalloc_cpumask_var(& new_cpu_mask, 208U); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { retcode = 122; goto fail; } else { } if ((nlp->flags & 2) != 0) { memset((void *)(& sc), 0, 204UL); sc.rate = 250; sc.after = -1; sc.al_extents = 127; sc.dp_volume = 16384; sc.dp_interval = 5; sc.throttle_th = 20; sc.hold_off_th = 100; } else { __len = 204UL; if (__len > 63UL) { __ret = memcpy((void *)(& sc), (void const *)(& mdev->sync_conf), __len); } else { __ret = memcpy((void *)(& sc), (void const *)(& mdev->sync_conf), __len); } } tmp___1 = syncer_conf_from_tags(mdev, (unsigned short *)(& nlp->tag_list), & sc); if (tmp___1 == 0) { retcode = 126; goto fail; } else { } rsr = (((unsigned int )*((unsigned short *)mdev + 994UL) == 256U || (unsigned int )*((unsigned short *)mdev + 994UL) == 272U) || (unsigned int )*((unsigned short *)mdev + 994UL) == 320U) || (unsigned int )*((unsigned short *)mdev + 994UL) == 336U; if (rsr != 0) { tmp___2 = strcmp((char const *)(& sc.csums_alg), (char const *)(& mdev->sync_conf.csums_alg)); if (tmp___2 != 0) { retcode = 148; goto fail; } else { } } else { } if (rsr == 0 && (unsigned int )sc.csums_alg[0] != 0U) { csums_tfm = crypto_alloc_hash((char const *)(& sc.csums_alg), 0U, 128U); tmp___3 = IS_ERR((void const *)csums_tfm); if (tmp___3 != 0L) { csums_tfm = 0; retcode = 144; goto fail; } else { } tmp___4 = crypto_hash_tfm(csums_tfm); tmp___5 = drbd_crypto_is_hash(tmp___4); if (tmp___5 == 0) { retcode = 145; goto fail; } else { } } else { } ovr = (unsigned int )*((unsigned short *)mdev + 994UL) == 288U || (unsigned int )*((unsigned short *)mdev + 994UL) == 304U; if (ovr != 0) { tmp___6 = strcmp((char const *)(& sc.verify_alg), (char const *)(& mdev->sync_conf.verify_alg)); if (tmp___6 != 0) { retcode = 149; goto fail; } else { } } else { } if (ovr == 0 && (unsigned int )sc.verify_alg[0] != 0U) { verify_tfm = crypto_alloc_hash((char const *)(& sc.verify_alg), 0U, 128U); tmp___7 = IS_ERR((void const *)verify_tfm); if (tmp___7 != 0L) { verify_tfm = 0; retcode = 146; goto fail; } else { } tmp___8 = crypto_hash_tfm(verify_tfm); tmp___9 = drbd_crypto_is_hash(tmp___8); if (tmp___9 == 0) { retcode = 147; goto fail; } else { } } else { } if (nr_cpu_ids > 1 && (unsigned int )sc.cpu_mask[0] != 0U) { err = __bitmap_parse((char const *)(& sc.cpu_mask), 32U, 0, (unsigned long *)(& new_cpu_mask->bits), nr_cpu_ids); if (err != 0) { tmp___10 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___11 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<4>%s %s: __bitmap_parse() failed with %d\n", tmp___11, tmp___10, err); retcode = 143; goto fail; } else { } } else { } _b = sc.rate <= 0; if (_b != 0) { tmp___12 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___13 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___13, tmp___12, "drbd_nl_syncer_conf", (char *)"sc.rate < 1", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_nl.c.prepared", 1666); } else { } if (_b != 0) { sc.rate = 1; } else { } _b___0 = sc.al_extents <= 6; if (_b___0 != 0) { tmp___14 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___15 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: %s: (%s) in %s:%d\n", tmp___15, tmp___14, "drbd_nl_syncer_conf", (char *)"sc.al_extents < 7", (char *)"/work/ldvuser/novikov/work/current--X--drivers/block/drbd/drbd.ko--X--defaultlinux--X--32_7a--X--cpachecker/linux/csd_deg_dscv/19/dscv_tempdir/dscv/ri/32_7a/drivers/block/drbd/drbd_nl.c.prepared", 1667); } else { } if (_b___0 != 0) { sc.al_extents = 127; } else { } if (sc.al_extents > 3843) { tmp___16 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___17 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: sc.al_extents > %d\n", tmp___17, tmp___16, 3843); sc.al_extents = 3843; } else { } retcode = drbd_alter_sa(mdev, sc.after); if (retcode != 101) { goto fail; } else { } spin_lock(& mdev->peer_seq_lock); mdev->sync_conf = sc; if (rsr == 0) { crypto_free_hash(mdev->csums_tfm); mdev->csums_tfm = csums_tfm; csums_tfm = 0; } else { } if (ovr == 0) { crypto_free_hash(mdev->verify_tfm); mdev->verify_tfm = verify_tfm; verify_tfm = 0; } else { } spin_unlock(& mdev->peer_seq_lock); tmp___21 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___21 != 0) { tmp___18 = lc_try_lock(mdev->act_log); if (tmp___18 != 0) { goto ldv_44678; } else { } tmp___19 = get_current(); __wait.flags = 0U; __wait.private = (void *)tmp___19; __wait.func = & autoremove_wake_function; __wait.task_list.next = & __wait.task_list; __wait.task_list.prev = & __wait.task_list; ldv_44681: prepare_to_wait(& mdev->al_wait, & __wait, 2); tmp___20 = lc_try_lock(mdev->act_log); if (tmp___20 != 0) { goto ldv_44680; } else { } schedule(); goto ldv_44681; ldv_44680: finish_wait(& mdev->al_wait, & __wait); ldv_44678: drbd_al_shrink(mdev); err = drbd_check_al_size(mdev); lc_unlock(mdev->act_log); __wake_up(& mdev->al_wait, 3U, 1, 0); put_ldev(mdev); drbd_md_sync(mdev); if (err != 0) { retcode = 122; goto fail; } else { } } else { } if ((int )mdev->state.ldv_33381.conn > 9) { drbd_send_sync_param(mdev, & sc); } else { } tmp___22 = cpumask_equal((struct cpumask const *)mdev->cpu_mask, (struct cpumask const *)new_cpu_mask); if (tmp___22) { tmp___23 = 0; } else { tmp___23 = 1; } if (tmp___23) { cpumask_copy(mdev->cpu_mask, (struct cpumask const *)new_cpu_mask); drbd_calc_cpu_mask(mdev); mdev->receiver.reset_cpu_mask = 1; mdev->asender.reset_cpu_mask = 1; mdev->worker.reset_cpu_mask = 1; } else { } kobject_uevent(& (mdev->vdisk)->part0.__dev.kobj, KOBJ_CHANGE); fail: free_cpumask_var(new_cpu_mask); crypto_free_hash(csums_tfm); crypto_free_hash(verify_tfm); reply->ret_code = retcode; return (0); } } static int drbd_nl_invalidate(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { int retcode ; union drbd_state val ; union drbd_state mask ; union drbd_state val___0 ; union drbd_state mask___0 ; union drbd_state __ns ; union drbd_state val___1 ; union drbd_state mask___1 ; { val.i = 0U; val.ldv_33381.conn = 12U; mask.i = 0U; mask.ldv_33381.conn = 31U; retcode = _drbd_request_state(mdev, mask, val, CS_ORDERED); if (retcode <= 0 && retcode != -15) { val___0.i = 0U; val___0.ldv_33381.conn = 12U; mask___0.i = 0U; mask___0.ldv_33381.conn = 31U; retcode = drbd_request_state(mdev, mask___0, val___0); } else { } goto ldv_44704; ldv_44703: spin_lock_irq(& mdev->req_lock); if ((int )mdev->state.ldv_33381.conn <= 9) { __ns.i = mdev->state.i; __ns.ldv_33381.disk = 4U; retcode = _drbd_set_state(mdev, __ns, CS_VERBOSE, 0); } else { } spin_unlock_irq(& mdev->req_lock); if (retcode != -15) { goto ldv_44698; } else { } val___1.i = 0U; val___1.ldv_33381.conn = 12U; mask___1.i = 0U; mask___1.ldv_33381.conn = 31U; retcode = drbd_request_state(mdev, mask___1, val___1); ldv_44704: ; if (retcode == -15) { goto ldv_44703; } else { } ldv_44698: reply->ret_code = retcode; return (0); } } static int drbd_nl_invalidate_peer(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { union drbd_state val ; union drbd_state mask ; { val.i = 0U; val.ldv_33381.conn = 11U; mask.i = 0U; mask.ldv_33381.conn = 31U; reply->ret_code = drbd_request_state(mdev, mask, val); return (0); } } static int drbd_nl_pause_sync(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { int retcode ; union drbd_state val ; union drbd_state mask ; int tmp ; { retcode = 101; val.i = 0U; val.ldv_33381.user_isp = 1U; mask.i = 0U; mask.ldv_33381.user_isp = 1U; tmp = drbd_request_state(mdev, mask, val); if (tmp == 2) { retcode = 134; } else { } reply->ret_code = retcode; return (0); } } static int drbd_nl_resume_sync(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { int retcode ; union drbd_state val ; union drbd_state mask ; int tmp ; { retcode = 101; val.i = 0U; val.ldv_33381.user_isp = 0U; mask.i = 0U; mask.ldv_33381.user_isp = 1U; tmp = drbd_request_state(mdev, mask, val); if (tmp == 2) { retcode = 135; } else { } reply->ret_code = retcode; return (0); } } static int drbd_nl_suspend_io(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { union drbd_state val ; union drbd_state mask ; { val.i = 0U; val.ldv_33381.susp = 1U; mask.i = 0U; mask.ldv_33381.susp = 1U; reply->ret_code = drbd_request_state(mdev, mask, val); return (0); } } static int drbd_nl_resume_io(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { union drbd_state val ; union drbd_state mask ; { val.i = 0U; val.ldv_33381.susp = 0U; mask.i = 0U; mask.ldv_33381.susp = 1U; reply->ret_code = drbd_request_state(mdev, mask, val); return (0); } } static int drbd_nl_outdate(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { union drbd_state val ; union drbd_state mask ; { val.i = 0U; val.ldv_33381.disk = 5U; mask.i = 0U; mask.ldv_33381.disk = 15U; reply->ret_code = drbd_request_state(mdev, mask, val); return (0); } } static int drbd_nl_get_config(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { unsigned short *tl ; int tmp ; int tmp___0 ; void *__gu_p ; unsigned short *tmp___1 ; { tl = (unsigned short *)(& reply->tag_list); tmp = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp != 0) { tl = disk_conf_to_tags(mdev, & (mdev->ldev)->dc, tl); put_ldev(mdev); } else { } tmp___0 = get_net_conf(mdev); if (tmp___0 != 0) { tl = net_conf_to_tags(mdev, mdev->net_conf, tl); put_net_conf(mdev); } else { } tl = syncer_conf_to_tags(mdev, & mdev->sync_conf, tl); tmp___1 = tl; tl = tl + 1; __gu_p = (void *)tmp___1; switch (2UL) { case 1UL: *((u8 *)__gu_p) = 0U; goto ldv_44769; case 2UL: put_unaligned_le16(0, __gu_p); goto ldv_44769; case 4UL: put_unaligned_le32(0U, __gu_p); goto ldv_44769; case 8UL: put_unaligned_le64(0ULL, __gu_p); goto ldv_44769; default: __bad_unaligned_access_size(); goto ldv_44769; } ldv_44769: ; return ((int )((unsigned int )((long )tl) - (unsigned int )((long )(& reply->tag_list)))); } } static int drbd_nl_get_state(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { unsigned short *tl ; union drbd_state s ; unsigned long rs_left ; unsigned int res ; int tmp ; void *__gu_p ; unsigned short *tmp___0 ; { tl = (unsigned short *)(& reply->tag_list); s = mdev->state; tl = get_state_to_tags(mdev, (struct get_state *)(& s), tl); if ((int )s.ldv_33381.conn > 15 && (int )s.ldv_33381.conn <= 21) { tmp = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp != 0) { drbd_get_syncer_progress(mdev, & rs_left, & res); tl = tl_add_int(tl, T_sync_progress, (void const *)(& res)); put_ldev(mdev); } else { } } else { } tmp___0 = tl; tl = tl + 1; __gu_p = (void *)tmp___0; switch (2UL) { case 1UL: *((u8 *)__gu_p) = 0U; goto ldv_44785; case 2UL: put_unaligned_le16(0, __gu_p); goto ldv_44785; case 4UL: put_unaligned_le32(0U, __gu_p); goto ldv_44785; case 8UL: put_unaligned_le64(0ULL, __gu_p); goto ldv_44785; default: __bad_unaligned_access_size(); goto ldv_44785; } ldv_44785: ; return ((int )((unsigned int )((long )tl) - (unsigned int )((long )(& reply->tag_list)))); } } static int drbd_nl_get_uuids(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { unsigned short *tl ; int tmp ; void *__gu_p ; unsigned short *tmp___0 ; { tl = (unsigned short *)(& reply->tag_list); tmp = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp != 0) { tl = tl_add_blob(tl, T_uuids, (void const *)(& (mdev->ldev)->md.uuid), 32); tl = tl_add_int(tl, T_uuids_flags, (void const *)(& (mdev->ldev)->md.flags)); put_ldev(mdev); } else { } tmp___0 = tl; tl = tl + 1; __gu_p = (void *)tmp___0; switch (2UL) { case 1UL: *((u8 *)__gu_p) = 0U; goto ldv_44798; case 2UL: put_unaligned_le16(0, __gu_p); goto ldv_44798; case 4UL: put_unaligned_le32(0U, __gu_p); goto ldv_44798; case 8UL: put_unaligned_le64(0ULL, __gu_p); goto ldv_44798; default: __bad_unaligned_access_size(); goto ldv_44798; } ldv_44798: ; return ((int )((unsigned int )((long )tl) - (unsigned int )((long )(& reply->tag_list)))); } } static int drbd_nl_get_timeout_flag(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { unsigned short *tl ; char rv ; int tmp ; void *__gu_p ; unsigned short *tmp___0 ; { tl = (unsigned short *)(& reply->tag_list); if (*((unsigned int *)mdev + 497UL) != 40960U) { tmp = constant_test_bit(8U, (unsigned long const volatile *)(& mdev->flags)); rv = tmp != 0; } else { rv = 2; } tl = tl_add_blob(tl, T_use_degraded, (void const *)(& rv), 1); tmp___0 = tl; tl = tl + 1; __gu_p = (void *)tmp___0; switch (2UL) { case 1UL: *((u8 *)__gu_p) = 0U; goto ldv_44812; case 2UL: put_unaligned_le16(0, __gu_p); goto ldv_44812; case 4UL: put_unaligned_le32(0U, __gu_p); goto ldv_44812; case 8UL: put_unaligned_le64(0ULL, __gu_p); goto ldv_44812; default: __bad_unaligned_access_size(); goto ldv_44812; } ldv_44812: ; return ((int )((unsigned int )((long )tl) - (unsigned int )((long )(& reply->tag_list)))); } } static int drbd_nl_start_ov(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { struct start_ov args ; int tmp ; union drbd_state val ; union drbd_state mask ; { args.start_sector = (unsigned long long )mdev->ov_start_sector; tmp = start_ov_from_tags(mdev, (unsigned short *)(& nlp->tag_list), & args); if (tmp == 0) { reply->ret_code = 126; return (0); } else { } mdev->ov_start_sector = (sector_t )args.start_sector & 0xfffffffffffffff7UL; val.i = 0U; val.ldv_33381.conn = 18U; mask.i = 0U; mask.ldv_33381.conn = 31U; reply->ret_code = drbd_request_state(mdev, mask, val); return (0); } } static int drbd_nl_new_c_uuid(struct drbd_conf *mdev , struct drbd_nl_cfg_req *nlp , struct drbd_nl_cfg_reply *reply ) { int retcode ; int skip_initial_sync ; int err ; struct new_c_uuid args ; int tmp ; int tmp___0 ; char const *tmp___1 ; char const *tmp___2 ; char const *tmp___3 ; char const *tmp___4 ; union drbd_state __ns ; { retcode = 101; skip_initial_sync = 0; memset((void *)(& args), 0, 4UL); tmp = new_c_uuid_from_tags(mdev, (unsigned short *)(& nlp->tag_list), & args); if (tmp == 0) { reply->ret_code = 126; return (0); } else { } ldv_mutex_lock_140(& mdev->state_mutex); tmp___0 = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp___0 == 0) { retcode = 138; goto out; } else { } if ((((unsigned int )*((unsigned short *)mdev + 994UL) == 160U && mdev->agreed_pro_version > 89) && (mdev->ldev)->md.uuid[0] == 4ULL) && (unsigned int )*((unsigned char *)(& args) + 0UL) != 0U) { tmp___1 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___2 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<6>%s %s: Preparing to skip initial sync\n", tmp___2, tmp___1); skip_initial_sync = 1; } else if ((unsigned int )*((unsigned short *)mdev + 994UL) != 0U) { retcode = 151; goto out_dec; } else { } drbd_uuid_set(mdev, 1, 0ULL); drbd_uuid_new_current(mdev); if ((unsigned int )*((unsigned char *)(& args) + 0UL) != 0U) { err = drbd_bitmap_io(mdev, & drbd_bmio_clear_n_write, (char *)"clear_n_write from new_c_uuid"); if (err != 0) { tmp___3 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___4 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: Writing bitmap failed with %d\n", tmp___4, tmp___3, err); retcode = 118; } else { } if (skip_initial_sync != 0) { drbd_send_uuids_skip_initial_sync(mdev); _drbd_uuid_set(mdev, 1, 0ULL); spin_lock_irq(& mdev->req_lock); __ns.i = mdev->state.i; __ns.ldv_33381.disk = 8U; __ns.ldv_33381.pdsk = 8U; _drbd_set_state(mdev, __ns, CS_VERBOSE, 0); spin_unlock_irq(& mdev->req_lock); } else { } } else { } drbd_md_sync(mdev); out_dec: put_ldev(mdev); out: ldv_mutex_unlock_141(& mdev->state_mutex); reply->ret_code = retcode; return (0); } } static struct drbd_conf *ensure_mdev(struct drbd_nl_cfg_req *nlp ) { struct drbd_conf *mdev ; struct gendisk *disk ; { if (nlp->drbd_minor >= minor_count) { return (0); } else { } mdev = minor_to_mdev(nlp->drbd_minor); if ((unsigned long )mdev == (unsigned long )((struct drbd_conf *)0) && nlp->flags & 1) { disk = 0; mdev = drbd_new_device(nlp->drbd_minor); spin_lock_irq(& drbd_pp_lock); if ((unsigned long )*(minor_table + (unsigned long )nlp->drbd_minor) == (unsigned long )((struct drbd_conf *)0)) { *(minor_table + (unsigned long )nlp->drbd_minor) = mdev; disk = mdev->vdisk; mdev = 0; } else { } spin_unlock_irq(& drbd_pp_lock); if ((unsigned long )disk != (unsigned long )((struct gendisk *)0)) { add_disk(disk); } else { drbd_free_mdev(mdev); } mdev = minor_to_mdev(nlp->drbd_minor); } else { } return (mdev); } } static struct cn_handler_struct cnd_table[27U] = { {0, 0}, {& drbd_nl_primary, 0}, {& drbd_nl_secondary, 0}, {& drbd_nl_disk_conf, 0}, {& drbd_nl_detach, 0}, {& drbd_nl_net_conf, 0}, {& drbd_nl_disconnect, 0}, {& drbd_nl_resize, 0}, {& drbd_nl_syncer_conf, 0}, {& drbd_nl_invalidate, 0}, {& drbd_nl_invalidate_peer, 0}, {& drbd_nl_pause_sync, 0}, {& drbd_nl_resume_sync, 0}, {& drbd_nl_suspend_io, 0}, {& drbd_nl_resume_io, 0}, {& drbd_nl_outdate, 0}, {& drbd_nl_get_config, 1272}, {& drbd_nl_get_state, 16}, {& drbd_nl_get_uuids, 48}, {& drbd_nl_get_timeout_flag, 8}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {& drbd_nl_start_ov, 0}, {& drbd_nl_new_c_uuid, 0}}; static void drbd_connector_callback(struct cn_msg *req , struct netlink_skb_parms *nsp ) { struct drbd_nl_cfg_req *nlp ; struct cn_handler_struct *cm ; struct cn_msg *cn_reply ; struct drbd_nl_cfg_reply *reply ; struct drbd_conf *mdev ; int retcode ; int rr ; int reply_size ; int tmp ; void *tmp___0 ; { nlp = (struct drbd_nl_cfg_req *)(& req->data); reply_size = 34; tmp = try_module_get___0(& __this_module); if (tmp == 0) { printk("<3>drbd: try_module_get() failed!\n"); return; } else { } if ((nsp->eff_cap.cap[0] & 2097152U) == 0U) { retcode = 152; goto fail; } else { } mdev = ensure_mdev(nlp); if ((unsigned long )mdev == (unsigned long )((struct drbd_conf *)0)) { retcode = 127; goto fail; } else { } if (nlp->packet_type > 26) { retcode = 137; goto fail; } else { } cm = (struct cn_handler_struct *)(& cnd_table) + (unsigned long )nlp->packet_type; if ((unsigned long )cm->function == (unsigned long )((int (*)(struct drbd_conf * , struct drbd_nl_cfg_req * , struct drbd_nl_cfg_reply * ))0)) { retcode = 137; goto fail; } else { } reply_size = cm->reply_body_size + reply_size; tmp___0 = kmalloc___5((size_t )reply_size, 208U); cn_reply = (struct cn_msg *)tmp___0; if ((unsigned long )cn_reply == (unsigned long )((struct cn_msg *)0)) { retcode = 122; goto fail; } else { } reply = (struct drbd_nl_cfg_reply *)(& cn_reply->data); reply->packet_type = cm->reply_body_size != 0 ? nlp->packet_type : 27; reply->minor = nlp->drbd_minor; reply->ret_code = 101; rr = (*(cm->function))(mdev, nlp, reply); cn_reply->id = req->id; cn_reply->seq = req->seq; cn_reply->ack = req->ack + 1U; cn_reply->len = (unsigned int )((__u16 )rr) + 12U; cn_reply->flags = 0U; rr = cn_netlink_send(cn_reply, 8U, 208U); if (rr != 0 && rr != -3) { printk("<6>drbd: cn_netlink_send()=%d\n", rr); } else { } kfree((void const *)cn_reply); module_put(& __this_module); return; fail: drbd_nl_send_reply(req, retcode); module_put(& __this_module); return; } } static atomic_t drbd_nl_seq = {2}; static unsigned short *__tl_add_blob(unsigned short *tl , enum drbd_tags tag , void const *data , unsigned short len , int nul_terminated ) { unsigned short l ; void *__gu_p ; unsigned short *tmp ; void *__gu_p___0 ; unsigned short *tmp___0 ; size_t __len ; void *__ret ; { l = (unsigned short )tag_descriptions[(unsigned int )tag & 8191U].max_len; len = (int )len < (int )l ? len : l; tmp = tl; tl = tl + 1; __gu_p = (void *)tmp; switch (2UL) { case 1UL: *((u8 *)__gu_p) = (unsigned char )tag; goto ldv_44876; case 2UL: put_unaligned_le16((int )((unsigned short )tag), __gu_p); goto ldv_44876; case 4UL: put_unaligned_le32((unsigned int )tag, __gu_p); goto ldv_44876; case 8UL: put_unaligned_le64((unsigned long long )tag, __gu_p); goto ldv_44876; default: __bad_unaligned_access_size(); goto ldv_44876; } ldv_44876: tmp___0 = tl; tl = tl + 1; __gu_p___0 = (void *)tmp___0; switch (2UL) { case 1UL: *((u8 *)__gu_p___0) = (unsigned char )len; goto ldv_44883; case 2UL: put_unaligned_le16((int )len, __gu_p___0); goto ldv_44883; case 4UL: put_unaligned_le32((unsigned int )len, __gu_p___0); goto ldv_44883; case 8UL: put_unaligned_le64((unsigned long long )len, __gu_p___0); goto ldv_44883; default: __bad_unaligned_access_size(); goto ldv_44883; } ldv_44883: __len = (size_t )len; __ret = memcpy((void *)tl, data, __len); tl = tl + (unsigned long )len; if (nul_terminated != 0) { *((char *)tl + 0xffffffffffffffffUL) = 0; } else { } return (tl); } } static unsigned short *tl_add_blob(unsigned short *tl , enum drbd_tags tag , void const *data , int len ) { unsigned short *tmp ; { tmp = __tl_add_blob(tl, tag, data, (int )((unsigned short )len), 0); return (tmp); } } static unsigned short *tl_add_str(unsigned short *tl , enum drbd_tags tag , char const *str ) { size_t tmp ; unsigned short *tmp___0 ; { tmp = strlen(str); tmp___0 = __tl_add_blob(tl, tag, (void const *)str, (int )((unsigned int )((unsigned short )tmp) + 1U), 0); return (tmp___0); } } static unsigned short *tl_add_int(unsigned short *tl , enum drbd_tags tag , void const *val ) { void *__gu_p ; unsigned short *tmp ; void *__gu_p___0 ; unsigned short *tmp___0 ; void *__gu_p___1 ; void *__gu_p___2 ; unsigned short *tmp___1 ; void *__gu_p___3 ; { tmp = tl; tl = tl + 1; __gu_p = (void *)tmp; switch (2UL) { case 1UL: *((u8 *)__gu_p) = (unsigned char )tag; goto ldv_44909; case 2UL: put_unaligned_le16((int )((unsigned short )tag), __gu_p); goto ldv_44909; case 4UL: put_unaligned_le32((unsigned int )tag, __gu_p); goto ldv_44909; case 8UL: put_unaligned_le64((unsigned long long )tag, __gu_p); goto ldv_44909; default: __bad_unaligned_access_size(); goto ldv_44909; } ldv_44909: ; switch ((unsigned int )tag & 49152U) { case 0U: tmp___0 = tl; tl = tl + 1; __gu_p___0 = (void *)tmp___0; switch (2UL) { case 1UL: *((u8 *)__gu_p___0) = 4U; goto ldv_44917; case 2UL: put_unaligned_le16(4, __gu_p___0); goto ldv_44917; case 4UL: put_unaligned_le32(4U, __gu_p___0); goto ldv_44917; case 8UL: put_unaligned_le64(4ULL, __gu_p___0); goto ldv_44917; default: __bad_unaligned_access_size(); goto ldv_44917; } ldv_44917: __gu_p___1 = (void *)tl; switch (4UL) { case 1UL: *((u8 *)__gu_p___1) = (unsigned char )*((int *)val); goto ldv_44924; case 2UL: put_unaligned_le16((int )((unsigned short )*((int *)val)), __gu_p___1); goto ldv_44924; case 4UL: put_unaligned_le32((unsigned int )*((int *)val), __gu_p___1); goto ldv_44924; case 8UL: put_unaligned_le64((unsigned long long )*((int *)val), __gu_p___1); goto ldv_44924; default: __bad_unaligned_access_size(); goto ldv_44924; } ldv_44924: tl = tl + 4U; goto ldv_44929; case 16384U: tmp___1 = tl; tl = tl + 1; __gu_p___2 = (void *)tmp___1; switch (2UL) { case 1UL: *((u8 *)__gu_p___2) = 8U; goto ldv_44933; case 2UL: put_unaligned_le16(8, __gu_p___2); goto ldv_44933; case 4UL: put_unaligned_le32(8U, __gu_p___2); goto ldv_44933; case 8UL: put_unaligned_le64(8ULL, __gu_p___2); goto ldv_44933; default: __bad_unaligned_access_size(); goto ldv_44933; } ldv_44933: __gu_p___3 = (void *)tl; switch (8UL) { case 1UL: *((u8 *)__gu_p___3) = (unsigned char )*((u64 *)val); goto ldv_44940; case 2UL: put_unaligned_le16((int )((unsigned short )*((u64 *)val)), __gu_p___3); goto ldv_44940; case 4UL: put_unaligned_le32((unsigned int )*((u64 *)val), __gu_p___3); goto ldv_44940; case 8UL: put_unaligned_le64(*((u64 *)val), __gu_p___3); goto ldv_44940; default: __bad_unaligned_access_size(); goto ldv_44940; } ldv_44940: tl = tl + 8U; goto ldv_44929; default: ; } ldv_44929: ; return (tl); } } void drbd_bcast_state(struct drbd_conf *mdev , union drbd_state state ) { char buffer[42U] ; struct cn_msg *cn_reply ; struct drbd_nl_cfg_reply *reply ; unsigned short *tl ; void *__gu_p ; unsigned short *tmp ; int tmp___0 ; { cn_reply = (struct cn_msg *)(& buffer); reply = (struct drbd_nl_cfg_reply *)(& cn_reply->data); tl = (unsigned short *)(& reply->tag_list); tl = get_state_to_tags(mdev, (struct get_state *)(& state), tl); tmp = tl; tl = tl + 1; __gu_p = (void *)tmp; switch (2UL) { case 1UL: *((u8 *)__gu_p) = 0U; goto ldv_44956; case 2UL: put_unaligned_le16(0, __gu_p); goto ldv_44956; case 4UL: put_unaligned_le32(0U, __gu_p); goto ldv_44956; case 8UL: put_unaligned_le64(0ULL, __gu_p); goto ldv_44956; default: __bad_unaligned_access_size(); goto ldv_44956; } ldv_44956: cn_reply->id.idx = 8U; cn_reply->id.val = 1U; tmp___0 = atomic_add_return(1, & drbd_nl_seq); cn_reply->seq = (__u32 )tmp___0; cn_reply->ack = 0U; cn_reply->len = (unsigned int )((int )((__u16 )((long )tl)) - (int )((__u16 )((long )(& reply->tag_list)))) + 12U; cn_reply->flags = 0U; reply->packet_type = 17; reply->minor = mdev_to_minor(mdev); reply->ret_code = 101; cn_netlink_send(cn_reply, 8U, 16U); return; } } void drbd_bcast_ev_helper(struct drbd_conf *mdev , char *helper_name ) { char buffer[74U] ; struct cn_msg *cn_reply ; struct drbd_nl_cfg_reply *reply ; unsigned short *tl ; void *__gu_p ; unsigned short *tmp ; int tmp___0 ; { cn_reply = (struct cn_msg *)(& buffer); reply = (struct drbd_nl_cfg_reply *)(& cn_reply->data); tl = (unsigned short *)(& reply->tag_list); tl = tl_add_str(tl, T_helper, (char const *)helper_name); tmp = tl; tl = tl + 1; __gu_p = (void *)tmp; switch (2UL) { case 1UL: *((u8 *)__gu_p) = 0U; goto ldv_44971; case 2UL: put_unaligned_le16(0, __gu_p); goto ldv_44971; case 4UL: put_unaligned_le32(0U, __gu_p); goto ldv_44971; case 8UL: put_unaligned_le64(0ULL, __gu_p); goto ldv_44971; default: __bad_unaligned_access_size(); goto ldv_44971; } ldv_44971: cn_reply->id.idx = 8U; cn_reply->id.val = 1U; tmp___0 = atomic_add_return(1, & drbd_nl_seq); cn_reply->seq = (__u32 )tmp___0; cn_reply->ack = 0U; cn_reply->len = (unsigned int )((int )((__u16 )((long )tl)) - (int )((__u16 )((long )(& reply->tag_list)))) + 12U; cn_reply->flags = 0U; reply->packet_type = 20; reply->minor = mdev_to_minor(mdev); reply->ret_code = 101; cn_netlink_send(cn_reply, 8U, 16U); return; } } void drbd_bcast_ee(struct drbd_conf *mdev , char const *reason , int const dgs , char const *seen_hash , char const *calc_hash , struct drbd_epoch_entry const *e ) { struct cn_msg *cn_reply ; struct drbd_nl_cfg_reply *reply ; unsigned short *tl ; struct page *page ; unsigned int len ; void *tmp ; char const *tmp___0 ; char const *tmp___1 ; void *__gu_p ; unsigned short *tmp___2 ; void *__gu_p___0 ; unsigned short *tmp___3 ; void *d ; void *tmp___4 ; unsigned int l ; unsigned int __min1 ; unsigned int __min2 ; size_t __len ; void *__ret ; struct page *tmp___5 ; void *__gu_p___1 ; unsigned short *tmp___6 ; int tmp___7 ; { if ((unsigned long )e == (unsigned long )((struct drbd_epoch_entry const *)0)) { return; } else { } if ((unsigned long )reason == (unsigned long )((char const *)0) || (int )((signed char )*reason) == 0) { return; } else { } tmp = kmalloc___5(33026UL, 16U); cn_reply = (struct cn_msg *)tmp; if ((unsigned long )cn_reply == (unsigned long )((struct cn_msg *)0)) { tmp___0 = dev_name((struct device const *)(& (mdev->vdisk)->part0.__dev)); tmp___1 = dev_driver_string((struct device const *)(& (mdev->vdisk)->part0.__dev)); printk("<3>%s %s: could not kmalloc buffer for drbd_bcast_ee, sector %llu, size %u\n", tmp___1, tmp___0, (unsigned long long )e->sector, e->size); return; } else { } reply = (struct drbd_nl_cfg_reply *)(& cn_reply->data); tl = (unsigned short *)(& reply->tag_list); tl = tl_add_str(tl, T_dump_ee_reason, reason); tl = tl_add_blob(tl, T_seen_digest, (void const *)seen_hash, dgs); tl = tl_add_blob(tl, T_calc_digest, (void const *)calc_hash, dgs); tl = tl_add_int(tl, T_ee_sector, (void const *)(& e->sector)); tl = tl_add_int(tl, T_ee_block_id, (void const *)(& e->block_id)); tmp___2 = tl; tl = tl + 1; __gu_p = (void *)tmp___2; switch (2UL) { case 1UL: *((u8 *)__gu_p) = 50U; goto ldv_44991; case 2UL: put_unaligned_le16(49202, __gu_p); goto ldv_44991; case 4UL: put_unaligned_le32(49202U, __gu_p); goto ldv_44991; case 8UL: put_unaligned_le64(49202ULL, __gu_p); goto ldv_44991; default: __bad_unaligned_access_size(); goto ldv_44991; } ldv_44991: tmp___3 = tl; tl = tl + 1; __gu_p___0 = (void *)tmp___3; switch (2UL) { case 1UL: *((u8 *)__gu_p___0) = (unsigned char )e->size; goto ldv_44998; case 2UL: put_unaligned_le16((int )((unsigned short )e->size), __gu_p___0); goto ldv_44998; case 4UL: put_unaligned_le32(e->size, __gu_p___0); goto ldv_44998; case 8UL: put_unaligned_le64((unsigned long long )e->size, __gu_p___0); goto ldv_44998; default: __bad_unaligned_access_size(); goto ldv_44998; } ldv_44998: len = e->size; page = e->pages; goto ldv_45013; ldv_45012: tmp___4 = kmap_atomic___0(page, KM_USER0); d = tmp___4; __min1 = len; __min2 = 4096U; l = __min1 < __min2 ? __min1 : __min2; __len = (size_t )l; __ret = memcpy((void *)tl, (void const *)d, __len); pagefault_enable___0(); tl = tl + (unsigned long )l; len = len - l; page = page_chain_next(page); ldv_45013: ; if ((unsigned long )page != (unsigned long )((struct page *)0)) { tmp___5 = page_chain_next(page); __builtin_prefetch((void const *)tmp___5); if (1 != 0) { goto ldv_45012; } else { goto ldv_45014; } } else { } ldv_45014: tmp___6 = tl; tl = tl + 1; __gu_p___1 = (void *)tmp___6; switch (2UL) { case 1UL: *((u8 *)__gu_p___1) = 0U; goto ldv_45017; case 2UL: put_unaligned_le16(0, __gu_p___1); goto ldv_45017; case 4UL: put_unaligned_le32(0U, __gu_p___1); goto ldv_45017; case 8UL: put_unaligned_le64(0ULL, __gu_p___1); goto ldv_45017; default: __bad_unaligned_access_size(); goto ldv_45017; } ldv_45017: cn_reply->id.idx = 8U; cn_reply->id.val = 1U; tmp___7 = atomic_add_return(1, & drbd_nl_seq); cn_reply->seq = (__u32 )tmp___7; cn_reply->ack = 0U; cn_reply->len = (unsigned int )((int )((__u16 )((long )tl)) - (int )((__u16 )((long )(& reply->tag_list)))) + 12U; cn_reply->flags = 0U; reply->packet_type = 24; reply->minor = mdev_to_minor(mdev); reply->ret_code = 101; cn_netlink_send(cn_reply, 8U, 16U); kfree((void const *)cn_reply); return; } } void drbd_bcast_sync_progress(struct drbd_conf *mdev ) { char buffer[42U] ; struct cn_msg *cn_reply ; struct drbd_nl_cfg_reply *reply ; unsigned short *tl ; unsigned long rs_left ; unsigned int res ; int tmp ; void *__gu_p ; unsigned short *tmp___0 ; int tmp___1 ; { cn_reply = (struct cn_msg *)(& buffer); reply = (struct drbd_nl_cfg_reply *)(& cn_reply->data); tl = (unsigned short *)(& reply->tag_list); tmp = _get_ldev_if_state(mdev, D_INCONSISTENT); if (tmp == 0) { return; } else { } drbd_get_syncer_progress(mdev, & rs_left, & res); put_ldev(mdev); tl = tl_add_int(tl, T_sync_progress, (void const *)(& res)); tmp___0 = tl; tl = tl + 1; __gu_p = (void *)tmp___0; switch (2UL) { case 1UL: *((u8 *)__gu_p) = 0U; goto ldv_45033; case 2UL: put_unaligned_le16(0, __gu_p); goto ldv_45033; case 4UL: put_unaligned_le32(0U, __gu_p); goto ldv_45033; case 8UL: put_unaligned_le64(0ULL, __gu_p); goto ldv_45033; default: __bad_unaligned_access_size(); goto ldv_45033; } ldv_45033: cn_reply->id.idx = 8U; cn_reply->id.val = 1U; tmp___1 = atomic_add_return(1, & drbd_nl_seq); cn_reply->seq = (__u32 )tmp___1; cn_reply->ack = 0U; cn_reply->len = (unsigned int )((int )((__u16 )((long )tl)) - (int )((__u16 )((long )(& reply->tag_list)))) + 12U; cn_reply->flags = 0U; reply->packet_type = 23; reply->minor = mdev_to_minor(mdev); reply->ret_code = 101; cn_netlink_send(cn_reply, 8U, 16U); return; } } int drbd_nl_init(void) { struct cb_id cn_id_drbd ; int err ; int try ; int tmp ; { try = 10; cn_id_drbd.val = 1U; ldv_45045: cn_id_drbd.idx = cn_idx; err = cn_add_callback(& cn_id_drbd, (char *)"cn_drbd", & drbd_connector_callback); if (err == 0) { goto ldv_45044; } else { } cn_idx = cn_idx + 6977U; tmp = try; try = try - 1; if (tmp != 0) { goto ldv_45045; } else { } ldv_45044: ; if (err != 0) { printk("<3>drbd: cn_drbd failed to register\n"); return (err); } else { } return (0); } } void drbd_nl_cleanup(void) { struct cb_id cn_id_drbd ; { cn_id_drbd.idx = cn_idx; cn_id_drbd.val = 1U; cn_del_callback(& cn_id_drbd); return; } } void drbd_nl_send_reply(struct cn_msg *req , int ret_code ) { char buffer[32U] ; struct cn_msg *cn_reply ; struct drbd_nl_cfg_reply *reply ; int rr ; { cn_reply = (struct cn_msg *)(& buffer); reply = (struct drbd_nl_cfg_reply *)(& cn_reply->data); cn_reply->id = req->id; cn_reply->seq = req->seq; cn_reply->ack = req->ack + 1U; cn_reply->len = 12U; cn_reply->flags = 0U; reply->minor = ((struct drbd_nl_cfg_req *)(& req->data))->drbd_minor; reply->ret_code = ret_code; rr = cn_netlink_send(cn_reply, 8U, 16U); if (rr != 0 && rr != -3) { printk("<6>drbd: cn_netlink_send()=%d\n", rr); } else { } return; } } void ldv_mutex_lock_135(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_drbd_socket(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_136(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_137(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_drbd_socket(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_138(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_state_mutex_of_drbd_conf(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_139(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_state_mutex_of_drbd_conf(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_140(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_state_mutex_of_drbd_conf(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_141(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_state_mutex_of_drbd_conf(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } __inline static void ldv_error(void) { { LDV_ERROR: {reach_error();abort();} } } extern int ldv_undef_int(void) ; long ldv__builtin_expect(long exp , long c ) { { return (exp); } } static int ldv_mutex_bm_change_of_drbd_bitmap ; int ldv_mutex_lock_interruptible_bm_change_of_drbd_bitmap(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_bm_change_of_drbd_bitmap == 1) { } else { ldv_error(); } nondetermined = ldv_undef_int(); if (nondetermined) { ldv_mutex_bm_change_of_drbd_bitmap = 2; return (0); } else { return (-4); } } } int ldv_mutex_lock_killable_bm_change_of_drbd_bitmap(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_bm_change_of_drbd_bitmap == 1) { } else { ldv_error(); } nondetermined = ldv_undef_int(); if (nondetermined) { ldv_mutex_bm_change_of_drbd_bitmap = 2; return (0); } else { return (-4); } } } void ldv_mutex_lock_bm_change_of_drbd_bitmap(struct mutex *lock ) { { if (ldv_mutex_bm_change_of_drbd_bitmap == 1) { } else { ldv_error(); } ldv_mutex_bm_change_of_drbd_bitmap = 2; return; } } int ldv_mutex_trylock_bm_change_of_drbd_bitmap(struct mutex *lock ) { int is_mutex_held_by_another_thread ; { if (ldv_mutex_bm_change_of_drbd_bitmap == 1) { } else { ldv_error(); } is_mutex_held_by_another_thread = ldv_undef_int(); if (is_mutex_held_by_another_thread) { return (0); } else { ldv_mutex_bm_change_of_drbd_bitmap = 2; return (1); } } } int ldv_atomic_dec_and_mutex_lock_bm_change_of_drbd_bitmap(atomic_t *cnt , struct mutex *lock ) { int atomic_value_after_dec ; { if (ldv_mutex_bm_change_of_drbd_bitmap == 1) { } else { ldv_error(); } atomic_value_after_dec = ldv_undef_int(); if (atomic_value_after_dec == 0) { ldv_mutex_bm_change_of_drbd_bitmap = 2; return (1); } else { } return (0); } } int ldv_mutex_is_locked_bm_change_of_drbd_bitmap(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_bm_change_of_drbd_bitmap == 1) { nondetermined = ldv_undef_int(); if (nondetermined) { return (0); } else { return (1); } } else { return (1); } } } void ldv_mutex_unlock_bm_change_of_drbd_bitmap(struct mutex *lock ) { { if (ldv_mutex_bm_change_of_drbd_bitmap == 2) { } else { ldv_error(); } ldv_mutex_bm_change_of_drbd_bitmap = 1; return; } } static int ldv_mutex_md_io_mutex_of_drbd_conf ; int ldv_mutex_lock_interruptible_md_io_mutex_of_drbd_conf(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_md_io_mutex_of_drbd_conf == 1) { } else { ldv_error(); } nondetermined = ldv_undef_int(); if (nondetermined) { ldv_mutex_md_io_mutex_of_drbd_conf = 2; return (0); } else { return (-4); } } } int ldv_mutex_lock_killable_md_io_mutex_of_drbd_conf(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_md_io_mutex_of_drbd_conf == 1) { } else { ldv_error(); } nondetermined = ldv_undef_int(); if (nondetermined) { ldv_mutex_md_io_mutex_of_drbd_conf = 2; return (0); } else { return (-4); } } } void ldv_mutex_lock_md_io_mutex_of_drbd_conf(struct mutex *lock ) { { if (ldv_mutex_md_io_mutex_of_drbd_conf == 1) { } else { ldv_error(); } ldv_mutex_md_io_mutex_of_drbd_conf = 2; return; } } int ldv_mutex_trylock_md_io_mutex_of_drbd_conf(struct mutex *lock ) { int is_mutex_held_by_another_thread ; { if (ldv_mutex_md_io_mutex_of_drbd_conf == 1) { } else { ldv_error(); } is_mutex_held_by_another_thread = ldv_undef_int(); if (is_mutex_held_by_another_thread) { return (0); } else { ldv_mutex_md_io_mutex_of_drbd_conf = 2; return (1); } } } int ldv_atomic_dec_and_mutex_lock_md_io_mutex_of_drbd_conf(atomic_t *cnt , struct mutex *lock ) { int atomic_value_after_dec ; { if (ldv_mutex_md_io_mutex_of_drbd_conf == 1) { } else { ldv_error(); } atomic_value_after_dec = ldv_undef_int(); if (atomic_value_after_dec == 0) { ldv_mutex_md_io_mutex_of_drbd_conf = 2; return (1); } else { } return (0); } } int ldv_mutex_is_locked_md_io_mutex_of_drbd_conf(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_md_io_mutex_of_drbd_conf == 1) { nondetermined = ldv_undef_int(); if (nondetermined) { return (0); } else { return (1); } } else { return (1); } } } void ldv_mutex_unlock_md_io_mutex_of_drbd_conf(struct mutex *lock ) { { if (ldv_mutex_md_io_mutex_of_drbd_conf == 2) { } else { ldv_error(); } ldv_mutex_md_io_mutex_of_drbd_conf = 1; return; } } static int ldv_mutex_mutex_of_drbd_socket ; int ldv_mutex_lock_interruptible_mutex_of_drbd_socket(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_mutex_of_drbd_socket == 1) { } else { ldv_error(); } nondetermined = ldv_undef_int(); if (nondetermined) { ldv_mutex_mutex_of_drbd_socket = 2; return (0); } else { return (-4); } } } int ldv_mutex_lock_killable_mutex_of_drbd_socket(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_mutex_of_drbd_socket == 1) { } else { ldv_error(); } nondetermined = ldv_undef_int(); if (nondetermined) { ldv_mutex_mutex_of_drbd_socket = 2; return (0); } else { return (-4); } } } void ldv_mutex_lock_mutex_of_drbd_socket(struct mutex *lock ) { { if (ldv_mutex_mutex_of_drbd_socket == 1) { } else { ldv_error(); } ldv_mutex_mutex_of_drbd_socket = 2; return; } } int ldv_mutex_trylock_mutex_of_drbd_socket(struct mutex *lock ) { int is_mutex_held_by_another_thread ; { if (ldv_mutex_mutex_of_drbd_socket == 1) { } else { ldv_error(); } is_mutex_held_by_another_thread = ldv_undef_int(); if (is_mutex_held_by_another_thread) { return (0); } else { ldv_mutex_mutex_of_drbd_socket = 2; return (1); } } } int ldv_atomic_dec_and_mutex_lock_mutex_of_drbd_socket(atomic_t *cnt , struct mutex *lock ) { int atomic_value_after_dec ; { if (ldv_mutex_mutex_of_drbd_socket == 1) { } else { ldv_error(); } atomic_value_after_dec = ldv_undef_int(); if (atomic_value_after_dec == 0) { ldv_mutex_mutex_of_drbd_socket = 2; return (1); } else { } return (0); } } int ldv_mutex_is_locked_mutex_of_drbd_socket(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_mutex_of_drbd_socket == 1) { nondetermined = ldv_undef_int(); if (nondetermined) { return (0); } else { return (1); } } else { return (1); } } } void ldv_mutex_unlock_mutex_of_drbd_socket(struct mutex *lock ) { { if (ldv_mutex_mutex_of_drbd_socket == 2) { } else { ldv_error(); } ldv_mutex_mutex_of_drbd_socket = 1; return; } } static int ldv_mutex_state_mutex_of_drbd_conf ; int ldv_mutex_lock_interruptible_state_mutex_of_drbd_conf(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_state_mutex_of_drbd_conf == 1) { } else { ldv_error(); } nondetermined = ldv_undef_int(); if (nondetermined) { ldv_mutex_state_mutex_of_drbd_conf = 2; return (0); } else { return (-4); } } } int ldv_mutex_lock_killable_state_mutex_of_drbd_conf(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_state_mutex_of_drbd_conf == 1) { } else { ldv_error(); } nondetermined = ldv_undef_int(); if (nondetermined) { ldv_mutex_state_mutex_of_drbd_conf = 2; return (0); } else { return (-4); } } } void ldv_mutex_lock_state_mutex_of_drbd_conf(struct mutex *lock ) { { if (ldv_mutex_state_mutex_of_drbd_conf == 1) { } else { ldv_error(); } ldv_mutex_state_mutex_of_drbd_conf = 2; return; } } int ldv_mutex_trylock_state_mutex_of_drbd_conf(struct mutex *lock ) { int is_mutex_held_by_another_thread ; { if (ldv_mutex_state_mutex_of_drbd_conf == 1) { } else { ldv_error(); } is_mutex_held_by_another_thread = ldv_undef_int(); if (is_mutex_held_by_another_thread) { return (0); } else { ldv_mutex_state_mutex_of_drbd_conf = 2; return (1); } } } int ldv_atomic_dec_and_mutex_lock_state_mutex_of_drbd_conf(atomic_t *cnt , struct mutex *lock ) { int atomic_value_after_dec ; { if (ldv_mutex_state_mutex_of_drbd_conf == 1) { } else { ldv_error(); } atomic_value_after_dec = ldv_undef_int(); if (atomic_value_after_dec == 0) { ldv_mutex_state_mutex_of_drbd_conf = 2; return (1); } else { } return (0); } } int ldv_mutex_is_locked_state_mutex_of_drbd_conf(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_state_mutex_of_drbd_conf == 1) { nondetermined = ldv_undef_int(); if (nondetermined) { return (0); } else { return (1); } } else { return (1); } } } void ldv_mutex_unlock_state_mutex_of_drbd_conf(struct mutex *lock ) { { if (ldv_mutex_state_mutex_of_drbd_conf == 2) { } else { ldv_error(); } ldv_mutex_state_mutex_of_drbd_conf = 1; return; } } void ldv_initialize(void) { { ldv_mutex_bm_change_of_drbd_bitmap = 1; ldv_mutex_md_io_mutex_of_drbd_conf = 1; ldv_mutex_mutex_of_drbd_socket = 1; ldv_mutex_state_mutex_of_drbd_conf = 1; return; } } void ldv_check_final_state(void) { { if (ldv_mutex_bm_change_of_drbd_bitmap == 1) { } else { ldv_error(); } if (ldv_mutex_md_io_mutex_of_drbd_conf == 1) { } else { ldv_error(); } if (ldv_mutex_mutex_of_drbd_socket == 1) { } else { ldv_error(); } if (ldv_mutex_state_mutex_of_drbd_conf == 1) { } else { ldv_error(); } return; } }