Skip to content

Commit 13a1f65

Browse files
bvanasscheaxboe
authored andcommitted
dm/dm-zoned: Use the enum req_op type
Improve static type checking by using the enum req_op type for arguments that represent a request operation. Reviewed-by: Damien Le Moal <[email protected]> Cc: Alasdair Kergon <[email protected]> Cc: Mike Snitzer <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 8a5a7ce commit 13a1f65

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

drivers/md/dm-zoned-metadata.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ static int dmz_write_mblock(struct dmz_metadata *zmd, struct dmz_mblock *mblk,
737737
/*
738738
* Read/write a metadata block.
739739
*/
740-
static int dmz_rdwr_block(struct dmz_dev *dev, int op,
740+
static int dmz_rdwr_block(struct dmz_dev *dev, enum req_op op,
741741
sector_t block, struct page *page)
742742
{
743743
struct bio *bio;
@@ -2045,7 +2045,8 @@ struct dm_zone *dmz_get_zone_for_reclaim(struct dmz_metadata *zmd,
20452045
* allocated and used to map the chunk.
20462046
* The zone returned will be set to the active state.
20472047
*/
2048-
struct dm_zone *dmz_get_chunk_mapping(struct dmz_metadata *zmd, unsigned int chunk, int op)
2048+
struct dm_zone *dmz_get_chunk_mapping(struct dmz_metadata *zmd,
2049+
unsigned int chunk, enum req_op op)
20492050
{
20502051
struct dmz_mblock *dmap_mblk = zmd->map_mblk[chunk >> DMZ_MAP_ENTRIES_SHIFT];
20512052
struct dmz_map *dmap = (struct dmz_map *) dmap_mblk->data;

drivers/md/dm-zoned.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ struct dm_zone *dmz_get_zone_for_reclaim(struct dmz_metadata *zmd,
248248
unsigned int dev_idx, bool idle);
249249

250250
struct dm_zone *dmz_get_chunk_mapping(struct dmz_metadata *zmd,
251-
unsigned int chunk, int op);
251+
unsigned int chunk, enum req_op op);
252252
void dmz_put_chunk_mapping(struct dmz_metadata *zmd, struct dm_zone *zone);
253253
struct dm_zone *dmz_get_chunk_buffer(struct dmz_metadata *zmd,
254254
struct dm_zone *dzone);

0 commit comments

Comments
 (0)