From: Lou Langholtz <ldl@aros.net>
To: Christoph Hellwig <hch@infradead.org>
Cc: Andrew Morton <akpm@digeo.com>,
linux-kernel@vger.kernel.org, pavel@ucw.cz
Subject: Re: [RFC][PATCH] nbd driver for 2.5+: fix locking issues with ioctl UI
Date: Wed, 25 Jun 2003 11:38:43 -0600 [thread overview]
Message-ID: <3EF9DE23.2080806@aros.net> (raw)
In-Reply-To: <20030625165513.A20328@infradead.org>
Christoph Hellwig wrote:
>On Wed, Jun 25, 2003 at 09:36:50AM -0600, Lou Langholtz wrote:
>
>
>>I have also attached a patch to Pavel's nbd-2.0 release nbd tools that
>>updates the nbd-client to work with linux 2.5 as well as 2.5.74
>>(assuming the aforementioned patch 6.1 made it into 2.5.74). Handling is
>>switched at compile time however and uses <linux/version.h> to do the
>>switching. This will have problems of course if the builder doesn't pay
>>close attention to where there header file are coming from or tries to
>>run the same binary on a different kernel release. Etc.
>>
>>
>
>That's broken. You must make sure that a binary works with different
>kernels or at least make it fail gracefully. Using <linux/version.h>
>from userspace is absolutely not acceptable, just don't use kernel headers
>at all but a local copy of <linux/nbd.h>.
>
>
Yes. To be fair though, the binary (and the driver too) was broken on
linux 2.5 kernels long before I even proposed any changes to the nbd
driver. I'm trying to fix that. But it's a puzzle that has to have
pieces moved out of the way first. With constraints like making one
patch per fundemental change, it's more of a challenge trying to keep
things in sync with user space. I'd like to see binary (runtime)
compatibility too, but it's a bigger step to implement that. In the
meantime, the hack/patch I submitted to nbd-client seems like a step
forward. At least it works its way around several of the
incompatibilities and lets people find out what other problem may lie
ahead. I just found another problem for example with the disconnect
function in nbd-client that will need to be fixed in order to be able to
unload the module. A future step will be to change the compile time
switching to a runtime switch, but I'm not sold on any one way to
implement this yet. If you have something in mind for this, let me know.
For example, should the ioctls be used to somehow notify the user
process of the differing implementation. Like returning EINVAL for
NBD_SET_SOCK. That'd tell nbd-tool that the nbd driver thinks something
about the ioctl was invalid but not what. I wanted to return EDEPRECATED
instead but I haven't found that errno yet. I could overload an errno
but that seems ugly too. Or the driver could have a NBD_GET_VERSION
ioctl. Is there precedence for that? I haven't come accross it yet.
How would you propose these issues be solved? Keep in touch!! Thanks!!
next prev parent reply other threads:[~2003-06-25 17:24 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-25 6:51 [RFC][PATCH] nbd driver for 2.5+: fix locking issues with ioctl UI Lou Langholtz
2003-06-25 7:19 ` Andrew Morton
2003-06-25 14:24 ` Lou Langholtz
2003-06-25 15:36 ` Lou Langholtz
2003-06-25 15:55 ` Christoph Hellwig
2003-06-25 17:38 ` Lou Langholtz [this message]
2003-06-25 17:44 ` Christoph Hellwig
2003-06-25 18:16 ` Lou Langholtz
2003-06-25 18:19 ` Christoph Hellwig
2003-06-25 17:58 ` Anyone for NBD maintainer [was Re: [RFC][PATCH] nbd driver for 2.5+: fix locking issues with ioctl UI] Pavel Machek
2003-06-25 18:21 ` Lou Langholtz
2003-06-25 18:30 ` Pavel Machek
2003-06-25 21:35 ` Lou Langholtz
[not found] ` <Pine.LNX.4.10.10306251645580.11076-100000@clements.sc.steeleye.com>
2003-06-25 21:09 ` NBD maintainer change [was Re: Anyone for NBD maintainer] Pavel Machek
2003-06-25 17:48 ` [RFC][PATCH] nbd driver for 2.5+: fix locking issues with ioctl UI Paul Clements
2003-06-25 17:56 ` viro
2003-06-25 18:57 ` Lou Langholtz
2003-06-25 19:41 ` Lou Langholtz
2003-06-25 20:00 ` Paul Clements
2003-06-25 22:17 ` Lou Langholtz
2003-06-28 17:13 ` Paul Clements
2003-06-30 16:10 ` Lou Langholtz
2003-06-28 17:20 ` [PATCH] nbd: maintain compatibility with existing nbd tools Paul Clements
2003-06-29 18:42 ` Pavel Machek
2003-06-29 21:04 ` [PATCH 2.5.73] " Paul Clements
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=3EF9DE23.2080806@aros.net \
--to=ldl@aros.net \
--cc=akpm@digeo.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.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