#include <linux/module.h>
#include <linux/drbd.h>
#include <linux/sched/signal.h>
#include <linux/wait.h>
#include <linux/mm.h>
#include <linux/memcontrol.h>
#include <linux/mm_inline.h>
#include <linux/slab.h>
#include <linux/random.h>
#include <linux/string.h>
#include <linux/scatterlist.h>
#include <linux/part_stat.h>
#include "drbd_int.h"
#include "drbd_protocol.h"
#include "drbd_req.h"
static int make_ov_request(struct drbd_peer_device *, int);
static int make_resync_request(struct drbd_peer_device *, int);
void drbd_md_endio(struct bio *bio)
{ … }
static void drbd_endio_read_sec_final(struct drbd_peer_request *peer_req) __releases(local)
{ … }
void drbd_endio_write_sec_final(struct drbd_peer_request *peer_req) __releases(local)
{ … }
void drbd_peer_request_endio(struct bio *bio)
{ … }
static void
drbd_panic_after_delayed_completion_of_aborted_request(struct drbd_device *device)
{ … }
void drbd_request_endio(struct bio *bio)
{ … }
void drbd_csum_ee(struct crypto_shash *tfm, struct drbd_peer_request *peer_req, void *digest)
{ … }
void drbd_csum_bio(struct crypto_shash *tfm, struct bio *bio, void *digest)
{ … }
static int w_e_send_csum(struct drbd_work *w, int cancel)
{ … }
#define GFP_TRY …
static int read_for_csum(struct drbd_peer_device *peer_device, sector_t sector, int size)
{ … }
int w_resync_timer(struct drbd_work *w, int cancel)
{ … }
void resync_timer_fn(struct timer_list *t)
{ … }
static void fifo_set(struct fifo_buffer *fb, int value)
{ … }
static int fifo_push(struct fifo_buffer *fb, int value)
{ … }
static void fifo_add_val(struct fifo_buffer *fb, int value)
{ … }
struct fifo_buffer *fifo_alloc(unsigned int fifo_size)
{ … }
static int drbd_rs_controller(struct drbd_peer_device *peer_device, unsigned int sect_in)
{ … }
static int drbd_rs_number_requests(struct drbd_peer_device *peer_device)
{ … }
static int make_resync_request(struct drbd_peer_device *const peer_device, int cancel)
{ … }
static int make_ov_request(struct drbd_peer_device *peer_device, int cancel)
{ … }
int w_ov_finished(struct drbd_work *w, int cancel)
{ … }
static int w_resync_finished(struct drbd_work *w, int cancel)
{ … }
static void ping_peer(struct drbd_device *device)
{ … }
int drbd_resync_finished(struct drbd_peer_device *peer_device)
{ … }
static void move_to_net_ee_or_free(struct drbd_device *device, struct drbd_peer_request *peer_req)
{ … }
int w_e_end_data_req(struct drbd_work *w, int cancel)
{ … }
static bool all_zero(struct drbd_peer_request *peer_req)
{ … }
int w_e_end_rsdata_req(struct drbd_work *w, int cancel)
{ … }
int w_e_end_csum_rs_req(struct drbd_work *w, int cancel)
{ … }
int w_e_end_ov_req(struct drbd_work *w, int cancel)
{ … }
void drbd_ov_out_of_sync_found(struct drbd_peer_device *peer_device, sector_t sector, int size)
{ … }
int w_e_end_ov_reply(struct drbd_work *w, int cancel)
{ … }
static int drbd_send_barrier(struct drbd_connection *connection)
{ … }
static int pd_send_unplug_remote(struct drbd_peer_device *pd)
{ … }
int w_send_write_hint(struct drbd_work *w, int cancel)
{ … }
static void re_init_if_first_write(struct drbd_connection *connection, unsigned int epoch)
{ … }
static void maybe_send_barrier(struct drbd_connection *connection, unsigned int epoch)
{ … }
int w_send_out_of_sync(struct drbd_work *w, int cancel)
{ … }
int w_send_dblock(struct drbd_work *w, int cancel)
{ … }
int w_send_read_req(struct drbd_work *w, int cancel)
{ … }
int w_restart_disk_io(struct drbd_work *w, int cancel)
{ … }
static int _drbd_may_sync_now(struct drbd_device *device)
{ … }
static bool drbd_pause_after(struct drbd_device *device)
{ … }
static bool drbd_resume_next(struct drbd_device *device)
{ … }
void resume_next_sg(struct drbd_device *device)
{ … }
void suspend_other_sg(struct drbd_device *device)
{ … }
enum drbd_ret_code drbd_resync_after_valid(struct drbd_device *device, int o_minor)
{ … }
void drbd_resync_after_changed(struct drbd_device *device)
{ … }
void drbd_rs_controller_reset(struct drbd_peer_device *peer_device)
{ … }
void start_resync_timer_fn(struct timer_list *t)
{ … }
static void do_start_resync(struct drbd_device *device)
{ … }
static bool use_checksum_based_resync(struct drbd_connection *connection, struct drbd_device *device)
{ … }
void drbd_start_resync(struct drbd_device *device, enum drbd_conns side)
{ … }
static void update_on_disk_bitmap(struct drbd_peer_device *peer_device, bool resync_done)
{ … }
static void drbd_ldev_destroy(struct drbd_device *device)
{ … }
static void go_diskless(struct drbd_device *device)
{ … }
static int do_md_sync(struct drbd_device *device)
{ … }
void __update_timing_details(
struct drbd_thread_timing_details *tdp,
unsigned int *cb_nr,
void *cb,
const char *fn, const unsigned int line)
{ … }
static void do_device_work(struct drbd_device *device, const unsigned long todo)
{ … }
#define DRBD_DEVICE_WORK_MASK …
static unsigned long get_work_bits(unsigned long *flags)
{ … }
static void do_unqueued_work(struct drbd_connection *connection)
{ … }
static bool dequeue_work_batch(struct drbd_work_queue *queue, struct list_head *work_list)
{ … }
static void wait_for_work(struct drbd_connection *connection, struct list_head *work_list)
{ … }
int drbd_worker(struct drbd_thread *thi)
{ … }