* FAILED: patch "[PATCH] dm zoned: remove duplicate nr_rnd_zones increase in" failed to apply to 5.4-stable tree
@ 2020-04-15 11:02 gregkh
2020-04-16 0:51 ` Sasha Levin
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2020-04-15 11:02 UTC (permalink / raw)
To: bob.liu, damien.lemoal, snitzer; +Cc: stable
The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From b8fdd090376a7a46d17db316638fe54b965c2fb0 Mon Sep 17 00:00:00 2001
From: Bob Liu <bob.liu@oracle.com>
Date: Tue, 24 Mar 2020 21:22:45 +0800
Subject: [PATCH] dm zoned: remove duplicate nr_rnd_zones increase in
dmz_init_zone()
zmd->nr_rnd_zones was increased twice by mistake. The other place it
is increased in dmz_init_zone() is the only one needed:
1131 zmd->nr_useable_zones++;
1132 if (dmz_is_rnd(zone)) {
1133 zmd->nr_rnd_zones++;
^^^
Fixes: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target")
Cc: stable@vger.kernel.org
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c
index 516c7b671d25..369de15c4e80 100644
--- a/drivers/md/dm-zoned-metadata.c
+++ b/drivers/md/dm-zoned-metadata.c
@@ -1109,7 +1109,6 @@ static int dmz_init_zone(struct blk_zone *blkz, unsigned int idx, void *data)
switch (blkz->type) {
case BLK_ZONE_TYPE_CONVENTIONAL:
set_bit(DMZ_RND, &zone->flags);
- zmd->nr_rnd_zones++;
break;
case BLK_ZONE_TYPE_SEQWRITE_REQ:
case BLK_ZONE_TYPE_SEQWRITE_PREF:
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: FAILED: patch "[PATCH] dm zoned: remove duplicate nr_rnd_zones increase in" failed to apply to 5.4-stable tree
2020-04-15 11:02 FAILED: patch "[PATCH] dm zoned: remove duplicate nr_rnd_zones increase in" failed to apply to 5.4-stable tree gregkh
@ 2020-04-16 0:51 ` Sasha Levin
2020-04-16 1:18 ` Damien Le Moal
0 siblings, 1 reply; 3+ messages in thread
From: Sasha Levin @ 2020-04-16 0:51 UTC (permalink / raw)
To: gregkh; +Cc: bob.liu, damien.lemoal, snitzer, stable
On Wed, Apr 15, 2020 at 01:02:39PM +0200, gregkh@linuxfoundation.org wrote:
>
>The patch below does not apply to the 5.4-stable tree.
>If someone wants it applied there, or to any other stable or longterm
>tree, then please email the backport, including the original git commit
>id to <stable@vger.kernel.org>.
>
>thanks,
>
>greg k-h
>
>------------------ original commit in Linus's tree ------------------
>
>From b8fdd090376a7a46d17db316638fe54b965c2fb0 Mon Sep 17 00:00:00 2001
>From: Bob Liu <bob.liu@oracle.com>
>Date: Tue, 24 Mar 2020 21:22:45 +0800
>Subject: [PATCH] dm zoned: remove duplicate nr_rnd_zones increase in
> dmz_init_zone()
>
>zmd->nr_rnd_zones was increased twice by mistake. The other place it
>is increased in dmz_init_zone() is the only one needed:
>
>1131 zmd->nr_useable_zones++;
>1132 if (dmz_is_rnd(zone)) {
>1133 zmd->nr_rnd_zones++;
> ^^^
>Fixes: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target")
>Cc: stable@vger.kernel.org
>Signed-off-by: Bob Liu <bob.liu@oracle.com>
>Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
>Signed-off-by: Mike Snitzer <snitzer@redhat.com>
>
>diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c
>index 516c7b671d25..369de15c4e80 100644
>--- a/drivers/md/dm-zoned-metadata.c
>+++ b/drivers/md/dm-zoned-metadata.c
>@@ -1109,7 +1109,6 @@ static int dmz_init_zone(struct blk_zone *blkz, unsigned int idx, void *data)
> switch (blkz->type) {
> case BLK_ZONE_TYPE_CONVENTIONAL:
> set_bit(DMZ_RND, &zone->flags);
>- zmd->nr_rnd_zones++;
> break;
> case BLK_ZONE_TYPE_SEQWRITE_REQ:
> case BLK_ZONE_TYPE_SEQWRITE_PREF:
The code on older kernels was using is/else construct instead of a
switch. I've adjusted the patch and queued it up.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: FAILED: patch "[PATCH] dm zoned: remove duplicate nr_rnd_zones increase in" failed to apply to 5.4-stable tree
2020-04-16 0:51 ` Sasha Levin
@ 2020-04-16 1:18 ` Damien Le Moal
0 siblings, 0 replies; 3+ messages in thread
From: Damien Le Moal @ 2020-04-16 1:18 UTC (permalink / raw)
To: Sasha Levin, gregkh@linuxfoundation.org
Cc: bob.liu@oracle.com, snitzer@redhat.com, stable@vger.kernel.org
On 2020/04/16 9:51, Sasha Levin wrote:
> On Wed, Apr 15, 2020 at 01:02:39PM +0200, gregkh@linuxfoundation.org wrote:
>>
>> The patch below does not apply to the 5.4-stable tree.
>> If someone wants it applied there, or to any other stable or longterm
>> tree, then please email the backport, including the original git commit
>> id to <stable@vger.kernel.org>.
>>
>> thanks,
>>
>> greg k-h
>>
>> ------------------ original commit in Linus's tree ------------------
>>
>>From b8fdd090376a7a46d17db316638fe54b965c2fb0 Mon Sep 17 00:00:00 2001
>> From: Bob Liu <bob.liu@oracle.com>
>> Date: Tue, 24 Mar 2020 21:22:45 +0800
>> Subject: [PATCH] dm zoned: remove duplicate nr_rnd_zones increase in
>> dmz_init_zone()
>>
>> zmd->nr_rnd_zones was increased twice by mistake. The other place it
>> is increased in dmz_init_zone() is the only one needed:
>>
>> 1131 zmd->nr_useable_zones++;
>> 1132 if (dmz_is_rnd(zone)) {
>> 1133 zmd->nr_rnd_zones++;
>> ^^^
>> Fixes: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Bob Liu <bob.liu@oracle.com>
>> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
>> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
>>
>> diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c
>> index 516c7b671d25..369de15c4e80 100644
>> --- a/drivers/md/dm-zoned-metadata.c
>> +++ b/drivers/md/dm-zoned-metadata.c
>> @@ -1109,7 +1109,6 @@ static int dmz_init_zone(struct blk_zone *blkz, unsigned int idx, void *data)
>> switch (blkz->type) {
>> case BLK_ZONE_TYPE_CONVENTIONAL:
>> set_bit(DMZ_RND, &zone->flags);
>> - zmd->nr_rnd_zones++;
>> break;
>> case BLK_ZONE_TYPE_SEQWRITE_REQ:
>> case BLK_ZONE_TYPE_SEQWRITE_PREF:
>
> The code on older kernels was using is/else construct instead of a
> switch. I've adjusted the patch and queued it up.
>
I was about to do that. You saved me time :)
Thanks !
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-16 1:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-15 11:02 FAILED: patch "[PATCH] dm zoned: remove duplicate nr_rnd_zones increase in" failed to apply to 5.4-stable tree gregkh
2020-04-16 0:51 ` Sasha Levin
2020-04-16 1:18 ` Damien Le Moal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).