svn commit: r233982 - projects/nand/sys/fs/nandfs

Andrew Thompson thompsa at FreeBSD.org
Sat Apr 7 06:10:46 UTC 2012


On 7 April 2012 17:20, Grzegorz Bernacki <gber at freebsd.org> 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.


Andrew


More information about the svn-src-projects mailing list