Commit Graph

203829 Commits

Author SHA1 Message Date
Craig Rodrigues
ae274020ba Define _NS_PRIVATE to make declarations visible.
This eliminates -Wmissing-prototypes warnings.
2015-09-20 04:17:03 +00:00
Craig Rodrigues
ffdd70376a Add missing includes to eliminate -Wmissing-prototypes warnings 2015-09-20 04:15:37 +00:00
Craig Rodrigues
9762525c95 Adding missing declarations to eliminate -Wmissing-prototypes warnings 2015-09-20 04:06:55 +00:00
Craig Rodrigues
f8af09cd0f Add missing include to eliminate -Wmissing-prototypes warning 2015-09-20 04:06:04 +00:00
Craig Rodrigues
6db7b53b71 Add declaration to eliminate -Wmissing-prototypes warning 2015-09-20 03:59:27 +00:00
Craig Rodrigues
e0b54d0140 Add declarations to eliminate -Wmissing-prototypes warnings 2015-09-20 03:58:27 +00:00
Craig Rodrigues
97f3e1c2a2 Adding missing include to eliminate -Wmissing-prototypes warning 2015-09-20 03:56:57 +00:00
Craig Rodrigues
486828e8a3 Add declarations to eliminate -Wmissing-prototypes warnings 2015-09-20 03:55:03 +00:00
Craig Rodrigues
8d3aa83d8b Add declarations to eliminate -Wmissing-prototypes warnings. 2015-09-20 03:53:08 +00:00
Craig Rodrigues
d5cc6f7378 Add declaration to eliminate -Wmissing-prototypes warning. 2015-09-20 03:51:15 +00:00
Craig Rodrigues
7ca26e3831 Add missing include to eliminate -Wmissing-prototypes warnings 2015-09-20 03:49:08 +00:00
Craig Rodrigues
cfb65fa249 Add missing includes to eliminate -Wmissing-prototypes warnings 2015-09-20 03:45:57 +00:00
Konstantin Belousov
8f3da8a2d0 Use tabs for indend.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-09-20 01:35:51 +00:00
Konstantin Belousov
cff8c6f2d1 Add support for weak symbols to the kernel linkers. It means that
linkers no longer raise an error when undefined weak symbols are
found, but relocate as if the symbol value was 0.  Note that we do not
repeat the mistake of userspace dynamic linker of making the symbol
lookup prefer non-weak symbol definition over the weak one, if both
are available.  In fact, kernel linker uses the first definition
found, and ignores duplicates.

Signature of the elf_lookup() and elf_obj_lookup() functions changed
to split result/error code and the symbol address returned.
Otherwise, it is impossible to return zero address as the symbol
value, to MD relocation code.  This explains the mechanical changes in
elf_machdep.c sources.

The powerpc64 R_PPC_JMP_SLOT handler did not checked error from the
lookup() call, the patch leaves the code as is (untested).

Reported by:	glebius
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-09-20 01:27:59 +00:00
Hiroki Sato
bb957021d7 Add PF_LOCAL support in getaddrinfo(3) and getnameinfo(3):
- In a PF_LOCAL address, "hostname" must begins with '/' and "servname"
  is always NULL.  All of ai_flags are ignored.

- PF_UNSPEC matches PF_LOCAL.  EAI_SERVICE is not returned to make
  AF-independent programming easier; "servname" is always ignored
  in PF_LOCAL.  In practice, PF_INET* and PF_LOCAL are
  mutually-exclusive because a hostname which begins with '/' is invalid
  in PF_INET*.  No domain name resolution is performed for a PF_LOCAL address.

Differential Revision:	https://reviews.freebsd.org/D3634
2015-09-20 01:09:23 +00:00
Hiroki Sato
fb0e28f0e1 - Remove unused union p_un.
- Use NI_MAXHOST-long buffer for getnameinfo().
  Although INET6_ADDRSTRLEN was designed to hold the longest
  IPv6 address in IPv4-mapped address format a long time ago,
  getnameinfo() can return scope identifier in addition to it.

MFC after:	1 day
2015-09-19 23:48:06 +00:00
Hiroki Sato
157d2c3355 - Fix a crash on a rpc entry when an IPv6 address is explicitly specified
in -a flag.

- Fix a bug that sockaddr_in was used where sockaddr_in6 should have
  been used.  This was not actually harmful because offsetof(struct
  sockaddr_in, sin_port) is equal to offsetof(struct sockaddr_in6,
  sin6_port).

