Re: geom_raid5 inclusion in HEAD?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <Arne@...>, <W@...>
Cc: John Nielsen <john@...>, <freebsd-current@...>, fluffles.net <bsd@...>
Date: Wednesday, November 7, 2007 - 5:06 pm

On ons, nov 07, 2007 at 10:57:18 -0800, Arne W�rner wrote:
Well, this might sound picky, but it's still a style issue:
- Parantheses around return values:

static __inline u_int
g_raid5_nvalid(struct g_raid5_softc *sc)
{
        u_int i, no;

        no = 0;
        for (i = 0; i < sc->sc_ndisks; i++)
                if (g_raid5_disk_good(sc,i))
                        no++;

-        return no;
+	 return (no);
}


- Proper spacing between variable declaration and function body.
  struct g_consumer **cpp = cp->private;
 +
        if (cpp == NULL)
                return -1;

- Declaration of variables should be in the top of the function.
 struct g_consumer **cpp = cp->private;
 if (cpp == NULL)
        return -1;
 struct g_consumer *rcp = *cpp;
 if (rcp == NULL)
       return -1;
 int dn = cpp - sc->sc_disks;

- Proper indenting when breaking a line, should be 4 spaces etc.

All of this can be found in the style(9) manpage, so I'd rather just suggest
to go through it and make sure it's satisfied.

I've only looked at TOS so far, but I'll look at PP as well to see how it is.

Hmm, I'm not sure what you mean about this dead lock, but sounds like a weird
thing to having to deadlock because of your filesystem. Maybe this could be
solved in another way, or is this not a graid5-thing at all?

The general thing is that I don't think one should start optimizing for
performance before everything works correctly and having made sure that it
improves performance statistically. (I know this isn't a completely new
project, but still).
First of all, disk I/O is generally much slower than CPU anyway, so I would
doubt that having to use one thread would decrease performance noticeably.
In my ears, this is a good argument for using one thread only. But then
again, this might not be a big deal if it's already there and it's correct.

I'm starting to get busier and busier with exams coming up now, but I'll try
take a look when I can, but don't expect to much :) Also, as I said, I've
only looked at TOS so far.

-- 
Ulf Lilleengen
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
geom_raid5 inclusion in HEAD?, fluffles.net, (Tue Nov 6, 10:16 am)
Re: geom_raid5 inclusion in HEAD?, Oliver Fromme, (Wed Nov 14, 2:53 pm)
Re: geom_raid5 inclusion in HEAD?, Arne W, (Wed Nov 14, 3:10 pm)
Re: geom_raid5 inclusion in HEAD?, Oliver Fromme, (Thu Nov 15, 11:14 am)
Re: geom_raid5 inclusion in HEAD?, Arne W, (Thu Nov 15, 12:05 pm)
Re: geom_raid5 inclusion in HEAD?, John Nielsen, (Tue Nov 6, 2:17 pm)
Re: geom_raid5 inclusion in HEAD?, Arne W, (Tue Nov 6, 3:33 pm)
Re: geom_raid5 inclusion in HEAD?, Ulf Lilleengen, (Wed Nov 7, 1:09 pm)
Re: geom_raid5 inclusion in HEAD?, Arne W, (Wed Nov 7, 2:57 pm)
Re: geom_raid5 inclusion in HEAD?, Ulf Lilleengen, (Wed Nov 7, 5:06 pm)
Re: geom_raid5 inclusion in HEAD?, Arne W, (Wed Nov 7, 6:16 pm)
Re: geom_raid5 inclusion in HEAD?, Ivan Voras, (Wed Nov 7, 6:48 am)
Re: geom_raid5 inclusion in HEAD?, Arne W, (Wed Nov 7, 8:17 am)
Re: geom_raid5 inclusion in HEAD?, Ivan Voras, (Wed Nov 7, 8:50 am)
Re: geom_raid5 inclusion in HEAD?, 韓家標 Bill Hacker, (Wed Nov 7, 9:08 am)
Re: geom_raid5 inclusion in HEAD?, Ivan Voras, (Wed Nov 7, 9:23 am)
Re: geom_raid5 inclusion in HEAD?, 韓家標 Bill Hacker, (Wed Nov 7, 10:01 am)
Re: geom_raid5 inclusion in HEAD?, Arne W, (Wed Nov 7, 8:56 am)
Re: geom_raid5 inclusion in HEAD?, Nikolay Pavlov, (Tue Nov 6, 5:00 pm)