Re: [Nbd] [ANNOUNCE] Portable NBD server
- To: Wouter Verhelst <wouter@...3...>, Pavel Machek <pavel@...28...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] [ANNOUNCE] Portable NBD server
- From: Andy Isaacson <adi@...24...>
- Date: Sat, 17 Jul 2004 15:06:13 -0500
- Message-id: <20040717200613.GB2797@...24...>
- In-reply-to: <20040715191654.GA6980@...29...> <1089762479.3236.7.camel@...21...>
- References: <20040713174540.GA727@...24...> <20040715191654.GA6980@...29...> <20040713174540.GA727@...24...> <1089762479.3236.7.camel@...21...>
On Wed, Jul 14, 2004 at 01:47:59AM +0200, Wouter Verhelst wrote:
> Op di 13-07-2004, om 19:45 schreef Andy Isaacson:
> > The NBD server in nbd-2.7.1 from nbd.sourceforge.net doesn't compile on
> > non-Linux hosts,
>
> Actually, it does; it compiles and runs on (at least) FreeBSD and The
> Hurd. If it doesn't compile, I'd be happy to learn about it, and will
> (most likely) incorporate any patches that might be relevant; the
> intention, in any case, is for it to compile on anything resembling GCC
> and some C library (although I'm quite aware that it probably doesn't
> reach that goal at the moment, mostly since I didn't test on anything
> else than the above two platforms, and Linux).
Well, how do you compile it? Apparently you have to go get nbd.h out of
a Linux kernel tree, and have an environment that defines _IO()...
I have managed now, but originally I was discouraged because I was
misled by my quick reading of nbd.h.
On Thu, Jul 15, 2004 at 09:16:54PM +0200, Pavel Machek wrote:
> > The NBD server in nbd-2.7.1 from nbd.sourceforge.net doesn't compile on
> > non-Linux hosts, even though the server doesn't do anything inherently
> > nonportable. So I wrote a new one that should work fine on any POSIX
> > host with 'long long'.
> >
> > I've successfully used it to recover log data on a dirty ext3 filesystem
> > that ended up in an OpenBSD box.
> >
> > I hope this proves useful to someone.
>
> Well, you should have fixed the bugs and submit a patch, not
> start your own branch...
I agree, if the only reason I were doing this were to serve NBD from
non-Linux hosts, then writing a new server would be dumb. However:
1. I'm planning to go a radically different direction with mine, so it's
unlikely the patches would be (or should be!) accepted. And the patches
would approximately match the new code in complexity.
2. Experience. I wanted to see what a different solution would look
like.
-andy
Reply to: