* Problem w/ CONFIG_DEBUG_BLOCK_EXT_DEVT
@ 2008-09-02 10:36 Alan D. Brunelle
2008-09-02 10:47 ` Tejun Heo
0 siblings, 1 reply; 7+ messages in thread
From: Alan D. Brunelle @ 2008-09-02 10:36 UTC (permalink / raw)
To: device-mapper development; +Cc: linux-kernel@vger.kernel.org, Jens Axboe, tj
I have found two problems in LVM2/DM w/ a potential new "experimental
feature" in 2.6.28: CONFIG_DEBUG_BLOCK_EXT_DEVT (this is from Jens
Axboe's origin/for-2.6.28 git branch)
"Conventionally, block device numbers are allocated from predetermined
contiguous area. However, extended block area may introduce
non-contiguous block device numbers. This option forces most block
device numbers to be allocated from the extended space and spreads them
to discover kernel or userland code paths which assume predetermined
contiguous device number allocation."
W/ LVM2 & DM there are (at least) two issues:
(1) Device major numbers for some reason are /not/ being entered
correctly into /proc/devices -- w/ CONFIG_DEBUG_BLOCK_EXT_DEVT=y I am
seeing some devices w/ major "259" (a SATA controller) but no entry in
/proc/devices. LVM2/DM will not find the entry in /proc/devices, and not
allow any device w/ that major to be used with LVM commands.
(2) Device minor numbers can be quite large, and the 10-character limits
in dm/lib/libdm-deptree.c are too small.
Alan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problem w/ CONFIG_DEBUG_BLOCK_EXT_DEVT
2008-09-02 10:36 Problem w/ CONFIG_DEBUG_BLOCK_EXT_DEVT Alan D. Brunelle
@ 2008-09-02 10:47 ` Tejun Heo
2008-09-02 10:55 ` Alan D. Brunelle
0 siblings, 1 reply; 7+ messages in thread
From: Tejun Heo @ 2008-09-02 10:47 UTC (permalink / raw)
To: Alan D. Brunelle
Cc: device-mapper development, linux-kernel@vger.kernel.org,
Jens Axboe
Hello,
Alan D. Brunelle wrote:
> I have found two problems in LVM2/DM w/ a potential new "experimental
> feature" in 2.6.28: CONFIG_DEBUG_BLOCK_EXT_DEVT (this is from Jens
> Axboe's origin/for-2.6.28 git branch)
It's a debug option and I don't expect it to be enabled in any
production kernel.
> "Conventionally, block device numbers are allocated from predetermined
> contiguous area. However, extended block area may introduce
> non-contiguous block device numbers. This option forces most block
> device numbers to be allocated from the extended space and spreads them
> to discover kernel or userland code paths which assume predetermined
> contiguous device number allocation."
>
> W/ LVM2 & DM there are (at least) two issues:
>
> (1) Device major numbers for some reason are /not/ being entered
> correctly into /proc/devices -- w/ CONFIG_DEBUG_BLOCK_EXT_DEVT=y I am
> seeing some devices w/ major "259" (a SATA controller) but no entry in
> /proc/devices. LVM2/DM will not find the entry in /proc/devices, and not
> allow any device w/ that major to be used with LVM commands.
Hmmm.. Adding a call to register_blkdev(), which will create the
corresponding entry in /proc/devices, isn't difficult at all but which
name would it use? It'll be mix of block devices (hd and sds
currently). If we introduce a new name there, say, ext-block, would
that work? BTW, is there any specific reason why LVM2/DM can't use
/sys/block/* ?
> (2) Device minor numbers can be quite large, and the 10-character limits
> in dm/lib/libdm-deptree.c are too small.
Would it be difficult to increase that?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problem w/ CONFIG_DEBUG_BLOCK_EXT_DEVT
2008-09-02 10:47 ` Tejun Heo
@ 2008-09-02 10:55 ` Alan D. Brunelle
2008-09-02 10:57 ` Jens Axboe
2008-09-02 11:06 ` Tejun Heo
0 siblings, 2 replies; 7+ messages in thread
From: Alan D. Brunelle @ 2008-09-02 10:55 UTC (permalink / raw)
To: Tejun Heo
Cc: device-mapper development, linux-kernel@vger.kernel.org,
Jens Axboe
Tejun Heo wrote:
> Hello,
>
> Alan D. Brunelle wrote:
>> I have found two problems in LVM2/DM w/ a potential new "experimental
>> feature" in 2.6.28: CONFIG_DEBUG_BLOCK_EXT_DEVT (this is from Jens
>> Axboe's origin/for-2.6.28 git branch)
>
> It's a debug option and I don't expect it to be enabled in any
> production kernel.
Then perhaps it should /not/ default to Y...
>
>> "Conventionally, block device numbers are allocated from predetermined
>> contiguous area. However, extended block area may introduce
>> non-contiguous block device numbers. This option forces most block
>> device numbers to be allocated from the extended space and spreads them
>> to discover kernel or userland code paths which assume predetermined
>> contiguous device number allocation."
>>
>> W/ LVM2 & DM there are (at least) two issues:
>>
>> (1) Device major numbers for some reason are /not/ being entered
>> correctly into /proc/devices -- w/ CONFIG_DEBUG_BLOCK_EXT_DEVT=y I am
>> seeing some devices w/ major "259" (a SATA controller) but no entry in
>> /proc/devices. LVM2/DM will not find the entry in /proc/devices, and not
>> allow any device w/ that major to be used with LVM commands.
>
> Hmmm.. Adding a call to register_blkdev(), which will create the
> corresponding entry in /proc/devices, isn't difficult at all but which
> name would it use? It'll be mix of block devices (hd and sds
> currently). If we introduce a new name there, say, ext-block, would
> that work? BTW, is there any specific reason why LVM2/DM can't use
> /sys/block/* ?
>
>> (2) Device minor numbers can be quite large, and the 10-character limits
>> in dm/lib/libdm-deptree.c are too small.
>
> Would it be difficult to increase that?
No, but knowing the upper bound would be helpful.
>
> Thanks.
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problem w/ CONFIG_DEBUG_BLOCK_EXT_DEVT
2008-09-02 10:55 ` Alan D. Brunelle
@ 2008-09-02 10:57 ` Jens Axboe
2008-09-02 11:06 ` Tejun Heo
1 sibling, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2008-09-02 10:57 UTC (permalink / raw)
To: Alan D. Brunelle
Cc: Tejun Heo, device-mapper development,
linux-kernel@vger.kernel.org
On Tue, Sep 02 2008, Alan D. Brunelle wrote:
> Tejun Heo wrote:
> > Hello,
> >
> > Alan D. Brunelle wrote:
> >> I have found two problems in LVM2/DM w/ a potential new "experimental
> >> feature" in 2.6.28: CONFIG_DEBUG_BLOCK_EXT_DEVT (this is from Jens
> >> Axboe's origin/for-2.6.28 git branch)
> >
> > It's a debug option and I don't expect it to be enabled in any
> > production kernel.
>
> Then perhaps it should /not/ default to Y...
It has already been changed to default to 'n'.
--
Jens Axboe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Problem w/ CONFIG_DEBUG_BLOCK_EXT_DEVT
2008-09-02 10:55 ` Alan D. Brunelle
2008-09-02 10:57 ` Jens Axboe
@ 2008-09-02 11:06 ` Tejun Heo
2008-09-02 12:20 ` [dm-devel] " Alasdair G Kergon
1 sibling, 1 reply; 7+ messages in thread
From: Tejun Heo @ 2008-09-02 11:06 UTC (permalink / raw)
To: Alan D. Brunelle
Cc: device-mapper development, linux-kernel@vger.kernel.org,
Jens Axboe
Alan D. Brunelle wrote:
>>> (2) Device minor numbers can be quite large, and the 10-character limits
>>> in dm/lib/libdm-deptree.c are too small.
>> Would it be difficult to increase that?
>
> No, but knowing the upper bound would be helpful.
Well, dev_t is 32bits and MINORBITS is 20. So, major 12 bits, minor 20
bits, so 4 characters for major, 7 characters for minor.
--
tejun
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dm-devel] Re: Problem w/ CONFIG_DEBUG_BLOCK_EXT_DEVT
2008-09-02 11:06 ` Tejun Heo
@ 2008-09-02 12:20 ` Alasdair G Kergon
2008-09-02 12:23 ` Tejun Heo
0 siblings, 1 reply; 7+ messages in thread
From: Alasdair G Kergon @ 2008-09-02 12:20 UTC (permalink / raw)
To: device-mapper development
Cc: Alan D. Brunelle, linux-kernel@vger.kernel.org, Jens Axboe
On Tue, Sep 02, 2008 at 01:06:24PM +0200, Tejun Heo wrote:
> Well, dev_t is 32bits and MINORBITS is 20. So, major 12 bits, minor 20
> bits, so 4 characters for major, 7 characters for minor.
Upstream libdevmapper CVS patched - will appear in next release (1.02.28).
Alasdair
--
agk@redhat.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dm-devel] Re: Problem w/ CONFIG_DEBUG_BLOCK_EXT_DEVT
2008-09-02 12:20 ` [dm-devel] " Alasdair G Kergon
@ 2008-09-02 12:23 ` Tejun Heo
0 siblings, 0 replies; 7+ messages in thread
From: Tejun Heo @ 2008-09-02 12:23 UTC (permalink / raw)
To: device-mapper development, Alan D. Brunelle,
linux-kernel@vger.kernel.org, Jens Axboe
Alasdair G Kergon wrote:
> On Tue, Sep 02, 2008 at 01:06:24PM +0200, Tejun Heo wrote:
>> Well, dev_t is 32bits and MINORBITS is 20. So, major 12 bits, minor 20
>> bits, so 4 characters for major, 7 characters for minor.
>
> Upstream libdevmapper CVS patched - will appear in next release (1.02.28).
Alright, thanks. What about the /proc/devices one? Would adding an
entry help? I'm kind of lost /proc/devices. It's now mostly
non-functional legacy stuff we've been carrying around. Is it
deprecated or do we intend to keep it around forever?
Ooh.. which also reminds me that I forgot to reserve the major number w/
lanana. Will do that.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-09-02 12:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-02 10:36 Problem w/ CONFIG_DEBUG_BLOCK_EXT_DEVT Alan D. Brunelle
2008-09-02 10:47 ` Tejun Heo
2008-09-02 10:55 ` Alan D. Brunelle
2008-09-02 10:57 ` Jens Axboe
2008-09-02 11:06 ` Tejun Heo
2008-09-02 12:20 ` [dm-devel] " Alasdair G Kergon
2008-09-02 12:23 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).