All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Damien Le Moal <Damien.LeMoal@wdc.com>,
	Mike Snitzer <snitzer@redhat.com>
Cc: Bob Liu <bob.liu@oracle.com>,
	"dm-devel@redhat.com" <dm-devel@redhat.com>
Subject: Re: [PATCH 1/4] dm-zoned: store zone id within the zone structure
Date: Tue, 31 Mar 2020 10:54:49 +0200	[thread overview]
Message-ID: <2ac051c7-b6af-9517-6036-0f074ada3e59@suse.de> (raw)
In-Reply-To: <CO2PR04MB2343EA1C30F6ACC57B36F170E7C80@CO2PR04MB2343.namprd04.prod.outlook.com>

On 3/31/20 2:57 AM, Damien Le Moal wrote:
> On 2020/03/27 16:15, Hannes Reinecke wrote:
>> Instead of calculating the zone index by the offset within the
>> zone array store the index within the structure itself.
>>
>> Signed-off-by: Hannes Reinecke <hare@suse.de>
>> ---
>>   drivers/md/dm-zoned-metadata.c | 3 ++-
>>   drivers/md/dm-zoned.h          | 3 +++
>>   2 files changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c
>> index c8787560fa9f..afce594067fb 100644
>> --- a/drivers/md/dm-zoned-metadata.c
>> +++ b/drivers/md/dm-zoned-metadata.c
>> @@ -189,7 +189,7 @@ struct dmz_metadata {
>>    */
>>   unsigned int dmz_id(struct dmz_metadata *zmd, struct dm_zone *zone)
>>   {
>> -	return ((unsigned int)(zone - zmd->zones));
>> +	return zone->id;
>>   }
>>   
>>   sector_t dmz_start_sect(struct dmz_metadata *zmd, struct dm_zone *zone)
>> @@ -1119,6 +1119,7 @@ static int dmz_init_zone(struct blk_zone *blkz, unsigned int idx, void *data)
>>   
>>   	INIT_LIST_HEAD(&zone->link);
>>   	atomic_set(&zone->refcount, 0);
>> +	zone->id = idx;
> 
> See my comment on patch 4. Allowing partial bdev mapping changes the meaning of
> this ID: for a partial mapping, this is not equal to the zone number anymore. So
> we should document that (in the struct declaration), and may be merge this patch
> with patch 4 since they are related so closely ?
> 
See my reply to patch 4. I do not allow for partial mapping, nor was it 
ever the intention to do so.
The zone numbering will not change.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke            Teamlead Storage & Networking
hare@suse.de                               +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

  reply	other threads:[~2020-03-31  8:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-27  7:14 [PATCH RFC 0/4] dm-zoned: Metadata V2 Hannes Reinecke
2020-03-27  7:14 ` [PATCH 1/4] dm-zoned: store zone id within the zone structure Hannes Reinecke
2020-03-31  0:57   ` Damien Le Moal
2020-03-31  8:54     ` Hannes Reinecke [this message]
2020-03-27  7:14 ` [PATCH 2/4] dm-zoned: use array for superblock zones Hannes Reinecke
2020-03-31  0:51   ` Damien Le Moal
2020-03-31  9:10   ` Bob Liu
2020-03-27  7:14 ` [PATCH 3/4] dm-zoned: V2 metadata handling Hannes Reinecke
2020-03-31  0:54   ` Damien Le Moal
2020-03-31  9:11   ` Bob Liu
2020-04-02 14:53     ` John Dorminy
2020-04-02 15:09       ` Hannes Reinecke
2020-04-02 15:52         ` John Dorminy
2020-04-02 20:01           ` John Dorminy
2020-04-03  5:47             ` Damien Le Moal
2020-03-27  7:14 ` [PATCH 4/4] dm-zoned: allow for device size smaller than the capacity Hannes Reinecke
2020-03-31  0:49   ` Damien Le Moal
2020-03-31  8:53     ` Hannes Reinecke
2020-04-02  2:45       ` Damien Le Moal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ac051c7-b6af-9517-6036-0f074ada3e59@suse.de \
    --to=hare@suse.de \
    --cc=Damien.LeMoal@wdc.com \
    --cc=bob.liu@oracle.com \
    --cc=dm-devel@redhat.com \
    --cc=snitzer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.