From owner-freebsd-current@FreeBSD.ORG Fri Aug 10 14:05:33 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B70D106566C for ; Fri, 10 Aug 2012 14:05:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 694568FC0C for ; Fri, 10 Aug 2012 14:05:33 +0000 (UTC) Received: from John-Baldwins-MacBook-Air.local (d-69-161-105-82.cpe.metrocast.net [69.161.105.82]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 814C7B946; Fri, 10 Aug 2012 10:05:32 -0400 (EDT) Message-ID: <50251530.2060502@FreeBSD.org> Date: Fri, 10 Aug 2012 10:05:36 -0400 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Mike Tancsa References: <201208031418.57941.jhb@freebsd.org> <201208031726.03652.jhb@freebsd.org> <502121F5.4020705@sentex.net> <201208080727.45595.jhb@freebsd.org> <5022B252.30606@sentex.net> <5023AB9D.5070608@sentex.net> <5023B824.40405@FreeBSD.org> <5023C9A6.9070502@sentex.net> <5023F199.1090201@FreeBSD.org> <50240F5F.6000702@sentex.net> <502425C0.5070303@sentex.net> <50250D48.6020101@FreeBSD.org> <50251226.8020805@sentex.net> In-Reply-To: <50251226.8020805@sentex.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 10 Aug 2012 10:05:33 -0400 (EDT) Cc: Garrett Cooper , current@freebsd.org Subject: Re: [PATCH] Add locking to twe(4) so it no longer uses Giant X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Aug 2012 14:05:33 -0000 On 8/10/12 9:52 AM, Mike Tancsa wrote: > On 8/10/2012 9:31 AM, John Baldwin wrote: >> On 8/9/12 5:04 PM, Mike Tancsa wrote: >>> Start up the tw_cli client >>> >>> 0{offsite2}# tw_cli >>> //offsite2> show >>> >>> Ctl Model (V)Ports Drives Units NotOpt RRate VRate BBU >>> ------------------------------------------------------------------------ >>> c0 9650SE-2LP 2 2 1 0 1 1 - >>> >>> >>> //offsite2> exit >>> 0{offsite2}# ls -l /dev/tw* >>> crw------- 1 root operator - 0, 37 Aug 9 16:58 /dev/twa0 >>> crw-r----- 1 root operator - 0, 174 Aug 9 17:00 /dev/twed0 >>> 0{offsite2}# >>> >>> >>> It then disappears ?! >> >> Bizarre, it seems to disappear while tw_cli is running? I'm curious if >> 'rm -W /dev/twe0' brings it back? > > nada > 0{offsite2}# rm -W /dev/twe0 > rm: /dev/twe0: No such file or directory > 1{offsite2}# rm -W /dev/twe0 > rm: /dev/twe0: No such file or directory > 1{offsite2}# ls -l /dev/twe* > crw-r----- 1 root operator - 0, 174 Aug 9 17:00 /dev/twed0 > 0{offsite2}# > >> >> If so, it might be interesting to see a ktrace of tw_cli. >> > > I just ran ktrace tw_cli > File is available at > > http://www.tancsa.com/misc/ktrace.out > and > http://www.tancsa.com/misc/ktrace.txt 5972 tw_cli CALL __sysctl(0x7fffffffd798,0x2,0x7fffffffd7a0,0x7fffffffd790,0x7fffffffd960,0x16) 5972 tw_cli SCTL "sysctl.name2oid" 5972 tw_cli RET __sysctl -1 errno 2 No such file or directory 5972 tw_cli CALL unlink(0x7fffffffd9d0) 5972 tw_cli NAMI "/dev/twe0" 5972 tw_cli RET unlink 0 ... Oh! I moved the sysctl's for twe out of hw and under the device node. That seem to have broken tw_cli. I will revert that and generate an updated patch. Try http://www.FreeBSD.org/~jhb/patches/twe_locking2.patch -- John Baldwin