All of lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: Hannes Reinecke <hare@suse.de>, Mike Snitzer <snitzer@redhat.com>
Cc: Bob Liu <bob.liu@oracle.com>,
	"dm-devel@redhat.com" <dm-devel@redhat.com>
Subject: Re: [PATCH 15/15] dm-zoned: metadata version 2
Date: Mon, 11 May 2020 08:51:49 +0000	[thread overview]
Message-ID: <BY5PR04MB6900D34837D615DB2C1EB80FE7A10@BY5PR04MB6900.namprd04.prod.outlook.com> (raw)
In-Reply-To: 0601428c-8c71-06a9-07b9-d7b1b6331c70@suse.de

On 2020/05/11 17:46, Hannes Reinecke wrote:
> On 5/11/20 10:36 AM, Damien Le Moal wrote:
>> On 2020/05/11 17:24, Hannes Reinecke wrote:
>>> Implement handling for metadata version 2. The new metadata adds
>>> a label and UUID for the device mapper device, and additional UUID
>>> for the underlying block devices.
>>> It also allows for an additional regular drive to be used for
>>> emulating random access zones. The emulated zones will be placed
>>> logically in front of the zones from the zoned block device, causing
>>> the superblocks and metadata to be stored on that device.
>>> The first zone of the original zoned device will be used to hold
>>> another, tertiary copy of the metadata; this copy carries a
>>> generation number of 0 and is never updated; it's just used
>>> for identification.
>>>
>>> Signed-off-by: Hannes Reinecke <hare@suse.de>
>>> Reviewed-by: Bob Liu <bob.liu@oracle.com>
>>> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
>>
>> Forgot to read through the documentation update. A couple of comments added below.
>>
>>> ---
>>>   .../admin-guide/device-mapper/dm-zoned.rst         |  34 ++-
>>>   drivers/md/dm-zoned-metadata.c                     | 310 +++++++++++++++++----
>>>   drivers/md/dm-zoned-target.c                       | 185 ++++++++----
>>>   drivers/md/dm-zoned.h                              |   7 +-
>>>   4 files changed, 427 insertions(+), 109 deletions(-)
>>>
>>> diff --git a/Documentation/admin-guide/device-mapper/dm-zoned.rst b/Documentation/admin-guide/device-mapper/dm-zoned.rst
>>> index 7547ce635161..553752ea2521 100644
>>> --- a/Documentation/admin-guide/device-mapper/dm-zoned.rst
>>> +++ b/Documentation/admin-guide/device-mapper/dm-zoned.rst
>>> @@ -37,9 +37,13 @@ Algorithm
>>>   dm-zoned implements an on-disk buffering scheme to handle non-sequential
>>>   write accesses to the sequential zones of a zoned block device.
>>>   Conventional zones are used for caching as well as for storing internal
>>> -metadata.
>>> +metadata. It can also use a regular block device together with the zoned
>>> +block device; in that case the regular block device will be split logically
>>> +in zones with the same size as the zoned block device. These zones will be
>>> +placed in front of the zones from the zoned block device and will be handled
>>> +just like conventional zones.
>>>   
>>> -The zones of the device are separated into 2 types:
>>> +The zones of the device(s) are separated into 2 types:
>>>   
>>>   1) Metadata zones: these are conventional zones used to store metadata.
>>>   Metadata zones are not reported as useable capacity to the user.
>>> @@ -127,6 +131,13 @@ resumed. Flushing metadata thus only temporarily delays write and
>>>   discard requests. Read requests can be processed concurrently while
>>>   metadata flush is being executed.
>>>   
>>> +If a regular device is used in conjunction with the zoned block device,
>>> +a third set of metadata (without the zone bitmaps) is written to the
>>> +start of the zoned block device. This metadata has a generation counter of
>>> +'0' and will never be updated during normal operation; it just serves for
>>> +identification purposes. The first and second copy of the metadata
>>> +are located at the start of the regular block device.
>>> +
>>>   Usage
>>>   =====
>>>   
>>> @@ -138,12 +149,21 @@ Ex::
>>>   
>>>   	dmzadm --format /dev/sdxx
>>>   
>>> -For a formatted device, the target can be created normally with the
>>> -dmsetup utility. The only parameter that dm-zoned requires is the
>>> -underlying zoned block device name. Ex::
>>>   
>>> -	echo "0 `blockdev --getsize ${dev}` zoned ${dev}" | \
>>> -	dmsetup create dmz-`basename ${dev}`
>>> +If two drives are to be used, both devices must be specified, with the
>>> +regular block device as the first device.
>>
>> Actually, the zoned block device must be first. Otherwise dmzadm complains. We
>> can change that, or change the doc. Which do you prefer ? No strong opinion here.
>>
> Nope, not any more. Fixed it in my local repo (which I haven't pushed, 
> sorry).
> 
> But after the last discussion we had I thought it better and more 
> consistent to have the regular device first, just like the device-mapper 
> interface.

