Commit Graph

150662 Commits

Author SHA1 Message Date
Kirk McKusick
4179ce18a2 MFC of 203763, 203764, 203768, 203769, 203770, 203782, and 203784.
These fixes correct a problem in the file system that treats large
inode numbers as negative rather than unsigned. For a default
(16K block) file system, this bug began to show up at a file system
size above about 16Tb.

These fixes also update newfs to ensure that it will never create a
filesystem with more than 2^32 inodes.

They also update libufs, tunefs, and growfs so that they properly
handle inode numbers as unsigned.

Reported by: Scott Burns, John Kilburg, and Bruce Evans
Followup by: Jeff Roberson
PR:          133980
2010-02-26 21:49:11 +00:00
Rui Paulo
9d8ea0c702 MFC r203695, r203751
Fix spelling mistake and compile error.
2010-02-26 20:25:30 +00:00
Rui Paulo
f5e8283aa9 MFC r203683:
Add multicast key search support. This fixes corrupted mcast packets
 when we have more than one hostap vap.
2010-02-26 18:46:16 +00:00
Xin LI
a5a931b33f MFC 203052:
Add interface description capability as inspired by OpenBSD.  Thanks for
rwatson@, jhb@, brooks@ and others for feedback to the old implementation!

Sponsored by:	iXsystems, Inc.
2010-02-26 00:54:47 +00:00
Jung-uk Kim
7cfd788d1a MFC: r204105
Return partially filled buffer for non-blocking read(2)
in non-immediate mode.

PR:		kern/143855
Submitted by:	Guy Harris (guy at alum dot mit dot edu)
2010-02-26 00:11:17 +00:00
Rafal Jaworowski
bca23f69fd MFC r204009
Assorted fixes for mge(4).

- Use proper map for the busdma sync on mge descriptor.
- Remove unnecesary busdma sync.
- Eliminate redundant locking in mge_reinit_rx() (just assert).
- Kill unused variable.

Submitted by:	Grzegorz Bernacki
Obtained from:	Semihalf
2010-02-25 13:28:05 +00:00
Konstantin Belousov
f407eeb3b4 MFC r204205:
Remove write-only variable.
2010-02-25 10:40:52 +00:00
Xin LI
a498e71df3 MFC r202964:
On FreeBSD, time_t is 64-bit for all platforms except i386 and powerpc,
where the type is 32-bit.  ZFS can handle 64-bit timestamp internally
but zfs_setattr() would check if the time value can fit, we change the
checking macros to match 64-bit timestamp if the platform supports it.

This change has some downsides like, while you can import zfs on 32-bit
platforms, the timestamp would overflow if they are out of the range.

This fixes the Y2.038K issue on platforms using 64-bit timestamps.

Reviewed by:	pjd
2010-02-25 00:46:51 +00:00
Brooks Davis
3c48c0897f MFC r202143,202163,202341,202342,204278
Replace the static NGROUPS=NGROUPS_MAX+1=1024 with a dynamic
  kern.ngroups+1.  kern.ngroups can range from NGROUPS_MAX=1023 to
  somewhere in the neighborhood of INT_MAX/4 one a system with sufficent
  RAM and memory bandwidth.  Given that the Windows group limit is
  1024, this range should be sufficient for most applications

r202342:
  Only allocate the space we need before calling kern_getgroups instead
  of allocating what ever the user asks for up to "ngroups_max + 1".  On
  systems with large values of kern.ngroups this will be more efficient.

  The now redundant check that the array is large enough in
  kern_getgroups() is deliberate to allow this change to be merged to
  stable/8 without breaking potential third party consumers of the API.
2010-02-24 22:16:16 +00:00
John Baldwin
8224141fb7 MFC 204090:
Fix mptutil's method for locating disk devices attached to a specific
mpt(4) controller.  Previously, the code assumed that multiple match
patterns provided to an XPT_DEV_MATCH request were ANDed together.
Instead, they are ORed.  Instead, to match peripherals for a specific bus,
one query needs to be performed to lookup the path ID of the bus.  A second
query can then be performed matching peripherals attached to that path.
This approach also makes the code a bit cleaner as the returned match
results do not mix buses and perphierals.
2010-02-24 21:29:18 +00:00
John Baldwin
daeeeefea0 MFC 204086:
- Don't emit a warning in 'show adapter' if the IOC2 or IOC6 pages are not
  present.  mpt(4) controllers that do not support RAID do not have an IOC6
  page, for example.
- Correct a check for a missing page error in a debug function.
2010-02-24 21:20:25 +00:00
Rafal Jaworowski
0bd1aed098 MFC r203924:
Call the proper linkup routine in PowerPC Book-E machdep.

Submitted by:	attilio
2010-02-24 20:20:02 +00:00
Jaakko Heinonen
bb2f41f9a4 MFC r202945:
Fixes for ls(1) long format (-l) output:

- Allow -h option to work if the listing contains at least one device
  file.
- Align major and minor device numbers correctly to the size field.

