All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alan D. Brunelle" <Alan.Brunelle@hp.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	linux-kernel@vger.kernel.org, lvm-devel@redhat.com,
	Tejun Heo <tj@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Alasdair G Kergon <agk@redhat.com>
Subject: Re: Re: 2.6.27-rc5-mmotm0829 - lvm issues at boot, possible disk_devt() related?
Date: Tue, 02 Sep 2008 08:16:01 -0400	[thread overview]
Message-ID: <48BD2E81.2030406@hp.com> (raw)
In-Reply-To: <20080901101543.GL20055@kernel.dk>

[-- Attachment #1: Type: text/plain, Size: 1344 bytes --]

Jens Axboe wrote:
> On Mon, Sep 01 2008, Alasdair G Kergon wrote:
>> On Mon, Sep 01, 2008 at 05:15:58AM -0400, Valdis.Kletnieks@vt.edu wrote:
>>> On Mon, 01 Sep 2008 09:58:40 +0200, Tejun Heo said:
>>>> Yeah, I made a mistake converting two of them and devt lookup fails when
>>>> the disk is zero sized.  Bartlomiej debugged the problem and posted a
>>>> patch and I followed up with an updated patch.  It should be fine in the
>>>> next round.
>>>>   http://article.gmane.org/gmane.linux.kernel.next/2663
>>>>   http://article.gmane.org/gmane.linux.kernel.next/2676
>>>> If you're seeing other problems, please let me know.
>>> Confirming - 2.6.27-rc5-mmotm0829 plus the merge of the 2 above patches
>>> does find the LVM volumes and come up.  Thanks for the clue.. :)
>> I expect we'll need some patches to userspace lvm2 to support these extended
>> device numbers properly too...
>>
>> Alasdair (back from holiday)
> 
> They'll be defaulting to off from now on, so it should not be a big
> worry. But Alan Brunelle did find that the "10-character limit
> in dm/lib/libdm-deptree is too small".
> 

Tejun pointed out:

"dev_t is 32bits and MINORBITS is 20.  So, major 12 bits, minor 20
bits, so 4 characters for major, 7 characters for minor."

That would mean: 4+':'+7+'\0' = 13 characters at a minimum, so attached
patch seems to work...