MFC after:	1 day
2015-09-19 23:27:22 +00:00
Jilles Tjoelker
1c0046d792 libc: Consistently call _ioctl() internally, not ioctl(). 2015-09-19 20:27:09 +00:00
Xin LI
99e4638821 'sin' is never used after assignment. Looking at the context, it seems
that it belongs the commented out section of code so make it part of that
section.

Reported by:	clang static analyzer
MFC after:	2 weeks
2015-09-19 20:12:53 +00:00
Alexander Motin
921af50782 Always execute REPORT LUNS and REQUEST SENSE commands locally.
REPORT LUNS command is more related to target rather then specific LUN.
This node may be primary for LUNs for some reason unknown to another,
and command forwarded to another node won't be able to report them.

REQUEST SENSE is related to LUN, but in our implementation it reports
only UAs and CAs, that are stored locally rather then on primary node.
2015-09-19 19:30:55 +00:00
Alexander Motin
efbf6139a4 Split two command flags with different meaning.
This is only a cosmetical change.
2015-09-19 19:11:59 +00:00
Allan Jude
6af5d161e7 Rename some functions and variables inside sesutil(8) to make gcc happy
Reported by:	bz
Approved by:	bapt (implicit)
Sponsored by:	ScaleEngine Inc.
2015-09-19 18:41:24 +00:00
Alexander Motin
027dd0cfd0 Pack struct ctl_ha_msg_hdr by 8 bytes. 2015-09-19 18:23:06 +00:00
Sean Bruno
e373323fe2 Revert 287914,287762.
Reports of breakage on igb(4) have been narrowed down to 287762 and 287914
is an dependant change.

Submitted by:	erj
2015-09-19 18:22:59 +00:00
Bryan Drewery
6fcd667fd6 Connect sesutil(1) and numactl(1) for META_MODE.
Sponsored by:	EMC / Isilon Storage Division
2015-09-19 17:47:36 +00:00
Allan Jude
8729f5ec0e Improve and expand sesutil(8)
- Return an error if no matching device is found when the locate command is run
- Enhance the locate command to be able to address drive bays with no disk, or where the SES controller has not made the mapping to the device name
- Added the fault command, similar to locate, but a different SES property. On some of my controllers locate blinks the activity light, others the fault light. The fault command keeps the fault light on constant.
- Improve the usage() output and use it everywhere
- Added the map command, displays all elements connected to each (or the specified) ses(4) controller
- Added the status command, returns the overall status of the ses(4) controller

Reviewed by:	wblock (man page, earlier version)
Approved by:	bapt (mentor)
MFC after:	3 weeks
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3580
2015-09-19 16:36:45 +00:00
Baptiste Daroussin
449a792dd5 Restore man -t for manpages rendered by mandoc
Reported by:	swills
2015-09-19 16:00:50 +00:00
Alexander Motin
6861045bda Fix memory corruption when >128K transferred through HA link.
While there, do some cleaning.
2015-09-19 13:12:09 +00:00
Alexander V. Chernikov
501adf0140 Cleanup nd6_cache_lladdr(). No functional changes.
* Since new extries are now allocated explicitly, fill in
  all the necessary fields for lle _before_ attaching it to the table.
* Remove ND6_LLINFO_INCOMPLETE check which was unused even in
  first KAME merge (r53541).
* After that, the only new state that function can set, was
  ND6_LLINFO_STALE. Given everything above, simplify logic besides
  do_update and is_newentry.
* Fix nd_resolve() comment.
2015-09-19 11:50:02 +00:00
Bryan Drewery
3adbeacc66 Replace afterinstall: hack with FILES mechanism.
Sponsored by:	EMC / Isilon Storage Division
2015-09-19 03:53:37 +00:00
Bryan Drewery
b6ad36706d Replace afterinstall: hack from r54681 with 'make delete-old' functionality.
Sponsored by:	EMC / Isilon Storage Division
2015-09-19 03:51:19 +00:00
Bryan Drewery
55e031ccad Replace afterinstall: hack from r111083 with 'make delete-old' functionality.
Sponsored by:	EMC / Isilon Storage Division
2015-09-19 03:46:10 +00:00
Bryan Drewery
de0e3997d9 Replace beforeinstall: handling with FILES.
This actually fixes some cases to respect LIBRARIES_ONLY.

Sponsored by:	EMC / Isilon Storage Division
2015-09-18 23:49:32 +00:00
Bryan Drewery
76e11fbdfc Remove redundant beforeinstall. 2015-09-18 23:34:47 +00:00
Bryan Drewery
740e5b178f Fix LIBRARIES_ONLY
It was erroring: make: don't know how to make _manpages. Stop

