]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
13 years agoMFhead 210500:
glebius [Thu, 16 Sep 2010 14:30:32 +0000 (14:30 +0000)]
MFhead 210500:
  Zero padding fields of netflow records. This helps to reduce
  size of compressed export logs.

  Requested by: Alexey Illarionov <littlesavage orionet.ru>

git-svn-id: svn://svn.freebsd.org/base/stable/8@212734 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212146:
mav [Thu, 16 Sep 2010 02:47:09 +0000 (02:47 +0000)]
MFC r212146:
Add workaround for SiI3114 and SiI3512 chips bug, which caused sending
R_ERR in response to DMA activate FIS under certain circumstances. This is
recommended fix from chip datasheet. If triggered, this bug most likely
caused write command timeout.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212720 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212145:
mav [Thu, 16 Sep 2010 02:44:23 +0000 (02:44 +0000)]
MFC r212145:
SATA1.x SiliconImage controllers on power-on reset TFD Status register into
value 0xff. On hot-plug this value confuses ata_generic_reset() device
presence detection logic. As soon as we already know drive presence from
SATA hard reset, hint ata_generic_reset() to wait for device signature
until success or full timeout.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212719 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212081:
mav [Thu, 16 Sep 2010 02:42:52 +0000 (02:42 +0000)]
MFC r212081:
Increase device reset timeout from 10 to 15 seconds, same as in ahci(4).
Some devices found need about 10-12 seconds to spinup.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212718 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r212125, r212126
rmacklem [Thu, 16 Sep 2010 01:38:13 +0000 (01:38 +0000)]
MFC: r212125, r212126
Modify lib/libstand/nfs.c to use NFSv3 instead of NFSv2.
This allows the nfs_getrootfh() function to return the
correct file handle size to pxe.c for pxeboot. It also
results in NFSv2 no longer being used by default anywhere
in FreeBSD. If built with OLD_NFSV2 defined, the old
code that predated this patch will be built and NFSv2
will be used. pxe.c is also modified to use this version
of nfs_getrootfh() so that pxeboot will use NFSv3 and
work for non-FreeBSD as well as FreeBSD NFS servers.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212717 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r212123
rmacklem [Thu, 16 Sep 2010 01:02:53 +0000 (01:02 +0000)]
MFC: r212123
Modify nfs_diskless.c to recognize the environment variable
boot.nfsroot.nfshandlelen and set the diskless root fs to
use NFSv3 and this file handle length when it is set. If
this environment variable is not set, the diskless root fs
will use NFSv2 and the same defaults as before. This fixes
the problem where the diskless nfs root fs had to be on a
FreeBSD server for NFSv3 to work, because it did not know
the correct file handle length and assumed the size used
by FreeBSD.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212716 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r208459
marius [Wed, 15 Sep 2010 20:40:27 +0000 (20:40 +0000)]
MFC: r208459

Use real atomic operations for sparc64.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212697 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r210601 (partial), r211071, r211073
marius [Wed, 15 Sep 2010 20:17:18 +0000 (20:17 +0000)]
MFC: r210601 (partial), r211071, r211073

- As it is not possible for sched_bind(9) to context switch with
  td_critnest > 1 when not already running on the desired CPU read the
  TICK counter of the BSP via a direct cross trap request in that case
  instead.
- Provide a STICK based timecounter.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212695 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212335
emax [Wed, 15 Sep 2010 19:34:18 +0000 (19:34 +0000)]
MFC r212335

Make sure to only pickup hid_input items when parsing input reports.
As it turns out, libusbhid(3) also picks up hic_collection items even
though we explicitly requested hid_input items only.

Tested by: Buganini < buganini at gmail dot com >

git-svn-id: svn://svn.freebsd.org/base/stable/8@212691 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r211050 (partial)
marius [Wed, 15 Sep 2010 19:27:30 +0000 (19:27 +0000)]
MFC: r211050 (partial)

- Introduce a cpu_ipi_single() function pointer in order to send IPIs
  to single CPUs more efficiently with Cheetah(-class) and Jalapeno CPUs.
- Factor out the Jalapeno support from the Cheetah IPI send functions
  in order to be able to more easily and efficiently implement support
  for more than 32 target CPUs as well as a workaround for Cheetah+
  erratum 25 for the latter.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212689 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoAdd missing MFC to r212668 for cddl/compat/opensolaris from r209962.
mm [Wed, 15 Sep 2010 19:20:29 +0000 (19:20 +0000)]
Add missing MFC to r212668 for cddl/compat/opensolaris from r209962.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212688 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r211049, r211568
marius [Wed, 15 Sep 2010 18:51:14 +0000 (18:51 +0000)]
MFC: r211049, r211568

For CPUs which ignore TD_CV and support hardware unaliasing don't
bother doing page coloring. This results in a small but measurable
performance improvement in buildworld times.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212685 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r210176
marius [Wed, 15 Sep 2010 18:09:16 +0000 (18:09 +0000)]
MFC: r210176

Allocate proper amount of memory for interrupt names on sparc64 and
sun4v, same as done on other architectures. This removes garbage from
`vmstat -ia` output.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212684 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r208515
marius [Wed, 15 Sep 2010 17:38:59 +0000 (17:38 +0000)]
MFC: r208515

Fix some whitespace nits.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212679 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211932, r211947, r211948:
mm [Wed, 15 Sep 2010 16:20:24 +0000 (16:20 +0000)]
MFC r211932, r211947, r211948:

MFC r211932:

Import changes from OpenSolaris that provide
- better ACL caching and speedup of ACL permission checks
- faster handling of stat()
- lowered mutex contention in the read/writer lock (rrwlock)
- several related bugfixes

Detailed information (OpenSolaris onnv changesets and Bug IDs):

9749:105f407a2680
6802734 Support for Access Based Enumeration (not used on FreeBSD)
6844861 inconsistent xattr readdir behavior with too-small buffer

9866:ddc5f1d8eb4e
6848431 zfs with rstchown=0 or file_chown_self privilege allows user to "take" ownership

9981:b4907297e740
6775100 stat() performance on files on zfs should be improved
6827779 rrwlock is overly protective of its counters

10143:d2d432dfe597
6857433 memory leaks found at: zfs_acl_alloc/zfs_acl_node_alloc
6860318 truncate() on zfsroot succeeds when file has a component of its path set without access permission

10232:f37b85f7e03e
6865875 zfs sometimes incorrectly giving search access to a dir

10250:b179ceb34b62
6867395 zpool_upgrade_007_pos testcase panic'd with BAD TRAP: type=e (#pf Page fault)

10269:2788675568fd
6868276 zfs_rezget() can be hazardous when znode has a cached ACL

10295:f7a18a1e9610
6870564 panic in zfs_getsecattr

