From owner-freebsd-arch@FreeBSD.ORG Mon Jul 26 15:59:27 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7486E16A4CF for ; Mon, 26 Jul 2004 15:59:27 +0000 (GMT) Received: from dragon.ti.com (news.ti.com [192.94.94.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D01443D1D for ; Mon, 26 Jul 2004 15:59:27 +0000 (GMT) (envelope-from elizabeth.su@ti.com) Received: from dlep30.itg.ti.com ([157.170.139.157]) by dragon.ti.com (8.12.11/8.12.11) with ESMTP id i6QFwuwv028731 for ; Mon, 26 Jul 2004 10:58:56 -0500 (CDT) Received: from dlep90.itg.ti.com (localhost [127.0.0.1]) by dlep30.itg.ti.com (8.12.11/8.12.11) with ESMTP id i6QFwu2g015627 for ; Mon, 26 Jul 2004 10:58:56 -0500 (CDT) Received: from dlee2k71.ent.ti.com (localhost [127.0.0.1]) by dlep90.itg.ti.com (8.12.11/8.12.11) with ESMTP id i6QFwt3f012298 for ; Mon, 26 Jul 2004 10:58:55 -0500 (CDT) Received: from dlee2k07.ent.ti.com ([157.170.152.116]) by dlee2k71.ent.ti.com with Microsoft SMTPSVC(5.0.2195.6747); Mon, 26 Jul 2004 10:58:55 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.0.6556.0 content-class: urn:content-classes:message MIME-Version: 1.0 Date: Mon, 26 Jul 2004 10:58:55 -0500 Message-ID: <30FD3429B18A2A448A2E6C4147059BE8510539@dlee2k07.ent.ti.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Returned mail: Data format error Thread-Index: AcRzKXRgqT0ijuREQFWHJ611Lu26fgAAAARb From: "Su, Elizabeth" To: X-OriginalArrivalTime: 26 Jul 2004 15:58:55.0791 (UTC) FILETIME=[74753BF0:01C47329] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Out of Office AutoReply: Returned mail: Data format error X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2004 15:59:27 -0000 I am currently on leave of absence. For questions or issues requiring immediate attention, please contact = Samip Banker (x4804) or Melissa Leadingham (x1578). Regards, Elizabeth Su From owner-freebsd-arch@FreeBSD.ORG Mon Jul 26 16:06:22 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A4E216A4CE for ; Mon, 26 Jul 2004 16:06:22 +0000 (GMT) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 357D343D69 for ; Mon, 26 Jul 2004 16:06:20 +0000 (GMT) (envelope-from justin@mac.com) Received: from mac.com (smtpin08-en2 [10.13.10.153]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id i6QG2lBC018630; Mon, 26 Jul 2004 09:02:47 -0700 (PDT) Received: from [67.169.117.81] (c-67-169-117-81.client.comcast.net [67.169.117.81]) (authenticated bits=0) by mac.com (Xserve/smtpin08/MantshX 4.0) with ESMTP id i6QG2iaB012939 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Mon, 26 Jul 2004 09:02:47 -0700 (PDT) In-Reply-To: <30FD3429B18A2A448A2E6C4147059BE8510539@dlee2k07.ent.ti.com> References: <30FD3429B18A2A448A2E6C4147059BE8510539@dlee2k07.ent.ti.com> Mime-Version: 1.0 (Apple Message framework v618) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <3AD8E733-DF1D-11D8-A9F3-00306544D642@mac.com> Content-Transfer-Encoding: 7bit From: Justin Walker Date: Mon, 26 Jul 2004 09:02:44 -0700 To: "Su, Elizabeth" X-Mailer: Apple Mail (2.618) cc: arch@freebsd.org Subject: Re: Out of Office AutoReply: Returned mail: Data format error X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2004 16:06:22 -0000 Fix your responder. Do not reply to mailing list traffic. On Jul 26, 2004, at 8:58, Su, Elizabeth wrote: > I am currently on leave of absence. > > For questions or issues requiring immediate attention, please contact > Samip Banker (x4804) or Melissa Leadingham (x1578). > > Regards, > Elizabeth Su > > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" > > -- Justin C. Walker, Curmudgeon-At-Large * Institute for General Semantics | When LuteFisk is outlawed | Only outlaws will have | LuteFisk *--------------------------------------*-------------------------------* From owner-freebsd-arch@FreeBSD.ORG Mon Jul 26 23:49:25 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9D5716A4CE; Mon, 26 Jul 2004 23:49:25 +0000 (GMT) Received: from out005.verizon.net (out005pub.verizon.net [206.46.170.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B72B43D1D; Mon, 26 Jul 2004 23:49:25 +0000 (GMT) (envelope-from babkin@bellatlantic.net) Received: from bellatlantic.net ([141.153.249.52]) by out005.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20040726234924.NSNQ3910.out005.verizon.net@bellatlantic.net>; Mon, 26 Jul 2004 18:49:24 -0500 Sender: root@FreeBSD.ORG Message-ID: <4105987E.5FC50517@bellatlantic.net> Date: Mon, 26 Jul 2004 19:49:18 -0400 From: Sergey Babkin X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.7-RELEASE i386) X-Accept-Language: en, ru MIME-Version: 1.0 To: Max Laier References: <20040718184008.GC57678@darkness.comp.waw.pl> <20040719075952.GG57678@darkness.comp.waw.pl> <200407191855.19885.max@love2party.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out005.verizon.net from [141.153.249.52] at Mon, 26 Jul 2004 18:49:22 -0500 cc: keramida@ceid.upatras.gr cc: pjd@FreeBSD.org cc: zeratul2@wanadoo.es cc: nsouch@free.fr cc: freebsd-arch@freebsd.org Subject: Re: some PRs X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2004 23:49:25 -0000 Max Laier wrote: > > On Monday 19 July 2004 16:13, M. Warner Losh wrote: > > The question to me is, do we really want to support (read fertilize) such a > stupid thing? Given the chance that once we do support it people will use it. > In my opinion it is bad to integrate something into base that we agree is > nothing one should ever have created (at least that's my reading of the > thread so far). I see no user-pessure for this. I'm about a week behind :-) but here are my 2 cents: it's a VERY useful device for testing. Not checking the error code of write(), printf() and such is a typical bug, so making it easy to detect by switching the output to /dev/full (or creating a symlink to it) is a very good idea. Like this: yourprogram >/dev/full \ && echo "The program does not check for success of write()" -SB From owner-freebsd-arch@FreeBSD.ORG Tue Jul 27 03:29:41 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 03C9A16A4CE; Tue, 27 Jul 2004 03:29:41 +0000 (GMT) Received: from pinky.otenet.gr (pinky.otenet.gr [195.170.0.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92C8C43D39; Tue, 27 Jul 2004 03:29:39 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a007.otenet.gr [212.205.215.7]) i6R3TUmc022185; Tue, 27 Jul 2004 06:29:31 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.11/8.12.11) with ESMTP id i6R3THEq024997; Tue, 27 Jul 2004 06:29:17 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.11/8.12.11/Submit) id i6R3THmQ024996; Tue, 27 Jul 2004 06:29:17 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 27 Jul 2004 06:29:17 +0300 From: Giorgos Keramidas To: Sergey Babkin Message-ID: <20040727032917.GA24942@gothmog.gr> References: <20040718184008.GC57678@darkness.comp.waw.pl> <20040719075952.GG57678@darkness.comp.waw.pl> <20040719.081356.51946167.imp@bsdimp.com> <200407191855.19885.max@love2party.net> <4105987E.5FC50517@bellatlantic.net> <20040727032253.GA24778@gothmog.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4105987E.5FC50517@bellatlantic.net> cc: Max Laier cc: pjd@freebsd.org cc: zeratul2@wanadoo.es cc: nsouch@free.fr cc: freebsd-arch@freebsd.org Subject: Re: some PRs X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2004 03:29:41 -0000 On 2004-07-26 19:49, Sergey Babkin wrote: > Max Laier wrote: > > The question to me is, do we really want to support (read fertilize) > > such a stupid thing? Given the chance that once we do support it > > people will use it. In my opinion it is bad to integrate something > > into base that we agree is nothing one should ever have created (at > > least that's my reading of the thread so far). I see no user-pessure > > for this. > > I'm about a week behind :-) but here are my 2 cents: it's a VERY > useful device for testing. Not checking the error code of write(), > printf() and such is a typical bug, so making it easy to detect by > switching the output to /dev/full (or creating a symlink to it) is a > very good idea. Like this: > > yourprogram >/dev/full \ > && echo "The program does not check for success of write()" If a program doesn't check the return code of write() but merrily goes on doing other stuff or even terminates with a zero return value, how will the redirection affect its operation? I think it won't, as shown in the test below (run on a Linux machine): : $ ls -ld /dev/full : crw-rw-rw- 1 root root 1, 7 Jun 14 00:24 /dev/full : $ cat -n lala.c : 1 #include : 2 #include : 3 #include : 4 : 5 int : 6 main(void) : 7 { : 8 char buf[] = "hello world\n"; : 9 size_t len; : 10 : 11 len = strlen(buf); : 12 write(1, buf, len); : 13 return 0; : 14 } : $ cc -O -W -Wall -o lala lala.c : $ ./lala : hello world : $ ./lala >/dev/full : $ echo $? : 0 : $ The fact that /dev/full was used as the output device didn't reveal the potential write() problem. I must have misunderstood something. How do you mean that we could use /dev/full for testing? From owner-freebsd-arch@FreeBSD.ORG Tue Jul 27 03:36:02 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B64016A4CE; Tue, 27 Jul 2004 03:36:02 +0000 (GMT) Received: from bilbo.otenet.gr (bilbo.otenet.gr [195.170.0.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9173C43D2D; Tue, 27 Jul 2004 03:36:01 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a007.otenet.gr [212.205.215.7]) i6R3ZuEq001296; Tue, 27 Jul 2004 06:35:57 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.11/8.12.11) with ESMTP id i6R3ZilT025117; Tue, 27 Jul 2004 06:35:44 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.11/8.12.11/Submit) id i6R3ZiJ9025116; Tue, 27 Jul 2004 06:35:44 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 27 Jul 2004 06:35:44 +0300 From: Giorgos Keramidas To: Sergey Babkin Message-ID: <20040727033544.GA25010@gothmog.gr> References: <20040718184008.GC57678@darkness.comp.waw.pl> <20040719075952.GG57678@darkness.comp.waw.pl> <20040719.081356.51946167.imp@bsdimp.com> <200407191855.19885.max@love2party.net> <4105987E.5FC50517@bellatlantic.net> <20040727032253.GA24778@gothmog.gr> <20040727032917.GA24942@gothmog.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040727032917.GA24942@gothmog.gr> cc: Max Laier cc: pjd@freebsd.org cc: zeratul2@wanadoo.es cc: nsouch@free.fr cc: freebsd-arch@freebsd.org Subject: Re: some PRs X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2004 03:36:02 -0000 On 2004-07-27 06:29, Giorgos Keramidas wrote: > : $ ./lala > : hello world > : $ ./lala >/dev/full > : $ echo $? > : 0 > : $ > > The fact that /dev/full was used as the output device didn't reveal the > potential write() problem. Or at least cannot be distinguished by a program that doesn't produce output (for which a zero termination code would be normal). Giorgos From owner-freebsd-arch@FreeBSD.ORG Tue Jul 27 08:43:34 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D73216A4CE for ; Tue, 27 Jul 2004 08:43:34 +0000 (GMT) Received: from mail007.syd.optusnet.com.au (mail007.syd.optusnet.com.au [211.29.132.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id D945C43D2F for ; Tue, 27 Jul 2004 08:43:32 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) i6R8hQo20814; Tue, 27 Jul 2004 18:43:26 +1000 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])i6R8hPVd019768; Tue, 27 Jul 2004 18:43:25 +1000 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost)i6R8hPTn019767; Tue, 27 Jul 2004 18:43:25 +1000 (EST) (envelope-from pjeremy) Date: Tue, 27 Jul 2004 18:43:24 +1000 From: Peter Jeremy To: Sergey Babkin Message-ID: <20040727084324.GM3001@cirb503493.alcatel.com.au> References: <20040718184008.GC57678@darkness.comp.waw.pl> <20040719075952.GG57678@darkness.comp.waw.pl> <200407191855.19885.max@love2party.net> <4105987E.5FC50517@bellatlantic.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4105987E.5FC50517@bellatlantic.net> User-Agent: Mutt/1.4.2i cc: freebsd-arch@freebsd.org Subject: Re: some PRs X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2004 08:43:34 -0000 [ /dev/full ] On Mon, 2004-Jul-26 19:49:18 -0400, Sergey Babkin wrote: >I'm about a week behind :-) but here are my 2 cents: it's a VERY useful >device for testing. Maybe. There are lots of other error numbers that are equally useful for testing. If you really want a way to inject known errors into I/O system calls, why not go the whole hog and implement a virtual filesystem that returns the required error: .../EPERM just returns EPERM .../ENOENT just returns EPERM etc Of course, you've then got to decide which of open(), close(), read() write(), ioctl(), fcntl() etc should succeed and which should return an error. This rapidly becomes unworkable. Overall, IMHO, the benefits are minimal and don't warrant the effort of implementing and maintaining the code. -- Peter Jeremy From owner-freebsd-arch@FreeBSD.ORG Tue Jul 27 16:36:47 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 66F0A16A4CF for ; Tue, 27 Jul 2004 16:36:47 +0000 (GMT) Received: from out010.verizon.net (out010pub.verizon.net [206.46.170.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF9D943D31 for ; Tue, 27 Jul 2004 16:36:46 +0000 (GMT) (envelope-from babkin@bellatlantic.net) Received: from bellatlantic.net ([138.89.157.57]) by out010.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20040727163645.WQML14383.out010.verizon.net@bellatlantic.net>; Tue, 27 Jul 2004 11:36:45 -0500 Sender: root@FreeBSD.ORG Message-ID: <41068499.CACDAEB0@bellatlantic.net> Date: Tue, 27 Jul 2004 12:36:41 -0400 From: Sergey Babkin X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.7-RELEASE i386) X-Accept-Language: en, ru MIME-Version: 1.0 To: Peter Jeremy References: <20040718184008.GC57678@darkness.comp.waw.pl> <20040719075952.GG57678@darkness.comp.waw.pl> <200407191855.19885.max@love2party.net> <4105987E.5FC50517@bellatlantic.net> <20040727084324.GM3001@cirb503493.alcatel.com.au> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out010.verizon.net from [138.89.157.57] at Tue, 27 Jul 2004 11:36:44 -0500 cc: freebsd-arch@freebsd.org Subject: Re: some PRs X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2004 16:36:47 -0000 Peter Jeremy wrote: > > [ /dev/full ] > On Mon, 2004-Jul-26 19:49:18 -0400, Sergey Babkin wrote: > >I'm about a week behind :-) but here are my 2 cents: it's a VERY useful > >device for testing. > > Maybe. There are lots of other error numbers that are equally useful > for testing. If you really want a way to inject known errors into I think any one error is good enough. Especially that EPERM and ENOENT would be returned from open(), not write(). > Overall, IMHO, the benefits are minimal and don't warrant the effort > of implementing and maintaining the code. Oh, come on: the code is already implemented by someone and requires zero maintenance. I mean, when was the last time someone touched the implementation of /dev/null? BTW, probably an easy implementation would be to just add one more minor to the null driver. -SB From owner-freebsd-arch@FreeBSD.ORG Tue Jul 27 16:36:52 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F07BD16A4D4; Tue, 27 Jul 2004 16:36:52 +0000 (GMT) Received: from out014.verizon.net (out014pub.verizon.net [206.46.170.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id 918DC43D2F; Tue, 27 Jul 2004 16:36:52 +0000 (GMT) (envelope-from babkin@bellatlantic.net) Received: from bellatlantic.net ([138.89.157.57]) by out014.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20040727163650.UYMC24490.out014.verizon.net@bellatlantic.net>; Tue, 27 Jul 2004 11:36:50 -0500 Sender: root@FreeBSD.ORG Message-ID: <410684A0.5C65ED42@bellatlantic.net> Date: Tue, 27 Jul 2004 12:36:48 -0400 From: Sergey Babkin X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.7-RELEASE i386) X-Accept-Language: en, ru MIME-Version: 1.0 To: Giorgos Keramidas References: <20040718184008.GC57678@darkness.comp.waw.pl> <20040719075952.GG57678@darkness.comp.waw.pl> <20040719.081356.51946167.imp@bsdimp.com> <200407191855.19885.max@love2party.net> <4105987E.5FC50517@bellatlantic.net> <20040727032253.GA24778@gothmog.gr> <20040727032917.GA24942@gothmog.gr> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out014.verizon.net from [138.89.157.57] at Tue, 27 Jul 2004 11:36:49 -0500 cc: Max Laier cc: pjd@freebsd.org cc: zeratul2@wanadoo.es cc: nsouch@free.fr cc: freebsd-arch@freebsd.org Subject: Re: some PRs X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2004 16:36:53 -0000 Giorgos Keramidas wrote: > > On 2004-07-26 19:49, Sergey Babkin wrote: > > Max Laier wrote: > > > The question to me is, do we really want to support (read fertilize) > > > such a stupid thing? Given the chance that once we do support it > > > people will use it. In my opinion it is bad to integrate something > > > into base that we agree is nothing one should ever have created (at > > > least that's my reading of the thread so far). I see no user-pessure > > > for this. > > > > I'm about a week behind :-) but here are my 2 cents: it's a VERY > > useful device for testing. Not checking the error code of write(), > > printf() and such is a typical bug, so making it easy to detect by > > switching the output to /dev/full (or creating a symlink to it) is a > > very good idea. Like this: > > > > yourprogram >/dev/full \ > > && echo "The program does not check for success of write()" > > If a program doesn't check the return code of write() but merrily goes > on doing other stuff or even terminates with a zero return value, how > will the redirection affect its operation? I think it won't, as shown > in the test below (run on a Linux machine): If you run a test in which you know the program must fail (such as writing to /dev/full) yet it does not, this means that there is abug in the program. > : $ ls -ld /dev/full > : crw-rw-rw- 1 root root 1, 7 Jun 14 00:24 /dev/full > : $ cat -n lala.c > : 1 #include > : 2 #include > : 3 #include > : 4 > : 5 int > : 6 main(void) > : 7 { > : 8 char buf[] = "hello world\n"; > : 9 size_t len; > : 10 > : 11 len = strlen(buf); > : 12 write(1, buf, len); > : 13 return 0; > : 14 } > : $ cc -O -W -Wall -o lala lala.c > : $ ./lala > : hello world > : $ ./lala >/dev/full > : $ echo $? > : 0 > : $ > > The fact that /dev/full was used as the output device didn't reveal the > potential write() problem. That's _exactly my point: if the program writes to /dev/full and yet does produce an error exit code or an error message, there is a bug in the program. > I must have misunderstood something. How do you mean that we could use > /dev/full for testing? Well, as described above: for each file that your program can produce, try to substitute it with /dev/full and watch the prgoram fail. If it does not fail, there is a bug. That's much easier than producing an actual full filesystem. -SB From owner-freebsd-arch@FreeBSD.ORG Tue Jul 27 16:50:04 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 15E0116A4D2 for ; Tue, 27 Jul 2004 16:50:04 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 914EF43D5D for ; Tue, 27 Jul 2004 16:50:03 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 700A1ACAE6; Tue, 27 Jul 2004 18:50:01 +0200 (CEST) Date: Tue, 27 Jul 2004 18:50:01 +0200 From: Pawel Jakub Dawidek To: Sergey Babkin Message-ID: <20040727165001.GI57678@darkness.comp.waw.pl> References: <20040718184008.GC57678@darkness.comp.waw.pl> <20040719075952.GG57678@darkness.comp.waw.pl> <20040719.081356.51946167.imp@bsdimp.com> <200407191855.19885.max@love2party.net> <4105987E.5FC50517@bellatlantic.net> <20040727032253.GA24778@gothmog.gr> <20040727032917.GA24942@gothmog.gr> <410684A0.5C65ED42@bellatlantic.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Vo48LVc30GAQuLuW" Content-Disposition: inline In-Reply-To: <410684A0.5C65ED42@bellatlantic.net> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: Giorgos Keramidas cc: Max Laier cc: zeratul2@wanadoo.es cc: nsouch@free.fr cc: freebsd-arch@freebsd.org Subject: Re: some PRs X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2004 16:50:04 -0000 --Vo48LVc30GAQuLuW Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 27, 2004 at 12:36:48PM -0400, Sergey Babkin wrote: +> If you run a test in which you know the program must fail (such +> as writing to /dev/full) yet it does not, this means that there +> is abug in the program. And what if I've more than one write() on this descriptor and first write() check works fine, how can I check other writes()? Really, it is not worth new device. If you want to use something like this, it should go into /usr/src/tools/ not into /usr/src/sys/ and it should gives us much more than that. For example in gnop(8) I'm allowing to specify a failure probability, so you can test failures handling much better (not only first one). Are there any other places where it could be helpful? --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --Vo48LVc30GAQuLuW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD4DBQFBBoe5ForvXbEpPzQRAn4lAKDfE7xZlk9vMH86q63M6eh7qaCH1wCUCham hwN3XsSL0hLrM89owN9IPA== =uNFb -----END PGP SIGNATURE----- --Vo48LVc30GAQuLuW-- From owner-freebsd-arch@FreeBSD.ORG Tue Jul 27 17:24:04 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3433716A4CE for ; Tue, 27 Jul 2004 17:24:04 +0000 (GMT) Received: from smtp3.server.rpi.edu (smtp3.server.rpi.edu [128.113.2.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id D29AC43D41 for ; Tue, 27 Jul 2004 17:24:03 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp3.server.rpi.edu (8.13.0/8.13.0) with ESMTP id i6RHO18Y012431; Tue, 27 Jul 2004 13:24:02 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <410684A0.5C65ED42@bellatlantic.net> References: <20040718184008.GC57678@darkness.comp.waw.pl> <20040719075952.GG57678@darkness.comp.waw.pl> <20040719.081356.51946167.imp@bsdimp.com> <200407191855.19885.max@love2party.net> <20040727032253.GA24778@gothmog.gr> <410684A0.5C65ED42@bellatlantic.net> Date: Tue, 27 Jul 2004 13:24:00 -0400 To: Sergey Babkin From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) cc: freebsd-arch@freebsd.org Subject: Re: some PRs X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2004 17:24:04 -0000 At 12:36 PM -0400 7/27/04, Sergey Babkin wrote: >Giorgos Keramidas wrote: >> > > On 2004-07-26 19:49, Sergey Babkin wrote: > > > >> > I'm about a week behind :-) but here are my 2 cents: it's a VERY >> > useful device for testing. Not checking the error code of write(), > > > printf() and such is a typical bug, so making it easy to detect > > > by switching the output to /dev/full (or creating a symlink to > > > it) is a very good idea. Like this: > > > >> > yourprogram >/dev/full \ >> > && echo "The program does not check for success of write()" >> > > If a program doesn't check the return code of write() but merrily > > goes on doing other stuff or even terminates with a zero return > > value, how will the redirection affect its operation? I think it > > won't, as shown in the test below (run on a Linux machine): > >If you run a test in which you know the program must fail (such >as writing to /dev/full) yet it does not, this means that there >is abug in the program. > > I must have misunderstood something. How do you mean that we > > could use /dev/full for testing? > >Well, as described above: for each file that your program can >produce, try to substitute it with /dev/full and watch the >program fail. If it does not fail, there is a bug. That's >much easier than producing an actual full filesystem. The problem is that using /dev/full on a good program will only test a single write() command. If I have a program which does writes at 10 different points, and the program fails when pointed at /dev/full, I still do not know if ALL of those writes are doing the appropriate checking. Maybe nine of them do zero checking, and only one of them checks (and that one may be the final write(), not the first one). Using /dev/full on such a program will still get the failure indication, and the developer (or user) will think the program is correct, when in fact it is 9/10ths wrong. The problem is that a full filesystem can happen at any point in the program's execution, not just the first write(). While /dev/full might be some help in testing, I do not believe it is as useful as you seem to think it is. I am not against the idea of /dev/full, but I am not particularly for it either... -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu From owner-freebsd-arch@FreeBSD.ORG Wed Jul 28 04:26:46 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3987316A535 for ; Wed, 28 Jul 2004 04:26:46 +0000 (GMT) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id E992A43D45 for ; Wed, 28 Jul 2004 04:26:45 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 30717 invoked from network); 28 Jul 2004 04:26:45 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 28 Jul 2004 04:26:45 -0000 Received: from slimer.baldwin.cx (slimer.baldwin.cx [192.168.0.16]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i6S4QMKi076150; Wed, 28 Jul 2004 00:26:42 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-arch@FreeBSD.org Date: Tue, 27 Jul 2004 21:20:48 -0400 User-Agent: KMail/1.6 References: <200407221502.i6MF2Yqg039032@freefall.freebsd.org> <40FFFBA3.1030204@elischer.org> In-Reply-To: <40FFFBA3.1030204@elischer.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200407272120.48608.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: arch@FreeBSD.org cc: Julian Elischer cc: Poul-Henning Kamp Subject: Re: [REVIEW] unit number allocation API X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2004 04:26:46 -0000 On Thursday 22 July 2004 01:38 pm, Julian Elischer wrote: > Poul-Henning Kamp wrote: > >We need to allocate unit numbers for (pseudo)devices, and a few > >places we need to allocate inode numbers for synthetic filesystems > >(for instance DEVFS). > > > >For these applications the overhead of rman(9) can be totally > >unacceptable (60 bytes per allocation ?) and something more memory > >frugal is called for. > > > >This is a small API I just wrote, targeted specifically for allocating > >unit numbers and similar spaces. > > > >Currently the allocation policy is "lowest free number", but it > >would be possible to add support for allocating a specific number > >as well. > > > >It uses a mixed run-length/bitmap strategy with fixed size memory > >chunks (so it can use uma(9) in the kernel). > > > >Worst case memory usage is two bits per managed unit-number (worst > >case is "allocate all units, free all the odd numbered ones"). > > > >For the typical case where we never free any unit numbers, it will > >use 52 bytes in total on i386. > > > >Please review. (It can be run in userland) > > > >Poul-Henning > > please also look at the Thread_id (lwpid) allocator marcel added to > kern_thread.c Whatever we use, can we use it to manage pids as well to work around the problem with putting newborn processes onto allproc. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-arch@FreeBSD.ORG Wed Jul 28 04:26:46 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5260116A55D for ; Wed, 28 Jul 2004 04:26:46 +0000 (GMT) Received: from mail3.speakeasy.net (mail3.speakeasy.net [216.254.0.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id E9A8F43D62 for ; Wed, 28 Jul 2004 04:26:45 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 30717 invoked from network); 28 Jul 2004 04:26:45 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 28 Jul 2004 04:26:45 -0000 Received: from slimer.baldwin.cx (slimer.baldwin.cx [192.168.0.16]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i6S4QMKi076150; Wed, 28 Jul 2004 00:26:42 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-arch@FreeBSD.org Date: Tue, 27 Jul 2004 21:20:48 -0400 User-Agent: KMail/1.6 References: <200407221502.i6MF2Yqg039032@freefall.freebsd.org> <40FFFBA3.1030204@elischer.org> In-Reply-To: <40FFFBA3.1030204@elischer.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200407272120.48608.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: arch@FreeBSD.org cc: Julian Elischer cc: Poul-Henning Kamp Subject: Re: [REVIEW] unit number allocation API X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2004 04:26:46 -0000 On Thursday 22 July 2004 01:38 pm, Julian Elischer wrote: > Poul-Henning Kamp wrote: > >We need to allocate unit numbers for (pseudo)devices, and a few > >places we need to allocate inode numbers for synthetic filesystems > >(for instance DEVFS). > > > >For these applications the overhead of rman(9) can be totally > >unacceptable (60 bytes per allocation ?) and something more memory > >frugal is called for. > > > >This is a small API I just wrote, targeted specifically for allocating > >unit numbers and similar spaces. > > > >Currently the allocation policy is "lowest free number", but it > >would be possible to add support for allocating a specific number > >as well. > > > >It uses a mixed run-length/bitmap strategy with fixed size memory > >chunks (so it can use uma(9) in the kernel). > > > >Worst case memory usage is two bits per managed unit-number (worst > >case is "allocate all units, free all the odd numbered ones"). > > > >For the typical case where we never free any unit numbers, it will > >use 52 bytes in total on i386. > > > >Please review. (It can be run in userland) > > > >Poul-Henning > > please also look at the Thread_id (lwpid) allocator marcel added to > kern_thread.c Whatever we use, can we use it to manage pids as well to work around the problem with putting newborn processes onto allproc. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-arch@FreeBSD.ORG Wed Jul 28 05:47:17 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1DB816A4D4; Wed, 28 Jul 2004 05:47:17 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1473843D5D; Wed, 28 Jul 2004 05:47:17 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 178485314; Wed, 28 Jul 2004 07:47:00 +0200 (CEST) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 8EA285308; Wed, 28 Jul 2004 07:46:34 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 2602) id 823EBB8A3; Tue, 27 Jul 2004 19:37:34 +0200 (CEST) To: Poul-Henning Kamp References: <200407221502.i6MF2Yqg039032@freefall.freebsd.org> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Tue, 27 Jul 2004 19:37:34 +0200 In-Reply-To: <200407221502.i6MF2Yqg039032@freefall.freebsd.org> (Poul-Henning Kamp's message of "Thu, 22 Jul 2004 15:02:34 GMT") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on flood.des.no X-Spam-Level: X-Spam-Status: No, hits=0.2 required=5.0 tests=AWL,DATE_IN_PAST_12_24 autolearn=no version=2.63 cc: arch@freebsd.org Subject: Re: [REVIEW] unit number allocation API X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2004 05:47:17 -0000 Poul-Henning Kamp writes: > This is a small API I just wrote, targeted specifically for allocating > unit numbers and similar spaces. We already have heavily tested and benchmarked code for this in kern_descrip.c; it shouldn't be too hard to rip it free of the file descriptor code. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-arch@FreeBSD.ORG Wed Jul 28 18:33:59 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 68CF016A4CE for ; Wed, 28 Jul 2004 18:33:59 +0000 (GMT) Received: from imf19aec.mail.bellsouth.net (imf19aec.mail.bellsouth.net [205.152.59.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCE2A43D5A for ; Wed, 28 Jul 2004 18:33:58 +0000 (GMT) (envelope-from sah@coraid.com) Received: from coraid.com ([68.19.5.244]) by imf19aec.mail.bellsouth.net (InterMail vM.5.01.06.08 201-253-122-130-108-20031117) with SMTP id <20040728183344.ELWU1792.imf19aec.mail.bellsouth.net@coraid.com> for ; Wed, 28 Jul 2004 14:33:44 -0400 Message-Id: <20040728183344.ELWU1792.imf19aec.mail.bellsouth.net@coraid.com> Date: Wed, 28 Jul 2004 14:33:58 -0400 From: sah@coraid.com To: undisclosed-recipients: ; X-Mailman-Approved-At: Thu, 29 Jul 2004 11:58:19 +0000 Subject: AoE & driver tips X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2004 18:33:59 -0000 Hello, I'm in the process of writing a AoE disk/protocol driver for freebsd. AoE (ATA over Ethernet) is used to access ATA devices attached directly to the Ethernet using the AoE registered Ethernet protocol type 0x88a2. I have already written a driver for linux 2.4 and 2.6 that makes AoE devices show up as local disks. I'm hoping to do the same for freebsd. I have some questions from my initial perusal of the code. I've been looking at the code in sys/dev/ata/ for tips on plugging into the disk device layer. It appears that what I want is disk_create && disk_destroy. How is the parameter "unit" related to device major & minor? I don't see anywhere where major and minor are related to the disk structure, though perhaps I'm just missing it. Do I need to register a device major? If a device fails or vanishes, can i just fail the outstanding bios and disk_destroy it? How does freebsd do SMART on ata? I'd like to be able to plug into this as well if the system uses it. Any other tips/comments about gluing together the disk & network would be appreciated. Cheers, Sam sah@coraid.com From owner-freebsd-arch@FreeBSD.ORG Thu Jul 29 16:13:06 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F10016A4CE for ; Thu, 29 Jul 2004 16:13:06 +0000 (GMT) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id D288F43D53 for ; Thu, 29 Jul 2004 16:13:05 +0000 (GMT) (envelope-from scottl@freebsd.org) Received: from pooker.samsco.org (scottl@localhost [127.0.0.1]) by pooker.samsco.org (8.12.11/8.12.10) with ESMTP id i6TGJquL019346; Thu, 29 Jul 2004 10:19:53 -0600 (MDT) (envelope-from scottl@freebsd.org) Received: from localhost (scottl@localhost)i6TGJqCC019343; Thu, 29 Jul 2004 10:19:52 -0600 (MDT) (envelope-from scottl@freebsd.org) X-Authentication-Warning: pooker.samsco.org: scottl owned process doing -bs Date: Thu, 29 Jul 2004 10:19:52 -0600 (MDT) From: Scott Long Sender: scottl@pooker.samsco.org To: sah@coraid.com In-Reply-To: <20040728183344.ELWU1792.imf19aec.mail.bellsouth.net@coraid.com> Message-ID: <20040729094711.B32601@pooker.samsco.org> References: <20040728183344.ELWU1792.imf19aec.mail.bellsouth.net@coraid.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=0.0 required=3.8 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on pooker.samsco.org cc: arch@freebsd.org Subject: Re: AoE & driver tips X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2004 16:13:06 -0000 On Wed, 28 Jul 2004 sah@coraid.com wrote: > Hello, > > I'm in the process of writing a AoE disk/protocol driver for freebsd. > AoE (ATA over Ethernet) is used to access ATA devices attached directly to the Ethernet using the AoE registered Ethernet protocol type 0x88a2. I have already written a driver for linux 2.4 and 2.6 that makes AoE devices show up as local disks. I'm hoping to do the same for freebsd. I have some questions from my > initial perusal of the code. I guess the biggest question that you have to answer is whether you want to plug directly into the ATA framework or have your driver be a monolithic block driver. The ATA framework provides generic ATA command transforms and error handling and might be attractive for your needs. However, I have not read the AoE spec so I can't say for sure. Areas like error recovery might or might not be applicable to your needs. The downside to plugging into the ATA layer is that it is very centered on having very thin/simple hardware drivers underneath it. It seems to also be centered on the traditional ATA assumptions of discrete channels with a fixed number of drives that can or cannot do traditional DMA operations. I'm not sure how hard it would be to broaden its scope here. Doing something that crosses from the ATA layer to the network layer might also have some locking implications, but again I don't know for sure. ATA also seems to be on a bit of a rocky road for many people right now, so you might want to seriously investigate it before deciding. In any case, the API that you want to look at for plugging into it is nominally defined in the ata_pci_controller and ata_device structures. One other thing to note is that the ATA driver in 4.x isn't layered like it is in 5.x so plugging into it will be a bit harder. Writing a separate block driver isn't very hard, but it means that your user-visible disk devices will have unique names and not be part of the '/dev/adN' naming scheme. This usually isn't a big deal. Locking is also much simplier in this scheme. You do have to provide your own ATA command transformsi, enumeration/discovery, and error recovery, though. > I've been looking at the code in sys/dev/ata/ for tips on plugging into > the disk device layer. It appears that what I want is disk_create && > disk_destroy. How is the parameter "unit" related to device major & > minor? I don't see anywhere where major and minor are related to the > disk structure, though perhaps I'm just missing it. Do I need to > register a device major? disk_create() and disk_destroy() are block layer API calls that the ATA framework calls on behalf of the lower ATA hardware drivers. Major numbers are dynamically assigned in FreeBSD 5.x. For 4.x, you'll only need a unique major reservation if your driver winds up being a block driver. If it's an ATA driver then it'll use the ATA major/minor scheme. > > If a device fails or vanishes, can i just fail the outstanding bios and > disk_destroy it? How does freebsd do SMART on ata? I'd like to be able > to plug into this as well if the system uses it. I believe that there are some SMART monitoring tools in the ports tree (/usr/ports/sysutils/smartmontools looks promising), but there isn't anything like that integrated into the base system. > > Any other tips/comments about gluing together the disk & network would be appreciated. You might also consider plugging into the SCSI framework (called CAM on FreeBSD). There are many tradeoffs there, but the API is more flexible and is consistent between 4.x and 5.x. If neither frameworks appeal to you then doing a block driver would be the right choice. Block drivers are a bit more flexible in FreeBSD than they are in Linux, too. Scott From owner-freebsd-arch@FreeBSD.ORG Fri Jul 30 17:05:29 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D763916A4CE for ; Fri, 30 Jul 2004 17:05:29 +0000 (GMT) Received: from mail.tiscali.cz (stateless2.tiscali.cz [213.235.135.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4154443D6B for ; Fri, 30 Jul 2004 17:05:29 +0000 (GMT) (envelope-from hsn@netmag.cz) Received: from sanatana.dharma (213.235.69.128) by mail.tiscali.cz (6.7.021) id 40E84FD100AE86B6 for freebsd-arch@freebsd.org; Fri, 30 Jul 2004 19:05:26 +0200 Received: from hsn@localhost by sanatana.dharma (Exim 4.34_0 FreeBSD) id 1BqZUR-0009K4-SG for ; Fri, 30 Jul 2004 17:40:11 +0200 Date: Fri, 30 Jul 2004 17:40:11 +0200 From: Radim Kolar To: freebsd-arch@freebsd.org Message-ID: <20040730154011.GA98131@sanatana.dharma> Mail-Followup-To: freebsd-arch@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: newer versions of gnu diff and patch X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2004 17:05:30 -0000 in freebsd 5.2 i have in base system diff 2.7 and patch 2.1. Are there any plans to import newer versions into base system for 5.3 release? Newer patch 2.5.4 has much better error recovery and diff 2.8 is more POSIX compatible. I am more interested in newer patch than newer diff, but patch and diff man pages are tied together. From owner-freebsd-arch@FreeBSD.ORG Fri Jul 30 17:33:38 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1966F16A4CE for ; Fri, 30 Jul 2004 17:33:38 +0000 (GMT) Received: from gandalf.online.bg (gandalf.online.bg [217.75.128.9]) by mx1.FreeBSD.org (Postfix) with SMTP id 5E51F43D66 for ; Fri, 30 Jul 2004 17:33:36 +0000 (GMT) (envelope-from roam@ringlet.net) Received: (qmail 32055 invoked from network); 30 Jul 2004 17:27:37 -0000 Received: from unknown (HELO straylight.m.ringlet.net) (217.75.134.254) by gandalf.online.bg with SMTP; 30 Jul 2004 17:27:37 -0000 Received: (qmail 52125 invoked by uid 1000); 30 Jul 2004 17:33:01 -0000 Date: Fri, 30 Jul 2004 20:33:01 +0300 From: Peter Pentchev To: freebsd-arch@freebsd.org Message-ID: <20040730173301.GA984@straylight.m.ringlet.net> Mail-Followup-To: freebsd-arch@freebsd.org References: <20040730154011.GA98131@sanatana.dharma> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="opJtzjQTFsWo+cga" Content-Disposition: inline In-Reply-To: <20040730154011.GA98131@sanatana.dharma> User-Agent: Mutt/1.5.6i Subject: Re: newer versions of gnu diff and patch X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2004 17:33:38 -0000 --opJtzjQTFsWo+cga Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 30, 2004 at 05:40:11PM +0200, Radim Kolar wrote: > in freebsd 5.2 i have in base system diff 2.7 and patch 2.1. Are there > any plans to import newer versions into base system for 5.3 release? >=20 > Newer patch 2.5.4 has much better error recovery and diff 2.8 is more POS= IX > compatible. I am more interested in newer patch than newer diff, but patch > and diff man pages are tied together. Just to make sure: you are aware of the devel/patch and textproc/diffutils ports, right? :) G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@cnsys.bg roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 The rest of this sentence is written in Thailand, on --opJtzjQTFsWo+cga Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBCoZN7Ri2jRYZRVMRAgalAKCtyVkGmtSPnvZaIaV9pp55CtqsqACfREMr ZheykVt4FE5JXHwbdjf2dgI= =sVH8 -----END PGP SIGNATURE----- --opJtzjQTFsWo+cga-- From owner-freebsd-arch@FreeBSD.ORG Fri Jul 30 18:42:06 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AADEF16A4CE for ; Fri, 30 Jul 2004 18:42:06 +0000 (GMT) Received: from smtp4.server.rpi.edu (smtp4.server.rpi.edu [128.113.2.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DDBA43D4C for ; Fri, 30 Jul 2004 18:42:06 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp4.server.rpi.edu (8.13.0/8.13.0) with ESMTP id i6UIfWo5008046; Fri, 30 Jul 2004 14:41:33 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20040730154011.GA98131@sanatana.dharma> References: <20040730154011.GA98131@sanatana.dharma> Date: Fri, 30 Jul 2004 14:41:32 -0400 To: Radim Kolar , freebsd-arch@freebsd.org From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) Subject: Re: newer versions of gnu diff and patch X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2004 18:42:06 -0000 At 5:40 PM +0200 7/30/04, Radim Kolar wrote: >in freebsd 5.2 i have in base system diff 2.7 and patch 2.1. >Are there any plans to import newer versions into base system >for 5.3 release? There is an explicit decision to leave diff and patch as they are. The newer gnu patch is also incompatible to the older patch in some ways, so it is not a trivial "just drop it in" upgrade. A new version of patch *will* break some things, and we certainly do not need that right now. What we would like to do is to move to a bsd-licensed version of patch, which I am supposed to be working on in my copious spare time... -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu From owner-freebsd-arch@FreeBSD.ORG Fri Jul 30 18:57:41 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CFDCC16A4CE for ; Fri, 30 Jul 2004 18:57:41 +0000 (GMT) Received: from mgr2.xmission.com (mgr2.xmission.com [198.60.22.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id B90ED43D2F for ; Fri, 30 Jul 2004 18:57:41 +0000 (GMT) (envelope-from glewis@eyesbeyond.com) Received: from [198.60.22.207] (helo=mgr7.xmission.com) by mgr2.xmission.com with esmtp (Exim 3.35 #1) id 1BqcY1-0002JK-02; Fri, 30 Jul 2004 12:56:05 -0600 Received: from [166.70.56.15] (helo=misty.eyesbeyond.com) by mgr7.xmission.com with esmtp (Exim 4.32) id 1BqcY0-0007aC-SE; Fri, 30 Jul 2004 12:56:05 -0600 Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) i6UIu3n4052912; Fri, 30 Jul 2004 12:56:03 -0600 (MDT) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.12.11/8.12.11/Submit) id i6UIu2Qa052911; Fri, 30 Jul 2004 12:56:02 -0600 (MDT) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Fri, 30 Jul 2004 12:56:02 -0600 From: Greg Lewis To: Garance A Drosihn Message-ID: <20040730185602.GA52746@misty.eyesbeyond.com> References: <20040730154011.GA98131@sanatana.dharma> Mime-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Content-Type: text/plain; charset=us-ascii X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on mgr7.xmission.com X-Spam-Level: X-Spam-Status: No, hits=-1.4 required=8.0 tests=BAYES_20 autolearn=no version=2.63 X-SA-Exim-Connect-IP: 166.70.56.15 X-SA-Exim-Mail-From: glewis@eyesbeyond.com X-SA-Exim-Version: 4.0 (built Sat, 24 Apr 2004 12:31:30 +0200) X-SA-Exim-Scanned: Yes (on mgr7.xmission.com) cc: freebsd-arch@freebsd.org Subject: Re: newer versions of gnu diff and patch X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2004 18:57:42 -0000 On Fri, Jul 30, 2004 at 02:41:32PM -0400, Garance A Drosihn wrote: > What we would like to do is to move to a bsd-licensed version of > patch, which I am supposed to be working on in my copious spare > time... OpenBSD appear to gotten permission from Larry Wall to put patch(1) under a BSD license. They also appear to have made a reasonable number of improvements since then, including better POSIX compliance. It may be worth looking at :). I don't know what version of patch they started with though. http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/patch/ -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org From owner-freebsd-arch@FreeBSD.ORG Fri Jul 30 19:18:35 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 09FDE16A4CE for ; Fri, 30 Jul 2004 19:18:35 +0000 (GMT) Received: from smtp4.server.rpi.edu (smtp4.server.rpi.edu [128.113.2.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9083243D39 for ; Fri, 30 Jul 2004 19:18:34 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp4.server.rpi.edu (8.13.0/8.13.0) with ESMTP id i6UJI8KX015355; Fri, 30 Jul 2004 15:18:09 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20040730185602.GA52746@misty.eyesbeyond.com> References: <20040730154011.GA98131@sanatana.dharma> <20040730185602.GA52746@misty.eyesbeyond.com> Date: Fri, 30 Jul 2004 15:18:07 -0400 To: Greg Lewis From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) cc: freebsd-arch@freebsd.org Subject: Re: newer versions of gnu diff and patch X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2004 19:18:35 -0000 At 12:56 PM -0600 7/30/04, Greg Lewis wrote: >On Fri, Jul 30, 2004, Garance A Drosihn wrote: > > What we would like to do is to move to a bsd-licensed version of >> patch, which I am supposed to be working on in my copious spare >> time... > >OpenBSD appear to gotten permission from Larry Wall to put patch(1) >under a BSD license. They also appear to have made a reasonable >number of improvements since then, including better POSIX compliance. >It may be worth looking at :). I don't know what version of patch >they started with though. > >http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/patch/ Indeed. Both NetBSD and OpenBSD have BSD-licensed versions of patch. That's what I was supposed to start with. The thing is, all three versions (Net, Open, Free) have different improvements to them. I really should get going on this, but right now my spare time is spent trying to track down other problems with my FreeBSD machines... -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu From owner-freebsd-arch@FreeBSD.ORG Sat Jul 31 03:52:52 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A0CE16A4CE for ; Sat, 31 Jul 2004 03:52:52 +0000 (GMT) Received: from robbins.dropbear.id.au (175.b.008.mel.iprimus.net.au [210.50.87.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FD8543D45 for ; Sat, 31 Jul 2004 03:52:51 +0000 (GMT) (envelope-from tim@robbins.dropbear.id.au) Received: by robbins.dropbear.id.au (Postfix, from userid 1000) id BF7B04210; Sat, 31 Jul 2004 13:52:38 +1000 (EST) Date: Sat, 31 Jul 2004 13:52:38 +1000 From: Tim Robbins To: Garance A Drosihn Message-ID: <20040731035238.GA15249@cat.robbins.dropbear.id.au> References: <20040730154011.GA98131@sanatana.dharma> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i cc: Radim Kolar cc: freebsd-arch@freebsd.org Subject: Re: newer versions of gnu diff and patch X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2004 03:52:52 -0000 On Fri, Jul 30, 2004 at 02:41:32PM -0400, Garance A Drosihn wrote: > At 5:40 PM +0200 7/30/04, Radim Kolar wrote: > >in freebsd 5.2 i have in base system diff 2.7 and patch 2.1. > >Are there any plans to import newer versions into base system > >for 5.3 release? > > There is an explicit decision to leave diff and patch as they are. > The newer gnu patch is also incompatible to the older patch in > some ways, so it is not a trivial "just drop it in" upgrade. A > new version of patch *will* break some things, and we certainly > do not need that right now. > > What we would like to do is to move to a bsd-licensed version of > patch, which I am supposed to be working on in my copious spare > time... FWIW, I have been running with OpenBSD's version of patch on most of my machines for a year or more now, and haven't had any problems. Tim From owner-freebsd-arch@FreeBSD.ORG Sat Jul 31 18:15:01 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A203816A4CE; Sat, 31 Jul 2004 18:15:01 +0000 (GMT) Received: from smtp4.server.rpi.edu (smtp4.server.rpi.edu [128.113.2.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4610743D46; Sat, 31 Jul 2004 18:15:01 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp4.server.rpi.edu (8.13.0/8.13.0) with ESMTP id i6VIEw3R003724; Sat, 31 Jul 2004 14:15:00 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20040731035238.GA15249@cat.robbins.dropbear.id.au> References: <20040730154011.GA98131@sanatana.dharma> <20040731035238.GA15249@cat.robbins.dropbear.id.au> Date: Sat, 31 Jul 2004 14:14:57 -0400 To: Tim Robbins From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) cc: Radim Kolar cc: freebsd-arch@freebsd.org Subject: Re: newer versions of gnu diff and patch X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2004 18:15:02 -0000 At 1:52 PM +1000 7/31/04, Tim Robbins wrote: >On Fri, Jul 30, 2004, Garance A Drosihn wrote: > > At 5:40 PM +0200 7/30/04, Radim Kolar wrote: >> >in freebsd 5.2 i have in base system diff 2.7 and patch 2.1. >> >Are there any plans to import newer versions into base system >> >for 5.3 release? >> >> There is an explicit decision to leave diff and patch as they are. >> The newer gnu patch is also incompatible to the older patch in >> some ways, so it is not a trivial "just drop it in" upgrade. A >> new version of patch *will* break some things, and we certainly >> do not need that right now. >> >> What we would like to do is to move to a bsd-licensed version of >> patch, which I am supposed to be working on in my copious spare >> time... > >FWIW, I have been running with OpenBSD's version of patch on most of >my machines for a year or more now, and haven't had any problems. Thanks for the info. It is my intent to revive the patch-related project that I had promised to do. I might be able to start on that this weekend, assuming I can first track down a completely unrelated problem that I am having on sparc64. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu