Re: [RFC][PATCH] nbd driver for 2.5+: fix locking issues with ioctl UI

Christoph Hellwig (hch@infradead.org)
Wed, 25 Jun 2003 19:19:49 +0100


On Wed, Jun 25, 2003 at 12:16:10PM -0600, Lou Langholtz wrote:
> >Hey, I didn't say changing the interface is wrong. But if possible
> >do it in a way that the new userspace can still support the old kernel
> >driver.
> >
> Agreed! Will do, but how???

if (detected_new_driver) {
new_code();
} else {
old_code();
}

in the userland app. if structures change in an incompatible way
you need _v1 and _v2 versions of them of course.

And what to use for detected_new_driver? Probably the new ABI version
ioctl..

> Cool! I'll take a look at these. Is this the prefered way then? There's
> probably a lot of need for this generally speaking.

Yeah. And please do like device-mapper with major and minor versions.
major as in completly incompatible and minor as in support old protocol
but has new featues in addition.

> Thought about using
> /proc for this too.

Bad idea :)

> And then sysfs is gaining favor so maybe in there?

Doesn't sound like a fit either. Maybe you could do a small own fs
to control nbd, but I'm not familar enough with the actual API to comment
on this more.

-
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/