On Tue, Jan 11, 2011 at 12:42 PM, Andrey V. Elsukov <a...@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: > Round GNOP provider's mediasize to its sectorsize. This prevents KASSERT > in g_io_request when geom classes doing tasting. > > PR: kern/147852 > MFC after: 1 week > > Modified: > head/sys/geom/nop/g_nop.c > > Modified: head/sys/geom/nop/g_nop.c > ============================================================================== > --- head/sys/geom/nop/g_nop.c Tue Jan 11 11:01:29 2011 (r217261) > +++ head/sys/geom/nop/g_nop.c Tue Jan 11 11:42:22 2011 (r217262) > @@ -176,6 +176,8 @@ g_nop_create(struct gctl_req *req, struc > gctl_error(req, "Invalid secsize for provider %s.", pp->name); > return (EINVAL); > } > + if (size % secsize != 0) > + size -= 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 _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"