Works for me !

> 
>>> +
>>> +Ex::
>>> +
>>> +	dmzadm --format /dev/sdxx /dev/sdyy
>>> +
>>> +
>>> +Fomatted device(s) can be started with the dmzadm utility, too.:
>>> +
>>> +Ex::
>>> +
>>> +	dmzadm --start /dev/sdxx /dev/sdyy
>>
>> And same here, the zoned device must come first. I added a patch that internally
>> reverse that order for the dm start operation so that the regular device is
>> specified first.
>>
> See above. I've fixed up dmzadm for this.
> 
> I just hadn't pushed the patch as I wanted to get the kernel bits 
> settled. But now that we have I'll be pushing the dm-zoned-tools updates.

Please send changes on top of the "staging" branch. Your first batch of changes
is already merged in that branch.

> 
> Cheers,
> 
> Hannes
> 


-- 
Damien Le Moal
Western Digital Research

  reply	other threads:[~2020-05-11  8:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11  8:24 [PATCHv6 00/14] dm-zoned: metadata version 2 Hannes Reinecke
2020-05-11  8:24 ` [PATCH 01/15] dm-zoned: add 'status' callback Hannes Reinecke
2020-05-11  8:24 ` [PATCH 02/15] dm-zoned: add 'message' callback Hannes Reinecke
2020-05-11  8:24 ` [PATCH 03/15] dm-zoned: store zone id within the zone structure and kill dmz_id() Hannes Reinecke
2020-05-11  8:24 ` [PATCH 04/15] dm-zoned: use array for superblock zones Hannes Reinecke
2020-05-11  8:24 ` [PATCH 05/15] dm-zoned: store device in struct dmz_sb Hannes Reinecke
2020-05-11  8:24 ` [PATCH 06/15] dm-zoned: move fields from struct dmz_dev to dmz_metadata Hannes Reinecke
2020-05-11  8:24 ` [PATCH 07/15] dm-zoned: introduce dmz_metadata_label() to format device name Hannes Reinecke
2020-05-11  8:24 ` [PATCH 08/15] dm-zoned: Introduce dmz_dev_is_dying() and dmz_check_dev() Hannes Reinecke
2020-05-11  8:24 ` [PATCH 09/15] dm-zoned: remove 'dev' argument from reclaim Hannes Reinecke
2020-05-11  8:24 ` [PATCH 10/15] dm-zoned: replace 'target' pointer in the bio context Hannes Reinecke
2020-05-11  8:24 ` [PATCH 11/15] dm-zoned: use dmz_zone_to_dev() when handling metadata I/O Hannes Reinecke
2020-05-11  8:24 ` [PATCH 12/15] dm-zoned: add metadata logging functions Hannes Reinecke
2020-05-11  8:24 ` [PATCH 13/15] dm-zoned: Reduce logging output on startup Hannes Reinecke
2020-05-11  8:24 ` [PATCH 14/15] dm-zoned: ignore metadata zone in dmz_alloc_zone() Hannes Reinecke
2020-05-11  8:24 ` [PATCH 15/15] dm-zoned: metadata version 2 Hannes Reinecke
2020-05-11  8:36   ` Damien Le Moal
2020-05-11  8:46     ` Hannes Reinecke
2020-05-11  8:51       ` Damien Le Moal [this message]
2020-05-11  9:18         ` Hannes Reinecke
2020-05-11  9:20           ` 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=BY5PR04MB6900D34837D615DB2C1EB80FE7A10@BY5PR04MB6900.namprd04.prod.outlook.com \
    --to=damien.lemoal@wdc.com \
    --cc=bob.liu@oracle.com \
    --cc=dm-devel@redhat.com \
    --cc=hare@suse.de \
    --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.