MFC r211947:

Move ZUT_OBJS in the same place that is used in vendor code.

MFC r211948:

Return NULL pointer instead of B_FALSE as it is done in the vendor code.

Approved by: delphij (mentor)
Obtained from: OpenSolaris (multiple Bug IDs)

git-svn-id: svn://svn.freebsd.org/base/stable/8@212672 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211931:
mm [Wed, 15 Sep 2010 16:14:38 +0000 (16:14 +0000)]
MFC r211931:

Update ZFS metaslab code from OpenSolaris.
This provides a noticeable write speedup, especially on pools with
less than 30% of free space.

Detailed information (OpenSolaris onnv changesets and Bug IDs):

11146:7e58f40bcb1c
6826241 Sync write IOPS drops dramatically during TXG sync
6869229 zfs should switch to shiny new metaslabs more frequently

11728:59fdb3b856f6
6918420 zdb -m has issues printing metaslab statistics

12047:7c1fcc8419ca
6917066 zfs block picking can be improved

Approved by: delphij (mentor)
Obtained from: OpenSolaris (Bug ID 6826241686922969184206917066)

git-svn-id: svn://svn.freebsd.org/base/stable/8@212671 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210398:
mm [Wed, 15 Sep 2010 16:10:38 +0000 (16:10 +0000)]
MFC r210398:

Enable fake resolving of SMB RIDs by using nulldomain and UID_NOBODY
- fixes panics when Solaris/OpenSolaris pools that contain files
uploaded with the SMB protocol are accessed

Enable seting/unsetting the sharesmb property (dummy action)
- allows users who import pools from Solaris/Opensolaris to unset
the sharesmb property and get rid of annoying messages

PR: kern/145778, kern/148709
Approved by: pjd, delphij (mentor))

git-svn-id: svn://svn.freebsd.org/base/stable/8@212670 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209962, r211970-r211972, r212050, r212605, r212611
mm [Wed, 15 Sep 2010 16:05:40 +0000 (16:05 +0000)]
MFC r209962, r211970-r211972, r212050, r212605, r212611

MFC r209962:

Merge ZFS version 15 and almost all OpenSolaris bugfixes referenced
in Solaris 10 updates 141445-09 and 142901-14.

Detailed information:
(OpenSolaris revisions and Bug IDs, Solaris 10 patch numbers)

7844:effed23820ae
6755435 zfs_open() and zfs_close() needs to use ZFS_ENTER/ZFS_VERIFY_ZP (141445-01)

7897:e520d8258820
6748436 inconsistent zpool.cache in boot_archive could panic a zfs root filesystem upon boot-up (141445-01)

7965:b795da521357
6740164 zpool attach can create an illegal root pool (141909-02)

8084:b811cc60d650
6769612 zpool_import() will continue to write to cachefile even if altroot is set (N/A)

8121:7fd09d4ebd9c
6757430 want an option for zdb to disable space map loading and leak tracking (141445-01)

8129:e4f45a0bfbb0
6542860 ASSERT: reason != VDEV_LABEL_REMOVE||vdev_inuse(vd, crtxg, reason, 0) (141445-01)

8188:fd00c0a81e80
6761100 want zdb option to select older uberblocks (141445-01)

8190:6eeea43ced42
6774886 zfs_setattr() won't allow ndmp to restore SUNWattr_rw (141445-01)

8225:59a9961c2aeb
6737463 panic while trying to write out config file if root pool import fails (141445-01)

8227:f7d7be9b1f56
6765294 Refactor replay (141445-01)

8228:51e9ca9ee3a5
6572357 libzfs should do more to avoid mnttab lookups (141909-01)
6572376 zfs_iter_filesystems and zfs_iter_snapshots get objset stats twice (141909-01)

8241:5a60f16123ba
6328632 zpool offline is a bit too conservative (141445-01)
6739487 ASSERT: txg <= spa_final_txg due to scrub/export race (141445-01)
6767129 ASSERT: cvd->vdev_isspare, in spa_vdev_detach() (141445-01)
6747698 checksum failures after offline -t / export / import / scrub (141445-01)
6745863 ZFS writes to disk after it has been offlined (141445-01)
6722540 50% slowdown on scrub/resilver with certain vdev configurations (141445-01)
6759999 resilver logic rewrites ditto blocks on both source and destination (141445-01)
6758107 I/O should never suspend during spa_load() (141445-01)
6776548 codereview(1) runs off the page when faced with multi-line comments (N/A)
6761406 AMD errata 91 workaround doesn't work on 64-bit systems (141445-01)

8242:e46e4b2f0a03
6770866 GRUB/ZFS should require physical path or devid, but not both (141445-01)

8269:03a7e9050cfd
6674216 "zfs share" doesn't work, but "zfs set sharenfs=on" does (141445-01)
6621164 $SRC/cmd/zfs/zfs_main.c seems to have a syntax error in the translation note (141445-01)
6635482 i18n problems in libzfs_dataset.c and zfs_main.c (141445-01)
6595194 "zfs get" VALUE column is as wide as NAME (141445-01)
6722991 vdev_disk.c: error checking for ddi_pathname_to_dev_t() must test for NODEV (141445-01)
6396518 ASSERT strings shouldn't be pre-processed (141445-01)

8274:846b39508aff
6713916 scrub/resilver needlessly decompress data (141445-01)

8343:655db2375fed
6739553 libzfs_status msgid table is out of sync (141445-01)
6784104 libzfs unfairly rejects numerical values greater than 2^63 (141445-01)
6784108 zfs_realloc() should not free original memory on failure (141445-01)

8525:e0e0e525d0f8
6788830 set large value to reservation cause core dump (141445-01)
6791064 want sysevents for ZFS scrub (141445-01)
6791066 need to be able to set cachefile on faulted pools (141445-01)
6791071 zpool_do_import() should not enable datasets on faulted pools (141445-01)
6792134 getting multiple properties on a faulted pool leads to confusion (141445-01)

8547:bcc7b46e5ff7
6792884 Vista clients cannot access .zfs (141445-01)

8632:36ef517870a3
6798384 It can take a village to raise a zio (141445-01)

8636:7e4ce9158df3
6551866 deadlock between zfs_write(), zfs_freesp(), and zfs_putapage() (141909-01)
6504953 zfs_getpage() misunderstands VOP_GETPAGE() interface (141909-01)
6702206 ZFS read/writer lock contention throttles sendfile() benchmark (141445-01)
6780491 Zone on a ZFS filesystem has poor fork/exec performance (141445-01)
6747596 assertion failed: DVA_EQUAL(BP_IDENTITY(&zio->io_bp_orig), BP_IDENTITY(zio->io_bp))); (141445-01)