Sponsored by:	EMC / Isilon Storage Division
MFC after:	1 week
2015-09-18 23:25:43 +00:00
Bryan Drewery
1508ab98e5 META_MODE: No need to fix the link in this case.
The exists(${DESTDIR}...) check runs with DESTDIR being blank.  When the
target runs it does have DESTDIR=${STAGE_OBJTOP} via bsd.sys.mk.  This
results in the first execution warning that the symlink is missing.  The
second run does run fine.  However, this chflags is not needed at all
for META_MODE/STAGING since we never had this path being a schg file
while using META_MODE.

Sponsored by:	EMC / Isilon Storage Division
2015-09-18 23:12:38 +00:00
Bryan Drewery
2491838ff5 Remove rm -Rf beforeinstall hack that was needed due to a change that
only lasted 3 days in HEAD in 2001 (r88348 - r88459)

Sponsored by:	EMC / Isilon Storage Division
2015-09-18 22:55:18 +00:00
Bryan Drewery
db31773f3e Garbage collect _SHLIBDIRPREFIX leftovers from r284898.
Sponsored by:	EMC / Isilon Storage Division
2015-09-18 22:28:13 +00:00
Bryan Drewery
978e1d6629 Regenerate 2015-09-18 22:26:25 +00:00
Bryan Drewery
b917e97346 Document NO_DIRDEPS for META_MODE and give link to full details. 2015-09-18 22:22:32 +00:00
Bryan Drewery
df884b5ca7 META_MODE: Avoid command changing in 2nd build.
If the command to be ran changes then a rebuild is caused. Checking
exists(${DESTDIR}...) from make results in this on the 2nd and
possibly subsequent builds due to staging during build.  Avoid this
by always running the existence check in the make sh command.

Sponsored by:	EMC / Isilon Storage Division
2015-09-18 21:36:29 +00:00
Bryan Drewery
144cd65bca Use FILES for installing the dtrace scripts.
The BSD.usr.dist mtree always creates /usr/lib/dtrace so there is no
need to check if it exists.

The FILES mechanism already supports LIBRARIES_ONLY.

Sponsored by:	EMC / Isilon Storage Division
2015-09-18 21:18:44 +00:00
Bryan Drewery
e56d20da9d Don't hide build commands. 2015-09-18 21:01:52 +00:00
Xin LI
ac1a32b454 There is no HP 300 support in FreeBSD anymore, so remove the obsolete
BUGS section.

While I'm there also bump Dd date.

MFC after:	2 weeks
2015-09-18 20:28:37 +00:00
Alexander Motin
bc8749e2ff Mark I/Os with DMA flag while moving data through the HA link. 2015-09-18 20:11:10 +00:00
Alexander Motin
75a3108e13 Relax serseq option operation for reads.
Previously, with serseq enabled, next command was unblocked only after
previous completed.  With this change, for read operations, next command
is unblocked as soon as last media read completed.  This is important
for frontends that actually wait for data move completion (like camtgt),
or when data are moved through the HA link, or especially when both.
2015-09-18 19:43:14 +00:00
Bryan Drewery
621ce7a5a6 Avoid /usr/obj// from r287899 2015-09-18 18:57:09 +00:00
Adrian Chadd
413bae20bb Ensure the ring state is also blanked upon reset, otherwise
duplicate rx events get handled during reset paths.

Submitted by:	Matthew Dillion <dillon@apollo.backplane.com>
Obtained from:	DragonflyBSD
2015-09-18 17:39:31 +00:00
Edward Tomasz Napierala
0d3d0cc358 Kernel part of reroot support - a way to change rootfs without reboot.
Note that the mountlist manipulations are somewhat fragile, and not very
pretty.  The reason for this is to avoid changing vfs_mountroot(), which
is (obviously) rather mission-critical, but not very well documented,
and thus hard to test properly.  It might be possible to rework it to use
its own simple root mount mechanism instead of vfs_mountroot().

Reviewed by:	kib@
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2698
2015-09-18 17:32:22 +00:00
Konstantin Belousov
0510aedcd5 Do not execute exception handlers with disabled interrupts.
We should not call vm_fault(), or send a signal, with interrupts
disabled.  MI kernel code is not prepared for such environment, not to
mention that this increases system latency, since code appears to be
executing as being under spinlock.

The FAR register for data aborts is read before the interrupts are
enabled, to avoid its corruption due to nested exception or context
switch.

Add asserts, similar to the checks done by other architectures, about
not taking page faults in non-sleepable contexts, rather than die with
late and somewhat confusing witness diagnostic.

Reviewed by:	andrew
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3669
2015-09-18 17:09:59 +00:00