Subject: Re: poolifying fileassoc
To: Brett Lymn <blymn@baesystems.com.au>
From: Andrew Doran <ad@netbsd.org>
List: tech-kern
Date: 04/08/2007 14:45:05
Hi,

Some pedantic style nits and a question.

On Sun, Apr 08, 2007 at 05:57:55PM +0930, Brett Lymn wrote:

> @@ -52,6 +53,7 @@
>  #include <sys/vnode.h>
>  
>  #include <uvm/uvm.h>
> +#include <sys/verified_exec.h>

Usually the includes are grouped by directory.
  
> +int
> +uvm_io_done(struct vm_page **pgs, int npages, int flags, boolean_t overwrite,
> +	    int ridx, int orignpages, struct buf *bp)
>  {

boolean_t/TRUE/FALSE have been replaced by bool/true/false in -current.

> +#if NVERIEXEC > 0
> +	if (!error && !write && !swap && (flags != UVMPAGER_ASYNCIO_START)) {
> +		error = veriexec_block_verify(bp->b_vp, pgs, npages);
> +	}
> +#endif

Is veriexec_block_verify() MP safe?

> +	error = uvm_io_done(pgs, npages, UVMPAGER_ASYNCIO_DONE, FALSE,
> +			    0, npages, bp);

> +	error = uvm_io_done(pgs, npages,
> +			    ((async)? UVMPAGER_ASYNCIO_START : UVMPAGER_SYNCIO_DONE),
> +			    overwrite, ridx, orignpages, mbp);

> +	if ((!error) && (ap->a_m != NULL)) {
>  		memcpy(ap->a_m, &pgs[ridx],
> -		    orignpages * sizeof(struct vm_page *));
> +		       orignpages * sizeof(struct vm_page *));

KNF says 4 character indent, except for function declarations which look
like this.

Cheers,
Andrew