diff options
author | Hannes Reinecke <hare@suse.de> | 2020-06-02 14:09:45 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2020-06-05 21:59:46 +0300 |
commit | aec67b4ffa4bea4a02063d9a0f379e5795d6f5dc (patch) | |
tree | 3fb9889d17013ffab71a722c923b28a074b5354c /drivers/md/dm-zoned.h | |
parent | c3ff479dde9f77d044c164f3ff5443bbe2b6c72d (diff) | |
download | linux-aec67b4ffa4bea4a02063d9a0f379e5795d6f5dc.tar.xz |
dm zoned: add a 'reserved' zone flag
Instead of counting the number of reserved zones in dmz_free_zone(),
mark the zone as 'reserved' during allocation and simplify
dmz_free_zone().
Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-zoned.h')
-rw-r--r-- | drivers/md/dm-zoned.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/dm-zoned.h b/drivers/md/dm-zoned.h index 8083607b9535..3451b5a768b4 100644 --- a/drivers/md/dm-zoned.h +++ b/drivers/md/dm-zoned.h @@ -123,6 +123,7 @@ enum { DMZ_META, DMZ_DATA, DMZ_BUF, + DMZ_RESERVED, /* Zone internal state */ DMZ_RECLAIM, @@ -140,6 +141,7 @@ enum { #define dmz_is_offline(z) test_bit(DMZ_OFFLINE, &(z)->flags) #define dmz_is_readonly(z) test_bit(DMZ_READ_ONLY, &(z)->flags) #define dmz_in_reclaim(z) test_bit(DMZ_RECLAIM, &(z)->flags) +#define dmz_is_reserved(z) test_bit(DMZ_RESERVED, &(z)->flags) #define dmz_seq_write_err(z) test_bit(DMZ_SEQ_WRITE_ERR, &(z)->flags) #define dmz_reclaim_should_terminate(z) \ test_bit(DMZ_RECLAIM_TERMINATE, &(z)->flags) |