lkml.org 
[lkml]   [2002]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PATCH - change to blkdev->queue calling triggers BUG in md.c

On Mon, 2 Sep 2002, Linus Torvalds wrote:
>
> However, that has nothing to do with whether it is in user space or kernel
> space. In many ways it is _easier_ to do on demand in kernel space: when
> somebody opens /dev/sda1 and it isn't partitioned yet, you know it needs
> to be.

Note that this actually allows you to do your own user-space partitioning
if you want to - simply by making sure that you do your partitioning
_before_ somebody tries to open a partition on the device.

And if you look at how fs/block_dev.c looks right now, you'll notice that
we already handle the "main device" vs "sub-partition" cases differently,
so it should be fairly straightforward to eventually do the partitioning
on demand.

We're not there yet, no. But doing it in the open() path of
fs/block_dev.c sure looks like it's the easiest way to maintain sanity wrt
partitioning, _and_ maintain 100% backwards compatibility.

[ Well, the "100% backwards compatibility" is not strictly true. Doing
partition handling on demand will mean that things like /proc/partitions
will obviously also end up being populated on demand, which may break
various sysadmin tools. But at least then it's fairly well localized,
and it's reasonably easy to grep for /proc/partitions in tools to see if
they may care ]

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.047 / U:2.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site