From: Jeff Garzik <jgarzik@pobox.com>
To: Andi Kleen <ak@muc.de>
Cc: Joe Thornber <joe@fib011235813.fsnet.co.uk>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Device-mapper submission 6/7
Date: Thu, 17 Oct 2002 11:10:19 -0400 [thread overview]
Message-ID: <3DAED2DB.3030407@pobox.com> (raw)
In-Reply-To: m3fzv5pj23.fsf@averell.firstfloor.org
Andi Kleen wrote:
> Joe Thornber <joe@fib011235813.fsnet.co.uk> writes:
>
>
>>Is there anyone out there who is going to argue against using an fs
>>interface when I submit it ? Speak now or forever hold your peace !
>>
>>If dm now misses the feature freeze deadline due to this extra work,
>>is it going to be possible to still place it in 2.5 at a later date ?
>>(dm with an ioctl interface is better than no dm at all).
>
>
> How would the fs based interface work ?
>
> plan9 style echo 'rename foo bla' > /dmfs/command would seem ugly to me
> (just look at the horrible parser code for that in mtrr.c)
>
> doing it fully as fs objects (mv /dmfs/volume1 /dmfs/volume2 for rename)
> could likely get complicated and it's doubtful that VFS semantics completely
> map to DM volumes.
The simplest interface can be read(2) and write(2) to replace ioctl(2),
but still using a single control node [or whatever granularity currently
exists] I think you are over-complicating a simple issue.
> Unless you have a clear and simple way to handle these issues I would
> suggest to stay with simple ioctls. They look clean enough.
Please go back and read what Linus and Al Viro have repeatedly posted
about ioctl(2)...
Overall, one should consider here
* device mapper has never been in the Linux kernel before, thus we have
a duty to make sure it is clean before it gets into the kernel
* ioctls appear "simple" only at first glance. they require more
maintenance in the long run due to the ioctl32 thunking layers, and are
often riddled with shortsighted 32-bit size limits that reduce their
utility on 64-bit platforms
* ioctls cannot be exported over NFS and similar interfaces
* ioctls are a way to add "do something totally different" functionality
to a file descriptor. IOW you read(2) and write(2) a file, and when you
have other tasks to do to this file, add an "escape hatch"? No, that's
the wrong way to go.
ioctls are analogous to procfs: they are simple, easy, and usually the
wrong thing to do.
Jeff
next prev parent reply other threads:[~2002-10-17 15:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-15 17:58 [PATCH] Device-mapper submission 6/7 Joe Thornber
2002-10-15 18:15 ` Jeff Garzik
2002-10-15 18:59 ` Greg KH
2002-10-15 21:44 ` Joe Thornber
2002-10-16 14:20 ` Jeff Garzik
2002-10-16 14:38 ` Anton Blanchard
2002-10-16 15:20 ` Jeff Garzik
2002-10-16 15:20 ` Joe Thornber
2002-10-16 15:59 ` Jeff Garzik
2002-10-17 8:05 ` Joe Thornber
2002-10-17 8:26 ` Andi Kleen
2002-10-17 8:50 ` Joe Thornber
2002-10-17 16:54 ` Jeff Garzik
2002-10-18 11:38 ` Jakob Oestergaard
2002-10-17 15:10 ` Jeff Garzik [this message]
2002-10-18 0:48 ` Andi Kleen
2002-10-17 0:46 ` Greg KH
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=3DAED2DB.3030407@pobox.com \
--to=jgarzik@pobox.com \
--cc=ak@muc.de \
--cc=joe@fib011235813.fsnet.co.uk \
--cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox