Date: Wed, 5 Nov 2014 15:09:00 -0700 (MST) From: Warren Block <wblock@wonkity.com> To: Chris H <bsd-lists@bsdforge.com> Cc: freebsd-stable@freebsd.org, freebsd-questions@freebsd.org, =?ISO-8859-15?Q?Juan_Ram=F3n_Molina_Menor?= <listjm@club-internet.fr> Subject: Re: Status of svnlite(1) in make.conf(5) Message-ID: <alpine.BSF.2.11.1411051505420.70051@wonkity.com> In-Reply-To: <82353c164271e8ec77453393ddfa41b2@ultimatedns.net> References: <545A95DB.1060100@club-internet.fr> <82353c164271e8ec77453393ddfa41b2@ultimatedns.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 5 Nov 2014, Chris H wrote: > On Wed, 05 Nov 2014 22:25:47 +0100 Juan Ramón Molina Menor > <listjm@club-internet.fr> wrote > >> Hi! >> >> Just curious about what it seems an inconsistency with svnlite(1). The >> initial commit (r251886) says that it was included for checking out and >> committing source and cites two make.conf(5) knobs: WITH_SVN (to get >> "svn" instead of "svnlite") and WITHOUT_SVNLITE (in reality, they are in >> src.conf(5)). Nevertheless, the make.conf man page says, in the >> SVN_UPDATE section, that no subversion client is included in the base >> system, and indeed 'make update' does not work by default. >> >> Should I open a PR or it is too much nitpicking? > I think it would be a good idea. I can say for sure that > svnlite(1) comes on, and is installed from the bootonly CD/DVD. > I think it's also worth mentioning that the entries are actually > targeted to the src.conf(5). > You may also want to CC docs@. As I think Warren Block might also > be interested. It's just "doc@", but I'm here also. And agreed, if the information in a man page is not correct, it needs to be fixed. From owner-freebsd-questions@FreeBSD.ORG Wed Nov 5 22:13:40 2014 Return-Path: <owner-freebsd-questions@FreeBSD.ORG> Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70D32DE0 for <freebsd-questions@freebsd.org>; Wed, 5 Nov 2014 22:13:40 +0000 (UTC) Received: from mail-ie0-x229.google.com (mail-ie0-x229.google.com [IPv6:2607:f8b0:4001:c03::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 320ACF38 for <freebsd-questions@freebsd.org>; Wed, 5 Nov 2014 22:13:40 +0000 (UTC) Received: by mail-ie0-f169.google.com with SMTP id tr6so1746898ieb.28 for <freebsd-questions@freebsd.org>; Wed, 05 Nov 2014 14:13:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=QvBobFZ9bctu0DDUWWOrZ9peazRqJbxTP4Fh5RRg6VI=; b=KAuO82dB5UF8dR9zHTi98OowpqHTHioZsUiKMa/nZSQ/QG0kmT2mlsnBVvXhSZIsAp 917Q+fI0No49cH/ahOTe5rrXfjcrNC73hhNx1359SuMYk4NtYh7nCgE23HxvpWXbzqIp SKlgoW9iVYJWZzQNQHaDijMP52+geBiDMbA2+IiJwEDBVbn/fS/4TSMvxzkWX0Mw6ahY pr7XkMYyBJtdPSL3OXRxakvJ/VEQxw8z6xH4xMj5Dv8su5hylr37bO8WU1LCX9KRLQ1B ziDCbF389Wn40SBnVSmP0cy0+Xt9lOfXZIx+2iHtw+RyvTNxhezLgyOGy1k2dCstUYgd +fQQ== X-Received: by 10.42.27.9 with SMTP id h9mr7796487icc.32.1415225619598; Wed, 05 Nov 2014 14:13:39 -0800 (PST) Received: from localhost.localdomain (63-225-227-131.slkc.qwest.net. [63.225.227.131]) by mx.google.com with ESMTPSA id f71sm2063717ioe.28.2014.11.05.14.13.38 for <freebsd-questions@freebsd.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Nov 2014 14:13:38 -0800 (PST) Message-ID: <545AA111.3000802@gmail.com> Date: Wed, 05 Nov 2014 15:13:37 -0700 From: jd1008 <jd1008@gmail.com> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: Open file descriptor reference count implementation in driver References: <c1241e563944d7ec496c6c235f420b21@mail.gmail.com> <CAN2YBg78ucj2hBGHye9UN3-QFB0gT-o=dd4iynGet_sWZ5ABpQ@mail.gmail.com> <1ab03c9bac878f437b205786d8304bd3@mail.gmail.com> In-Reply-To: <1ab03c9bac878f437b205786d8304bd3@mail.gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions <freebsd-questions.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/> List-Post: <mailto:freebsd-questions@freebsd.org> List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=subscribe> X-List-Received-Date: Wed, 05 Nov 2014 22:13:40 -0000 Hi Sibananda, As you can see below, si_refcount and si_usecount are used by the kernel in kern_conf.c, and the generic FS vnode layer, and the device FS vnode layer. ./kern/kern_conf.c: dev->si_refcount++; ./kern/kern_conf.c: dev->si_refcount++; ./kern/kern_conf.c: dev->si_refcount--; ./kern/kern_conf.c: KASSERT(dev->si_refcount >= 0, ./kern/kern_conf.c: if (dev->si_usecount == 0 && ./kern/kern_conf.c: if (dev->si_devsw == NULL && dev->si_refcount == 0) { ./kern/kern_conf.c: dev->si_refcount++; /* Avoid race with dev_rel() */ ./kern/kern_conf.c: dev->si_refcount--; /* Avoid race with dev_rel() */ ./kern/kern_conf.c: if (dev->si_refcount > 0) { ./kern/kern_conf.c: dev->si_name, dev->si_refcount, dev->si_usecount, The FS Vnode layer: ./kern/vfs_bio.c: KASSERT(dev->si_refcount > 0, ./kern/vfs_subr.c: vp->v_rdev->si_usecount++; ./kern/vfs_subr.c: vp->v_rdev->si_usecount++; ./kern/vfs_subr.c: vp->v_rdev->si_usecount--; ./kern/vfs_subr.c: vp->v_rdev->si_usecount--; ./kern/vfs_subr.c: count = vp->v_rdev->si_usecount; ./kern/vfs_subr.c: count = dev->si_usecount; ./sys/conf.h: int si_refcount; ./sys/conf.h: u_long si_usecount; The device FS vnode layer: ./fs/devfs/devfs_vnops.c: KASSERT((*devp)->si_refcount > 0, ./fs/devfs/devfs_vnops.c: dev->si_usecount += vp->v_usecount; ./fs/devfs/devfs_vnops.c: KASSERT(dev->si_refcount > 0, ./fs/devfs/devfs_vnops.c: dev->si_usecount -= vp->v_usecount; So, it would seem like YOUR DRIVER has no business checking/modifying these variables. But your device driver's open and close functions will be called by the upper vnode operations (functions) and they take care of these variables (among others). When your driver's close function is called as a final act of the vnode layer when the counts go to 0. Whay your XX_close() function will do depends a lot on what your driver is supposed to achieve. Mostlly, release driver locks and memory allocated for the very first open.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.11.1411051505420.70051>