Add a field to struct swdevt to avoid a bogus udev2dev() call.
This commit is contained in:
parent
bd8b17658f
commit
09327a40f9
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)conf.h 8.5 (Berkeley) 1/9/95
|
||||
* $Id: conf.h,v 1.64 1999/07/07 03:03:20 green Exp $
|
||||
* $Id: conf.h,v 1.65 1999/07/07 04:06:56 msmith Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_CONF_H_
|
||||
@ -155,10 +155,11 @@ void ldisc_deregister __P((int));
|
||||
* Swap device table
|
||||
*/
|
||||
struct swdevt {
|
||||
udev_t sw_dev;
|
||||
udev_t sw_dev; /* For quasibogus swapdev reporting */
|
||||
int sw_flags;
|
||||
int sw_nblks;
|
||||
struct vnode *sw_vp;
|
||||
dev_t sw_device;
|
||||
};
|
||||
#define SW_FREED 0x01
|
||||
#define SW_SEQUENTIAL 0x02
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)conf.h 8.5 (Berkeley) 1/9/95
|
||||
* $Id: conf.h,v 1.64 1999/07/07 03:03:20 green Exp $
|
||||
* $Id: conf.h,v 1.65 1999/07/07 04:06:56 msmith Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_CONF_H_
|
||||
@ -155,10 +155,11 @@ void ldisc_deregister __P((int));
|
||||
* Swap device table
|
||||
*/
|
||||
struct swdevt {
|
||||
udev_t sw_dev;
|
||||
udev_t sw_dev; /* For quasibogus swapdev reporting */
|
||||
int sw_flags;
|
||||
int sw_nblks;
|
||||
struct vnode *sw_vp;
|
||||
dev_t sw_device;
|
||||
};
|
||||
#define SW_FREED 0x01
|
||||
#define SW_SEQUENTIAL 0x02
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)vm_swap.c 8.5 (Berkeley) 2/17/94
|
||||
* $Id: vm_swap.c,v 1.76 1999/07/07 09:12:44 ache Exp $
|
||||
* $Id: vm_swap.c,v 1.77 1999/07/17 18:43:50 phk Exp $
|
||||
*/
|
||||
|
||||
#include "opt_devfs.h"
|
||||
@ -156,7 +156,7 @@ swstrategy(bp)
|
||||
biodone(bp);
|
||||
return;
|
||||
}
|
||||
bp->b_dev = udev2dev(sp->sw_dev, 2);
|
||||
bp->b_dev = sp->sw_device;
|
||||
if (sp->sw_vp == NULL) {
|
||||
bp->b_error = ENODEV;
|
||||
bp->b_flags |= B_ERROR;
|
||||
@ -315,6 +315,7 @@ swaponvp(p, vp, dev, nblks)
|
||||
|
||||
sp->sw_vp = vp;
|
||||
sp->sw_dev = dev2udev(dev);
|
||||
sp->sw_device = dev;
|
||||
sp->sw_flags |= SW_FREED;
|
||||
sp->sw_nblks = nblks;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user