summaryrefslogtreecommitdiff
path: root/drivers/md/dm-zoned-reclaim.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2020-06-02 14:09:53 +0300
committerMike Snitzer <snitzer@redhat.com>2020-06-05 21:59:52 +0300
commit22c1ef66c4cbb82baf81a28abedfe8ad20ad9126 (patch)
treef27512085be637385073999cb414b2dea9d5459e /drivers/md/dm-zoned-reclaim.c
parent4dba12881f882b629774796bb8655f5b1415d803 (diff)
downloadlinux-22c1ef66c4cbb82baf81a28abedfe8ad20ad9126.tar.xz
dm zoned: allocate zone by device index
When allocating a zone, pass in an indicator on which device the zone should be allocated; this increases performance for a multi-device setup because reclaim will now allocate zones on the device for which reclaim is running. 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-reclaim.c')
-rw-r--r--drivers/md/dm-zoned-reclaim.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-zoned-reclaim.c b/drivers/md/dm-zoned-reclaim.c
index 18edf1b9bf52..5a04e34d17a9 100644
--- a/drivers/md/dm-zoned-reclaim.c
+++ b/drivers/md/dm-zoned-reclaim.c
@@ -288,7 +288,8 @@ static int dmz_reclaim_rnd_data(struct dmz_reclaim *zrc, struct dm_zone *dzone)
/* Get a free random or sequential zone */
dmz_lock_map(zmd);
again:
- szone = dmz_alloc_zone(zmd, alloc_flags | DMZ_ALLOC_RECLAIM);
+ szone = dmz_alloc_zone(zmd, zrc->dev_idx,
+ alloc_flags | DMZ_ALLOC_RECLAIM);
if (!szone && alloc_flags == DMZ_ALLOC_SEQ && dmz_nr_cache_zones(zmd)) {
alloc_flags = DMZ_ALLOC_RND;
goto again;