Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(644)

Issue 2020011: CHROMIUM: add boot-to-device mapper support. (Closed)

Created:
10 years, 7 months ago by Will Drewry
Modified:
9 years, 7 months ago
CC:
chromium-os-reviews_chromium.org, mbligh, Mandeep Singh Baines, Olof Johansson, vb
Base URL:
ssh://git@gitrw.chromium.org//kernel.git
Visibility:
Public.

Description

This is a wrap-up of three patches pending upstream approval. I'm bundling them because they are interdependent, and it'll be easier to drop it on rebase later. 1. dm: allow a dm-fs-style device to be shared via dm-ioctl Integrates feedback from Alisdair, Mike, and Kiyoshi. Two main changes occur here: - One function is added which allows for a programmatically created mapped device to be inserted into the dm-ioctl hash table. This binds the device to a name and, optional, uuid which is needed by udev and allows for userspace management of the mapped device. - dm_table_complete() was extended to handle all of the final functional changes required for the table to be operational once called. 2. init: boot to device-mapper targets without an initr* Add a dm= kernel parameter modeled after the md= parameter from do_mounts_md. It allows for device-mapper targets to be configured at boot time for use early in the boot process (as the root device or otherwise). It also replaces /dev/XXX calls with major:minor opportunistically. The format is dm="name uuid ro,table line 1,table line 2,...". The parser expects the comma to be safe to use as a newline substitute but, otherwise, uses the normal separator of space. Some attempt has been made to make it forgiving of additional spaces (using skip_spaces()). A mapped device created during boot will be assigned a minor of 0 and may be access via /dev/dm-0. An example dm-linear root with no uuid may look like: root=/dev/dm-0 dm="lroot none ro, 0 4096 linear /dev/ubdb 0, 4096 4096 linear /dv/ubdc 0" Once udev is started, /dev/dm-0 will become /dev/mapper/lroot. Older upstream threads: http://marc.info/?l=dm-devel&m=127429492521964&w=2 http://marc.info/?l=dm-devel&m=127429499422096&w=2 http://marc.info/?l=dm-devel&m=127429493922000&w=2 Latest upstream threads: https://patchwork.kernel.org/patch/104859/ https://patchwork.kernel.org/patch/104860/ https://patchwork.kernel.org/patch/104861/ Signed-off-by: Will Drewry <wad@chromium.org>;

Patch Set 1 #

Patch Set 2 : bring into sync with the pending upstream work #

Patch Set 3 : add skip_spaces directly until 2.6.33; alternately, I can backport the lib/string changes. #

Patch Set 4 : don't add +1 twice when grabbing the name #

Patch Set 5 : ro/rw change; name_to_dev_t dep #

Patch Set 6 : checkpatch.pl fixes #

Patch Set 7 : style fixes #

Patch Set 8 : fix the onyl #

Patch Set 9 : fix the onyl #