[-- Attachment #2: 0001-Set-major-minor-buffers-to-13-character-to-hold-larg.patch --]
[-- Type: text/x-diff, Size: 968 bytes --]

[PATCH] Set major,minor buffers to 13 character to hold largest values

Need 4 for major, 7 for minor, 1 for the separator plus 1 for the
terminator.

Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
---
 lib/libdm-deptree.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/libdm-deptree.c b/lib/libdm-deptree.c
index c73ed50..a437311 100644
--- a/lib/libdm-deptree.c
+++ b/lib/libdm-deptree.c
@@ -1243,7 +1243,7 @@ static int _emit_areas_line(struct dm_task *dmt __attribute((unused)),
 			    size_t paramsize, int *pos)
 {
 	struct seg_area *area;
-	char devbuf[10];
+	char devbuf[13];
 	int tw;
 	const char *prefix = "";
 
@@ -1270,7 +1270,7 @@ static int _emit_segment_line(struct dm_task *dmt, struct load_segment *seg, uin
         int pos = 0;
 	int tw;
         int r;
-	char originbuf[10], cowbuf[10], logbuf[10];
+	char originbuf[13], cowbuf[13], logbuf[13];
 	const char *logtype;
 
 	switch(seg->type) {
-- 
1.5.4.3


[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



WARNING: multiple messages have this Message-ID (diff)
From: "Alan D. Brunelle" <Alan.Brunelle@hp.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: Alasdair G Kergon <agk@redhat.com>,
	Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	linux-kernel@vger.kernel.org, lvm-devel@redhat.com,
	Tejun Heo <tj@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [dm-devel] Re: 2.6.27-rc5-mmotm0829 - lvm issues at boot,	possible disk_devt() related?
Date: Tue, 02 Sep 2008 08:16:01 -0400	[thread overview]
Message-ID: <48BD2E81.2030406@hp.com> (raw)
In-Reply-To: <20080901101543.GL20055@kernel.dk>

[-- Attachment #1: Type: text/plain, Size: 1344 bytes --]

Jens Axboe wrote:
> On Mon, Sep 01 2008, Alasdair G Kergon wrote:
>> On Mon, Sep 01, 2008 at 05:15:58AM -0400, Valdis.Kletnieks@vt.edu wrote:
>>> On Mon, 01 Sep 2008 09:58:40 +0200, Tejun Heo said:
>>>> Yeah, I made a mistake converting two of them and devt lookup fails when
>>>> the disk is zero sized.  Bartlomiej debugged the problem and posted a
>>>> patch and I followed up with an updated patch.  It should be fine in the
>>>> next round.
>>>>   http://article.gmane.org/gmane.linux.kernel.next/2663
>>>>   http://article.gmane.org/gmane.linux.kernel.next/2676
>>>> If you're seeing other problems, please let me know.
>>> Confirming - 2.6.27-rc5-mmotm0829 plus the merge of the 2 above patches
>>> does find the LVM volumes and come up.  Thanks for the clue.. :)
>> I expect we'll need some patches to userspace lvm2 to support these extended
>> device numbers properly too...
>>
>> Alasdair (back from holiday)
> 
> They'll be defaulting to off from now on, so it should not be a big
> worry. But Alan Brunelle did find that the "10-character limit
> in dm/lib/libdm-deptree is too small".
> 

Tejun pointed out:

"dev_t is 32bits and MINORBITS is 20.  So, major 12 bits, minor 20
bits, so 4 characters for major, 7 characters for minor."

That would mean: 4+':'+7+'\0' = 13 characters at a minimum, so attached
patch seems to work...

[-- Attachment #2: 0001-Set-major-minor-buffers-to-13-character-to-hold-larg.patch --]
[-- Type: text/x-diff, Size: 968 bytes --]

[PATCH] Set major,minor buffers to 13 character to hold largest values

Need 4 for major, 7 for minor, 1 for the separator plus 1 for the
terminator.

Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
---
 lib/libdm-deptree.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/libdm-deptree.c b/lib/libdm-deptree.c
index c73ed50..a437311 100644
--- a/lib/libdm-deptree.c
+++ b/lib/libdm-deptree.c
@@ -1243,7 +1243,7 @@ static int _emit_areas_line(struct dm_task *dmt __attribute((unused)),
 			    size_t paramsize, int *pos)
 {
 	struct seg_area *area;
-	char devbuf[10];
+	char devbuf[13];
 	int tw;
 	const char *prefix = "";
 
@@ -1270,7 +1270,7 @@ static int _emit_segment_line(struct dm_task *dmt, struct load_segment *seg, uin
         int pos = 0;
 	int tw;
         int r;
-	char originbuf[10], cowbuf[10], logbuf[10];
+	char originbuf[13], cowbuf[13], logbuf[13];
 	const char *logtype;
 
 	switch(seg->type) {
-- 
1.5.4.3


  reply	other threads:[~2008-09-02 12:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-01  3:36 2.6.27-rc5-mmotm0829 - lvm issues at boot, possible disk_devt() related? Valdis.Kletnieks
2008-09-01  3:36 ` Valdis.Kletnieks
2008-09-01  7:58 ` Tejun Heo
2008-09-01  9:15   ` Valdis.Kletnieks
2008-09-01  9:50     ` Jens Axboe
2008-09-01  9:56     ` Alasdair G Kergon
2008-09-01  9:56       ` [dm-devel] " Alasdair G Kergon
2008-09-01  9:56       ` Alasdair G Kergon
2008-09-01 10:15       ` Jens Axboe
2008-09-01 10:15         ` [dm-devel] " Jens Axboe
2008-09-01 10:15         ` Jens Axboe
2008-09-02 12:16         ` Alan D. Brunelle [this message]
2008-09-02 12:16           ` Alan D. Brunelle

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=48BD2E81.2030406@hp.com \
    --to=alan.brunelle@hp.com \
    --cc=agk@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bzolnier@gmail.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvm-devel@redhat.com \
    --cc=tj@kernel.org \
    /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.