PR:		bin/125678
2010-02-24 15:27:31 +00:00
Pawel Jakub Dawidek
1b4509372f MFC r201684.
Teach the (gpt)zfsboot and zfsloader raidz code to use its buffers
more efficiently.

Before this patch, in the worst case memory use would increase
exponentially on the number of drives in the raidz vdev.

Submitted by:	Matt Reimer <mattjreimer@gmail.com>
Sponsored by:	VPOP Technologies, Inc.
Silence from:	dfr
2010-02-23 16:46:34 +00:00
Ed Maste
624e666b5d MFC r202812:
Add H55 ID from Mike Tancsa, with minor rewording from avg@.

PR:		kern/143068
Submitted by:	Mike Tancsa (Sentex)
2010-02-23 01:00:15 +00:00
Xin LI
d21288b029 MFC r203728:
- Return EAFNOSUPPORT instead of EINVAL for unsupported address family,
   this matches the Linux behavior.
 - Check if we have sufficient space allocated for socket structure, which
   fixes a buffer overflow when wrong length is being passed into the
   emulation layer. [1]

PR:		kern/138860
Submitted by:	Mateusz Guzik <mjguzik gmail com>
Reported by:	Alexander Best [1]
2010-02-23 00:40:02 +00:00
Xin LI
18148841f8 MFC r203533:
Remove two files that are not needed by FreeBSD.

Approved by:  pjd
2010-02-22 22:27:26 +00:00
Marius Strobl
c6bf5f18c0 - Factor out the code shared between NFS client and server into its own
module so it's not present twice.
- Move nfs_realign() from the NFS client to the shared NFS code and
  remove the NFS server version in order to reduce code duplication.
  The shared version now uses a second parameter how, which is passed
  on to m_get(9) and m_getcl(9) as the server used M_WAIT while the
  client requires M_DONTWAIT, and replaces the the previously unused
  parameter hsiz.
- Change nfs_realign() to use nfsm_aligned() so as with other NFS code
  the alignment check isn't actually performed on platforms without
  strict alignment requirements for performance reasons because as the
  comment suggests unaligned data only occasionally occurs with TCP.
- Change fha_extract_info() to use nfs_realign() with M_DONTWAIT rather
  than M_WAIT because it's called with the RPC sp_lock held.
2010-02-22 21:45:20 +00:00
Bernhard Schmidt
7eb2cc363d MFC r203673:
Ensure that tkip_mixing_phase1() is called after a rekeying event when
using plain s/w crypto.

PR:		bin/142547
Approved by:	rpaulo (mentor)
2010-02-22 17:10:47 +00:00
Ruslan Ermilov
9cdec2ba0e MFC: r203919: Show when an ARP entry expires (now that this info
cannot be obtained with netstat(1)).
2010-02-22 16:00:55 +00:00
Ruslan Ermilov
8d0a84b1d4 MFC: r204008: realloc() with a proper amount of memory. 2010-02-22 15:58:10 +00:00
Jaakko Heinonen
27a5b388f3 MFC r203551:
- Cast intptr_t, pid_t and time_t values to intmax_t and use %jd with
  printf.
- Cast the system call return value to long and use %ld in a printf in
  ktrsysret().

PR:		bin/123774
2010-02-21 13:17:35 +00:00
Antoine Brodin
4ed35fdd3d Merge r200413 and r202755 from head to stable/8:
reduces white space diff between head and stable/8

Suggested by:	ru@
2010-02-21 11:22:01 +00:00
Konstantin Belousov
3588e7da23 MFC r203866:
Invalid filesystem might cause the bp to be never read.
2010-02-21 11:13:15 +00:00
Alan Cox
454947a618 MFC r203085
Optimize pmap_demote_pde() by using the new KPTmap to access a kernel
  page table page instead of creating a temporary mapping to it.

  Set the PG_G bit on the page table entries that implement the KPTmap.

  Locore initializes the unused portions of the NKPT kernel page table
  pages that it allocates to zero.  So, pmap_bootstrap() needn't zero
  the page table entries referenced by CMAP1 and CMAP3.

  Simplify pmap_set_pg().
2010-02-21 04:10:25 +00:00
Marcel Moolenaar
69b0137459 MFC rev 203883:
o   Eliminate IA64_PHYS_TO_RR6 by calling bus_space_map() or pmap_mapdev().
o   Implement bus_space_map() in terms of pmap_mapdev().
o   Have ia64_pib hold the uncached virtual address of the PIB.
2010-02-20 22:43:12 +00:00
Jaakko Heinonen
1eb55c8537 MFC r203157, r203816:
Handle short reads when the -P option is used and remove some dead code.

PR:		bin/121502
2010-02-20 13:35:05 +00:00
Antoine Brodin
6335f05c51 MFC from head to stable/8:
r202896:
  Unbreak world:
  - WITHOUT_OPENSSH (and WITH_KERBEROS)
  - WITHOUT_KERBEROS and WITH_GSSAPI

  PR:		137483
  Submitted by:	bf
r203016 by ru@:
  Regen the list of prebuild libraries using tools/make_libdeps.sh.

