Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jan 2011 13:45:23 +0100
From:      Giovanni Trematerra <giovanni.trematerra@gmail.com>
To:        "Andrey V. Elsukov" <ae@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r217262 - head/sys/geom/nop
Message-ID:  <AANLkTimsv4ciU-mYknZs8NBY-p4etkxhvG%2B-iEKDAvdN@mail.gmail.com>
In-Reply-To: <201101111142.p0BBgMjc019149@svn.freebsd.org>
References:  <201101111142.p0BBgMjc019149@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 11, 2011 at 12:42 PM, Andrey V. Elsukov <ae@freebsd.org> wrote:
> Author: ae
> Date: Tue Jan 11 11:42:22 2011
> New Revision: 217262
> URL: http://svn.freebsd.org/changeset/base/217262
>
> Log:
> =A0Round GNOP provider's mediasize to its sectorsize. This prevents KASSE=
RT
> =A0in g_io_request when geom classes doing tasting.
>
> =A0PR: =A0 =A0 =A0 =A0 =A0 kern/147852
> =A0MFC after: =A0 =A01 week
>
> Modified:
> =A0head/sys/geom/nop/g_nop.c
>
> Modified: head/sys/geom/nop/g_nop.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
> --- head/sys/geom/nop/g_nop.c =A0 Tue Jan 11 11:01:29 2011 =A0 =A0 =A0 =
=A0(r217261)
> +++ head/sys/geom/nop/g_nop.c =A0 Tue Jan 11 11:42:22 2011 =A0 =A0 =A0 =
=A0(r217262)
> @@ -176,6 +176,8 @@ g_nop_create(struct gctl_req *req, struc
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0gctl_error(req, "Invalid secsize for provi=
der %s.", pp->name);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return (EINVAL);
> =A0 =A0 =A0 =A0}
> + =A0 =A0 =A0 if (size % secsize !=3D 0)
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 size -=3D size % secsize;

It seems to me that the if statement is redundant and you might use
parenthesis around
"size % secsize" just to have a better readability of the statement IMHO.

--
Gianni



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimsv4ciU-mYknZs8NBY-p4etkxhvG%2B-iEKDAvdN>