PERFORCE change 45480 for review
Scott Long
scottl at FreeBSD.org
Fri Jan 16 23:16:53 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=45480
Change 45480 by scottl at scottl-netperf on 2004/01/16 23:16:14
IFC @ 45479
Affected files ...
.. //depot/projects/netperf/sys/Makefile#2 integrate
.. //depot/projects/netperf/sys/compat/ndis/hal_var.h#2 integrate
.. //depot/projects/netperf/sys/compat/ndis/ndis_var.h#10 integrate
.. //depot/projects/netperf/sys/compat/ndis/ntoskrnl_var.h#4 integrate
.. //depot/projects/netperf/sys/compat/ndis/pe_var.h#4 integrate
.. //depot/projects/netperf/sys/compat/ndis/subr_hal.c#4 integrate
.. //depot/projects/netperf/sys/compat/ndis/subr_ntoskrnl.c#9 integrate
.. //depot/projects/netperf/sys/dev/dpt/dpt_scsi.c#3 integrate
.. //depot/projects/netperf/sys/dev/if_ndis/if_ndis.c#11 integrate
.. //depot/projects/netperf/sys/dev/usb/usb_quirks.c#4 integrate
.. //depot/projects/netperf/sys/dev/usb/usbdevs#13 integrate
.. //depot/projects/netperf/sys/dev/usb/usbdevs.h#13 integrate
.. //depot/projects/netperf/sys/dev/usb/usbdevs_data.h#13 integrate
.. //depot/projects/netperf/sys/fs/unionfs/union_subr.c#3 integrate
.. //depot/projects/netperf/sys/fs/unionfs/union_vnops.c#5 integrate
.. //depot/projects/netperf/sys/kern/init_main.c#7 integrate
.. //depot/projects/netperf/sys/kern/kern_descrip.c#9 integrate
.. //depot/projects/netperf/sys/kern/uipc_usrreq.c#4 integrate
.. //depot/projects/netperf/sys/modules/Makefile#15 integrate
.. //depot/projects/netperf/sys/powerpc/powermac/ata_macio.c#5 integrate
.. //depot/projects/netperf/sys/powerpc/psim/ata_iobus.c#4 integrate
.. //depot/projects/netperf/sys/sys/filedesc.h#4 integrate
Differences ...
==== //depot/projects/netperf/sys/Makefile#2 (text+ko) ====
@@ -1,9 +1,9 @@
-# $FreeBSD: src/sys/Makefile,v 1.28 2003/06/26 03:52:48 peter Exp $
+# $FreeBSD: src/sys/Makefile,v 1.29 2004/01/17 03:28:27 ru Exp $
# The boot loader
SUBDIR= boot
-# KLD modules build for both a.out and ELF
+# Loadable kernel modules
.if defined(MODULES_WITH_WORLD)
SUBDIR+=modules
.endif
==== //depot/projects/netperf/sys/compat/ndis/hal_var.h#2 (text+ko) ====
@@ -29,12 +29,20 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/compat/ndis/hal_var.h,v 1.1 2003/12/11 22:34:37 wpaul Exp $
+ * $FreeBSD: src/sys/compat/ndis/hal_var.h,v 1.2 2004/01/15 21:31:48 wpaul Exp $
*/
#ifndef _HAL_VAR_H_
#define _HAL_VAR_H_
+#ifdef __amd64__
+#define NDIS_BUS_SPACE_IO AMD64_BUS_SPACE_IO
+#define NDIS_BUS_SPACE_MEM AMD64_BUS_SPACE_MEM
+#else
+#define NDIS_BUS_SPACE_IO I386_BUS_SPACE_IO
+#define NDIS_BUS_SPACE_MEM I386_BUS_SPACE_MEM
+#endif
+
extern image_patch_table hal_functbl[];
#endif /* _HAL_VAR_H_ */
==== //depot/projects/netperf/sys/compat/ndis/ndis_var.h#10 (text+ko) ====
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/compat/ndis/ndis_var.h,v 1.15 2004/01/12 03:49:20 wpaul Exp $
+ * $FreeBSD: src/sys/compat/ndis/ndis_var.h,v 1.16 2004/01/16 02:07:04 obrien Exp $
*/
#ifndef _NDIS_VAR_H_
@@ -46,7 +46,7 @@
typedef void *ndis_handle;
typedef uint32_t ndis_oid;
typedef uint32_t ndis_error_code;
-typedef uint32_t ndis_kspin_lock;
+typedef register_t ndis_kspin_lock;
typedef uint8_t ndis_kirql;
/*
==== //depot/projects/netperf/sys/compat/ndis/ntoskrnl_var.h#4 (text+ko) ====
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/compat/ndis/ntoskrnl_var.h,v 1.4 2003/12/23 04:08:22 wpaul Exp $
+ * $FreeBSD: src/sys/compat/ndis/ntoskrnl_var.h,v 1.5 2004/01/16 02:07:04 obrien Exp $
*/
#ifndef _NTOSKRNL_VAR_H_
@@ -55,7 +55,28 @@
#define MDL_VA(b) \
((void *)((char *)((b)->nb_startva) + (b)->nb_byteoffset))
-typedef uint32_t kspin_lock;
+/*-
+ * The ndis_kspin_lock type is called KSPIN_LOCK in MS-Windows.
+ * According to the Windows DDK header files, KSPIN_LOCK is defined like this:
+ * typedef ULONG_PTR KSPIN_LOCK;
+ *
+ * From basetsd.h (SDK, Feb. 2003):
+ * typedef [public] unsigned __int3264 ULONG_PTR, *PULONG_PTR;
+ * typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
+ * typedef _W64 unsigned long ULONG_PTR, *PULONG_PTR;
+ *
+ * The keyword __int3264 specifies an integral type that has the following
+ * properties:
+ * + It is 32-bit on 32-bit platforms
+ * + It is 64-bit on 64-bit platforms
+ * + It is 32-bit on the wire for backward compatibility.
+ * It gets truncated on the sending side and extended appropriately
+ * (signed or unsigned) on the receiving side.
+ *
+ * Thus register_t seems the proper mapping onto FreeBSD for spin locks.
+ */
+
+typedef register_t kspin_lock;
struct slist_entry {
struct slist_entry *sl_next;
==== //depot/projects/netperf/sys/compat/ndis/pe_var.h#4 (text+ko) ====
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/compat/ndis/pe_var.h,v 1.4 2004/01/13 22:49:45 obrien Exp $
+ * $FreeBSD: src/sys/compat/ndis/pe_var.h,v 1.6 2004/01/15 21:31:48 wpaul Exp $
*/
#ifndef _PE_VAR_H_
@@ -417,9 +417,9 @@
*/
#ifdef __amd64__
-#define __stdcall
+#define __stdcall
#else
-#define __stdcall __attribute__((__stdcall__))
+#define __stdcall __attribute__((__stdcall__))
#endif
__BEGIN_DECLS
==== //depot/projects/netperf/sys/compat/ndis/subr_hal.c#4 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_hal.c,v 1.6 2004/01/13 22:49:45 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_hal.c,v 1.7 2004/01/15 19:34:56 obrien Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -96,7 +96,7 @@
uint32_t *port;
uint32_t val;
{
- bus_space_write_4(I386_BUS_SPACE_IO, 0x0, (uint32_t)port, val);
+ bus_space_write_4(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val);
return;
}
@@ -105,7 +105,7 @@
uint16_t *port;
uint16_t val;
{
- bus_space_write_2(I386_BUS_SPACE_IO, 0x0, (uint32_t)port, val);
+ bus_space_write_2(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val);
return;
}
@@ -114,7 +114,7 @@
uint8_t *port;
uint8_t val;
{
- bus_space_write_1(I386_BUS_SPACE_IO, 0x0, (uint32_t)port, val);
+ bus_space_write_1(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val);
return;
}
@@ -124,7 +124,7 @@
uint32_t *val;
uint32_t cnt;
{
- bus_space_write_multi_4(I386_BUS_SPACE_IO, 0x0,
+ bus_space_write_multi_4(NDIS_BUS_SPACE_IO, 0x0,
(bus_size_t)port, val, cnt);
return;
}
@@ -135,7 +135,7 @@
uint16_t *val;
uint32_t cnt;
{
- bus_space_write_multi_2(I386_BUS_SPACE_IO, 0x0,
+ bus_space_write_multi_2(NDIS_BUS_SPACE_IO, 0x0,
(bus_size_t)port, val, cnt);
return;
}
@@ -146,7 +146,7 @@
uint8_t *val;
uint32_t cnt;
{
- bus_space_write_multi_1(I386_BUS_SPACE_IO, 0x0,
+ bus_space_write_multi_1(NDIS_BUS_SPACE_IO, 0x0,
(bus_size_t)port, val, cnt);
return;
}
@@ -155,21 +155,21 @@
hal_readport_ushort(port)
uint16_t *port;
{
- return(bus_space_read_2(I386_BUS_SPACE_IO, 0x0, (uint32_t)port));
+ return(bus_space_read_2(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port));
}
__stdcall static uint32_t
hal_readport_ulong(port)
uint32_t *port;
{
- return(bus_space_read_4(I386_BUS_SPACE_IO, 0x0, (uint32_t)port));
+ return(bus_space_read_4(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port));
}
__stdcall static uint8_t
hal_readport_uchar(port)
uint8_t *port;
{
- return(bus_space_read_1(I386_BUS_SPACE_IO, 0x0, (uint32_t)port));
+ return(bus_space_read_1(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port));
}
__stdcall static void
@@ -178,7 +178,7 @@
uint32_t *val;
uint32_t cnt;
{
- bus_space_read_multi_4(I386_BUS_SPACE_IO, 0x0,
+ bus_space_read_multi_4(NDIS_BUS_SPACE_IO, 0x0,
(bus_size_t)port, val, cnt);
return;
}
@@ -189,7 +189,7 @@
uint16_t *val;
uint32_t cnt;
{
- bus_space_read_multi_2(I386_BUS_SPACE_IO, 0x0,
+ bus_space_read_multi_2(NDIS_BUS_SPACE_IO, 0x0,
(bus_size_t)port, val, cnt);
return;
}
@@ -200,7 +200,7 @@
uint8_t *val;
uint32_t cnt;
{
- bus_space_read_multi_1(I386_BUS_SPACE_IO, 0x0,
+ bus_space_read_multi_1(NDIS_BUS_SPACE_IO, 0x0,
(bus_size_t)port, val, cnt);
return;
}
==== //depot/projects/netperf/sys/compat/ndis/subr_ntoskrnl.c#9 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.15 2004/01/13 22:49:45 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.17 2004/01/15 21:31:48 wpaul Exp $");
#include <sys/ctype.h>
#include <sys/param.h>
@@ -56,6 +56,7 @@
#include <sys/rman.h>
#include <compat/ndis/pe_var.h>
+#include <compat/ndis/hal_var.h>
#include <compat/ndis/resource_var.h>
#include <compat/ndis/ndis_var.h>
#include <compat/ndis/ntoskrnl_var.h>
@@ -282,7 +283,7 @@
uint16_t *reg;
uint16_t val;
{
- bus_space_write_2(I386_BUS_SPACE_MEM, 0x0, (uint32_t)reg, val);
+ bus_space_write_2(NDIS_BUS_SPACE_MEM, 0x0, (bus_size_t)reg, val);
return;
}
@@ -290,7 +291,7 @@
ntoskrnl_readreg_ushort(reg)
uint16_t *reg;
{
- return(bus_space_read_2(I386_BUS_SPACE_MEM, 0x0, (uint32_t)reg));
+ return(bus_space_read_2(NDIS_BUS_SPACE_MEM, 0x0, (bus_size_t)reg));
}
__stdcall static void
@@ -298,7 +299,7 @@
uint32_t *reg;
uint32_t val;
{
- bus_space_write_4(I386_BUS_SPACE_MEM, 0x0, (uint32_t)reg, val);
+ bus_space_write_4(NDIS_BUS_SPACE_MEM, 0x0, (bus_size_t)reg, val);
return;
}
@@ -306,14 +307,14 @@
ntoskrnl_readreg_ulong(reg)
uint32_t *reg;
{
- return(bus_space_read_4(I386_BUS_SPACE_MEM, 0x0, (uint32_t)reg));
+ return(bus_space_read_4(NDIS_BUS_SPACE_MEM, 0x0, (bus_size_t)reg));
}
__stdcall static uint8_t
ntoskrnl_readreg_uchar(reg)
uint8_t *reg;
{
- return(bus_space_read_1(I386_BUS_SPACE_MEM, 0x0, (uint32_t)reg));
+ return(bus_space_read_1(NDIS_BUS_SPACE_MEM, 0x0, (bus_size_t)reg));
}
__stdcall static void
@@ -321,7 +322,7 @@
uint8_t *reg;
uint8_t val;
{
- bus_space_write_1(I386_BUS_SPACE_MEM, 0x0, (uint32_t)reg, val);
+ bus_space_write_1(NDIS_BUS_SPACE_MEM, 0x0, (bus_size_t)reg, val);
return;
}
==== //depot/projects/netperf/sys/dev/dpt/dpt_scsi.c#3 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/dpt/dpt_scsi.c,v 1.45 2003/08/24 17:46:04 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/dpt/dpt_scsi.c,v 1.46 2004/01/17 05:57:52 mdodd Exp $");
/*
* dpt_scsi.c: SCSI dependant code for the DPT driver
@@ -46,7 +46,7 @@
* arrays that span controllers (Wow!).
*/
-#ident "$FreeBSD: src/sys/dev/dpt/dpt_scsi.c,v 1.45 2003/08/24 17:46:04 obrien Exp $"
+#ident "$FreeBSD: src/sys/dev/dpt/dpt_scsi.c,v 1.46 2004/01/17 05:57:52 mdodd Exp $"
#define _DPT_C_
@@ -1553,8 +1553,19 @@
dpt->sims[i] = cam_sim_alloc(dpt_action, dpt_poll, "dpt",
dpt, dpt->unit, /*untagged*/2,
/*tagged*/dpt->max_dccbs, devq);
+ if (dpt->sims[i] == NULL) {
+ if (i == 0)
+ cam_simq_free(devq);
+ else
+ printf( "%s(): Unable to attach bus %d "
+ "due to resource shortage\n",
+ __func__, i);
+ break;
+ }
+
if (xpt_bus_register(dpt->sims[i], i) != CAM_SUCCESS) {
cam_sim_free(dpt->sims[i], /*free_devq*/i == 0);
+ dpt->sims[i] = NULL;
break;
}
@@ -1564,6 +1575,7 @@
CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
xpt_bus_deregister(cam_sim_path(dpt->sims[i]));
cam_sim_free(dpt->sims[i], /*free_devq*/i == 0);
+ dpt->sims[i] = NULL;
break;
}
==== //depot/projects/netperf/sys/dev/if_ndis/if_ndis.c#11 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.27 2004/01/12 21:04:43 wpaul Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/if_ndis/if_ndis.c,v 1.28 2004/01/15 21:31:49 wpaul Exp $");
#include "opt_bdg.h"
@@ -93,8 +93,6 @@
{ 0, 0, 0, NULL }
};
-#define __stdcall __attribute__((__stdcall__))
-
static int ndis_probe (device_t);
static int ndis_attach (device_t);
static int ndis_detach (device_t);
==== //depot/projects/netperf/sys/dev/usb/usb_quirks.c#4 (text+ko) ====
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.35 2004/01/13 21:42:31 green Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.36 2004/01/16 15:29:27 sanpei Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -105,6 +105,8 @@
{ USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_WMRPAD, ANY, { UQ_NO_STRINGS }},
{ USB_VENDOR_QUALCOMM, USB_PRODUCT_QUALCOMM_CDMA_MSM,
ANY, { UQ_ASSUME_CM_OVER_DATA }},
+ { USB_VENDOR_SUNTAC, USB_PRODUCT_SUNTAC_AS64LX,
+ 0x100, { UQ_ASSUME_CM_OVER_DATA }},
{ 0, 0, 0, { 0 } }
};
==== //depot/projects/netperf/sys/dev/usb/usbdevs#13 (text+ko) ====
@@ -1,4 +1,4 @@
-$FreeBSD: src/sys/dev/usb/usbdevs,v 1.156 2004/01/13 21:42:32 green Exp $
+$FreeBSD: src/sys/dev/usb/usbdevs,v 1.157 2004/01/16 15:29:27 sanpei Exp $
/*
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -1184,9 +1184,10 @@
/* SUN Corporation products */
product SUNTAC DS96L 0x0003 SUNTAC U-Cable type D2
-product SUNTAC IS96U 0x000a SUNTAC Ir-Trinity
product SUNTAC PS64P1 0x0005 SUNTAC U-Cable type P1
product SUNTAC VS10U 0x0009 SUNTAC Slipper U
+product SUNTAC IS96U 0x000a SUNTAC Ir-Trinity
+product SUNTAC AS64LX 0x000b SUNTAC U-Cable type A3
/* Sun Microsystems products */
product SUN KEYBOARD 0x0005 Type 6 USB keyboard
==== //depot/projects/netperf/sys/dev/usb/usbdevs.h#13 (text+ko) ====
@@ -1,10 +1,10 @@
-/* $FreeBSD: src/sys/dev/usb/usbdevs.h,v 1.163 2004/01/13 21:42:32 green Exp $ */
+/* $FreeBSD: src/sys/dev/usb/usbdevs.h,v 1.164 2004/01/16 15:31:20 sanpei Exp $ */
/*
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
*
* generated from:
- * FreeBSD: src/sys/dev/usb/usbdevs,v 1.155 2004/01/12 12:47:36 sanpei Exp
+ * FreeBSD: src/sys/dev/usb/usbdevs,v 1.157 2004/01/16 15:29:27 sanpei Exp
*/
/*
@@ -1191,9 +1191,10 @@
/* SUN Corporation products */
#define USB_PRODUCT_SUNTAC_DS96L 0x0003 /* SUNTAC U-Cable type D2 */
-#define USB_PRODUCT_SUNTAC_IS96U 0x000a /* SUNTAC Ir-Trinity */
#define USB_PRODUCT_SUNTAC_PS64P1 0x0005 /* SUNTAC U-Cable type P1 */
#define USB_PRODUCT_SUNTAC_VS10U 0x0009 /* SUNTAC Slipper U */
+#define USB_PRODUCT_SUNTAC_IS96U 0x000a /* SUNTAC Ir-Trinity */
+#define USB_PRODUCT_SUNTAC_AS64LX 0x000b /* SUNTAC U-Cable type A3 */
/* Sun Microsystems products */
#define USB_PRODUCT_SUN_KEYBOARD 0x0005 /* Type 6 USB keyboard */
==== //depot/projects/netperf/sys/dev/usb/usbdevs_data.h#13 (text+ko) ====
@@ -1,10 +1,10 @@
-/* $FreeBSD: src/sys/dev/usb/usbdevs_data.h,v 1.163 2004/01/13 21:42:32 green Exp $ */
+/* $FreeBSD: src/sys/dev/usb/usbdevs_data.h,v 1.164 2004/01/16 15:31:20 sanpei Exp $ */
/*
* THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
*
* generated from:
- * FreeBSD: src/sys/dev/usb/usbdevs,v 1.155 2004/01/12 12:47:36 sanpei Exp
+ * FreeBSD: src/sys/dev/usb/usbdevs,v 1.157 2004/01/16 15:29:27 sanpei Exp
*/
/*
@@ -2938,22 +2938,28 @@
"SUNTAC U-Cable type D2",
},
{
- USB_VENDOR_SUNTAC, USB_PRODUCT_SUNTAC_IS96U,
+ USB_VENDOR_SUNTAC, USB_PRODUCT_SUNTAC_PS64P1,
+ 0,
+ "SUN Corporation",
+ "SUNTAC U-Cable type P1",
+ },
+ {
+ USB_VENDOR_SUNTAC, USB_PRODUCT_SUNTAC_VS10U,
0,
"SUN Corporation",
- "SUNTAC Ir-Trinity",
+ "SUNTAC Slipper U",
},
{
- USB_VENDOR_SUNTAC, USB_PRODUCT_SUNTAC_PS64P1,
+ USB_VENDOR_SUNTAC, USB_PRODUCT_SUNTAC_IS96U,
0,
"SUN Corporation",
- "SUNTAC U-Cable type P1",
+ "SUNTAC Ir-Trinity",
},
{
- USB_VENDOR_SUNTAC, USB_PRODUCT_SUNTAC_VS10U,
+ USB_VENDOR_SUNTAC, USB_PRODUCT_SUNTAC_AS64LX,
0,
"SUN Corporation",
- "SUNTAC Slipper U",
+ "SUNTAC U-Cable type A3",
},
{
USB_VENDOR_SUN, USB_PRODUCT_SUN_KEYBOARD,
==== //depot/projects/netperf/sys/fs/unionfs/union_subr.c#3 (text+ko) ====
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union_subr.c 8.20 (Berkeley) 5/20/95
- * $FreeBSD: src/sys/fs/unionfs/union_subr.c,v 1.75 2003/07/26 07:32:21 phk Exp $
+ * $FreeBSD: src/sys/fs/unionfs/union_subr.c,v 1.77 2004/01/16 22:54:33 green Exp $
*/
#include <sys/param.h>
@@ -1155,38 +1155,31 @@
return (VOP_CLOSE(vp, fmode, cred, td));
}
-#if 0
-
/*
* union_removed_upper:
*
- * called with union_node unlocked. XXX
+ * An upper-only file/directory has been removed; un-cache it so
+ * that unionfs vnode gets reclaimed and the last uppervp reference
+ * disappears.
+ *
+ * Called with union_node unlocked.
*/
void
union_removed_upper(un)
struct union_node *un;
{
- struct thread *td = curthread; /* XXX */
- struct vnode **vpp;
+ if (un->un_flags & UN_CACHED) {
+ int hash = UNION_HASH(un->un_uppervp, un->un_lowervp);
- /*
- * Do not set the uppervp to NULLVP. If lowervp is NULLVP,
- * union node will have neither uppervp nor lowervp. We remove
- * the union node from cache, so that it will not be referrenced.
- */
- union_newupper(un, NULLVP);
- if (un->un_dircache != NULL)
- union_dircache_free(un);
-
- if (un->un_flags & UN_CACHED) {
+ while (union_list_lock(hash))
+ continue;
un->un_flags &= ~UN_CACHED;
LIST_REMOVE(un, un_cache);
+ union_list_unlock(hash);
}
}
-#endif
-
/*
* Determine whether a whiteout is needed
* during a remove/rmdir operation.
==== //depot/projects/netperf/sys/fs/unionfs/union_vnops.c#5 (text+ko) ====
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union_vnops.c 8.32 (Berkeley) 6/23/95
- * $FreeBSD: src/sys/fs/unionfs/union_vnops.c,v 1.104 2004/01/03 00:36:46 tjr Exp $
+ * $FreeBSD: src/sys/fs/unionfs/union_vnops.c,v 1.106 2004/01/16 22:55:25 green Exp $
*/
#include <sys/param.h>
@@ -1224,12 +1224,12 @@
if ((uppervp = union_lock_upper(un, td)) != NULLVP) {
if (union_dowhiteout(un, cnp->cn_cred, td))
cnp->cn_flags |= DOWHITEOUT;
- error = VOP_REMOVE(upperdvp, uppervp, cnp);
-#if 0
- /* XXX */
+ if (cnp->cn_flags & DOWHITEOUT) /* XXX fs corruption */
+ error = EOPNOTSUPP;
+ else
+ error = VOP_REMOVE(upperdvp, uppervp, cnp);
if (!error)
union_removed_upper(un);
-#endif
union_unlock_upper(uppervp, td);
} else {
error = union_mkwhiteout(
@@ -1541,7 +1541,12 @@
if ((uppervp = union_lock_upper(un, td)) != NULLVP) {
if (union_dowhiteout(un, cnp->cn_cred, td))
cnp->cn_flags |= DOWHITEOUT;
- error = VOP_RMDIR(upperdvp, uppervp, ap->a_cnp);
+ if (cnp->cn_flags & DOWHITEOUT) /* XXX fs corruption */
+ error = EOPNOTSUPP;
+ else
+ error = VOP_RMDIR(upperdvp, uppervp, ap->a_cnp);
+ if (!error)
+ union_removed_upper(un);
union_unlock_upper(uppervp, td);
} else {
error = union_mkwhiteout(
==== //depot/projects/netperf/sys/kern/init_main.c#7 (text+ko) ====
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/init_main.c,v 1.239 2004/01/15 10:15:03 des Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/init_main.c,v 1.240 2004/01/16 20:29:23 rwatson Exp $");
#include "opt_init_path.h"
#include "opt_mac.h"
@@ -683,6 +683,7 @@
error = fork1(&thread0, RFFDG | RFPROC | RFSTOPPED, 0, &initproc);
if (error)
panic("cannot fork init: %d\n", error);
+ KASSERT(initproc->p_pid == 1, ("create_init: initproc->p_pid != 1"));
/* divorce init's credentials from the kernel's */
newcred = crget();
PROC_LOCK(initproc);
==== //depot/projects/netperf/sys/kern/kern_descrip.c#9 (text+ko) ====
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_descrip.c,v 1.219 2004/01/15 10:15:03 des Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_descrip.c,v 1.223 2004/01/17 00:58:36 des Exp $");
#include "opt_compat.h"
@@ -599,12 +599,10 @@
if (type == DUP_FIXED) {
if (new >= fdp->fd_nfiles)
fdgrowtable(fdp, new + 1);
- KASSERT(new < fdp->fd_nfiles,
- ("fdgrowtable() failed to grow table"));
if (fdp->fd_ofiles[new] == NULL)
fdused(fdp, new);
} else {
- if ((error = fdalloc(td, &new)) != 0) {
+ if ((error = fdalloc(td, new, &new)) != 0) {
FILEDESC_UNLOCK(fdp);
fdrop(fp, td);
return (error);
@@ -1207,7 +1205,7 @@
* Allocate a file descriptor for the process.
*/
int
-fdalloc(struct thread *td, int *result)
+fdalloc(struct thread *td, int minfd, int *result)
{
struct proc *p = td->td_proc;
struct filedesc *fdp = p->p_fd;
@@ -1224,14 +1222,13 @@
* may drop the filedesc lock, so we're in a race.
*/
for (;;) {
- fd = fd_first_free(fdp, fdp->fd_freefile, fdp->fd_nfiles);
+ fd = fd_first_free(fdp, minfd, fdp->fd_nfiles);
if (fd >= maxfd)
return (EMFILE);
if (fd < fdp->fd_nfiles)
break;
fdgrowtable(fdp, min(fdp->fd_nfiles * 2, maxfd));
}
- FILEDESC_LOCK_ASSERT(fdp, MA_OWNED);
/*
* Perform some sanity checks, then mark the file descriptor as
@@ -1329,7 +1326,7 @@
LIST_INSERT_HEAD(&filehead, fp, f_list);
}
sx_xunlock(&filelist_lock);
- if ((error = fdalloc(td, &i))) {
+ if ((error = fdalloc(td, 0, &i))) {
FILEDESC_UNLOCK(p->p_fd);
fdrop(fp, td);
if (resultfp)
@@ -1374,8 +1371,10 @@
FILEDESC_LOCK_ASSERT(fdp, MA_OWNED);
+ FILEDESC_UNLOCK(fdp);
MALLOC(newfdp, struct filedesc0 *, sizeof(struct filedesc0),
M_FILEDESC, M_WAITOK | M_ZERO);
+ FILEDESC_LOCK(fdp);
mtx_init(&newfdp->fd_fd.fd_mtx, FILEDESC_LOCK_DESC, NULL, MTX_DEF);
newfdp->fd_fd.fd_cdir = fdp->fd_cdir;
if (newfdp->fd_fd.fd_cdir)
@@ -1429,11 +1428,13 @@
FILEDESC_LOCK_ASSERT(fdp, MA_OWNED);
newfdp = fdinit(fdp);
- FILEDESC_LOCK(newfdp);
- if (fdp->fd_lastfile >= newfdp->fd_nfiles)
+ while (fdp->fd_lastfile >= newfdp->fd_nfiles) {
+ FILEDESC_UNLOCK(fdp);
+ FILEDESC_LOCK(newfdp);
fdgrowtable(newfdp, fdp->fd_lastfile + 1);
- KASSERT(newfdp->fd_nfiles > fdp->fd_lastfile,
- ("fdgrowtable() failed to grow table"));
+ FILEDESC_UNLOCK(newfdp);
+ FILEDESC_LOCK(fdp);
+ }
/* copy everything except kqueue descriptors */
newfdp->fd_freefile = -1;
for (i = 0; i <= fdp->fd_lastfile; ++i) {
@@ -1441,7 +1442,6 @@
fdp->fd_ofiles[i]->f_type != DTYPE_KQUEUE) {
newfdp->fd_ofiles[i] = fdp->fd_ofiles[i];
newfdp->fd_ofileflags[i] = fdp->fd_ofileflags[i];
- fdused(newfdp, i);
fhold(newfdp->fd_ofiles[i]);
newfdp->fd_lastfile = i;
} else {
@@ -1449,10 +1449,16 @@
newfdp->fd_freefile = i;
}
}
+ FILEDESC_UNLOCK(fdp);
+ FILEDESC_LOCK(newfdp);
+ for (i = 0; i <= newfdp->fd_lastfile; ++i)
+ if (newfdp->fd_ofiles[i] != NULL)
+ fdused(newfdp, i);
+ FILEDESC_UNLOCK(newfdp);
+ FILEDESC_LOCK(fdp);
if (newfdp->fd_freefile == -1)
newfdp->fd_freefile = i;
newfdp->fd_cmask = fdp->fd_cmask;
- FILEDESC_UNLOCK(newfdp);
return (newfdp);
}
==== //depot/projects/netperf/sys/kern/uipc_usrreq.c#4 (text+ko) ====
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.114 2004/01/15 10:15:03 des Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.115 2004/01/17 00:59:04 des Exp $");
#include "opt_mac.h"
@@ -1047,7 +1047,7 @@
fdp = (int *)
CMSG_DATA(mtod(*controlp, struct cmsghdr *));
for (i = 0; i < newfds; i++) {
- if (fdalloc(td, &f))
+ if (fdalloc(td, 0, &f))
panic("unp_externalize fdalloc failed");
fp = *rp++;
td->td_proc->p_fd->fd_ofiles[f] = fp;
==== //depot/projects/netperf/sys/modules/Makefile#15 (text+ko) ====
@@ -1,33 +1,49 @@
-# $FreeBSD: src/sys/modules/Makefile,v 1.363 2004/01/11 09:15:13 nyan Exp $
+# $FreeBSD: src/sys/modules/Makefile,v 1.364 2004/01/16 15:55:29 ru Exp $
-.if !defined(NOCRYPT) || defined(ALL_MODULES)
-.if exists(${.CURDIR}/../opencrypto)
-_crypto= crypto
-_cryptodev= cryptodev
-.endif
-.if exists(${.CURDIR}/../crypto)
-_random= random
-.endif
-.endif
+# pcic -- currently broken and being worked on out of tree.
+# oldcard -- specialized use for debugging only.
+# owi -- totally unsupported for debugging only.
-SUBDIR= accf_data \
+SUBDIR= ${_3dfx} \
+ ${_aac} \
+ accf_data \
accf_http \
+ ${_acpi} \
+ ${_agp} \
aha \
+ ${_aic} \
aic7xxx \
aio \
+ ${_amd} \
amr \
an \
+ ${_aout} \
+ ${_apm} \
+ ${_ar} \
+ ${_arcnet} \
+ ${_asr} \
ath \
+ ${_ath_hal} \
aue \
+ ${_awi} \
axe \
bfe \
bge \
+ ${_bios} \
+ ${_bktr} \
bridge \
cam \
+ ${_canbepm} \
+ ${_canbus} \
+ ${_cardbus} \
+ ${_cbb} \
cd9660 \
cd9660_iconv \
+ ${_ciss} \
+ ${_cm} \
coda \
coda5 \
+ ${_coff} \
${_crypto} \
${_cryptodev} \
cue \
@@ -36,18 +52,37 @@
dcons_crom \
de \
digi \
+ ${_dpt} \
+ ${_drm} \
dummynet \
+ ${_ed} \
+ ${_el} \
+ ${_elink} \
+ ${_em} \
en \
+ ${_ep} \
+ ${_ex} \
+ ${_exca} \
+ ${_ext2fs} \
fatm \
fdc \
fdescfs \
+ ${_fe} \
firewire \
fxp \
+ ${_gem} \
geom \
gx \
harp \
hatm \
+ ${_hfa} \
hifn \
+ ${_hme} \
+ ${_i2c} \
+ ${_ibcs2} \
+ ${_ida} \
+ ${_idt} \
+ ${_ie} \
if_disc \
if_ef \
if_faith \
@@ -59,9 +94,12 @@
if_tap \
if_tun \
if_vlan \
+ ${_iir} \
ip6fw \
+ ${_ipfilter} \
+ ipfw \
ip_mroute_mod \
- ipfw \
+ ${_ips} \
isp \
ispfw \
joy \
@@ -70,6 +108,9 @@
libiconv \
libmbpool \
libmchain \
+ ${_linprocfs} \
+ ${_linux} \
+ ${_lnc} \
lpt \
mac_biba \
mac_bsdextended \
@@ -86,20 +127,34 @@
md \
mii \
mlx \
+ ${_mly} \
mpt \
msdosfs \
msdosfs_iconv \
my \
+ ${_ncp} \
+ ${_ncv} \
+ ${_ndis} \
+ ${_netgraph} \
nfsclient \
nfsserver \
nge \
nmdm \
+ ${_nsp} \
ntfs \
ntfs_iconv \
+ ${_null} \
nullfs \
+ ${_nwfs} \
+ ${_oltr} \
+ ${_osf1} \
patm \
+ ${_pccard} \
+ ${_pcfclock} \
pcn \
+ ${_pecoff} \
plip \
+ ${_pmc} \
portalfs \
ppbus \
ppi \
@@ -109,21 +164,36 @@
pst \
raidframe \
${_random} \
+ ${_ray} \
rc \
rc4 \
re \
rl \
rp \
rue \
+ ${_s3} \
+ ${_safe} \
+ ${_sbni} \
sbsh \
scd \
+ ${_scsi_low} \
sf \
sis \
sk \
+ ${_smbfs} \
sn \
+ ${_snc} \
snp \
+ ${_sound} \
+ ${_speaker} \
+ ${_splash} \
+ ${_sppp} \
+ ${_sr} \
ste \
+ ${_stg} \
+ ${_streams} \
sym \
+ ${_syscons} \
sysvipc \
ti \
tl \
@@ -139,6 +209,7 @@
udf \
udf_iconv \
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list