Commit c65bface authored by Matthew Sakai's avatar Matthew Sakai Committed by Mike Snitzer

dm vdo: add the vdo io_submitter

The io_submitter handles bio submission from vdo data store to the storage
below. It will merge bios when possible.
Co-developed-by: default avatarJ. corwin Coburn <corwin@hurlbutnet.net>
Signed-off-by: default avatarJ. corwin Coburn <corwin@hurlbutnet.net>
Co-developed-by: default avatarMichael Sclafani <dm-devel@lists.linux.dev>
Signed-off-by: default avatarMichael Sclafani <dm-devel@lists.linux.dev>
Co-developed-by: default avatarSweet Tea Dorminy <sweettea-kernel@dorminy.me>
Signed-off-by: default avatarSweet Tea Dorminy <sweettea-kernel@dorminy.me>
Co-developed-by: default avatarBruce Johnston <bjohnsto@redhat.com>
Signed-off-by: default avatarBruce Johnston <bjohnsto@redhat.com>
Co-developed-by: default avatarKen Raeburn <raeburn@redhat.com>
Signed-off-by: default avatarKen Raeburn <raeburn@redhat.com>
Signed-off-by: default avatarMatthew Sakai <msakai@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
parent 062401f0
This diff is collapsed.
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright 2023 Red Hat
*/
#ifndef VDO_IO_SUBMITTER_H
#define VDO_IO_SUBMITTER_H
#include <linux/bio.h>
#include "types.h"
struct io_submitter;
int vdo_make_io_submitter(unsigned int thread_count, unsigned int rotation_interval,
unsigned int max_requests_active, struct vdo *vdo,
struct io_submitter **io_submitter);
void vdo_cleanup_io_submitter(struct io_submitter *io_submitter);
void vdo_free_io_submitter(struct io_submitter *io_submitter);
void process_vio_io(struct vdo_completion *completion);
void submit_data_vio_io(struct data_vio *data_vio);
void vdo_submit_metadata_io(struct vio *vio, physical_block_number_t physical,
bio_end_io_t callback, vdo_action_fn error_handler,
unsigned int operation, char *data);
static inline void submit_metadata_vio(struct vio *vio, physical_block_number_t physical,
bio_end_io_t callback, vdo_action_fn error_handler,
unsigned int operation)
{
vdo_submit_metadata_io(vio, physical, callback, error_handler,
operation, vio->data);
}
static inline void submit_flush_vio(struct vio *vio, bio_end_io_t callback,
vdo_action_fn error_handler)
{
/* FIXME: Can we just use REQ_OP_FLUSH? */
vdo_submit_metadata_io(vio, 0, callback, error_handler,
REQ_OP_WRITE | REQ_PREFLUSH, NULL);
}
#endif /* VDO_IO_SUBMITTER_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment