dm: rearrange core declarations for extended use from dm-zone.c
authorDamien Le Moal <damien.lemoal@wdc.com>
Tue, 25 May 2021 21:24:59 +0000 (06:24 +0900)
committerMike Snitzer <snitzer@redhat.com>
Fri, 4 Jun 2021 16:07:37 +0000 (12:07 -0400)
commite2118b3c3d94289852417f70ec128c25f4833aad
tree187b3c2a61514e9139f77057332a4c242465ac20
parent9ffbbb435d8f566a0924ce4b5dc7fc1bceb6dbf8
dm: rearrange core declarations for extended use from dm-zone.c

Move the definitions of struct dm_target_io, struct dm_io and the bits
of the flags field of struct mapped_device from dm.c to dm-core.h to
make them usable from dm-zone.c. For the same reason, declare
dec_pending() in dm-core.h after renaming it to dm_io_dec_pending().
And for symmetry of the function names, introduce the inline helper
dm_io_inc_pending() instead of directly using atomic_inc() calls.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-core.h
drivers/md/dm.c