Reviewed by:	ru@
2010-02-20 12:48:44 +00:00
Konstantin Belousov
fe5e746617 MFC r203826:
Use M_ZERO instead of calling bzero().
Fix function name in the comment.

MFC r203828:
Fix function name in the comment in the second location too.
2010-02-20 11:58:19 +00:00
Konstantin Belousov
bc6c9c912c MFC r203822:
Remove unused macros.
2010-02-20 11:54:18 +00:00
Konstantin Belousov
c84124c0d4 MFC r203818:
Clear the bp pointer when buffer is already brelse()d.
2010-02-20 11:50:50 +00:00
Alexander Motin
a510b78b19 MFC r200291, r203529:
Increase Max Read Request Size for PCIe chips from 512 to 1024 bytes.
It gives those beasts additional 10% of write bandwidth.
Use new helper functions to do it.
2010-02-19 18:15:45 +00:00
Alexander Motin
210a19d014 MFC r203528:
Add pci_get|set_max_read_req() helper functions to control maximum PCIe
read request size.
2010-02-19 18:07:51 +00:00
Alexander Motin
c48c2a2389 MFC r203873:
With FBS enabled, we have no idea what command caused timeout.
Implement same logic as in siis(4) - wait for other commands
complete or timeout and then give some more time.
2010-02-19 17:54:03 +00:00
Alexander Motin
04c9f4b6d0 MFC r203931:
Make CD driver a bit more robust and predictable to unreported errors.
2010-02-19 17:45:47 +00:00
Rick Macklem
3ed680d8da MFC: r203849
Change the default value for vfs.newnfs.enable_locallocks to 0 for
the experimental NFS server, since local locking is known to be
broken and the patch to fix it is still a work in progress.
2010-02-19 16:36:08 +00:00
Ruslan Ermilov
3343356549 MFC: r203918: Unbreak makefiles by removing mentions of DEFAULT_THREAD_LIB. 2010-02-18 16:52:49 +00:00
Rick Macklem
3322939bbb MFC: r203848
This fixes the experimental NFS server so that it won't crash in the
caching code for IPv6 by fixing a typo that used the incorrect variable.
It also fixes the indentation of the statement above it.

Reported by:	simon AT comsys.ntu-kpi.kiev.ua
2010-02-18 16:23:13 +00:00
Rebecca Cran
dfbcd90790 MFC r203685:
Document the usfs driver and the NO_SYSCTL_DESCR option, and update the comment
for umass.
Don't include the sysctl description variables in aic7xxx when NO_SYSCTL_DESCR
is used.

Approved by:	rrs (mentor)
2010-02-18 11:07:36 +00:00
Rebecca Cran
646b39536d MFC r203679:
Remove the usb2_input_kbd directive that was missed during the renaming of the
drivers in the usb2 stack.

Approved by:	rrs (mentor)
2010-02-18 11:03:35 +00:00
Rebecca Cran
82521c1509 MFC r203678:
Rename usb2_ structures and variables to usb_.

Approved by:	rrs (mentor)
2010-02-18 10:59:32 +00:00
Rebecca Cran
ee7ee75497 MFC r203323:
Remove extra semicolon.

Approved by:	rrs (mentor)
2010-02-18 10:55:42 +00:00
Rebecca Cran
73ab91c2d6 MFC r203322:
Fix typo of ENOTCONN.
Add missing RETURN VALUES section in sctp_opt_info(3).

Approved by:	rrs (mentor)
2010-02-18 10:51:31 +00:00
Rebecca Cran
6d812e4f38 MFC r203690:
Xorg isn't treated as a distribution, so /usr/X11R6/lib shouldn't be
configured when running ldconfig.

PR:	bin/138945
Approved by:	rrs (mentor)
2010-02-18 10:48:37 +00:00
Rebecca Cran
b9d3fd67b9 MFC r203688:
Initialize the execfile argument to NULL instead of _PATH_DEVNULL. This allows
the -M option to be used without specifying -N.

PR:	bin/138146
Approved by:	rrs (mentor)
2010-02-18 10:46:25 +00:00
Rebecca Cran
0ed9d88bca MFC r203681:
Fix typo and remove extra spaces.

Approved by:	rrs (mentor)
2010-02-18 10:39:53 +00:00
Matt Jacob
21eee1133a Add the long missing "destroy" option [mfc of 203505] 2010-02-18 01:15:58 +00:00
Konstantin Belousov
a5d3f6af70 MFC r203441:
Placate new binutils, by using 16-bit %ax instead of 32-bit %eax as an
argument for fnstsw. Explicitely specify sizes for the XMM control and
status word and X87 control and status words.
2010-02-17 09:09:12 +00:00
Konstantin Belousov
f723d876b5 MFC r203875:
Do not leak process lock when current thread is not allowed to see target.
2010-02-17 09:03:38 +00:00
Gavin Atkinson
da7f88513e Merge 203689 from head:
Install the padlock(4) man page on amd64 as well as i386, to match the
  platforms where the driver itself is compiled and installed.

PR:		docs/130895
Reported by:	George Hartzell <hartzell alerce.com>
2010-02-16 22:23:33 +00:00