dm zoned: separate random and cache zones
authorHannes Reinecke <hare@suse.de>
Tue, 19 May 2020 08:14:20 +0000 (10:14 +0200)
committerMike Snitzer <snitzer@redhat.com>
Wed, 20 May 2020 21:09:49 +0000 (17:09 -0400)
commit34f5affd04c4a16d9df19c369bcec6e873e57ffe
tree73da1a362f1bfd5a3f4d3bee186e81e536a46a2b
parent489dc0f06a5837f87482c0ce61d830d24e17082e
dm zoned: separate random and cache zones

Instead of lumping emulated zones together with random zones we
should be handling them as separate 'cache' zones. This improves
code readability and allows an easier implementation of different
cache policies.

Also add additional allocation flags, to separate the type (cache,
random, or sequential) from the purpose (eg reclaim).

Also switch the allocation policy to not use random zones as buffer
zones if cache zones are present. This avoids a performance drop when
all cache zones are used.

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>
drivers/md/dm-zoned-metadata.c
drivers/md/dm-zoned-reclaim.c
drivers/md/dm-zoned-target.c
drivers/md/dm-zoned.h