From owner-freebsd-hackers Thu Jan 30 6:24:31 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5EB9337B401 for ; Thu, 30 Jan 2003 06:24:30 -0800 (PST) Received: from critter.freebsd.dk (esplanaden.cybercity.dk [212.242.40.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id 887E243F3F for ; Thu, 30 Jan 2003 06:24:29 -0800 (PST) (envelope-from phk@freebsd.org) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.6/8.12.6) with ESMTP id h0UEOAj1018288; Thu, 30 Jan 2003 15:24:28 +0100 (CET) (envelope-from phk@freebsd.org) To: David Gilbert Cc: "Matthew N. Dodd" , freebsd-hackers@freebsd.org Subject: Re: Network block device. From: phk@freebsd.org In-Reply-To: Your message of "Thu, 30 Jan 2003 06:48:14 EST." <15929.4350.816918.384371@canoe.velocet.net> Date: Thu, 30 Jan 2003 15:24:10 +0100 Message-ID: <18287.1043936650@critter.freebsd.dk> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <15929.4350.816918.384371@canoe.velocet.net>, David Gilbert writes: >>>>>> "phk" == phk writes: > >phk> NBD wouldn't be hard to implement on FreeBSD, the easiest way >phk> would be to write two GEOM modules to do it: a client and a >phk> server. > >phk> No, I don't have time to do that right now, but I will happily >phk> guide anybody who wants to try. > >I would be interested in knowing what you think would be required >... and some pointers. This sounds like a task I could bite off. First, find out what protocol you will use. If nothing else stay compatible with Linux (at least as an option if what they use suck too much). Then write a userland server and client so you have something to test against. Then write the kernel-client. There are two bits of this, one is the network part, one is the GEOM part. Julian proposed using netgraph for the network part, I'm not sure I agree with that idea, I think it would be more efficient to just make a kthread and go directly on the socket. I can't see what netgraph would add in this case, except a lot of code doing nothing but getting in the way. Once your kernel client can actually send a request and receive the reply, we will tack it onto GEOM. From there I expect doing the kernel server is pretty much the same, just the other way around :-) -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message