From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 18 10:59:06 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B7C3106566C; Sun, 18 Dec 2011 10:59:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 94C888FC08; Sun, 18 Dec 2011 10:59:04 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA15619; Sun, 18 Dec 2011 12:58:59 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1RcESI-000Cj5-Rt; Sun, 18 Dec 2011 12:58:58 +0200 Message-ID: <4EEDC771.800@FreeBSD.org> Date: Sun, 18 Dec 2011 12:58:57 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111206 Thunderbird/8.0 MIME-Version: 1.0 To: Hans Petter Selasky References: <4EE51CB5.1060505@FreeBSD.org> <201112160016.33776.hselasky@c2i.net> <4EECADD4.9040509@FreeBSD.org> <201112171806.43764.hselasky@c2i.net> In-Reply-To: <201112171806.43764.hselasky@c2i.net> X-Enigmail-Version: undefined Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: usb@FreeBSD.org, freebsd-hackers@FreeBSD.org, John Baldwin , mdf@FreeBSD.org Subject: Re: kern_yield vs ukbd_yield X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 10:59:06 -0000 on 17/12/2011 19:06 Hans Petter Selasky said the following: > If the problem is only in UKBD driver, I don't think this is a big problem to > solve. The reason for the auto-magic locking, is that I've sometimes seen > callers in non-polling mode call into UKBD without Giant locked. And this > causes a panic when starting USB transfers, because the code expects Giant to > be locked. Hmm, do you have an example of such a panic? I couldn't find how this could be possible in my examination of non-polling entry points into syscons and kbd drives. > Requirement: I would say that to use UKBD polling mode, the scheduler must be > stopped. Else you should not use polling mode at all. I think that mountroot > is getting characters the wrong way in this regard. I think that this is a too strong / unnecessary requirement. I think that now (after my recent syscons commits) ukbd should work correctly and optimally in this context. I have written a small article about my analysis of locking in syscons, underlying kbd drivers and ukbd in particular: http://wiki.freebsd.org/AvgSyscons I could have misunderstood or missed things, so I will appreciate a review and discussion of my observations. Thank you! -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 18 17:41:57 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 084A2106566B; Sun, 18 Dec 2011 17:41:57 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe09.c2i.net [212.247.155.2]) by mx1.freebsd.org (Postfix) with ESMTP id B4B688FC12; Sun, 18 Dec 2011 17:41:55 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe09.swip.net (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 44558516; Sun, 18 Dec 2011 18:41:53 +0100 From: Hans Petter Selasky To: Andriy Gapon Date: Sun, 18 Dec 2011 18:39:24 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <4EE51CB5.1060505@FreeBSD.org> <201112171806.43764.hselasky@c2i.net> <4EEDC771.800@FreeBSD.org> In-Reply-To: <4EEDC771.800@FreeBSD.org> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201112181839.24813.hselasky@c2i.net> Cc: usb@freebsd.org, freebsd-hackers@freebsd.org, mdf@freebsd.org Subject: Re: kern_yield vs ukbd_yield X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 17:41:57 -0000 On Sunday 18 December 2011 11:58:57 Andriy Gapon wrote: > on 17/12/2011 19:06 Hans Petter Selasky said the following: > > If the problem is only in UKBD driver, I don't think this is a big > > problem to solve. The reason for the auto-magic locking, is that I've > > sometimes seen callers in non-polling mode call into UKBD without Giant > > locked. And this causes a panic when starting USB transfers, because the > > code expects Giant to be locked. > > Hmm, do you have an example of such a panic? I couldn't find how this could > be possible in my examination of non-polling entry points into syscons and > kbd drives. mtx_assert(&Giant, MTX_OWNED); will panic if Giant is not locked. Do you need an example? > > > Requirement: I would say that to use UKBD polling mode, the scheduler > > must be stopped. Else you should not use polling mode at all. I think > > that mountroot is getting characters the wrong way in this regard. > > I think that this is a too strong / unnecessary requirement. I think that > now (after my recent syscons commits) ukbd should work correctly and > optimally in this context. > > I have written a small article about my analysis of locking in syscons, > underlying kbd drivers and ukbd in particular: > http://wiki.freebsd.org/AvgSyscons > I could have misunderstood or missed things, so I will appreciate a review > and discussion of my observations. Thank you! I will have a look at it when I find some time! --HPS From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 18 17:58:58 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 063E7106566B; Sun, 18 Dec 2011 17:58:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B301A8FC0A; Sun, 18 Dec 2011 17:58:56 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA18656; Sun, 18 Dec 2011 19:58:51 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1RcL0c-000CvS-Tv; Sun, 18 Dec 2011 19:58:50 +0200 Message-ID: <4EEE29D7.6020504@FreeBSD.org> Date: Sun, 18 Dec 2011 19:58:47 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111206 Thunderbird/8.0 MIME-Version: 1.0 To: Hans Petter Selasky References: <4EE51CB5.1060505@FreeBSD.org> <201112171806.43764.hselasky@c2i.net> <4EEDC771.800@FreeBSD.org> <201112181839.24813.hselasky@c2i.net> In-Reply-To: <201112181839.24813.hselasky@c2i.net> X-Enigmail-Version: undefined Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: usb@FreeBSD.org, freebsd-hackers@FreeBSD.org, John Baldwin , mdf@FreeBSD.org Subject: Re: kern_yield vs ukbd_yield X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 17:58:58 -0000 on 18/12/2011 19:39 Hans Petter Selasky said the following: > On Sunday 18 December 2011 11:58:57 Andriy Gapon wrote: >> on 17/12/2011 19:06 Hans Petter Selasky said the following: >>> If the problem is only in UKBD driver, I don't think this is a big >>> problem to solve. The reason for the auto-magic locking, is that I've >>> sometimes seen callers in non-polling mode call into UKBD without Giant >>> locked. And this causes a panic when starting USB transfers, because the >>> code expects Giant to be locked. >> >> Hmm, do you have an example of such a panic? I couldn't find how this could >> be possible in my examination of non-polling entry points into syscons and >> kbd drives. > > mtx_assert(&Giant, MTX_OWNED); will panic if Giant is not locked. Do you need > an example? Yes :-) I want to see a non-polled code path in the keyboard layer where Giant is not locked. >>> Requirement: I would say that to use UKBD polling mode, the scheduler >>> must be stopped. Else you should not use polling mode at all. I think >>> that mountroot is getting characters the wrong way in this regard. >> >> I think that this is a too strong / unnecessary requirement. I think that >> now (after my recent syscons commits) ukbd should work correctly and >> optimally in this context. >> >> I have written a small article about my analysis of locking in syscons, >> underlying kbd drivers and ukbd in particular: >> http://wiki.freebsd.org/AvgSyscons >> I could have misunderstood or missed things, so I will appreciate a review >> and discussion of my observations. Thank you! > > I will have a look at it when I find some time! Hope it won't be long. Thank you! -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 18 20:49:23 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1F5E106566C for ; Sun, 18 Dec 2011 20:49:23 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 453998FC0C for ; Sun, 18 Dec 2011 20:49:22 +0000 (UTC) Received: by lahl5 with SMTP id l5so2804585lah.13 for ; Sun, 18 Dec 2011 12:49:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=ohGWIqCxDxsG02d+7mriP/L18uHnc7RpKnlRnLRB/Iw=; b=inT3qsCNRCsPyU607cnTeV6Y+10mTlejl8g8pOwl0CNWP5CadfDlTvBAmdIWIKYjbB R4w6O5t45HiAZ6+7p3Wav1eiYvHN9xe72qVjfM3oz3snBrQDA5NZtu1m9Ql+tttgf6S7 r1XWwXhLkOGAzyaqiCJbn5lu/99uoXHGTytyQ= MIME-Version: 1.0 Received: by 10.152.103.51 with SMTP id ft19mr13961747lab.42.1324239502546; Sun, 18 Dec 2011 12:18:22 -0800 (PST) Received: by 10.152.24.138 with HTTP; Sun, 18 Dec 2011 12:18:22 -0800 (PST) Date: Sun, 18 Dec 2011 21:18:22 +0100 Message-ID: From: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= To: FreeBSD Hackers Content-Type: text/plain; charset=ISO-8859-1 Subject: sysctl variable question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 20:49:23 -0000 Hi all, I'm writing a small module just for fun. I would like to have two variables: - "pid" of type unsigned int and RW so the user can set a pid - "process_name" as a string RD that will display the process name associated to that pid (or a message if the pid doesn't exist anymore) My problem is with the handler functions. For "process_name", as it is read only, I wrote a simple handler that works fine. However, I want to write another one for "pid" so I can sanitize the input (avoiding pids < 0 and so). As I understand, the handler I specify with SYSCTL_OID will be called for both reads and writes. But, how can I tell what kind of operation is it, so I know if I have to use SYSCTL_OUT or SYSCTL_IN? I tried to have a look at sysctl_handle_int but I don't fully understand what is going on with the arg1 parameter. What is it for? Thanks in advance. From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 18 21:12:46 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 806DD106566C for ; Sun, 18 Dec 2011 21:12:46 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 531AE8FC0A for ; Sun, 18 Dec 2011 21:12:45 +0000 (UTC) Received: from julian-mac.elischer.org (c-67-180-24-15.hsd1.ca.comcast.net [67.180.24.15]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id pBILCfxR010726 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 18 Dec 2011 13:12:44 -0800 (PST) (envelope-from julian@freebsd.org) Message-ID: <4EEE5763.6010509@freebsd.org> Date: Sun, 18 Dec 2011 13:13:07 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.24) Gecko/20111103 Thunderbird/3.1.16 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: FreeBSD Hackers Subject: Re: sysctl variable question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 21:12:46 -0000 On 12/18/11 12:18 PM, Fernando Apesteguía wrote: > Hi all, > > I'm writing a small module just for fun. I would like to have two variables: > > - "pid" of type unsigned int and RW so the user can set a pid > - "process_name" as a string RD that will display the process name > associated to that pid (or a message if the pid doesn't exist anymore) this is dangerous as there are some places in the kernel where processes are referenced by pid, so changing it may break kernel assumptions. > My problem is with the handler functions. For "process_name", as it is > read only, I wrote a simple handler that works fine. However, I want > to write another one for "pid" so I can sanitize the input (avoiding > pids< 0 and so). As I understand, the handler I specify with > SYSCTL_OID will be called for both reads and writes. But, how can I > tell what kind of operation is it, so I know if I have to use > SYSCTL_OUT or SYSCTL_IN? I tried to have a look at sysctl_handle_int > but I don't fully understand what is going on with the arg1 parameter. > What is it for? > > Thanks in advance. > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 15 05:19:24 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 076CC106564A for ; Thu, 15 Dec 2011 05:19:24 +0000 (UTC) (envelope-from janm@transactionware.com) Received: from midgard.transactionware.com (mail2.transactionware.com [203.14.245.36]) by mx1.freebsd.org (Postfix) with SMTP id 5E4238FC13 for ; Thu, 15 Dec 2011 05:19:22 +0000 (UTC) Received: (qmail 88889 invoked by uid 907); 15 Dec 2011 04:52:41 -0000 Received: from jmmacpro.transactionware.com (HELO jmmacpro.transactionware.com) (192.168.1.33) by midgard.transactionware.com (qpsmtpd/0.82) with ESMTP; Thu, 15 Dec 2011 15:52:41 +1100 Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: Jan Mikkelsen In-Reply-To: <9317551F-CBE0-4368-B798-498E58E240B2@sarenet.es> Date: Thu, 15 Dec 2011 15:52:41 +1100 Content-Transfer-Encoding: quoted-printable Message-Id: <4391B719-FABD-4E13-B328-D55EA9E7D74D@transactionware.com> References: <4EE8A005.5030607@barafranca.com> <9317551F-CBE0-4368-B798-498E58E240B2@sarenet.es> To: Borja Marcos X-Mailer: Apple Mail (2.1251.1) X-Mailman-Approved-At: Sun, 18 Dec 2011 22:24:05 +0000 Cc: freebsd-hackers@freebsd.org, Hugo Silva Subject: Re: mfi (Dell H700) + hot swapping doesn't appear to work with RC1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2011 05:19:24 -0000 On 15/12/2011, at 2:16 AM, Borja Marcos wrote: >=20 > On Dec 14, 2011, at 2:09 PM, Hugo Silva wrote: >=20 >> Hello, >>=20 >> First of all apologies if this has been fixed in RC3. I set this = server >> up with mfsbsd, which is RC1, and didn't get to update the system = yet. >>=20 >> This box has 6 hdds, a 2-mirror zpool was set up as the root pool, = with >> 2 spares. >>=20 >> While testing hot swapping I noticed that while the controller = detects >> disk removal/insertion, the zpool will never recover. The problem = seems >> to be deeper than ZFS, as disklabel/fdisk/etc also fail on the >> removed-and-reinserted disk. >>=20 >> At the ZFS level, doing a zpool clear yields more errors on the = removed >> disk; rebooting becomes the only option to make the pool healthy = again. >>=20 >>=20 >> Is this normal? Did I miss any step? >=20 > I assume that you have tried to use the H700 as a "JBOD" card, = defining logical volume for each hard disk. >=20 > The problem is: that gorgeous, fantastic, masterful, Nobel award = candidate card, has a wonderful behavior in that case. If you extract = one of the disks, the logical volume associated to it is invalidated. = So, you insert a replacement disk, and the card refuses to recognize the = volume. What is even worse, in order to recover it's mandatory to reboot = the complete system *AND* go through the RAID configuration utility. >=20 > That's the problem. The card refuses to work as a simple disk = controller without frills, and the frills get in the way. >=20 > To summarize: it isn't FreeBSD's fault, no matter which version you = use. It's a "feature" coming directly from the geniuses who designed the = card. Hugo: You missed a step. Borja: No reboot required. For the mfi controllers I have been testing recently (MegaRAID 9261-8i), = you need to install the sysutils/megacli port, and use that to clear the = "foreignness" of the disk you just added. Something like: MegaCli -CfgForeign -Clear -a0 You should be able to then recreate it as a JBOD device, and progress = through whatever higher level recovery you need to do. Regards, Jan Mikkelsen From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 18 22:52:26 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6665A106567A for ; Sun, 18 Dec 2011 22:52:26 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id A30EA8FC0C for ; Sun, 18 Dec 2011 22:52:25 +0000 (UTC) Received: by lahl5 with SMTP id l5so2827761lah.13 for ; Sun, 18 Dec 2011 14:52:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=UQgyt1VVYcDfJL1MBT603u9sJfeAgJsYGBBZZ2sHwe8=; b=VCUPHsAuYZLkNBgAYWgELBSrg70//RrIaNrvKF4DGWH/cJufjEhRxVrLGn1E9VHo2J p2AICntFC1z7Tgs9MeAiPx6yWdfHLSa60OFTcZc8KFnalE9aR9Nduf4NyWQqrSrDlT4C +aHWAM4tANaIALVEw0yzdeQt8eAZ3dOiuec/w= MIME-Version: 1.0 Received: by 10.152.103.51 with SMTP id ft19mr14265162lab.42.1324248744283; Sun, 18 Dec 2011 14:52:24 -0800 (PST) Received: by 10.152.24.138 with HTTP; Sun, 18 Dec 2011 14:52:24 -0800 (PST) Received: by 10.152.24.138 with HTTP; Sun, 18 Dec 2011 14:52:24 -0800 (PST) In-Reply-To: <4EEE5763.6010509@freebsd.org> References: <4EEE5763.6010509@freebsd.org> Date: Sun, 18 Dec 2011 23:52:24 +0100 Message-ID: From: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= To: Julian Elischer Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD Hackers Subject: Re: sysctl variable question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Dec 2011 22:52:26 -0000 El 18/12/2011 22:12, "Julian Elischer" escribi=F3: > > On 12/18/11 12:18 PM, Fernando Apestegu=EDa wrote: >> >> Hi all, >> >> I'm writing a small module just for fun. I would like to have two variables: >> >> - "pid" of type unsigned int and RW so the user can set a pid >> - "process_name" as a string RD that will display the process name >> associated to that pid (or a message if the pid doesn't exist anymore) > > > this is dangerous as there are some places in the kernel where processes > are referenced by pid, so changing it may break kernel assumptions. Sorry, i think i didn't explain it clearly. The "pid" variable is static in my module and it is used just to tell the module which information it should show in the other variable. >> >> My problem is with the handler functions. For "process_name", as it is >> read only, I wrote a simple handler that works fine. However, I want >> to write another one for "pid" so I can sanitize the input (avoiding >> pids< 0 and so). As I understand, the handler I specify with >> SYSCTL_OID will be called for both reads and writes. But, how can I >> tell what kind of operation is it, so I know if I have to use >> SYSCTL_OUT or SYSCTL_IN? I tried to have a look at sysctl_handle_int >> but I don't fully understand what is going on with the arg1 parameter. >> What is it for? >> >> Thanks in advance. >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.or= g " >> > From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 19 01:15:57 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37C11106564A for ; Mon, 19 Dec 2011 01:15:57 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0631C8FC0C for ; Mon, 19 Dec 2011 01:15:56 +0000 (UTC) Received: by dakp5 with SMTP id p5so4873828dak.13 for ; Sun, 18 Dec 2011 17:15:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=f7BDuXu657zdbY1Tk7OMCXbtCW+mRT++URmGWsGMAhQ=; b=l9v32RGv7U7M8mNrC8WCrNfJQD7C7pagFU41VNLONhwpSFqdKMZHfHkRbEf4Da7CnK +3o2Jm9CSBngU177u6a3ugdZaKx6Mo3mmzi6PKvq98z2J+gvnT2ZgRy25CtaiQZfmR75 R5uZ26iM88LifAjPRQlGVGGH8TlPqjyGwc2O0= MIME-Version: 1.0 Received: by 10.68.191.70 with SMTP id gw6mr35230679pbc.85.1324257356477; Sun, 18 Dec 2011 17:15:56 -0800 (PST) Sender: mdf356@gmail.com Received: by 10.68.197.198 with HTTP; Sun, 18 Dec 2011 17:15:56 -0800 (PST) In-Reply-To: References: <4EEE5763.6010509@freebsd.org> Date: Sun, 18 Dec 2011 17:15:56 -0800 X-Google-Sender-Auth: Bd5ZlXUEpkAno-siSjyU4k5xVSE Message-ID: From: mdf@FreeBSD.org To: =?ISO-8859-1?Q?Fernando_Apestegu=EDa?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Hackers Subject: Re: sysctl variable question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2011 01:15:57 -0000 2011/12/18 Fernando Apestegu=EDa : > El 18/12/2011 22:12, "Julian Elischer" escribi=F3: >> >> On 12/18/11 12:18 PM, Fernando Apestegu=EDa wrote: >>> >>> Hi all, >>> >>> I'm writing a small module just for fun. I would like to have two > variables: >>> >>> - "pid" of type unsigned int and RW so the user can set a pid >>> - "process_name" as a string RD that will display the process name >>> associated to that pid (or a message if the pid doesn't exist anymore) >> >> >> this is dangerous as there are some places in the kernel where processes >> are referenced by pid, so changing it may break kernel assumptions. > > Sorry, i think i didn't explain it clearly. The "pid" variable is static = in > my module and it is used just to tell the module which information it > should show in the other variable. Many sysctl handlers look for a req->newptr and leave early if it's NULL. If it's non-NULL then you can use SYSCTL_IN to fetch the data. Note that a caller of sysctl(3) API can specify both old pointer and new pointer, which is why most handlers always do a SYSCTL_OUT on the current value. Cheers, matthew >>> My problem is with the handler functions. For "process_name", as it is >>> read only, I wrote a simple handler that works fine. However, I want >>> to write another one for "pid" so I can sanitize the input (avoiding >>> pids< =A00 and so). As I understand, the handler I specify with >>> SYSCTL_OID will be called for both reads and writes. But, how can I >>> tell what kind of operation is it, so I know if I have to use >>> SYSCTL_OUT or SYSCTL_IN? I tried to have a look at sysctl_handle_int >>> but I don't fully understand what is going on with the arg1 parameter. >>> What is it for? >>> >>> Thanks in advance. >>> _______________________________________________ >>> freebsd-hackers@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >>> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.o= rg > " >>> >> > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 20 14:52:48 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 959951065673; Tue, 20 Dec 2011 14:52:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6DD938FC0C; Tue, 20 Dec 2011 14:52:48 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 2574E46B0A; Tue, 20 Dec 2011 09:52:48 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3643BB93E; Tue, 20 Dec 2011 09:52:47 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 20 Dec 2011 09:11:43 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <4EED20C7.1090704@FreeBSD.org> In-Reply-To: <4EED20C7.1090704@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201112200911.43880.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 20 Dec 2011 09:52:47 -0500 (EST) Cc: hackers@freebsd.org, Andriy Gapon Subject: Re: RB_NOSYNC -> no device_shutdown ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 14:52:48 -0000 On Saturday, December 17, 2011 6:07:51 pm Andriy Gapon wrote: > > I look at the following code: > > static void > module_init(void *arg) > { > > sx_init(&modules_sx, "module subsystem sx lock"); > TAILQ_INIT(&modules); > EVENTHANDLER_REGISTER(shutdown_final, module_shutdown, NULL, > SHUTDOWN_PRI_DEFAULT); > } > > SYSINIT(module, SI_SUB_KLD, SI_ORDER_FIRST, module_init, 0); > > static void > module_shutdown(void *arg1, int arg2) > { > module_t mod; > > if (arg2 & RB_NOSYNC) > return; > mtx_lock(&Giant); > MOD_SLOCK; > TAILQ_FOREACH_REVERSE(mod, &modules, modulelist, link) > MOD_EVENT(mod, MOD_SHUTDOWN); > MOD_SUNLOCK; > mtx_unlock(&Giant); > } > > and wonder why RB_NOSYNC is overloaded to mean that no > MOD_SHUTDOWN/device_shutdown cleanup should be done? Presumably most device_shutdown handlers were used for syncing storage when the module stuff was first added. I'm not sure how you would fix this now since you can't easily pass the 'arg2' flags down to each handler so that the appropriate ones could skip their shutdown actions. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 20 14:52:48 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 959951065673; Tue, 20 Dec 2011 14:52:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 6DD938FC0C; Tue, 20 Dec 2011 14:52:48 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 2574E46B0A; Tue, 20 Dec 2011 09:52:48 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3643BB93E; Tue, 20 Dec 2011 09:52:47 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 20 Dec 2011 09:11:43 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <4EED20C7.1090704@FreeBSD.org> In-Reply-To: <4EED20C7.1090704@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201112200911.43880.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 20 Dec 2011 09:52:47 -0500 (EST) Cc: hackers@freebsd.org, Andriy Gapon Subject: Re: RB_NOSYNC -> no device_shutdown ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2011 14:52:48 -0000 On Saturday, December 17, 2011 6:07:51 pm Andriy Gapon wrote: > > I look at the following code: > > static void > module_init(void *arg) > { > > sx_init(&modules_sx, "module subsystem sx lock"); > TAILQ_INIT(&modules); > EVENTHANDLER_REGISTER(shutdown_final, module_shutdown, NULL, > SHUTDOWN_PRI_DEFAULT); > } > > SYSINIT(module, SI_SUB_KLD, SI_ORDER_FIRST, module_init, 0); > > static void > module_shutdown(void *arg1, int arg2) > { > module_t mod; > > if (arg2 & RB_NOSYNC) > return; > mtx_lock(&Giant); > MOD_SLOCK; > TAILQ_FOREACH_REVERSE(mod, &modules, modulelist, link) > MOD_EVENT(mod, MOD_SHUTDOWN); > MOD_SUNLOCK; > mtx_unlock(&Giant); > } > > and wonder why RB_NOSYNC is overloaded to mean that no > MOD_SHUTDOWN/device_shutdown cleanup should be done? Presumably most device_shutdown handlers were used for syncing storage when the module stuff was first added. I'm not sure how you would fix this now since you can't easily pass the 'arg2' flags down to each handler so that the appropriate ones could skip their shutdown actions. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 21 11:39:12 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1360106564A; Wed, 21 Dec 2011 11:39:12 +0000 (UTC) (envelope-from hosting@syscare.sk) Received: from services.syscare.sk (services.syscare.sk [188.40.39.36]) by mx1.freebsd.org (Postfix) with ESMTP id 756998FC13; Wed, 21 Dec 2011 11:39:12 +0000 (UTC) Received: from services.syscare.sk (services [188.40.39.36]) by services.syscare.sk (Postfix) with ESMTP id 30089968A6; Wed, 21 Dec 2011 12:20:07 +0100 (CET) X-Virus-Scanned: amavisd-new at rulez.sk Received: from services.syscare.sk ([188.40.39.36]) by services.syscare.sk (services.rulez.sk [188.40.39.36]) (amavisd-new, port 10024) with ESMTP id YP7KBeuKB5AO; Wed, 21 Dec 2011 12:20:01 +0100 (CET) Received: from hosting.syscare.sk (hosting [188.40.39.37]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by services.syscare.sk (Postfix) with ESMTPS id B9A5A96889; Wed, 21 Dec 2011 12:20:01 +0100 (CET) Received: (from www@localhost) by hosting.syscare.sk (8.14.4/8.14.4/Submit) id pBLBK1Xd024814; Wed, 21 Dec 2011 12:20:01 +0100 (CET) (envelope-from hosting@syscare.sk) X-Authentication-Warning: hosting.syscare.sk: www set sender to hosting@syscare.sk using -f To: , , X-PHP-Originating-Script: 0:func.inc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 21 Dec 2011 12:20:01 +0100 From: Daniel Gerzo Organization: The FreeBSD Project Message-ID: <42b359617666a9ec8b47908964a5ee9e@rulez.sk> X-Sender: danger@FreeBSD.org User-Agent: Roundcube Webmail/0.5.4 Cc: Subject: REMAINDER: Call for FreeBSD Status Reports - 4Q/2011 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 11:39:12 -0000 Dear all, I would like to remind you that the next round of status reports covering the fourth quarter of 2011 are due on January 15th, 2011. As this initiative is very popular among our users, I would like to ask you to submit your status reports as sooner than later (holidays are quickly approaching), so that we can compile the report in a timely fashion. Do not hesitate and write a few lines; a short description about what you are working on, what your plans and goals are, or any other information that you consider interested is always welcome. This way we can inform our community about your great work! Check out the reports from the past to get some inspiration of what your submission should look like. If you know about a project that should be included in the status report, please let us know as well, so we can poke the responsible people to provide us with something useful. Updates to submissions from the last report are welcome as well. Note that the submissions are accepted from anyone involved within the FreeBSD community, you do not have to be a FreeBSD committer. Anything related to FreeBSD can be covered. Please email us the filled-in XML template which can be found at http://www.freebsd.org/news/status/report-sample.xml to monthly@FreeBSD.org, or alternatively use our web based form located at http://www.freebsd.org/cgi/monthly.cgi. For more information, please visit http://www.freebsd.org/news/status/. We are looking forward to see your submissions! -- Kind regards Daniel Gerzo From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 21 21:53:51 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21332106564A for ; Wed, 21 Dec 2011 21:53:51 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) Received: from mail.ambrisko.com (mail.ambrisko.com [70.91.206.90]) by mx1.freebsd.org (Postfix) with ESMTP id F08638FC17 for ; Wed, 21 Dec 2011 21:53:50 +0000 (UTC) X-Ambrisko-Me: Yes Received: from server2.ambrisko.com (HELO internal.ambrisko.com) ([192.168.1.2]) by ironport.ambrisko.com with ESMTP; 21 Dec 2011 13:25:57 -0800 Received: from ambrisko.com (localhost [127.0.0.1]) by internal.ambrisko.com (8.14.4/8.14.4) with ESMTP id pBLLPET4021098; Wed, 21 Dec 2011 13:25:14 -0800 (PST) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.14.4/8.14.4/Submit) id pBLLPDvu021096; Wed, 21 Dec 2011 13:25:13 -0800 (PST) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <201112212125.pBLLPDvu021096@ambrisko.com> In-Reply-To: <3A13B3B1-4CDE-4D5A-A6F3-E7DC5BB0E4E3@averesystems.com> To: Andrew Boyer Date: Wed, 21 Dec 2011 13:25:13 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL124d (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Cc: freebsd-hackers@freebsd.org, Jan Mikkelsen , Hugo Silva Subject: Re: mfi (Dell H700) + hot swapping doesn't appear to work with RC1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Dec 2011 21:53:51 -0000 Andrew Boyer writes: [snip] | Has anyone managed to get the real JBOD mode working on this controller? | It advertises support in the firmware but doesn't seem to do anything. | The documentation only lists JBOD mode as a feature of the lower-end | controllers. [snip] The current mfi driver doesn't have support for JBOD support. The new one that is being working does have true JBOD support. Some people have been doing something like this via the cam passthough hack. With JBOD inserting the disk and removing a disk as hot swap is working. There are some rough edges on the new driver that are being worked out by a few people. It supports all current LSI MegaRAID cards. So things should get better in the near future. Thanks, Doug A. From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 22 06:16:20 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7E56106564A for ; Thu, 22 Dec 2011 06:16:20 +0000 (UTC) (envelope-from sushanth_rai@yahoo.com) Received: from nm24.access.bullet.mail.sp2.yahoo.com (nm24.access.bullet.mail.sp2.yahoo.com [98.139.44.151]) by mx1.freebsd.org (Postfix) with SMTP id 8EF058FC0A for ; Thu, 22 Dec 2011 06:16:20 +0000 (UTC) Received: from [98.139.44.99] by nm24.access.bullet.mail.sp2.yahoo.com with NNFMP; 22 Dec 2011 06:03:33 -0000 Received: from [98.139.44.90] by tm4.access.bullet.mail.sp2.yahoo.com with NNFMP; 22 Dec 2011 06:03:33 -0000 Received: from [127.0.0.1] by omp1027.access.mail.sp2.yahoo.com with NNFMP; 22 Dec 2011 06:03:33 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 212026.83351.bm@omp1027.access.mail.sp2.yahoo.com Received: (qmail 55465 invoked by uid 60001); 22 Dec 2011 06:03:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1324533812; bh=7LKyWHzKHxwVL9piKeJaf2Eyf4dv3pO8QnNvE6DDt4A=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=v0Khk0F1emjBrMZbvLcVjcQjN2g2GFqstTCj8a3ANdngYlCD7Yq+8/Ctmxw2qywG7IVOIb81nkJtYAJ/S5Pzun1rZq0EX3O0W6la77m/bGaXSw7W74O+ewVaiL09SpudMTVFD+SflD4XnpQESZhOmxYHPu38vY4zYfRvxphTUVk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=B7ixmc1QGySA7MULnWBV4ElhAiXNaCKLJAFz3H7a1/qa4zLhcw42/wrej+kHojc9MHB1i/JlKhmswprqyv/quEBuH+BIZrqkQT/XAcRuTiYKZpIZkFclmI26heYdKhJ+Nt+LSgyUGVXqMwf1pBP2vdmFLAsbke6joj5gMw7nbrw=; X-YMail-OSG: OQZJG48VM1mtwDh517F58MdLRV..ZIGH0oIxAAuXySRjssc xXyZyUnm8HVrpbLkadHmwQEZWOvb9b4hHGqmO7xPNQ6EaQbouS_mKUWp.9uJ 0ZAOVe.fTSu.M.cyQNcsISzIsb1SBai22BnZji9eQgBxOV12KsjjxGxXpBj0 WSAde_comiYVTXX8_H1O6QUfB3X7E9FpaSh3Sflu7WA7.Kukd3Ln_tolySSU RFmxp.z0xemJH8pukPn_9YlcAmwVIEj6Gm0T04EVvWf8xLnLRUzX2RLsiZrp qXRaJRSiR.4aTTEgHY.zmpLCfWVyPEZrYnfOy6P1KBpk6cSKZZ7MWTgZSTbq EoUr0_0_0F0zs06VLCD183lLYJUplahbW4nUMtygoPocuhPfi9ZsbyOoVf8e fRNZB28.AMg9FXLepsbIa2HsulvP_znfQB2eNae9BHhsqAFatXnlDFv6R9jh zCY59g.g- Received: from [76.211.234.138] by web180006.mail.gq1.yahoo.com via HTTP; Wed, 21 Dec 2011 22:03:31 PST X-Mailer: YahooMailClassic/15.0.4 YahooMailWebService/0.8.115.331698 Message-ID: <1324533811.54730.YahooMailClassic@web180006.mail.gq1.yahoo.com> Date: Wed, 21 Dec 2011 22:03:31 -0800 (PST) From: Sushanth Rai To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailman-Approved-At: Thu, 22 Dec 2011 06:26:55 +0000 Subject: Using kevent for signalling user app from kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 06:16:20 -0000 Hi, I'm planning to use kqueue/kevent mechanism to notify a user application from the kernel. Basically I set up a file descriptor for read event from the user application by calling kevent(). Now, I would like to wake-up the process from within the kernel. The wake-up will happen due to one of the internal events (not due to data being available to read). I have access to the process structure and vnode corresponding to file descriptor. Is there a mechanism available from the kernel to trigger a wakeup and clear the kernel break notify message ? Thanks, Sushanth From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 22 13:07:41 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03406106566B for ; Thu, 22 Dec 2011 13:07:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id CE8F38FC19 for ; Thu, 22 Dec 2011 13:07:40 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id 871F046B0D; Thu, 22 Dec 2011 08:07:40 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0399CB969; Thu, 22 Dec 2011 08:07:40 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 22 Dec 2011 07:57:11 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <1324533811.54730.YahooMailClassic@web180006.mail.gq1.yahoo.com> In-Reply-To: <1324533811.54730.YahooMailClassic@web180006.mail.gq1.yahoo.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201112220757.11823.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 22 Dec 2011 08:07:40 -0500 (EST) Cc: Sushanth Rai Subject: Re: Using kevent for signalling user app from kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 13:07:41 -0000 On Thursday, December 22, 2011 1:03:31 am Sushanth Rai wrote: > Hi, > > I'm planning to use kqueue/kevent mechanism to notify a user application from the kernel. Basically I set up a file descriptor for read event from the user application by calling kevent(). Now, I would like to wake-up the process from within the kernel. The wake-up will happen due to one of the internal events (not due to data being available to read). I have access to the process structure and vnode corresponding to file descriptor. Is there a mechanism available from the kernel to trigger a wakeup and clear the kernel break notify message ? In the kernel you'd typically use KNOTE() to signal that an event should be signalled. However, that will only post the event if the file is now readable. I think you have a couple of options: 1) You can send a signal to the process which will interrupt the kevent. 2) You can add a new filter type and use it with your file descriptor to signal your special side-band events. The userland app will have to add both an EVFILT_READ event and and event for your custom filter type. You can then use KNOTE when your side-band event happens and your custom filter's f_event hook can signal the event in that case. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 22 15:07:15 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40C97106566B for ; Thu, 22 Dec 2011 15:07:15 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 197878FC1C for ; Thu, 22 Dec 2011 15:07:15 +0000 (UTC) Received: by pbcc3 with SMTP id c3so6854602pbc.13 for ; Thu, 22 Dec 2011 07:07:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=g4hOevBnFpuNShWZ7T/DjFwwN/c5nCFGOoW86g7zpug=; b=ejtP5oyWHPbFX9E5ndJaqD6c6Ms6z0VJRC9D1qmQjqyzg3GSHrkToLEDjVZBZWUa6Z cciP38pzAEe7vc+hePyDkusTpr+0CH5NV19H3v81fvsm9AthUSL/BgBcsFNFosyHpc/J U02T/rgwPylHPgwaQPZJ/xGHVHNPjBS33hvvU= Received: by 10.68.74.167 with SMTP id u7mr23320312pbv.103.1324564736282; Thu, 22 Dec 2011 06:38:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.143.77.16 with HTTP; Thu, 22 Dec 2011 06:38:34 -0800 (PST) In-Reply-To: <1324533811.54730.YahooMailClassic@web180006.mail.gq1.yahoo.com> References: <1324533811.54730.YahooMailClassic@web180006.mail.gq1.yahoo.com> From: arrowdodger <6yearold@gmail.com> Date: Thu, 22 Dec 2011 17:38:34 +0300 Message-ID: To: Sushanth Rai Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Using kevent for signalling user app from kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 15:07:15 -0000 On Thu, Dec 22, 2011 at 10:03 AM, Sushanth Rai wrote: > Hi, > > I'm planning to use kqueue/kevent mechanism to notify a user application > from the kernel. Basically I set up a file descriptor for read event from > the user application by calling kevent(). Now, I would like to wake-up the > process from within the kernel. The wake-up will happen due to one of the > internal events (not due to data being available to read). I have access to > the process structure and vnode corresponding to file descriptor. Is there > a mechanism available from the kernel to trigger a wakeup and clear the > kernel break notify message ? > > Thanks, > Sushanth > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > Hi. I'm not very experienced in this stuff, but you can try to look at how EVFILT_USER is handled. Specifically, take a look at what is going on when this filter is triggered from userland. From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 22 17:44:12 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7141F106566C for ; Thu, 22 Dec 2011 17:44:12 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout2-b.corp.bf1.yahoo.com (mrout2-b.corp.bf1.yahoo.com [98.139.253.105]) by mx1.freebsd.org (Postfix) with ESMTP id 2533F8FC0A for ; Thu, 22 Dec 2011 17:44:11 +0000 (UTC) Received: from [127.0.0.1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout2-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id pBMHXjKo069343 for ; Thu, 22 Dec 2011 09:33:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1324575225; bh=QnU7v+MxBUGgHDvV5VVCELJdYg3J4EICbpy6EAt/7WI=; h=Subject:From:To:Content-Type:Date:Message-ID:Mime-Version: Content-Transfer-Encoding; b=LkaTJ5MF0QFKRyFRZ81t0IBOLiqEBNjd2ucs2swn96aM1OJq4JcAxfbLJwoXAgrg4 bxqlTXK5GDeeqsZRTAb1EWPNwVBEHz5EeicJ/H8uPYdd8sn2zTDn2AP+p6QinaomZ9 ewxNMd3HDOq66L7idBEzLxEMb01VW9IagJArgOyU= From: Sean Bruno To: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset="UTF-8" Date: Thu, 22 Dec 2011 09:33:45 -0800 Message-ID: <1324575225.20358.2.camel@hitfishpass-lx.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 (2.32.3-1.fc14) Content-Transfer-Encoding: 7bit Subject: Subversion upgrades of existing dirs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 17:44:12 -0000 How do I upgrade an existing svn tree with the current svn client. I don't really get what the client is trying to tell me here. [sbruno@ref9-xen32 /dumpster/scratch/sbruno-scratch/9]$ svn up svn: E155036: Please see the 'svn upgrade' command svn: E155036: Working copy '/dumpster/scratch/sbruno-scratch/9' is an old development version (format 12); to upgrade it, use a format 18 client, then use 'tools/dev/wc-ng/bumpt [sbruno@ref9-xen32 /dumpster/scratch/sbruno-scratch/9]$ svn upgrade . svn: E155019: Can't upgrade '/dumpster/scratch/sbruno-scratch/9' as it is not a pre-1.7 working copy directory svn: E150000: Missing default entry [sbruno@ref9-xen32 /dumpster/scratch/sbruno-scratch/9]$ pkg_info 44bsd-csh-20001106_3 The traditional 4.4BSD /bin/csh C-shell ambit-2.0.39 Extended bash brace expansion to expand hostnames or comman apr-ipv6-devrandom-gdbm-db42-1.4.5.1.3.12 Apache Portability Library bash-4.1.10 The GNU Project's Bourne Again SHell bison-2.4.3,1 A parser generator from FSF, (mostly) compatible with Yacc db42-4.2.52_5 The Berkeley DB package, revision 4.2 expat-2.0.1_1 XML 1.0 parser written in C gdbm-1.8.3_3 The GNU database manager gettext-0.18.1.1 GNU gettext package libiconv-1.13.1_1 A character set conversion library libtool-2.4_1 Generic shared library support script m4-1.4.16,1 GNU m4 neon29-0.29.6_2 An HTTP and WebDAV client library for Unix systems pkg-config-0.25_1 A utility to retrieve information about installed libraries sqlite3-3.7.7.1 An SQL database engine in a C library subversion-1.7.2 Version control system From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 22 17:51:08 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BF74106566C for ; Thu, 22 Dec 2011 17:51:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3EA688FC08 for ; Thu, 22 Dec 2011 17:51:08 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:64be:2ed2:2384:1368] (unknown [IPv6:2001:7b8:3a7:0:64be:2ed2:2384:1368]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 2B46F5C37; Thu, 22 Dec 2011 18:51:07 +0100 (CET) Message-ID: <4EF36E0B.5000102@FreeBSD.org> Date: Thu, 22 Dec 2011 18:51:07 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0) Gecko/20111214 Thunderbird/9.0 MIME-Version: 1.0 To: Sean Bruno References: <1324575225.20358.2.camel@hitfishpass-lx.corp.yahoo.com> In-Reply-To: <1324575225.20358.2.camel@hitfishpass-lx.corp.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers Subject: Re: Subversion upgrades of existing dirs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 17:51:08 -0000 On 2011-12-22 18:33, Sean Bruno wrote: > How do I upgrade an existing svn tree with the current svn client. I > don't really get what the client is trying to tell me here. > > [sbruno@ref9-xen32 /dumpster/scratch/sbruno-scratch/9]$ svn up > svn: E155036: Please see the 'svn upgrade' command > svn: E155036: Working copy '/dumpster/scratch/sbruno-scratch/9' is an > old development version (format 12); to upgrade it, use a format 18 > client, then use 'tools/dev/wc-ng/bumpt > > [sbruno@ref9-xen32 /dumpster/scratch/sbruno-scratch/9]$ svn upgrade . > svn: E155019: Can't upgrade '/dumpster/scratch/sbruno-scratch/9' as it > is not a pre-1.7 working copy directory > svn: E150000: Missing default entry This is on an NFS share, right? That is most likely fixed by running NFSv4, or by making sure rpc.lockd and rpc.statd run on both server and client. It looks like Subversion needs file locking to work in a certain way, otherwise it will give these obscure messages. Maybe it is useful to report it to the Subversion guys... (and hopefully not get the answer "don't do that" back :) From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 22 17:56:30 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2E801065672 for ; Thu, 22 Dec 2011 17:56:30 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8848D8FC08 for ; Thu, 22 Dec 2011 17:56:30 +0000 (UTC) Received: by ggnp1 with SMTP id p1so9494353ggn.13 for ; Thu, 22 Dec 2011 09:56:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; bh=pBpE6tmD2rxELfS1Zk0hmwhzghfOaiGPUW87fxtSXYQ=; b=V61mUj2TLx1BMay/G7/fkBcAe6Ps9bU/NWVCpKFqjI0NdvqU3dMPSY1ZiLetSrZUOz 4I7s8JWy8WhU4GMQw/J9mMswthM3XhwRByUpePeBtQEQbREspbRRc1a19bsXgOYTgKOe ADNqvoEHge21cCysHNYq8YDPKfN4hvDoi+v3k= Received: by 10.50.159.195 with SMTP id xe3mr3200544igb.14.1324576589819; Thu, 22 Dec 2011 09:56:29 -0800 (PST) Received: from DataIX.net (24-247-9-230.dhcp.aldl.mi.charter.com. [24.247.9.230]) by mx.google.com with ESMTPS id r18sm31338552ibh.4.2011.12.22.09.56.28 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 22 Dec 2011 09:56:28 -0800 (PST) Sender: Jason Hellenthal Received: from DataIX.net (localhost [127.0.0.1]) by DataIX.net (8.14.5/8.14.5) with ESMTP id pBMHuP5V020758 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 22 Dec 2011 12:56:26 -0500 (EST) (envelope-from jhell@DataIX.net) Received: (from jhell@localhost) by DataIX.net (8.14.5/8.14.5/Submit) id pBMHuKfI020757; Thu, 22 Dec 2011 12:56:20 -0500 (EST) (envelope-from jhell@DataIX.net) Date: Thu, 22 Dec 2011 12:56:20 -0500 From: Jason Hellenthal To: Sean Bruno Message-ID: <20111222175620.GA19784@DataIX.net> References: <1324575225.20358.2.camel@hitfishpass-lx.corp.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1324575225.20358.2.camel@hitfishpass-lx.corp.yahoo.com> Cc: "freebsd-hackers@freebsd.org" Subject: Re: Subversion upgrades of existing dirs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 17:56:31 -0000 On Thu, Dec 22, 2011 at 09:33:45AM -0800, Sean Bruno wrote: > How do I upgrade an existing svn tree with the current svn client. I > don't really get what the client is trying to tell me here. > > [sbruno@ref9-xen32 /dumpster/scratch/sbruno-scratch/9]$ svn up > svn: E155036: Please see the 'svn upgrade' command > svn: E155036: Working copy '/dumpster/scratch/sbruno-scratch/9' is an > old development version (format 12); to upgrade it, use a format 18 > client, then use 'tools/dev/wc-ng/bumpt > > [sbruno@ref9-xen32 /dumpster/scratch/sbruno-scratch/9]$ svn upgrade . > svn: E155019: Can't upgrade '/dumpster/scratch/sbruno-scratch/9' as it > is not a pre-1.7 working copy directory > svn: E150000: Missing default entry > seeing as this is a scratch location I wouldnt waste the time to figure it out and just recheck the sources out for 9 and move over whatever needed to function. I have found some instances of pre-checked out source unable to upgrade for whatever reason. 'tools/dev/wc-ng/bumpt' should be in the source tarball for SVN. Round about it is telling you to use a Subversion 1.8 client. > [sbruno@ref9-xen32 /dumpster/scratch/sbruno-scratch/9]$ pkg_info > 44bsd-csh-20001106_3 The traditional 4.4BSD /bin/csh C-shell > ambit-2.0.39 Extended bash brace expansion to expand hostnames or > comman > apr-ipv6-devrandom-gdbm-db42-1.4.5.1.3.12 Apache Portability Library > bash-4.1.10 The GNU Project's Bourne Again SHell > bison-2.4.3,1 A parser generator from FSF, (mostly) compatible > with Yacc > db42-4.2.52_5 The Berkeley DB package, revision 4.2 > expat-2.0.1_1 XML 1.0 parser written in C > gdbm-1.8.3_3 The GNU database manager > gettext-0.18.1.1 GNU gettext package > libiconv-1.13.1_1 A character set conversion library > libtool-2.4_1 Generic shared library support script > m4-1.4.16,1 GNU m4 > neon29-0.29.6_2 An HTTP and WebDAV client library for Unix systems > pkg-config-0.25_1 A utility to retrieve information about installed > libraries > sqlite3-3.7.7.1 An SQL database engine in a C library > subversion-1.7.2 Version control system > -- ;s =; From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 22 19:23:50 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6E651065670; Thu, 22 Dec 2011 19:23:50 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1.freebsd.org (Postfix) with ESMTP id 8C43C8FC0A; Thu, 22 Dec 2011 19:23:50 +0000 (UTC) Received: from [127.0.0.1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id pBMJN2sb072945; Thu, 22 Dec 2011 11:23:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1324581782; bh=QSs8Orng/nONOuPstWHHy21vZki/c1gM2+cl40bZf/Q=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=tvdqCZOOGT6Ey7AnohfvZyqqDGIRhvwUtjq+h7ntTD9qLMi5tMDu/g1uypw/5LqP2 /wnz4ioq+gl1FULkjod/URXxIJCXfrewBLbMV2nq5RrgwB/tbNZ41jZvyi+Gv5/Xhy ps6LvlvXf7a8iqbmydGY9KzTprGAF201LkGfgy4c= From: Sean Bruno To: Dimitry Andric In-Reply-To: <4EF36E0B.5000102@FreeBSD.org> References: <1324575225.20358.2.camel@hitfishpass-lx.corp.yahoo.com> <4EF36E0B.5000102@FreeBSD.org> Content-Type: text/plain; charset="UTF-8" Date: Thu, 22 Dec 2011 11:23:02 -0800 Message-ID: <1324581782.20358.4.camel@hitfishpass-lx.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 (2.32.3-1.fc14) Content-Transfer-Encoding: 7bit Cc: freebsd-hackers Subject: Re: Subversion upgrades of existing dirs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 19:23:50 -0000 On Thu, 2011-12-22 at 09:51 -0800, Dimitry Andric wrote: > On 2011-12-22 18:33, Sean Bruno wrote: > > How do I upgrade an existing svn tree with the current svn client. I > > don't really get what the client is trying to tell me here. > > > > [sbruno@ref9-xen32 /dumpster/scratch/sbruno-scratch/9]$ svn up > > svn: E155036: Please see the 'svn upgrade' command > > svn: E155036: Working copy '/dumpster/scratch/sbruno-scratch/9' is an > > old development version (format 12); to upgrade it, use a format 18 > > client, then use 'tools/dev/wc-ng/bumpt > > > > [sbruno@ref9-xen32 /dumpster/scratch/sbruno-scratch/9]$ svn upgrade . > > svn: E155019: Can't upgrade '/dumpster/scratch/sbruno-scratch/9' as it > > is not a pre-1.7 working copy directory > > svn: E150000: Missing default entry > > This is on an NFS share, right? That is most likely fixed by running > NFSv4, or by making sure rpc.lockd and rpc.statd run on both server and > client. > > It looks like Subversion needs file locking to work in a certain way, > otherwise it will give these obscure messages. Maybe it is useful to > report it to the Subversion guys... (and hopefully not get the answer > "don't do that" back :) > Eh? No. That's the other email thread I started ... back in November I think ... oh hey, you responded to that one! :-) http://lists.freebsd.org/pipermail/freebsd-current/2011-November/029580.html sean From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 22 19:31:23 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCDA3106566B for ; Thu, 22 Dec 2011 19:31:23 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1.freebsd.org (Postfix) with ESMTP id 5A6D48FC08 for ; Thu, 22 Dec 2011 19:31:23 +0000 (UTC) Received: from [127.0.0.1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id pBMJUc43076105; Thu, 22 Dec 2011 11:30:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1324582239; bh=CaQpwsFkiHXL/HAOFMk+z0WhwkkAXdhGBrtaLyx1Tgs=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=AO3GkU0EIKMPgsi1P+sw9IzZRXA5CLcdmDOeKmiFYMFSxy5lPBNY9wFPZCy+DZPjF EAZ6Eh4z/R/X5ds75nwEv6oUxXtrK7dEVGwa/aP5vJTmawFDqKFtwoURq2ttE7StAa tDeG0kQTM2lhl6DYBA9rRFJBNsYcC3Zwo8vFj1GQ= From: Sean Bruno To: Jason Hellenthal In-Reply-To: <20111222175620.GA19784@DataIX.net> References: <1324575225.20358.2.camel@hitfishpass-lx.corp.yahoo.com> <20111222175620.GA19784@DataIX.net> Content-Type: text/plain; charset="UTF-8" Date: Thu, 22 Dec 2011 11:30:38 -0800 Message-ID: <1324582238.20358.6.camel@hitfishpass-lx.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 (2.32.3-1.fc14) Content-Transfer-Encoding: 7bit Cc: "freebsd-hackers@freebsd.org" Subject: Re: Subversion upgrades of existing dirs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 19:31:23 -0000 On Thu, 2011-12-22 at 09:56 -0800, Jason Hellenthal wrote: > > On Thu, Dec 22, 2011 at 09:33:45AM -0800, Sean Bruno wrote: > > How do I upgrade an existing svn tree with the current svn client. I > > don't really get what the client is trying to tell me here. > > > > [sbruno@ref9-xen32 /dumpster/scratch/sbruno-scratch/9]$ svn up > > svn: E155036: Please see the 'svn upgrade' command > > svn: E155036: Working copy '/dumpster/scratch/sbruno-scratch/9' is an > > old development version (format 12); to upgrade it, use a format 18 > > client, then use 'tools/dev/wc-ng/bumpt > > > > [sbruno@ref9-xen32 /dumpster/scratch/sbruno-scratch/9]$ svn upgrade . > > svn: E155019: Can't upgrade '/dumpster/scratch/sbruno-scratch/9' as it > > is not a pre-1.7 working copy directory > > svn: E150000: Missing default entry > > > > seeing as this is a scratch location I wouldnt waste the time to figure it out and just recheck the sources out for 9 and move over whatever needed to function. I have found some instances of pre-checked out source unable to upgrade for whatever reason. > > 'tools/dev/wc-ng/bumpt' should be in the source tarball for SVN. Round about it is telling you to use a Subversion 1.8 client. > Yeah, I'm hoping that this doesn't impact users too much, but I think people are going to run into this. I have working directories that I share amongst the cluster machines for building, upgrading, testing and installing. I'd like to not have to keep a fbsd9 tree for svn version "x" and another fbsd9 tree for svn version "y" I guess I should fire off a pr to ports/subversion then ... Sean From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 22 20:56:01 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A8B71065670 for ; Thu, 22 Dec 2011 20:56:01 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.bf1.yahoo.com (mrout1-b.corp.bf1.yahoo.com [98.139.253.104]) by mx1.freebsd.org (Postfix) with ESMTP id 0A89F8FC15 for ; Thu, 22 Dec 2011 20:56:00 +0000 (UTC) Received: from [127.0.0.1] (rideseveral.corp.yahoo.com [10.73.160.231]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id pBMKtYkv006433 for ; Thu, 22 Dec 2011 12:55:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yahoo-inc.com; s=cobra; t=1324587334; bh=6mZlQo8kbbdBeorhHAAe/ycjtzjasnYHs4Y8DwJ7mZw=; h=Subject:From:To:In-Reply-To:References:Content-Type:Date: Message-ID:Mime-Version:Content-Transfer-Encoding; b=krR5yXfjB2UPEGfFVgzIO1UtvXfsZirGz1vGRKQenWlmM56V5ubJzVjC7uyzPrKOy 7WDsAWWgzAL6NEwEbA3QfXV9q4rFQpQkZix9wLchAxSq5HUdgVVQlSyOpvyjQPXiNS wh7RnuRy+dNa/RgzwyzYwSS6ISVc0Wawlq1v1RE0= From: Sean Bruno To: "freebsd-hackers@freebsd.org" In-Reply-To: <1324575225.20358.2.camel@hitfishpass-lx.corp.yahoo.com> References: <1324575225.20358.2.camel@hitfishpass-lx.corp.yahoo.com> Content-Type: text/plain; charset="UTF-8" Date: Thu, 22 Dec 2011 12:55:33 -0800 Message-ID: <1324587333.20358.8.camel@hitfishpass-lx.corp.yahoo.com> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 (2.32.3-1.fc14) Content-Transfer-Encoding: 7bit Subject: Re: Subversion upgrades of existing dirs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 20:56:01 -0000 On Thu, 2011-12-22 at 09:33 -0800, Sean Bruno wrote: > How do I upgrade an existing svn tree with the current svn client. I > don't really get what the client is trying to tell me here. > > [sbruno@ref9-xen32 /dumpster/scratch/sbruno-scratch/9]$ svn up > svn: E155036: Please see the 'svn upgrade' command > svn: E155036: Working copy '/dumpster/scratch/sbruno-scratch/9' is an > old development version (format 12); to upgrade it, use a format 18 > client, then use 'tools/dev/wc-ng/bumpt > > [sbruno@ref9-xen32 /dumpster/scratch/sbruno-scratch/9]$ svn upgrade . > svn: E155019: Can't upgrade '/dumpster/scratch/sbruno-scratch/9' as it > is not a pre-1.7 working copy directory > svn: E150000: Missing default entry > > > [sbruno@ref9-xen32 /dumpster/scratch/sbruno-scratch/9]$ pkg_info > 44bsd-csh-20001106_3 The traditional 4.4BSD /bin/csh C-shell > ambit-2.0.39 Extended bash brace expansion to expand hostnames or > comman > apr-ipv6-devrandom-gdbm-db42-1.4.5.1.3.12 Apache Portability Library > bash-4.1.10 The GNU Project's Bourne Again SHell > bison-2.4.3,1 A parser generator from FSF, (mostly) compatible > with Yacc > db42-4.2.52_5 The Berkeley DB package, revision 4.2 > expat-2.0.1_1 XML 1.0 parser written in C > gdbm-1.8.3_3 The GNU database manager > gettext-0.18.1.1 GNU gettext package > libiconv-1.13.1_1 A character set conversion library > libtool-2.4_1 Generic shared library support script > m4-1.4.16,1 GNU m4 > neon29-0.29.6_2 An HTTP and WebDAV client library for Unix systems > pkg-config-0.25_1 A utility to retrieve information about installed > libraries > sqlite3-3.7.7.1 An SQL database engine in a C library > subversion-1.7.2 Version control system > > Even more strange, on another machine in the cluster I can read and update my tree with subversion-1.7.1 ... but that version doesn't know how to upgrade the tree? I'm so confused on this. [sbruno@crush /dumpster/scratch/sbruno-scratch/9]$ pkg_info |grep subversion subversion-1.7.1_1 Version control system [sbruno@crush /dumpster/scratch/sbruno-scratch/9]$ svn upgrade svn: E155019: Can't upgrade '/dumpster/scratch/sbruno-scratch/9' as it is not a pre-1.7 working copy directory svn: E150000: Missing default entry Sean From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 22 22:17:16 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8512C106566B for ; Thu, 22 Dec 2011 22:17:16 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4E9E48FC0A for ; Thu, 22 Dec 2011 22:17:15 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so6893969obb.13 for ; Thu, 22 Dec 2011 14:17:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=0V+BomzU5X0phofzd/8+DoDokMSRhtsM9kr++svsW5Y=; b=WnMly4SBXf2p/gbEwql/7v+HBtlwatrsrFm0/+ufQeqXaAcAE1d75XtPdo5iNzT3bB VvFQmHhy4AH6GDuPCvjhQds33gYz3j0djQmJprYBWhak+gcY9wskGlAm0zf49DFPm4vL Dg1JYERWfQ7uBHPxRzPKJ/OV0jc7BddFIpAOQ= MIME-Version: 1.0 Received: by 10.182.225.66 with SMTP id ri2mr10597835obc.26.1324592235634; Thu, 22 Dec 2011 14:17:15 -0800 (PST) Received: by 10.182.62.227 with HTTP; Thu, 22 Dec 2011 14:17:15 -0800 (PST) In-Reply-To: <1324587333.20358.8.camel@hitfishpass-lx.corp.yahoo.com> References: <1324575225.20358.2.camel@hitfishpass-lx.corp.yahoo.com> <1324587333.20358.8.camel@hitfishpass-lx.corp.yahoo.com> Date: Thu, 22 Dec 2011 14:17:15 -0800 Message-ID: From: Garrett Cooper To: Sean Bruno Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-hackers@freebsd.org" Subject: Re: Subversion upgrades of existing dirs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 22:17:16 -0000 On Thu, Dec 22, 2011 at 12:55 PM, Sean Bruno wrote: > On Thu, 2011-12-22 at 09:33 -0800, Sean Bruno wrote: >> How do I upgrade an existing svn tree with the current svn client. =A0I >> don't really get what the client is trying to tell me here. >> >> [sbruno@ref9-xen32 /dumpster/scratch/sbruno-scratch/9]$ svn up >> svn: E155036: Please see the 'svn upgrade' command >> svn: E155036: Working copy '/dumpster/scratch/sbruno-scratch/9' is an >> old development version (format 12); to upgrade it, use a format 18 >> client, then use 'tools/dev/wc-ng/bumpt >> >> [sbruno@ref9-xen32 /dumpster/scratch/sbruno-scratch/9]$ svn upgrade . >> svn: E155019: Can't upgrade '/dumpster/scratch/sbruno-scratch/9' as it >> is not a pre-1.7 working copy directory >> svn: E150000: Missing default entry >> >> >> [sbruno@ref9-xen32 /dumpster/scratch/sbruno-scratch/9]$ pkg_info >> 44bsd-csh-20001106_3 The traditional 4.4BSD /bin/csh C-shell >> ambit-2.0.39 =A0 =A0 =A0 =A0Extended bash brace expansion to expand host= names or >> comman >> apr-ipv6-devrandom-gdbm-db42-1.4.5.1.3.12 Apache Portability Library >> bash-4.1.10 =A0 =A0 =A0 =A0 The GNU Project's Bourne Again SHell >> bison-2.4.3,1 =A0 =A0 =A0 A parser generator from FSF, (mostly) compatib= le >> with Yacc >> db42-4.2.52_5 =A0 =A0 =A0 The Berkeley DB package, revision 4.2 >> expat-2.0.1_1 =A0 =A0 =A0 XML 1.0 parser written in C >> gdbm-1.8.3_3 =A0 =A0 =A0 =A0The GNU database manager >> gettext-0.18.1.1 =A0 =A0GNU gettext package >> libiconv-1.13.1_1 =A0 A character set conversion library >> libtool-2.4_1 =A0 =A0 =A0 Generic shared library support script >> m4-1.4.16,1 =A0 =A0 =A0 =A0 GNU m4 >> neon29-0.29.6_2 =A0 =A0 An HTTP and WebDAV client library for Unix syste= ms >> pkg-config-0.25_1 =A0 A utility to retrieve information about installed >> libraries >> sqlite3-3.7.7.1 =A0 =A0 An SQL database engine in a C library >> subversion-1.7.2 =A0 =A0Version control system >> >> > > > Even more strange, on another machine in the cluster I can read and > update my tree with subversion-1.7.1 ... but that version doesn't know > how to upgrade the tree? =A0I'm so confused on this. > > [sbruno@crush /dumpster/scratch/sbruno-scratch/9]$ pkg_info |grep > subversion > subversion-1.7.1_1 =A0Version control system > > [sbruno@crush /dumpster/scratch/sbruno-scratch/9]$ svn upgrade > svn: E155019: Can't upgrade '/dumpster/scratch/sbruno-scratch/9' as it > is not a pre-1.7 working copy directory > svn: E150000: Missing default entry >From what I've seen the originally reported error is usually the result of two things: 1. I can't lock files, because the filesystem doesn't support locking. 2. I can't lock files, because of a permissions issue. subversion 1.7 doesn't make the difference between these two cases intuitive and easy to understand; you might need to ktrace -d the process to figure out what the exact issue is (most likely the former case based on earlier notes in the thread). Cheers, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 22 22:18:44 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E9AB106567F for ; Thu, 22 Dec 2011 22:18:44 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 474888FC16 for ; Thu, 22 Dec 2011 22:18:44 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so6895427obb.13 for ; Thu, 22 Dec 2011 14:18:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=5v57+lPDtJfoCLZ3jtpD0q2/xb7IbOsXFhXm+CQRf8E=; b=AzsSn1/BoQdrW2MUtjYXXtri++/Bu0bz+CTlYSJbXrXxfEUL1LGwug2JAwAVogO4Ji uQRsx1XfzKsYdPrY2k+XNvjzJttNu/t1PYX4EdRsG1c5M/R+Tx+r8uBJKjJt8YCYoAGE Tq0mzsCCXWx83kfO31MoOix4scLFJ7IQPoNAg= MIME-Version: 1.0 Received: by 10.182.40.98 with SMTP id w2mr10588534obk.36.1324592323805; Thu, 22 Dec 2011 14:18:43 -0800 (PST) Received: by 10.182.62.227 with HTTP; Thu, 22 Dec 2011 14:18:43 -0800 (PST) In-Reply-To: References: <1324575225.20358.2.camel@hitfishpass-lx.corp.yahoo.com> <1324587333.20358.8.camel@hitfishpass-lx.corp.yahoo.com> Date: Thu, 22 Dec 2011 14:18:43 -0800 Message-ID: From: Garrett Cooper To: Sean Bruno Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-hackers@freebsd.org" Subject: Re: Subversion upgrades of existing dirs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 22:18:44 -0000 On Thu, Dec 22, 2011 at 2:17 PM, Garrett Cooper wrote: > On Thu, Dec 22, 2011 at 12:55 PM, Sean Bruno wrot= e: >> >> Even more strange, on another machine in the cluster I can read and >> update my tree with subversion-1.7.1 ... but that version doesn't know >> how to upgrade the tree? =A0I'm so confused on this. >> >> [sbruno@crush /dumpster/scratch/sbruno-scratch/9]$ pkg_info |grep >> subversion >> subversion-1.7.1_1 =A0Version control system >> >> [sbruno@crush /dumpster/scratch/sbruno-scratch/9]$ svn upgrade >> svn: E155019: Can't upgrade '/dumpster/scratch/sbruno-scratch/9' as it >> is not a pre-1.7 working copy directory >> svn: E150000: Missing default entry > > From what I've seen the originally reported error is usually the > result of two things: > 1. I can't lock files, because the filesystem doesn't support locking. > 2. I can't lock files, because of a permissions issue. Or scenario 3. I just remembered: 3. I can't lock because someone else has the .svn database file(s) locked ;= ). > subversion 1.7 doesn't make the difference between these two cases > intuitive and easy to understand; you might need to ktrace -d the > process to figure out what the exact issue is (most likely the former > case based on earlier notes in the thread). Cheers, -Garrett