From owner-svn-src-projects@FreeBSD.ORG Sat Apr 7 06:10:46 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFA5D106566C for ; Sat, 7 Apr 2012 06:10:46 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id E7CB08FC0A for ; Sat, 7 Apr 2012 06:10:45 +0000 (UTC) Received: by lagv3 with SMTP id v3so3685321lag.13 for ; Fri, 06 Apr 2012 23:10:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=sR/VpwQHflwZu0Ruoh6v092DVHYHaxYnC0Ez0PlwIMQ=; b=OdJTkUdq1oe7jAXA/BSRacTz9fVJtitl5rgoljAUXYo7gkLDnMl1ue/CB79V0PIp3s UJN3VmLNE2b7W8VyIbxZCMC3wT9Zl8Hon0H2Hli3L2whtXX7ibB+yU7H/Cwn9cyz7EmK WaJTBdW8OAePcDgnAn52XuVt/BC7C1kVd2/MfSzehkSckHY42JFIB/2wDLCbbUzbFrQ+ 51UnRjKnzVtoWLM8nuKuOUKFvFNZdSVS4sDapoEaJ12MAqmsvPTKxPGzTUT2EKMkNVyV gxlGOqlKGQMTlF1LlNP3I6izrMAHcdDYHypxS/87xAcWDhDh3RlrSR2AhxBOp2pLLW9S pJZQ== MIME-Version: 1.0 Received: by 10.152.102.228 with SMTP id fr4mr772527lab.23.1333779044498; Fri, 06 Apr 2012 23:10:44 -0700 (PDT) Sender: andy@fud.org.nz Received: by 10.112.150.72 with HTTP; Fri, 6 Apr 2012 23:10:44 -0700 (PDT) In-Reply-To: <201204070520.q375KFJs044288@svn.freebsd.org> References: <201204070520.q375KFJs044288@svn.freebsd.org> Date: Sat, 7 Apr 2012 18:10:44 +1200 X-Google-Sender-Auth: iK8bJZb3o2krhKf6HSFimfr19M0 Message-ID: From: Andrew Thompson To: Grzegorz Bernacki Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQkMsCGhqBlyGqkQqtACSpB78NBibkES4a3MieD9YFByN0pf4/1EsZJqq7/hgXefT4t2hp5E Cc: svn-src-projects@freebsd.org, 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:10:46 -0000 On 7 April 2012 17:20, Grzegorz Bernacki wrote: > Author: gber > Date: Sat Apr =A07 05:20:14 2012 > New Revision: 233982 > URL: http://svn.freebsd.org/changeset/base/233982 > > Log: > =A0nandfs: Add nandfs cleaner. > > =A0Obtained from: Semihalf > =A0Supported by: =A0FreeBSD Foundation, Juniper Networks > > Added: projects/nand/sys/fs/nandfs/nandfs_cleaner.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null =A0 00:00:00 1970 =A0 (empty, because file is newly added) > +++ projects/nand/sys/fs/nandfs/nandfs_cleaner.c =A0 =A0 =A0 =A0Sat Apr = =A07 05:20:14 2012 =A0 =A0 =A0 =A0(r233982) > +nandfs_start_cleaner(struct nandfs_device *fsdev) > +{ > + =A0 =A0 =A0 int error; > + > + =A0 =A0 =A0 MPASS(fsdev->nd_cleaner =3D=3D NULL); > + > + =A0 =A0 =A0 fsdev->nd_cleaner_exit =3D 0; > + > + =A0 =A0 =A0 error =3D kproc_create((void(*)(void *))nandfs_cleaner, fsd= ev, > + =A0 =A0 =A0 =A0 =A0 &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. Andrew