8692:692d4668b40d
6801507 ZFS read aggregation should not mind the gap (141445-01)

8697:e62d2612c14d
6633095 creating a filesystem with many properties set is slow (141445-01)

8768:dfecfdbb27ed
6775697 oracle crashes when overwriting after hitting quota on zfs (141909-01)

8811:f8deccf701cf
6790687 libzfs mnttab caching ignores external changes (141445-01)
6791101 memory leak from libzfs_mnttab_init (141445-01)

8845:91af0d9c0790
6800942 smb_session_create() incorrectly stores IP addresses (N/A)
6582163 Access Control List (ACL) for shares (141445-01)
6804954 smb_search - shortname field should be space padded following the NULL terminator (N/A)
6800184 Panic at smb_oplock_conflict+0x35() (N/A)

8876:59d2e67b4b65
6803822 Reboot after replacement of system disk in a ZFS mirror drops to grub> prompt (141445-01)

8924:5af812f84759
6789318 coredump when issue zdb -uuuu poolname/ (141445-01)
6790345 zdb -dddd -e poolname coredump (141445-01)
6797109 zdb: 'zdb -dddddd pool_name/fs_name inode' coredump if the file with inode was deleted (141445-01)
6797118 zdb: 'zdb -dddddd poolname inum' coredump if I miss the fs name (141445-01)
6803343 shareiscsi=on failed, iscsitgtd failed request to share (141445-01)

9030:243fd360d81f
6815893 hang mounting a dataset after booting into a new boot environment (141445-01)

9056:826e1858a846
6809691 'zpool create -f' no longer overwrites ufs infomation (141445-01)

9179:d8fbd96b79b3
6790064 zfs needs to determine uid and gid earlier in create process (141445-01)

9214:8d350e5d04aa
6604992 forced unmount + being in .zfs/snapshot/<snap1> = not happy (141909-01)
6810367 assertion failed: dvp->v_flag & VROOT, file: ../../common/fs/gfs.c, line: 426 (141909-01)

9229:e3f8b41e5db4
6807765 ztest_dsl_dataset_promote_busy needs to clean up after ENOSPC (141445-01)

9230:e4561e3eb1ef
6821169 offlining a device results in checksum errors (141445-01)
6821170 ZFS should not increment error stats for unavailable devices (141445-01)
6824006 need to increase issue and interrupt taskqs threads in zfs (141445-01)

9234:bffdc4fc05c4
6792139 recovering from a suspended pool needs some work (141445-01)
6794830 reboot command hangs on a failed zfs pool (141445-01)

9246:67c03c93c071
6824062 System panicked in zfs_mount due to NULL pointer dereference when running btts and svvs tests (141909-01)

9276:a8a7fc849933
6816124 System crash running zpool destroy on broken zpool (141445-03)

9355:09928982c591
6818183 zfs snapshot -r is slow due to set_snap_props() doing txg_wait_synced() for each new snapshot (141445-03)

9391:413d0661ef33
6710376 log device can show incorrect status when other parts of pool are degraded (141445-03)

9396:f41cf682d0d3 (part already merged)
6501037 want user/group quotas on ZFS (141445-03)
6827260 assertion failed in arc_read(): hdr == pbuf->b_hdr (141445-03)
6815592 panic: No such hold X on refcount Y from zfs_znode_move (141445-03)
6759986 zfs list shows temporary %clone when doing online zfs recv (141445-03)

9404:319573cd93f8
6774713 zfs ignores canmount=noauto when sharenfs property != off (141445-03)

9412:4aefd8704ce0
6717022 ZFS DMU needs zero-copy support (141445-03)

9425:e7ffacaec3a8
6799895 spa_add_spares() needs to be protected by config lock (141445-03)
6826466 want to post sysevents on hot spare activation (141445-03)
6826468 spa 'allowfaulted' needs some work (141445-03)
6826469 kernel support for storing vdev FRU information (141445-03)
6826470 skip posting checksum errors from DTL regions of leaf vdevs (141445-03)
6826471 I/O errors after device remove probe can confuse FMA (141445-03)
6826472 spares should enjoy some of the benefits of cache devices (141445-03)

9443:2a96d8478e95
6833711 gang leaders shouldn't have to be logical (141445-03)

9463:d0bd231c7518
6764124 want zdb to be able to checksum metadata blocks only (141445-03)

9465:8372081b8019
6830237 zfs panic in zfs_groupmember() (141445-03)

9466:1fdfd1fed9c4
6833162 phantom log device in zpool status (141445-03)

9469:4f68f041ddcd
6824968 add ZFS userquota support to rquotad (141445-03)

9470:6d827468d7b5
6834217 godfather I/O should reexecute (141445-03)

9480:fcff33da767f
6596237 Stop looking and start ganging (141909-02)

9493:9933d599bc93
6623978 lwb->lwb_buf != NULL, file ../../../uts/common/fs/zfs/zil.c, line 787, function zil_lwb_commit (141445-06)

9512:64cafcbcc337
6801810 Commit of aligned streaming rewrites to ZIL device causes unwanted disk reads (N/A)

9515:d3b739d9d043
6586537 async zio taskqs can block out userland commands (142901-09)

9554:787363635b6a
6836768 zfs_userspace() callback has no way to indicate failure (N/A)

9574:1eb6a6ab2c57
6838062 zfs panics when an error is encountered in space_map_load() (141909-02)

9583:b0696cd037cc
6794136 Panic BAD TRAP: type=e when importing degraded zraid pool. (141909-03)

9630:e25a03f552e0
6776104 "zfs import" deadlock between spa_unload() and spa_async_thread() (141445-06)

9653:a70048a304d1
6664765 Unable to remove files when using fat-zap and quota exceeded on ZFS filesystem (141445-06)

9688:127be1845343
6841321 zfs userspace / zfs get userused@ doesn't work on mounted snapshot (N/A)
6843069 zfs get userused@S-1-... doesn't work (N/A)

9873:8ddc892eca6e
6847229 assertion failed: refcount_count(&tx->tx_space_written) + delta <= tx->tx_space_towrite in dmu_tx.c (141445-06)

9904:d260bd3fd47c
6838344 kernel heap corruption detected on zil while stress testing (141445-06)

9951:a4895b3dd543
6844900 zfs_ioc_userspace_upgrade leaks (N/A)

10040:38b25aeeaf7a
6857012 zfs panics on zpool import (141445-06)

10000:241a51d8720c
6848242 zdb -e no longer works as expected (N/A)

10100:4a6965f6bef8
6856634 snv_117 not booting: zfs_parse_bootfs: error2 (141445-07)

10160:a45b03783d44
6861983 zfs should use new name <-> SID interfaces (N/A)
6862984 userquota commands can hang (141445-06)

