On Sun, Sep 05, 2010 at 03:57:58PM +0100, Owain Ainsworth wrote:
> On Sun, Sep 05, 2010 at 02:07:03PM +0000, Thordur I Bjornsson wrote:
> > On Fri, Sep 03, 2010 at 09:11:39AM +0000, Thordur I Bjornsson wrote:
> > > Hi gang,
> >
> > Gabriel Kihlman spotted a small problem, swd_active was not
> > being incremented.
> >
> > Here's an updated diff.
>
> Looks alright to me, haven't tested it yet (will do this afternoon
> sometime) one comment below:
>
> >
> > Index: sys/buf.h
> > ===================================================================
> > RCS file: /home/cvs/src/sys/sys/buf.h,v
> > retrieving revision 1.72
> > diff -u -p -r1.72 buf.h
> > --- sys/buf.h 2 Sep 2010 07:05:39 -0000 1.72
> > +++ sys/buf.h 5 Sep 2010 14:00:49 -0000
> > @@ -42,6 +42,7 @@
> > #include <sys/queue.h>
> > #include <sys/tree.h>
> > #include <sys/mutex.h>
> > +#include <sys/workq.h>
> >
> > #define NOLIST ((struct buf *)0x87654321)
> >
> > @@ -105,10 +106,18 @@ struct bufq_fifo {
> > SIMPLEQ_ENTRY(buf) bqf_entries;
> > };
> >
> > +/* Abuse bufq_fifo, for swapping to regular files. */
> > +struct bufq_swapreg {
> > + SIMPLEQ_ENTRY(buf) bqf_entries;
> > + struct workq_task bqf_wqtask;
> > +
> > +};
>
> BIKESHED: Perhaps this should be:
>
> struct bufq_swapreg {
> struct bufq_fifo bfs_fifo;
> struct workq_task bqs_wqtask;
> }
>
> So if you ever change bufq_fifo bad things won't happen when fields
> overlap.
Can't do that. Not without changing kern_bufq.c, which means a new
discipline basically.