Unified diffs Side-by-side diffs Delta from patch set Stats (+580 lines, -35 lines) Patch
A Documentation/device-mapper/boot.txt View 2 3 4 1 chunk +42 lines, -0 lines 0 comments Download
M Documentation/kernel-parameters.txt View 2 chunks +4 lines, -0 lines 0 comments Download
M drivers/md/dm-ioctl.c View 2 3 4 5 3 chunks +39 lines, -34 lines 0 comments Download
M drivers/md/dm-table.c View 2 3 4 5 3 chunks +50 lines, -1 line 0 comments Download
M include/linux/device-mapper.h View 1 chunk +6 lines, -0 lines 0 comments Download
M init/Makefile View 1 chunk +1 line, -0 lines 0 comments Download
M init/do_mounts.h View 1 chunk +10 lines, -0 lines 0 comments Download
init/do_mounts.c View 1 chunk +1 line, -0 lines 0 comments Download
A init/do_mounts_dm.c View 1 2 3 4 5 6 7 1 chunk +427 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Will Drewry
10 years, 7 months ago (2010-05-12 19:48:03 UTC) #1
Olof Johansson
This looks like exactly the kind of patch that should go upstream first. :) I'm ...
10 years, 7 months ago (2010-05-12 20:49:47 UTC) #2
Will Drewry
On 2010/05/12 20:49:47, olofj wrote: > This looks like exactly the kind of patch that ...
10 years, 7 months ago (2010-05-12 21:03:03 UTC) #3
Olof Johansson
On 2010/05/12 21:03:03, Will Drewry wrote: > On 2010/05/12 20:49:47, olofj wrote: > > This ...
10 years, 7 months ago (2010-05-12 21:13:29 UTC) #4
Will Drewry
On 2010/05/12 21:13:29, olofj wrote: > On 2010/05/12 21:03:03, Will Drewry wrote: > > On ...
10 years, 7 months ago (2010-05-12 21:29:01 UTC) #5
Olof Johansson
On 2010/05/12 21:29:01, Will Drewry wrote: > On 2010/05/12 21:13:29, olofj wrote: > > On ...
10 years, 7 months ago (2010-05-12 21:34:37 UTC) #6
hughd
On Wed, May 12, 2010 at 2:34 PM, <olofj@chromium.org> wrote: > > LGTM, the others ...
10 years, 7 months ago (2010-05-12 23:31:24 UTC) #7
Will Drewry
On 2010/05/12 23:31:24, hughd wrote: > On Wed, May 12, 2010 at 2:34 PM, <mailto:olofj@chromium.org> ...
10 years, 7 months ago (2010-05-14 14:58:18 UTC) #8
hughd
On Fri, May 14, 2010 at 7:58 AM, <wad@chromium.org> wrote: > > Thanks! I just ...
10 years, 7 months ago (2010-05-14 19:54:01 UTC) #9
Will Drewry
On 2010/05/14 19:54:01, hughd wrote: > On Fri, May 14, 2010 at 7:58 AM, <mailto:wad@chromium.org> ...
10 years, 7 months ago (2010-05-19 19:33:16 UTC) #10
hughd
On 2010/05/19 19:33:16, Will Drewry wrote: > PTAL if you have the chance. > > ...
10 years, 7 months ago (2010-05-21 00:34:26 UTC) #11
Will Drewry
On 2010/05/21 00:34:26, hughd wrote: > On 2010/05/19 19:33:16, Will Drewry wrote: > > > ...
10 years, 6 months ago (2010-06-08 15:57:40 UTC) #12
Will Drewry
On 2010/06/08 15:57:40, Will Drewry wrote: > On 2010/05/21 00:34:26, hughd wrote: > > On ...
10 years, 6 months ago (2010-06-09 19:13:27 UTC) #13
hughd
On Wed, Jun 9, 2010 at 12:13 PM, <wad@chromium.org> wrote: >> PTAL - I'd love ...
10 years, 6 months ago (2010-06-09 22:09:04 UTC) #14
Will Drewry
On 2010/06/09 22:09:04, hughd wrote: > On Wed, Jun 9, 2010 at 12:13 PM, <mailto:wad@chromium.org> ...
10 years, 6 months ago (2010-06-09 22:27:14 UTC) #15
piman
BTW someone will need to move these patches over to the ARM kernel branches.
10 years, 6 months ago (2010-06-09 22:45:27 UTC) #16
Will Drewry
What's the best way to do that? On Wed, Jun 9, 2010 at 5:45 PM, ...
10 years, 6 months ago (2010-06-09 22:51:51 UTC) #17
piman
10 years, 6 months ago (2010-06-09 23:28:40 UTC) #18
On Wed, Jun 9, 2010 at 3:51 PM, Will Drewry <wad@chromium.org> wrote:

> What's the best way to do that?
>

We chatted on IRC, it doesn't break anything until the userland or the image
scripts depend on it, but In the mean time a bug was filed.


> On Wed, Jun 9, 2010 at 5:45 PM,  <piman@chromium.org> wrote:
> > BTW someone will need to move these patches over to the ARM kernel
> branches.
> >
> > http://codereview.chromium.org/2020011/show
> >
>

Powered by Google App Engine
This is Rietveld 408576698