From owner-svn-src-projects@FreeBSD.ORG Sat Apr 7 06:22:19 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 28A6F106564A; Sat, 7 Apr 2012 06:22:19 +0000 (UTC) (envelope-from gjb@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id C69FE8FC15; Sat, 7 Apr 2012 06:22:18 +0000 (UTC) Received: from localhost (unknown [213.17.239.109]) by smtp.semihalf.com (Postfix) with ESMTP id 1F636C4B3D; Sat, 7 Apr 2012 08:22:04 +0200 (CEST) X-Virus-Scanned: by amavisd-new at semihalf.com Received: from smtp.semihalf.com ([213.17.239.109]) by localhost (smtp.semihalf.com [213.17.239.109]) (amavisd-new, port 10024) with ESMTP id UbCNazyOwGli; Sat, 7 Apr 2012 08:22:03 +0200 (CEST) Received: from [172.17.136.194] (adsl-66-120-169-242.dsl.sntc01.pacbell.net [66.120.169.242]) by smtp.semihalf.com (Postfix) with ESMTPSA id 4C282C3833; Sat, 7 Apr 2012 08:22:00 +0200 (CEST) Message-ID: <4F7FDD0E.3090106@semihalf.com> Date: Sat, 07 Apr 2012 08:22:06 +0200 From: Grzegorz Bernacki User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Andrew Thompson References: <201204070520.q375KFJs044288@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-projects@freebsd.org, Grzegorz Bernacki , src-committers@freebsd.org Subject: Re: svn commit: r233982 - projects/nand/sys/fs/nandfs X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Apr 2012 06:22:19 -0000 W dniu 2012-04-07 08:10, Andrew Thompson pisze: > On 7 April 2012 17:20, Grzegorz Bernacki wrote: >> Author: gber >> Date: Sat Apr 7 05:20:14 2012 >> New Revision: 233982 >> URL: http://svn.freebsd.org/changeset/base/233982 >> >> Log: >> nandfs: Add nandfs cleaner. >> >> Obtained from: Semihalf >> Supported by: FreeBSD Foundation, Juniper Networks >> >> Added: projects/nand/sys/fs/nandfs/nandfs_cleaner.c >> ============================================================================== >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ projects/nand/sys/fs/nandfs/nandfs_cleaner.c Sat Apr 7 05:20:14 2012 (r233982) >> +nandfs_start_cleaner(struct nandfs_device *fsdev) >> +{ >> + int error; >> + >> + MPASS(fsdev->nd_cleaner == NULL); >> + >> + fsdev->nd_cleaner_exit = 0; >> + >> + error = kproc_create((void(*)(void *))nandfs_cleaner, fsdev, >> +&fsdev->nd_cleaner, 0, 0, "nandfs_cleaner"); > Unless you particularly wanted nandfs_cleaner to show up in the > process table you can use kthread_add() to make this a thread of > pid-0. Likewise kproc_kthread_add() allows you to easily add all the > nand processes as threads of a new proc. There are examples of each if > you search the kernel sources. Hi, Thanks for information. I think we can use kthread_add(). I see no reason to have this thread shown in process table. thanks, Grzesiek