10299:80845694147f
6696858 zfs receive of incremental replication stream can dereference NULL pointer and crash (N/A)

10302:a9e3d1987706
6696858 zfs receive of incremental replication stream can dereference NULL pointer and crash (fix lint) (N/A)

10575:2a8816c5173b (partial merge)
6882227 spa_async_remove() shouldn't do a full clear (142901-14)

10800:469478b180d9
6880764 fsync on zfs is broken if writes are greater than 32kb on a hard crash and no log attached (142901-09)
6793430 zdb -ivvvv assertion failure: bp->blk_cksum.zc_word[2] == dmu_objset_id(zilog->zl_os) (N/A)

10801:e0bf032e8673 (partial merge)
6822816 assertion failed: zap_remove_int(ds_next_clones_obj) returns ENOENT (142901-09)

10810:b6b161a6ae4a
6892298 buf->b_hdr->b_state != arc_anon, file: ../../common/fs/zfs/arc.c, line: 2849 (142901-09)

10890:499786962772
6807339 spurious checksum errors when replacing a vdev (142901-13)

11249:6c30f7dfc97b
6906110 bad trap panic in zil_replay_log_record (142901-13)
6906946 zfs replay isn't handling uid/gid correctly (142901-13)

11454:6e69bacc1a5a
6898245 suspended zpool should not cause rest of the zfs/zpool commands to hang (142901-10)

11546:42ea6be8961b (partial merge)
6833999 3-way deadlock in dsl_dataset_hold_ref() and dsl_sync_task_group_sync() (142901-09)

MFC r211970:

Fix 'zfs allow' (maybe not only) returning:

        cannot access dataset system/usr/home: Operation not supported

by including libzfs_impl.h. What libzfs_impl.h does is to redefine ioctl() to
be compatible with OpenSolaris. More specifically OpenSolaris returns ENOMEM
when buffer is too small and sets field zc_nvlist_dst_size to the size that
will be big enough for the data. In FreeBSD case ioctl() doesn't copy data
structure back in case of a failure. We work-around it in kernel and libzfs by
returning 0 from ioctl() and always checking if zc_nvlist_dst_size hasn't
changed. For this work-around to work in pyzfs we need this compatible ioctl()
which is implemented in libzfs_impl.h.

MFC r211971:

Print errors on stderr.

MFC r211972:

Give user a hint what to do when /usr/lib/zfs/pyzfs.py is missing.

MFC r212050:

When upgrading a pool which contain root file system, give user a hint that
he should update boot code.

MFC r212605:

Add missing vop_vector zfsctl_ops_shares
Add missing locks around VOP_READDIR and VOP_GETATTR with z_shares_dir

MFC r212611:

Remove duplicated VFS_HOLD due to a mismerge.

Approved by: delphij (mentor)
Obtained from: OpenSolaris (multiple Bug IDs), Perforce (pjd)

git-svn-id: svn://svn.freebsd.org/base/stable/8@212668 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212115:
mdf [Wed, 15 Sep 2010 15:53:05 +0000 (15:53 +0000)]
MFC r212115:

Fix a bug with sched_affinity() where it checks td_pinned of another
thread in a racy manner, which can lead to attempting to migrate a
thread that is pinned to a CPU.  Instead, have sched_switch() determine
which CPU a thread should run on if the current one is not allowed.

KASSERT in sched_bind() that the thread is not yet pinned to a CPU.

KASSERT in sched_switch() that only migratable threads or those moving
due to a sched_bind() are changing CPUs.

Note that this is direct commit as ipi_cpu() only exists in CURRENT.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212666 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212363:
nwhitehorn [Wed, 15 Sep 2010 13:45:06 +0000 (13:45 +0000)]
MFC r212363:

Reorder statistics tracking and table lock acquisitions already in place
to avoid race conditions updating the PVO statistics.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212659 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211967,212044,212278,212322,212331:
nwhitehorn [Wed, 15 Sep 2010 13:43:43 +0000 (13:43 +0000)]
MFC r211967,212044,212278,212322,212331:

Fix a variety of race conditions and errors in VSID allocation in both
the 32 and 64-bit PMAP modules, some dating back to the original PMAP
import from NetBSD. This fixes a variety of potential crashes and memory
corruption bugs, especially on SMP systems under heavy load.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212658 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212317 & r212412
sanpei [Wed, 15 Sep 2010 11:04:02 +0000 (11:04 +0000)]
MFC r212317 & r212412
Add Buffalo (Melco Inc.) LUA3-U2-ATX
Add Planex UE-200TX-G

git-svn-id: svn://svn.freebsd.org/base/stable/8@212656 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211874:
andre [Wed, 15 Sep 2010 09:38:01 +0000 (09:38 +0000)]
MFC r211874:

  Use timestamp modulo comparison macro for automatic receive buffer
  scaling to correctly handle wrapping of ticks value.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212644 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209064: Remove unused assignment.
avg [Wed, 15 Sep 2010 08:24:19 +0000 (08:24 +0000)]
MFC r209064: Remove unused assignment.

Original commit by jkim.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212642 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209055: Fix a possible dereference of null pointer.
avg [Wed, 15 Sep 2010 08:18:20 +0000 (08:18 +0000)]
MFC r209055: Fix a possible dereference of null pointer.

Original commit by jkim.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212641 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211762: zfs arc_reclaim_thread: no need to call arc_reclaim_needed
avg [Wed, 15 Sep 2010 08:03:23 +0000 (08:03 +0000)]
MFC r211762: zfs arc_reclaim_thread: no need to call arc_reclaim_needed
when resetting needfree

git-svn-id: svn://svn.freebsd.org/base/stable/8@212639 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212501:
kib [Wed, 15 Sep 2010 07:30:27 +0000 (07:30 +0000)]
MFC r212501:
Add DF_1_LOADFLTR.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212638 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212499:
kib [Wed, 15 Sep 2010 07:28:31 +0000 (07:28 +0000)]
MFC r212499:
Fix typo.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212637 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r212043
rmacklem [Tue, 14 Sep 2010 01:28:05 +0000 (01:28 +0000)]
MFC: r212043
Add a null_remove() function to nullfs, so that the v_usecount
of the lower level vnode is incremented to greater than 1 when
the upper level vnode's v_usecount is greater than one. This
is necessary for the NFS clients, so that they will do a silly
rename of the file instead of actually removing it when the
file is still in use. It is "racy", since the v_usecount is
incremented in many places in the kernel with
minimal synchronization, but an extraneous silly rename is
preferred to not doing a silly rename when it is required.
The only other file systems that currently check the value
of v_usecount in their VOP_REMOVE() functions are nwfs and
smbfs. These file systems choose to fail a remove when the
v_usecount is greater than 1 and I believe will function
more correctly with this patch, as well.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212590 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212296
emax [Tue, 14 Sep 2010 00:32:29 +0000 (00:32 +0000)]
MFC r212296

