From: Neil Brown <neilb@suse.de>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Chris Mason <chris.mason@oracle.com>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>,
"Bryn M. Reeves" <breeves@redhat.com>
Subject: Re: [PATCH][RFC] fast file mapping for loop
Date: Fri, 11 Jan 2008 10:01:18 +1100 [thread overview]
Message-ID: <18310.41918.555194.701639@notabene.brown> (raw)
In-Reply-To: message from Jens Axboe on Thursday January 10
On Thursday January 10, jens.axboe@oracle.com wrote:
> On Thu, Jan 10 2008, Chris Mason wrote:
> > On Thu, 10 Jan 2008 09:31:31 +0100
> > Jens Axboe <jens.axboe@oracle.com> wrote:
> >
> > > On Wed, Jan 09 2008, Alasdair G Kergon wrote:
> > > > Here's the latest version of dm-loop, for comparison.
> > > >
> > > > To try it out,
> > > > ln -s dmsetup dmlosetup
> > > > and supply similar basic parameters to losetup.
> > > > (using dmsetup version 1.02.11 or higher)
> > >
> > > Why oh why does dm always insist to reinvent everything? That's bad
> > > enough in itself, but on top of that most of the extra stuff ends up
> > > being essentially unmaintained.
> >
> > I don't quite get how the dm version is reinventing things. They use
>
> Things like raid, now file mapping functionality. I'm sure there are
> more examples, it's how dm was always developed probably originating
> back to when they developed mostly out of tree. And I think it's a bad
> idea, we don't want duplicate functionality. If something is wrong with
> loop, fix it, don't write dm-loop.
I'm with Jens here.
We currently have two interfaces that interesting block devices can be
written for: 'dm' and 'block'.
We really should aim to have just one. I would call it 'block' and
move anything really useful from dm into block.
As far as I can tell, the important things that 'dm' has that 'block'
doesn't have are:
- a standard ioctl interface for assembling and creating interesting
devices.
For 'block', everybody just rolls there own. e.g. md, loop, and
nbd all use totally different approaches for setup and tear down
etc.
- suspend/reconfigure/resume.
This is something that I would really like to see in 'block'. If
I had a filesystem mounted on /dev/sda1 and I wanted to make it a
raid1, it would be cool if I could
suspend /dev/sda1
build a raid1 from sda1 and something else
plug tha raid1 in as 'sda1'.
resume sda1
- Integrated 'linear' mapping.
This is the bit of 'dm' that I think of as yucky. If I read the
code correctly, every dm device is a linear array of a bunch of
targets. Each target can be a stripe-set(raid0) or a multipath or
a raid1 or a plain block device or whatever.
Having 'linear' at a different level to everything else seems a
bit ugly, but it isn't really a big deal.
I would really like to see every 'dm' target being just a regular
'block' device. Then a 'linear' block device could be used to
assemble dm targets into a dm device. Or the targets could be used
directly if the 'linear' function wasn't needed.
Each target/device could respond to both dm ioctls and 'adhoc'
ioctls. That is a bit ugly, but backwards compatibility always is,
but it isn't a big cost.
I think the way forward here is to put the important
suspend/reconfig/resume functionality into the block layer, then
work on making code work with multiple ioctl interfaces.
I *don't* think the way forward is to duplicate current block devices
as dm targets. This is duplication of effort (which I admit isn't
always a bad thing) and a maintenance headache (which is).
"Help, I'm having a problem with the loop driver"
"Which one, dm or regular, because if it is the 'dm' one you have to
ask over there ..."
It has already happened occasionally with raid1 and multipath - both
of which have pointless multiple implementations.
>
> > the dmsetup command that they use for everything else and provide a
> > small and fairly clean module for bio specific loop instead of piling
> > it onto loop.c....
I'm missing something here... "fairly clean module for bio specific
loop". Isn't that what 'loop.c' is meant to be?
NeilBrown
next prev parent reply other threads:[~2008-01-10 23:01 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-09 8:52 [PATCH][RFC] fast file mapping for loop Jens Axboe
2008-01-09 9:31 ` Christoph Hellwig
2008-01-09 9:43 ` Jens Axboe
2008-01-09 11:00 ` Chris Mason
2008-01-09 15:34 ` Andi Kleen
2008-01-10 8:43 ` Jens Axboe
2008-01-09 23:16 ` Alasdair G Kergon
2008-01-10 8:31 ` Jens Axboe
2008-01-10 8:42 ` Jens Axboe
2008-01-11 7:39 ` Mikulas Patocka
2008-01-11 7:58 ` Jens Axboe
2008-01-10 12:47 ` Chris Mason
2008-01-10 12:57 ` Jens Axboe
2008-01-10 23:01 ` Neil Brown [this message]
2008-01-11 14:21 ` Chris Mason
2008-01-10 1:42 ` Nick Piggin
2008-01-10 8:34 ` Jens Axboe
2008-01-10 8:37 ` Christoph Hellwig
2008-01-10 8:44 ` Jens Axboe
2008-01-10 8:54 ` Christoph Hellwig
2008-01-10 9:01 ` Jens Axboe
2008-01-10 12:53 ` Chris Mason
2008-01-10 13:03 ` Jens Axboe
2008-01-10 13:46 ` Chris Mason
2008-01-10 9:37 ` Peter Zijlstra
2008-01-10 9:49 ` Jens Axboe
2008-01-10 9:52 ` Peter Zijlstra
2008-01-10 10:02 ` Jens Axboe
2008-01-10 10:20 ` Peter Zijlstra
2008-01-11 1:25 ` Bill Davidsen
2008-01-11 18:17 ` Daniel Phillips
2008-01-11 18:23 ` Jens Axboe
2008-01-14 17:10 ` Chris Mason
2008-01-14 17:54 ` Jens Axboe
2008-01-15 9:25 ` Jens Axboe
2008-01-15 9:36 ` Jens Axboe
2008-01-15 10:07 ` Jens Axboe
2008-01-15 14:04 ` Chris Mason
[not found] <95637914@web.de>
2008-01-09 23:53 ` Alasdair G Kergon
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=18310.41918.555194.701639@notabene.brown \
--to=neilb@suse.de \
--cc=breeves@redhat.com \
--cc=chris.mason@oracle.com \
--cc=jens.axboe@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikulas@artax.karlin.mff.cuni.cz \
/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 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).