From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753336AbdEDNUX (ORCPT ); Thu, 4 May 2017 09:20:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35288 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751391AbdEDNUT (ORCPT ); Thu, 4 May 2017 09:20:19 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CDFFE3DBC0 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=agk@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com CDFFE3DBC0 Date: Thu, 4 May 2017 14:20:07 +0100 From: Alasdair G Kergon To: Enric Balletbo Serra Cc: Kees Cook , Will Drewry , Guenter Roeck , Mike Snitzer , "linux-doc@vger.kernel.org" , David Zeuthen , LKML , linux-raid@vger.kernel.org, dm-devel@redhat.com, Enric Balletbo i Serra , Shaohua Li , Alasdair Kergon Subject: Re: [dm-devel] [PATCH v6 0/3] dm: boot a mapped device without an initramfs Message-ID: <20170504132007.GG4943@agk-dp.fab.redhat.com> Mail-Followup-To: Enric Balletbo Serra , Kees Cook , Will Drewry , Guenter Roeck , Mike Snitzer , "linux-doc@vger.kernel.org" , David Zeuthen , LKML , linux-raid@vger.kernel.org, dm-devel@redhat.com, Enric Balletbo i Serra , Shaohua Li , Alasdair Kergon References: <20170418164240.18079-1-enric.balletbo@collabora.com> <20170504121452.GF4943@agk-dp.fab.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170504121452.GF4943@agk-dp.fab.redhat.com> Organization: Red Hat UK Ltd. Registered in England and Wales, number 03798903. Registered Office: Peninsular House, 30-36 Monument Street, 4th Floor, London, England, EC3R 8NB. User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 04 May 2017 13:20:18 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some more thoughts with your example, dmsetup might look like: # dmsetup create --bootformat "lroot:uuid,rw,0 2097152 linear 8:2 0, \ 2097152 2097152 linear 8:3 0, 4194304 2097152 linear 8:4 0" - also supporting creating multiple devices if the semi-colon is used - colon to separate name from uuid, like we already do major:minor - colon to separate other flags from rw if we need them in future - splitting first on a unescaped semi-colons, then on the first two unescaped commas, and then on unescaped commas and then unescaped spaces within the table - backslash escapes the following character so it is never a treated as a separator - lroot\:uuid\;\\\ \"\, would be a device with no uuid and the name lroot:uuid;\ ", (on a non-udev system without name mangling) # dmsetup ls --bootformat lroot dm="lroot:uuid,rw,0 2097152 linear 8:2 0, 2097152 2097152 \ linear 8:3 0, 4194304 2097152 linear 8:4 0" # dmsetup ls --bootformat (all devices on one output line) While the code also supports devices in the /dev/sda2 format for convenience, please use the preferred 8:2 format in any implementation and documented examples (to avoid the unnecessary dependency on /dev and its dependencies). Or with some alternative name for the option --boot[format|param] --short[format] --kernelparam --condensed other suggestions? dmsetup create --condensed dmsetup ls --condensed Alasdair