Do not request SDP attributes using ranges.
Apparently some devices do not like it.

Tested by: Buganini < buganini at gmail dot com >

git-svn-id: svn://svn.freebsd.org/base/stable/8@212587 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211213:
kib [Mon, 13 Sep 2010 20:29:09 +0000 (20:29 +0000)]
MFC r211213:
The buffers b_vflags field is not always properly protected by
bufobj lock. If b_bufobj is not NULL, then bufobj lock should be
held when manipulating the flags. Not doing this sometimes leaves
BV_BKGRDINPROG to be erronously set, causing softdep' getdirtybuf() to
stuck indefinitely in "getbuf" sleep, waiting for background write to
finish which is not actually performed.

Add BO_LOCK() in the cases where it was missed.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212583 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 212263.
gjb [Mon, 13 Sep 2010 17:30:29 +0000 (17:30 +0000)]
MFC 212263.

Fix typo in bsdcpio(1).

Approved by: keramida (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@212566 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 212269.
gjb [Mon, 13 Sep 2010 17:27:43 +0000 (17:27 +0000)]
MFC 212269.

Add ECONNRESET to connect(2).

Approved by: keramida (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@212564 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209053:
mdf [Mon, 13 Sep 2010 17:18:49 +0000 (17:18 +0000)]
MFC r209053:

Add INVARIANTS checking that numfreebufs values are sane.  Also add a
per-buf flag to catch if a buf is double-counted in the free count.
This code was useful to debug an instance where a local patch at Isilon
was incorrectly managing numfreebufs for a new buf state.

Requested by: Kostic Belousov

git-svn-id: svn://svn.freebsd.org/base/stable/8@212562 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoRegen
kib [Mon, 13 Sep 2010 08:49:51 +0000 (08:49 +0000)]
Regen

git-svn-id: svn://svn.freebsd.org/base/stable/8@212546 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211998:
kib [Mon, 13 Sep 2010 08:49:08 +0000 (08:49 +0000)]
MFC r211998:
Make the syscalls reserved for AFS usable by OpenAFS port.

The 'NOTSTATIC' flag is removed on merge, since corresponding functionality
is not implemented in the RELENG_8.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212545 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212436:
jamie [Mon, 13 Sep 2010 00:42:07 +0000 (00:42 +0000)]
MFC r212436:

  Don't exit kern_jail_set without freeing options when enforce_statfs
  has an illegal value.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212510 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 212241.
gjb [Sun, 12 Sep 2010 18:37:34 +0000 (18:37 +0000)]
MFC 212241.

Note that jail_list should contain alphanumeric characters only.

PR: 150098
Approved by: keramida (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@212503 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212008, 212028, 212210: Vendor update to version 3.80.06.003 to
delphij [Sun, 12 Sep 2010 06:19:35 +0000 (06:19 +0000)]
MFC r212008, 212028, 212210: Vendor update to version 3.80.06.003 to
fix panic with ZFS under heavy I/O load.

PR:             kern/149968
Submitted by:   LSI (Tom Couch)
Reported by:    Kai Kockro <kkockro web de>
Tested by:      Kai Kockro, jpaetzel

git-svn-id: svn://svn.freebsd.org/base/stable/8@212490 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211157, r211193, r212265, r212266: make it possible to load carp(4) as
will [Sat, 11 Sep 2010 22:02:36 +0000 (22:02 +0000)]
MFC r211157, r211193, r212265, r212266: make it possible to load carp(4) as
a kld using function pointer hooks and {pf_,ip,ip6}proto_{un,}register().

Reviewed by: bz
Approved by: ken (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@212482 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoRemove unused variable 'idle' which mistakenly got merged in r212472.
brucec [Sat, 11 Sep 2010 21:52:40 +0000 (21:52 +0000)]
Remove unused variable 'idle' which mistakenly got merged in r212472.

Approved by: rrs (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@212481 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMerge r212162 from head:
gavin [Sat, 11 Sep 2010 18:50:33 +0000 (18:50 +0000)]
Merge r212162 from head:

  Correct spelling mistake, int -> into

git-svn-id: svn://svn.freebsd.org/base/stable/8@212476 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211415:
brucec [Sat, 11 Sep 2010 14:34:16 +0000 (14:34 +0000)]
MFC r211415:

Add -m and -M options to control the minimum and maximum frequency.

PR: bin/145063
Submitted by: Boris Kochergin <spawk at acm.poly.edu>
Approved by: rrs (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@212472 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211419:
brucec [Sat, 11 Sep 2010 14:26:18 +0000 (14:26 +0000)]
MFC r211419:

Since top displays the uptime including seconds, there is no need to add 30
onto it, which may have been used for rounding purposes in other utilities.

PR: bin/147934
Submitted by: Janne Snabb <snabb at epipe.com>
Approved by: rrs (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@212470 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r206909:
brucec [Sat, 11 Sep 2010 14:18:30 +0000 (14:18 +0000)]
MFC r206909:

It's not necessary to reset the chip every time an input overflow event
occurs. In addition, the delay when programming the short cable fix
should be 100us, not 100ms.

PR: kern/64556
Approved by: rrs (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@212468 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212214: sh: Get rid of some magic numbers.
jilles [Sat, 11 Sep 2010 12:51:01 +0000 (12:51 +0000)]
MFC r212214: sh: Get rid of some magic numbers.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212464 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211940:
kib [Sat, 11 Sep 2010 06:38:34 +0000 (06:38 +0000)]
MFC r211940:
Test the poll(2) return value.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212454 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r211953
rmacklem [Sat, 11 Sep 2010 02:00:27 +0000 (02:00 +0000)]
MFC: r211953
Add acquisition of a reference count on nfsv4root_lock in the
nfsd_recalldelegation() function, since this function is called
by nfsd threads when they are handling NFSv2 or NFSv3 RPCs, where
no reference count would have been acquired.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212452 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r211951
rmacklem [Sat, 11 Sep 2010 01:08:16 +0000 (01:08 +0000)]
MFC: r211951
The timer routine in the experimental NFS server did not acquire
the correct mutex when checking nfsv4root_lock. Although this
could be fixed by adding mutex lock/unlock calls, zack.kirsch at
isilon.com suggested a better fix that uses a non-blocking
acquisition of a reference count on nfsv4root_lock. This fix
allows the weird NFSLOCKSTATE(); NFSUNLOCKSTATE(); synchronization
to be deleted. This patch applies this fix.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212446 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211194, r211229, r212058, r212063: memguard(9) rewrite
mdf [Fri, 10 Sep 2010 17:26:41 +0000 (17:26 +0000)]
MFC r211194, r211229, r212058, r212063: memguard(9) rewrite

r211194:

Rework memguard(9) to reserve significantly more KVA to detect
use-after-free over a longer time.  Also release the backing pages of
a guarded allocation at free(9) time to reduce the overhead of using
memguard(9).  Allow setting and varying the malloc type at run-time.
Add knobs to allow:

 - randomly guarding memory
 - adding un-backed KVA guard pages to detect underflow and overflow
 - a lower limit on the size of allocations that are guarded

r211229:

Fix compile.  It seemed better to have memguard.c include opt_vm.h in
case future compile-time knobs were added that it wants to use.
Also add include guards and forward declarations to vm/memguard.h.

r212058:

The realloc case for memguard(9) will copy too many bytes when
reallocating to a smaller-sized allocation.  Fix this issue.

r212063:

Have memguard(9) crash with an easier-to-debug message on double-free.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212427 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211861:
nwhitehorn [Fri, 10 Sep 2010 15:33:26 +0000 (15:33 +0000)]
MFC r211861:

pmap_mapdev() does not appear to actually need GIANT to be held here,
and asserting that is held breaks drm.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212421 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211941:
kib [Fri, 10 Sep 2010 12:55:36 +0000 (12:55 +0000)]
MFC r211941:
Recalcule the return value in pollout().

PR: kern/143029
Tested by: John Plevyak <jplevyak apache org>

git-svn-id: svn://svn.freebsd.org/base/stable/8@212415 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC:
imp [Fri, 10 Sep 2010 03:52:05 +0000 (03:52 +0000)]
MFC:
    r212169: Allow / in the NANO_DEVICE
    r209225: Allow boot.config to have different values than just -h.
    r209210: Allow population of /cfg and /data.  Begin the move to
making all slice creation overrideable too, but there's a few
problems doing that for the duplicated partitions (s1 and s2), so
just comment that it needs work.
    r209209: Create a make.conf.  not needed for runtime, but some ports
want to spam it at compile or install time.
    r209207: make these convenience functions more convenient by accepting
all args, not just the first.  makes mechanical conversion of old
style more forgiving.
    r207436: Fix typo in usage message.  Add -n to the list of valid arguments.
    r206276: Fix comment about NANO_ARCH.  It can be set now.  Also add
a warning about how it confuses TARGET and TARGET_ARCH and the need
to separate the two out into independent variables.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212406 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r207979
brueffer [Thu, 9 Sep 2010 21:26:55 +0000 (21:26 +0000)]
MFC: r207979

Build the ixgbe(4) and mwlfw(4) modules by default.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212386 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212155:
bz [Thu, 9 Sep 2010 06:43:18 +0000 (06:43 +0000)]
MFC r212155:
  MFp4 CH=183052 183053 183258:

    In protosw we define pr_protocol as short, while on the wire
    it is an uint8_t.  That way we can have "internal" protocols
    like DIVERT, SEND or gaps for modules (PROTO_SPACER).
    Switch ipproto_{un,}register to accept a short protocol number(*)
    and do an upfront check for valid boundries. With this we
    also consistently report EPROTONOSUPPORT for out of bounds
    protocols, as we did for proto == 0.  This allows a caller
    to not error for this case, which is especially important
    if we want to automatically call these from domain handling.

    (*) the functions have been without any in-tree consumer
    since the initial introducation, so this is considered save.

    Implement ip6proto_{un,}register() similarly to their legacy IP
    counter parts to allow modules to hook up dynamically.

  Reviewed by: philip, will

git-svn-id: svn://svn.freebsd.org/base/stable/8@212351 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211283:
zec [Wed, 8 Sep 2010 14:22:35 +0000 (14:22 +0000)]
MFC r211283:

  When moving an ethernet ifnet from one vnet to another, destroy the
  associated ng_ether netgraph node in the current vnet, and create a
  new one in the target vnet.

  Reviewed by:  julian

git-svn-id: svn://svn.freebsd.org/base/stable/8@212320 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208744:
zec [Wed, 8 Sep 2010 14:21:12 +0000 (14:21 +0000)]
MFC r208744:

  Virtualize the IPv4 multicast routing code.

  Submitted by: iprebeg
  Reviewed by:  bms, bz, Pavlin Radoslavov

git-svn-id: svn://svn.freebsd.org/base/stable/8@212319 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208743:
zec [Wed, 8 Sep 2010 14:19:33 +0000 (14:19 +0000)]
MFC r208743:

  Provide a macro for registering a virtualized sysctl handler for
  VNET opaque data.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212318 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212234:
kib [Wed, 8 Sep 2010 09:53:50 +0000 (09:53 +0000)]
MFC r212234:
Document "show cdev" command.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212316 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212233:
kib [Wed, 8 Sep 2010 09:51:03 +0000 (09:51 +0000)]
MFC r212233:
Document MAKEDEV_ETERNAL.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212315 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212087:
ed [Wed, 8 Sep 2010 08:03:08 +0000 (08:03 +0000)]
MFC r212087:

  Remove reference to device minor numbers in psm(4) man page.

  The number returned by stat(2) is generated automatically, so it is not
  possible to deduce whether the device is blocking or not.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212314 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r212047
davidxu [Wed, 8 Sep 2010 01:55:03 +0000 (01:55 +0000)]
MFC: r212047
  If a process is being debugged, skips job control caused by SIGSTOP/SIGCONT
  signals, because it is managed by debugger, however a normal signal sent to
  a interruptibly sleeping thread wakes up the thread so it will handle the
  signal when the process leaves the stopped state.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212311 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r211830
rmacklem [Wed, 8 Sep 2010 01:41:22 +0000 (01:41 +0000)]
MFC: r211830
Add mutex locking for the call to replay_prune() in
replay_setsize(), since replay_prune() expects the
rc_lock to be held when it is called.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212310 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC: r211789
rmacklem [Wed, 8 Sep 2010 01:18:09 +0000 (01:18 +0000)]
MFC: r211789
If the first iteration of the do loop in replay_prune()
succeeded and a subsequent interation failed to find an
entry to prune, it could loop infinitely, since the
"freed" variable wasn't reset to FALSE. This patch moves
setting freed FALSE to inside the loop to fix the problem.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212309 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r205662 + r212066 (except efi part):
delphij [Tue, 7 Sep 2010 18:14:59 +0000 (18:14 +0000)]
MFC r205662 + r212066 (except efi part):

Our boot loader is capable of booting both i386 and amd64 kernels so
call it "x86" instead of "i386".

git-svn-id: svn://svn.freebsd.org/base/stable/8@212301 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212209:
bz [Tue, 7 Sep 2010 13:10:46 +0000 (13:10 +0000)]
MFC r212209:

  In case of RADIX_MPATH do not leak the IN_IFADDR read lock on
  early return.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212291 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211748:
kib [Tue, 7 Sep 2010 12:06:41 +0000 (12:06 +0000)]
MFC r211748:
Move the __stack_chk_fail_local@FBSD_1.0 compat symbol definition into
the separate .o for libc_pic.a. This prevents rtld from making the
symbol global.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212290 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211743:
kib [Tue, 7 Sep 2010 12:04:07 +0000 (12:04 +0000)]
MFC r211743:
Remove unused source.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212289 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211742:
kib [Tue, 7 Sep 2010 12:02:34 +0000 (12:02 +0000)]
MFC r211742:
The __hidden definition is provided by sys/cdefs.h.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212288 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212152:
bz [Tue, 7 Sep 2010 11:46:09 +0000 (11:46 +0000)]
MFC r212152:

  MFp4 CH=183259:

    No reason to use if_free_type() as we don't change our type.
    Just if_free() is fine.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212287 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r196636:
weongyo [Mon, 6 Sep 2010 22:47:52 +0000 (22:47 +0000)]
MFC r196636:
  Connect bwi up to the build.  While there are some problems with this
  driver still, it generally works well for most people most of the
  time.  It is still too green for GENERIC, however.

  Submitted by: many (latest being kwm@)
Approved by: imp
Requested by: Warren Block <wblock at wonkity dot com>

git-svn-id: svn://svn.freebsd.org/base/stable/8@212275 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209888:
weongyo [Mon, 6 Sep 2010 22:31:24 +0000 (22:31 +0000)]
MFC r209888:
  Fixes a bug for LP PHY that some frames have 2 padding bytes at the
  start so we should adjust the mbuf if the driver is running in PIO
  mode.  Now it should work well with WPA authentication and association
  for LP PHY devices.

  Tested by:    Warren Block <wblock at wonkity.com>

git-svn-id: svn://svn.freebsd.org/base/stable/8@212274 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210393:
weongyo [Mon, 6 Sep 2010 22:28:46 +0000 (22:28 +0000)]
MFC r210393:
  Fixes a mistake to calculate CALC_COEFF2() value that tmp[3] is
  used even if it's unreachable.

  PR: kern/144505
  Submitted by: Henning Petersen <henning.petersen at t-online dot de>

git-svn-id: svn://svn.freebsd.org/base/stable/8@212273 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212172: acpi: update stale comments about order of cpu devices
avg [Mon, 6 Sep 2010 07:24:43 +0000 (07:24 +0000)]
MFC r212172: acpi: update stale comments about order of cpu devices
probing

git-svn-id: svn://svn.freebsd.org/base/stable/8@212250 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210926:
kib [Sun, 5 Sep 2010 14:37:29 +0000 (14:37 +0000)]
MFC r210926:
Mark /dev/zero and /dev/null as eternal.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212232 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210925:
kib [Sun, 5 Sep 2010 14:35:26 +0000 (14:35 +0000)]
MFC r210925:
Enable shared lookups and externed shared ops for devfs.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212231 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210924:
kib [Sun, 5 Sep 2010 14:31:58 +0000 (14:31 +0000)]
MFC r210924:
Add "show cdev" ddb command.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212230 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210923:
kib [Sun, 5 Sep 2010 14:27:55 +0000 (14:27 +0000)]
MFC r210923:
Add new make_dev_p(9) flag MAKEDEV_ETERNAL to inform devfs that created
cdev will never be destroyed. Propagate the flag to devfs vnodes as
VV_ETERNVALDEV. Use the flags to avoid acquiring devmtx and taking a
thread reference on such nodes.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212229 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210921:
kib [Sun, 5 Sep 2010 14:20:34 +0000 (14:20 +0000)]
MFC r210921:
Enable shared locks for the devfs vnodes. Honor the locking mode
requested by lookup().

git-svn-id: svn://svn.freebsd.org/base/stable/8@212228 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210918:
kib [Sun, 5 Sep 2010 14:16:35 +0000 (14:16 +0000)]
MFC r210918:
Initialize VV_ISTTY vnode flag on the devfs vnode creation instead of
doing it on each open.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212227 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r196885 (by ed):
kib [Sun, 5 Sep 2010 14:02:34 +0000 (14:02 +0000)]
MFC r196885 (by ed):
Remove unneeded minor numbers from /dev/null and /dev/zero.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212226 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210331-r210333,r210335,r210336,r210338,r210340,r210341,r210559.
kaiw [Sat, 4 Sep 2010 13:13:00 +0000 (13:13 +0000)]
MFC r210331-r210333,r210335,r210336,r210338,r210340,r210341,r210559.

r210331:
  Add a new ELF type denoting GNU style hash tables.

r210332:
  Changes for supporting GNU Hash sections.

r210333:
  Note that the *_fsize() functions are only defined for ELF types that
  have a fixed size.

r210335:
  - Return zero for file sizes of ELF types that have a variable size.
  - Neaten a few comments.

r210336:
  Reduce verbosity.

r210338:
  Perform additional checks when translating between file and memory
  representations of ELF types.

  The ELF(3) API allows applications to request a conversion that is
  `in-place', i.e., with source and destinations data buffers being
  the same.  However, the file and memory sizes of ELF sections that
  have additional internal structure, such as those of type `Elf_Note',
  or `Elf_GNU_Hash_Header', can be determined only known after the
  type-specific headers that comprise the first few words in these
  sections are read and translated.

  Pass in the size of destination buffer to type translation routines
  in "libelf_convert.m4" and have these routines return an error code
  if the translated data would not fit inside the destination buffer.

r210340:
  - Document that the *fsize() functions return a size of 1 for Elf
    types that don't have a fixed size.
  - The *fsize() functions should return a size of 1, for variable length
    types.
  - Redefine symbol ELF_T_LAST to match the current end of the list.

r210341:
  Add support for translating sections of type ELF_T_GNUHASH.

r210559:
  Protect GNUHASH translation functions with #ifdef; unbreak cross
  toolchain build.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212208 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210351-r210353,r211192.
kaiw [Sat, 4 Sep 2010 13:00:22 +0000 (13:00 +0000)]
MFC r210351-r210353,r211192.

r210351:
  * Note that ar(1) archives may also be opened using `elf_memory(3)`.
  * Ignore the passed in value of the `fd` argument for ar(1) archives
    opened with elf_memory(3).

r210352:
  Add a cross-reference to `elf_rawfile(3)`.

r210353:
  * Remove a superfluous error description.
  * Document an additional error that may be returned: `ELF_E_ARCHIVE`.

r211192:
  Add translation support for section type SHT_SUNW_dof.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212206 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210344,r210345,r210348.
kaiw [Sat, 4 Sep 2010 12:52:44 +0000 (12:52 +0000)]
MFC r210344,r210345,r210348.

r210344:
  Avoid switching between "unsigned char" and "char" in the C code
  generated from "libelf_convert.m4".

r210345:
  * Deprecate `elf_getshnum()`, `elf_getphnum()` and `elf_getshstrndx()` in
    favour of `elf_getshdrnum()`, `elf_getphdrnum()` and `elf_getshdrstrndx()`
    respectively.
  * Add new manual pages for `elf_getshdrstrndx()`, `elf_getphdrnum()` and
    `elf_getshdrnum()`.
  * Add a deprecation warning for `elf_getshstrndx()`, `elf_getphnum()` and
    `elf_getshnum()`.

r210348:
  Move helper functions `_libelf_ar_get_{name,number,string}()` and
  `_libelf_ar_open()` to a new compilation unit "libelf_ar_util.c"
  to break the circular dependency between "elf_memory.o" and
  "libelf_ar.o".

git-svn-id: svn://svn.freebsd.org/base/stable/8@212204 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210329,r210330,r210347.
kaiw [Sat, 4 Sep 2010 12:40:06 +0000 (12:40 +0000)]
MFC r210329,r210330,r210347.

r210329:
  Use <unistd.h> to declare the prototype for ftruncate().

r210330:
  Allow an application that updates only the ELF Ehdr to work.

r210347:
  Fix a memory leak.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212202 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210325,r210326,r210328,r210349
kaiw [Sat, 4 Sep 2010 12:19:19 +0000 (12:19 +0000)]
MFC r210325,r210326,r210328,r210349

r210325:
  Bug fix: when updating headers using the gelf_update_*() functions,
  the appropriate `dirty' bit needs to be set for both the Elf32 and
  Elf64 case.

r210326:
  Improve compatibility with other implementations of the ELF(3) API:
  when an output file has no program headers, set the 'e_phentsize'
  field of the ELF executable header to zero.

r210328:
  Bug fix: permit the creation of zero-sized sections.

r210349:
  Remove a redundant word.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212200 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210324, r210438.
kaiw [Sat, 4 Sep 2010 12:06:02 +0000 (12:06 +0000)]
MFC r210324, r210438.

r210324:
  - Correctly handle sections of type SHT_NOBITS.  For these sections:
    - elf_getdata() and elf_rawdata() should return an "Elf_Data" structure
      that has its "d_buf" member set to NULL and "d_size" member set to
      the nominal 'size' of the section.
    - Update the manual page for these functions.
  - Fix a memory leak in an error handling path inside elf_getdata().
  - Use _libelf_allocate_data() in elf_newdata() for consistency.

r210438: (np)
  Catch up with r210324.  d_buf will be NULL for SHT_NOBITS sections, do not
  attempt to copy from it in that case.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212198 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r210321:
kaiw [Sat, 4 Sep 2010 11:50:17 +0000 (11:50 +0000)]
MFC r210321:
  Remove a superfluous comment.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212196 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211513: Call dev_rel() in error paths.
jh [Sat, 4 Sep 2010 06:36:12 +0000 (06:36 +0000)]
MFC r211513: Call dev_rel() in error paths.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212194 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211922:
mav [Sat, 4 Sep 2010 06:09:08 +0000 (06:09 +0000)]
MFC r211922:
Add Intel Cougar Point PCH SATA Controller DeviceIDs. Correct some existing
entries for Intel Ibex Peak (5 Series/3400 Series) PCH SATA controllers.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212193 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211920:
mav [Sat, 4 Sep 2010 06:05:57 +0000 (06:05 +0000)]
MFC r211920:
Add Intel Cougar Point PCH SATA Controller DeviceIDs. Correct some existing
entries for Intel Ibex Peak (5 Series/3400 Series) PCH SATA controllers.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212192 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209652: sh: Remove comment that the comma operator is missing
jilles [Fri, 3 Sep 2010 21:59:12 +0000 (21:59 +0000)]
MFC r209652: sh: Remove comment that the comma operator is missing
in arithmetic expansion.

The comma operator is not listed in POSIX.1-2008 XCU 1.1.2.1 Arithmetic
Precision and Operations (referenced by XCU 2.6.4 Arithmetic Expansion) and
is therefore not required.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212189 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r208476,208629,210738,211080,211341,211467: New tests
jilles [Fri, 3 Sep 2010 21:51:38 +0000 (21:51 +0000)]
MFC r208476,208629,210738,211080,211341,211467: New tests
that also work with stable/8 sh.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212188 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC 212073:
jamie [Fri, 3 Sep 2010 15:34:28 +0000 (15:34 +0000)]
MFC 212073:

  Don't over-allocate array values in jailparam_export.

MFC 212074:

  Whitespace and comment fixes.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212179 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r212072:
jamie [Fri, 3 Sep 2010 15:33:15 +0000 (15:33 +0000)]
MFC r212072:

  Make it clear in the example that jailparam_export's return value
  should be freed.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212178 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211962: gsched(8): fix example usage, mdoc nits
uqs [Fri, 3 Sep 2010 11:58:50 +0000 (11:58 +0000)]
MFC r211962: gsched(8): fix example usage, mdoc nits

- ad0 was referred to as da0
- wrong parameter -s instead of -a in example
- use double quotes consistently

git-svn-id: svn://svn.freebsd.org/base/stable/8@212175 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r209256, r209549, r209816, r209844:
jh [Fri, 3 Sep 2010 06:30:11 +0000 (06:30 +0000)]
MFC r209256, r209549, r209816, r209844:

- Fix compilation of the subr_unit.c user space test program.
- Use %zu for size_t in a few format strings.
- Correct a comment typo.
- Assert that low and high are >= 0 in new_unrhdr().

git-svn-id: svn://svn.freebsd.org/base/stable/8@212171 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoAdd nameday for Monique
edwin [Thu, 2 Sep 2010 21:52:43 +0000 (21:52 +0000)]
Add nameday for Monique

PR: conf/150049
Submitted by: Thierry Thomas <thierry@pompo.net>

git-svn-id: svn://svn.freebsd.org/base/stable/8@212164 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r211904:
bz [Thu, 2 Sep 2010 16:09:09 +0000 (16:09 +0000)]
MFC r211904:

  MFp4 CH=182972:

  Add explicit linkstate UP/DOWN for the epair.  This is needed by carp(4)
  and other things to work.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212150 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

13 years agoMFC r199972:
emaste [Thu, 2 Sep 2010 13:34:54 +0000 (13:34 +0000)]
MFC r199972:

  Use switch out (SWO) instead of switch in (SWI) debug log mask in
  csw_out.

git-svn-id: svn://svn.freebsd.org/base/stable/8@212147 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f