Commit a6c05c98 authored by Mike Snitzer's avatar Mike Snitzer

dm vdo: fix various blk_opf_t sparse warnings

Use proper blk_opf_t type rather than unsigned int.
Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
Signed-off-by: default avatarSusan LeGendre-McGhee <slegendr@redhat.com>
Signed-off-by: default avatarMatthew Sakai <msakai@redhat.com>
parent ff919946
...@@ -1620,7 +1620,7 @@ static void write_initialized_page(struct vdo_completion *completion) ...@@ -1620,7 +1620,7 @@ static void write_initialized_page(struct vdo_completion *completion)
struct block_map_zone *zone = pooled->context; struct block_map_zone *zone = pooled->context;
struct tree_page *tree_page = completion->parent; struct tree_page *tree_page = completion->parent;
struct block_map_page *page = (struct block_map_page *) vio->data; struct block_map_page *page = (struct block_map_page *) vio->data;
unsigned int operation = REQ_OP_WRITE | REQ_PRIO; blk_opf_t operation = REQ_OP_WRITE | REQ_PRIO;
/* /*
* Now that we know the page has been written at least once, mark the copy we are writing * Now that we know the page has been written at least once, mark the copy we are writing
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
* ASAP to service heavy load, which is the only place where REQ_BACKGROUND might aid in load * ASAP to service heavy load, which is the only place where REQ_BACKGROUND might aid in load
* prioritization. * prioritization.
*/ */
static unsigned int PASSTHROUGH_FLAGS = (REQ_PRIO | REQ_META | REQ_SYNC | REQ_RAHEAD); static blk_opf_t PASSTHROUGH_FLAGS = (REQ_PRIO | REQ_META | REQ_SYNC | REQ_RAHEAD);
/** /**
* DOC: * DOC:
...@@ -1570,7 +1570,7 @@ static void read_block(struct vdo_completion *completion) ...@@ -1570,7 +1570,7 @@ static void read_block(struct vdo_completion *completion)
result = vio_reset_bio(vio, (char *) data_vio->compression.block, result = vio_reset_bio(vio, (char *) data_vio->compression.block,
read_endio, REQ_OP_READ, data_vio->mapped.pbn); read_endio, REQ_OP_READ, data_vio->mapped.pbn);
} else { } else {
int opf = ((data_vio->user_bio->bi_opf & PASSTHROUGH_FLAGS) | REQ_OP_READ); blk_opf_t opf = ((data_vio->user_bio->bi_opf & PASSTHROUGH_FLAGS) | REQ_OP_READ);
if (data_vio->is_partial) { if (data_vio->is_partial) {
result = vio_reset_bio(vio, vio->data, read_endio, opf, result = vio_reset_bio(vio, vio->data, read_endio, opf,
......
...@@ -338,7 +338,7 @@ void vdo_submit_data_vio(struct data_vio *data_vio) ...@@ -338,7 +338,7 @@ void vdo_submit_data_vio(struct data_vio *data_vio)
*/ */
void __submit_metadata_vio(struct vio *vio, physical_block_number_t physical, void __submit_metadata_vio(struct vio *vio, physical_block_number_t physical,
bio_end_io_t callback, vdo_action_fn error_handler, bio_end_io_t callback, vdo_action_fn error_handler,
unsigned int operation, char *data) blk_opf_t operation, char *data)
{ {
int result; int result;
struct vdo_completion *completion = &vio->completion; struct vdo_completion *completion = &vio->completion;
......
...@@ -26,11 +26,11 @@ void vdo_submit_data_vio(struct data_vio *data_vio); ...@@ -26,11 +26,11 @@ void vdo_submit_data_vio(struct data_vio *data_vio);
void __submit_metadata_vio(struct vio *vio, physical_block_number_t physical, void __submit_metadata_vio(struct vio *vio, physical_block_number_t physical,
bio_end_io_t callback, vdo_action_fn error_handler, bio_end_io_t callback, vdo_action_fn error_handler,
unsigned int operation, char *data); blk_opf_t operation, char *data);
static inline void vdo_submit_metadata_vio(struct vio *vio, physical_block_number_t physical, static inline void vdo_submit_metadata_vio(struct vio *vio, physical_block_number_t physical,
bio_end_io_t callback, vdo_action_fn error_handler, bio_end_io_t callback, vdo_action_fn error_handler,
unsigned int operation) blk_opf_t operation)
{ {
__submit_metadata_vio(vio, physical, callback, error_handler, __submit_metadata_vio(vio, physical, callback, error_handler,
operation, vio->data); operation, vio->data);
......
...@@ -172,7 +172,7 @@ void free_vio(struct vio *vio) ...@@ -172,7 +172,7 @@ void free_vio(struct vio *vio)
/* Set bio properties for a VDO read or write. */ /* Set bio properties for a VDO read or write. */
void vdo_set_bio_properties(struct bio *bio, struct vio *vio, bio_end_io_t callback, void vdo_set_bio_properties(struct bio *bio, struct vio *vio, bio_end_io_t callback,
unsigned int bi_opf, physical_block_number_t pbn) blk_opf_t bi_opf, physical_block_number_t pbn)
{ {
struct vdo *vdo = vio->completion.vdo; struct vdo *vdo = vio->completion.vdo;
struct device_config *config = vdo->device_config; struct device_config *config = vdo->device_config;
...@@ -193,7 +193,7 @@ void vdo_set_bio_properties(struct bio *bio, struct vio *vio, bio_end_io_t callb ...@@ -193,7 +193,7 @@ void vdo_set_bio_properties(struct bio *bio, struct vio *vio, bio_end_io_t callb
* vio associated with the bio. * vio associated with the bio.
*/ */
int vio_reset_bio(struct vio *vio, char *data, bio_end_io_t callback, int vio_reset_bio(struct vio *vio, char *data, bio_end_io_t callback,
unsigned int bi_opf, physical_block_number_t pbn) blk_opf_t bi_opf, physical_block_number_t pbn)
{ {
int bvec_count, offset, len, i; int bvec_count, offset, len, i;
struct bio *bio = vio->bio; struct bio *bio = vio->bio;
......
...@@ -119,10 +119,10 @@ static inline void initialize_vio(struct vio *vio, struct bio *bio, ...@@ -119,10 +119,10 @@ static inline void initialize_vio(struct vio *vio, struct bio *bio,
} }
void vdo_set_bio_properties(struct bio *bio, struct vio *vio, bio_end_io_t callback, void vdo_set_bio_properties(struct bio *bio, struct vio *vio, bio_end_io_t callback,
unsigned int bi_opf, physical_block_number_t pbn); blk_opf_t bi_opf, physical_block_number_t pbn);
int vio_reset_bio(struct vio *vio, char *data, bio_end_io_t callback, int vio_reset_bio(struct vio *vio, char *data, bio_end_io_t callback,
unsigned int bi_opf, physical_block_number_t pbn); blk_opf_t bi_opf, physical_block_number_t pbn);
void update_vio_error_stats(struct vio *vio, const char *format, ...) void update_vio_error_stats(struct vio *vio, const char *format, ...)
__printf(2, 3); __printf(2, 3);
......
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