#include <linux/slab.h>
#include <linux/crc32c.h>
#include <linux/drbd.h>
#include <linux/drbd_limits.h>
#include "drbd_int.h"
enum al_transaction_types { … };
struct __packed al_transaction_on_disk { … };
void *drbd_md_get_buffer(struct drbd_device *device, const char *intent)
{ … }
void drbd_md_put_buffer(struct drbd_device *device)
{ … }
void wait_until_done_or_force_detached(struct drbd_device *device, struct drbd_backing_dev *bdev,
unsigned int *done)
{ … }
static int _drbd_md_sync_page_io(struct drbd_device *device,
struct drbd_backing_dev *bdev,
sector_t sector, enum req_op op)
{ … }
int drbd_md_sync_page_io(struct drbd_device *device, struct drbd_backing_dev *bdev,
sector_t sector, enum req_op op)
{ … }
static struct bm_extent *find_active_resync_extent(struct drbd_device *device, unsigned int enr)
{ … }
static struct lc_element *_al_get(struct drbd_device *device, unsigned int enr, bool nonblock)
{ … }
bool drbd_al_begin_io_fastpath(struct drbd_device *device, struct drbd_interval *i)
{ … }
bool drbd_al_begin_io_prepare(struct drbd_device *device, struct drbd_interval *i)
{ … }
#if (PAGE_SHIFT + 3) < (AL_EXTENT_SHIFT - BM_BLOCK_SHIFT)
# error FIXME
#endif
static unsigned int al_extent_to_bm_page(unsigned int al_enr)
{ … }
static sector_t al_tr_number_to_on_disk_sector(struct drbd_device *device)
{ … }
static int __al_write_transaction(struct drbd_device *device, struct al_transaction_on_disk *buffer)
{ … }
static int al_write_transaction(struct drbd_device *device)
{ … }
void drbd_al_begin_io_commit(struct drbd_device *device)
{ … }
void drbd_al_begin_io(struct drbd_device *device, struct drbd_interval *i)
{ … }
int drbd_al_begin_io_nonblock(struct drbd_device *device, struct drbd_interval *i)
{ … }
void drbd_al_complete_io(struct drbd_device *device, struct drbd_interval *i)
{ … }
static int _try_lc_del(struct drbd_device *device, struct lc_element *al_ext)
{ … }
void drbd_al_shrink(struct drbd_device *device)
{ … }
int drbd_al_initialize(struct drbd_device *device, void *buffer)
{ … }
static const char *drbd_change_sync_fname[] = …;
static bool update_rs_extent(struct drbd_device *device,
unsigned int enr, int count,
enum update_sync_bits_mode mode)
{ … }
void drbd_advance_rs_marks(struct drbd_peer_device *peer_device, unsigned long still_to_go)
{ … }
static bool lazy_bitmap_update_due(struct drbd_device *device)
{ … }
static void maybe_schedule_on_disk_bitmap_update(struct drbd_device *device, bool rs_done)
{ … }
static int update_sync_bits(struct drbd_device *device,
unsigned long sbnr, unsigned long ebnr,
enum update_sync_bits_mode mode)
{ … }
static bool plausible_request_size(int size)
{ … }
int __drbd_change_sync(struct drbd_peer_device *peer_device, sector_t sector, int size,
enum update_sync_bits_mode mode)
{ … }
static
struct bm_extent *_bme_get(struct drbd_device *device, unsigned int enr)
{ … }
static int _is_in_al(struct drbd_device *device, unsigned int enr)
{ … }
int drbd_rs_begin_io(struct drbd_device *device, sector_t sector)
{ … }
int drbd_try_rs_begin_io(struct drbd_peer_device *peer_device, sector_t sector)
{ … }
void drbd_rs_complete_io(struct drbd_device *device, sector_t sector)
{ … }
void drbd_rs_cancel_all(struct drbd_device *device)
{ … }
int drbd_rs_del_all(struct drbd_device *device)
{ … }