On Mon, Apr 04, 2011 at 12:34:17PM +0200, Otto Moerbeek wrote:
> On Mon, Apr 04, 2011 at 09:22:41AM +0000, Thordur Bjornsson wrote:
> 
> > Hi,
> > 
> > 1) Swapping to svnds has issues (pagedaemon deadlocks) and has been
> >    broken since forever.
> > 2) Swapping to vnds makes no sense, why add another layer when you
> >    can just swap to a regular file instead ?
> > 
> > so stop supporting swapping to vnds. If this turns out to be kosher
> > I have a diff tested that removes vnds in favour of svnds.
> 
> I don't know if this is the right check, but the & is redundant to get
> the address of a function.
It's the easiest check. It's "hard" to map a dev_t to a device since
it is MD, so checking for that function is the "best" way I could
come up with.

And "doh" on the '&'. I'll commit with out it. 

 
>       -Otto
> 
> > 
> > 
> > OK ?
> > 
> > 
> > Index: uvm/uvm_swap.c
> > ===================================================================
> > RCS file: /home/thib/cvs/src/sys/uvm/uvm_swap.c,v
> > retrieving revision 1.100
> > diff -u -p -r1.100 uvm_swap.c
> > --- uvm/uvm_swap.c  21 Dec 2010 20:14:44 -0000      1.100
> > +++ uvm/uvm_swap.c  4 Apr 2011 09:14:59 -0000
> > @@ -912,6 +912,10 @@ swap_on(struct proc *p, struct swapdev *
> >     vp = sdp->swd_vp;
> >     dev = sdp->swd_dev;
> >  
> > +   /* no swapping to vnds. */
> > +   if (bdevsw[major(dev)].d_strategy == &vndstrategy)
> > +           return (EOPNOTSUPP);
> > +
> >     /*
> >      * open the swap file (mostly useful for block device files to
> >      * let device driver know what is up).

Reply via email to