]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoDo not return statuses for aborted iSCSI commands.
mav [Tue, 8 Jul 2014 12:16:28 +0000 (12:16 +0000)]
Do not return statuses for aborted iSCSI commands.

10 years agoReturn task management requests to queued execution, but differently.
mav [Tue, 8 Jul 2014 12:15:15 +0000 (12:15 +0000)]
Return task management requests to queued execution, but differently.

Testing shown that both original queued design with separate task queue,
and recent direct execution design had significant flaw: If abort request
arrives just after the victim, the last one may not be in the ooa_queue
yet, and so invisible for the task management function.

Unlike original queued implementation, use same queue for all SCSI and
TASK requests from the same initiator. That avoids races between them:
task functions are always executed in proper time, relatively to other
requests.

10 years agoAdd XPT_ABORT support to iSCSI initiator.
mav [Tue, 8 Jul 2014 09:37:41 +0000 (09:37 +0000)]
Add XPT_ABORT support to iSCSI initiator.

While CAM does not use it normally, it is useful for targets testing.

MFC after: 2 weeks

10 years agoFix task management functions status: task not found is not an error,
mav [Tue, 8 Jul 2014 08:34:34 +0000 (08:34 +0000)]
Fix task management functions status: task not found is not an error,
while not implemented function is.

10 years agoMake this compilable on latest Linux'es without warnings.
kib [Tue, 8 Jul 2014 08:11:52 +0000 (08:11 +0000)]
Make this compilable on latest Linux'es without warnings.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoCorrect the problem reported by test16 from
kib [Tue, 8 Jul 2014 08:10:15 +0000 (08:10 +0000)]
Correct the problem reported by test16 from
tools/regression/file/flock/flock.c, which completes the fix in
r192685.  When the lock was stolen from us, retry the whole lock
sequence in kernel, instead of returning EINTR to usermode and hoping
that application would handle it correctly by restarting the lock
acquire.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

10 years agoCorrect si_code for the SIGBUS signal generated by the alignment trap.
kib [Tue, 8 Jul 2014 08:05:42 +0000 (08:05 +0000)]
Correct si_code for the SIGBUS signal generated by the alignment trap.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoMake synopsis version of -3 flag match other uses in the page.
wblock [Tue, 8 Jul 2014 02:43:04 +0000 (02:43 +0000)]
Make synopsis version of -3 flag match other uses in the page.

MFC after: 1 week

10 years agoTypo means that this couldn't have possibly fixed anything, so revert
imp [Tue, 8 Jul 2014 02:11:48 +0000 (02:11 +0000)]
Typo means that this couldn't have possibly fixed anything, so revert
r268377.

10 years agoxdev builds libsupc++ and libstdc++ in a slightly strange way. This
imp [Mon, 7 Jul 2014 23:21:25 +0000 (23:21 +0000)]
xdev builds libsupc++ and libstdc++ in a slightly strange way. This
cause a race to be exposed between the two. Compensate for this race
by serializing the build/install of libstdc++ before libsupc++.

10 years agorm -rf can fail sometimes with an error from fts_read. Make it honor
imp [Mon, 7 Jul 2014 23:21:20 +0000 (23:21 +0000)]
rm -rf can fail sometimes with an error from fts_read. Make it honor
fflag to ignore fts_read errors, but stop deleting from that directory
because no further progress can be made.

When building a kernel with a high -j value on a high core count
machine, during the cleanobj phase we can wind up doing multiple rm
-rf at the same time for modules that have subdirectories. This
exposed this race (sometimes) as fts_read can return an error if the
directory is removed by another rm -rf. Since the intent of the -f
flag was to ignore errors, even if this was a bug in fts_read, we
should ignore the error like we've been instructed to do.

10 years agoFix typo in flag name.
imp [Mon, 7 Jul 2014 23:21:15 +0000 (23:21 +0000)]
Fix typo in flag name.

10 years agoNaughty NANDFS was using hidden unused flag, hiding the fact that the
imp [Mon, 7 Jul 2014 23:21:07 +0000 (23:21 +0000)]
Naughty NANDFS was using hidden unused flag, hiding the fact that the
flag was used and wasn't really available. Change the name without
fixing any laying issues that might be present in NANDFS' use of this
flag.

10 years agoDeclaration whitespace changes for style(9).
truckman [Mon, 7 Jul 2014 22:02:39 +0000 (22:02 +0000)]
Declaration whitespace changes for style(9).

MFC after: 1 week

10 years agoMake XPT_GET_TRAN_SETTINGS to report CAM that command queueing is enabled,
mav [Mon, 7 Jul 2014 17:34:48 +0000 (17:34 +0000)]
Make XPT_GET_TRAN_SETTINGS to report CAM that command queueing is enabled,
but make couple changes to handle non-queued commands too, if happen.

MFC after: 2 weeks

10 years agoDocument C_HARDCLOCK flag.
imp [Mon, 7 Jul 2014 16:55:07 +0000 (16:55 +0000)]
Document C_HARDCLOCK flag.

10 years agoRegenerate src.conf.5, which was completely busted by r268351.
dim [Mon, 7 Jul 2014 16:43:42 +0000 (16:43 +0000)]
Regenerate src.conf.5, which was completely busted by r268351.

10 years agoDon't call crdup nor uifind under vnode lock.
mjg [Mon, 7 Jul 2014 14:03:30 +0000 (14:03 +0000)]
Don't call crdup nor uifind under vnode lock.

A locked vnode can get into the way of satisyfing malloc with M_WATOK.

This is a fixup to r268087.

Suggested by: kib
MFC after: 1 week

10 years agoFix "use after free" on port creation error in r268291.
mav [Mon, 7 Jul 2014 11:52:22 +0000 (11:52 +0000)]
Fix "use after free" on port creation error in r268291.

10 years agoAdd support for READ FULL STATUS action of PERSISTENT RESERVE IN command.
mav [Mon, 7 Jul 2014 11:05:04 +0000 (11:05 +0000)]
Add support for READ FULL STATUS action of PERSISTENT RESERVE IN command.

10 years agoTeach ctl_add_initiator() to dynamically allocate IIDs from pool.
mav [Mon, 7 Jul 2014 09:37:22 +0000 (09:37 +0000)]
Teach ctl_add_initiator() to dynamically allocate IIDs from pool.

If port passed negative IID value, the function will try to allocate IID
from the pool of unused, based on passed wwpn or name arguments.  It does
all its best to make IID unique and persistent across reconnects.

This makes persistent reservation properly work for iSCSI.  Previously,
in case of reconnects, reservation could be unexpectedly lost, or even
migrate between intiators.

10 years agoFix bugs for PERSISTENT RESERVE OUT bits in r268096.
mav [Mon, 7 Jul 2014 08:58:36 +0000 (08:58 +0000)]
Fix bugs for PERSISTENT RESERVE OUT bits in r268096.

10 years agoOptim and Fix for mge driver:
fabient [Mon, 7 Jul 2014 08:22:39 +0000 (08:22 +0000)]
Optim and Fix for mge driver:
- add missing rcvif in mbuf
- add missing ipacket stat
- remove uncessary mbuf copy on output path
- fix deadlock of the TX engine in case of error

Obtained from: NETASQ
MFC after: 2 weeks

10 years agoCorrection to r268356: collide only sessions to the same target.
mav [Mon, 7 Jul 2014 06:17:07 +0000 (06:17 +0000)]
Correction to r268356: collide only sessions to the same target.

10 years agoWhen new connection comes in, check whether we already have session from
mav [Mon, 7 Jul 2014 05:48:11 +0000 (05:48 +0000)]
When new connection comes in, check whether we already have session from
the same intiator (Name+ISID).  If so -- terminate the old session and let
the new one take its place, as required by iSCSI RFC.

10 years agoImprove support for Intel Lynx Point USB 3.0 controllers by masking
hselasky [Mon, 7 Jul 2014 05:17:16 +0000 (05:17 +0000)]
Improve support for Intel Lynx Point USB 3.0 controllers by masking
the port routing bits like done in Linux.

MFC after: 1 week
Tested by: Tur-Wei Chan <twchan@singnet.com.sg>

10 years agoImplement ABORT TASK SET and I_T NEXUS RESET task management functions.
mav [Mon, 7 Jul 2014 03:10:56 +0000 (03:10 +0000)]
Implement ABORT TASK SET and I_T NEXUS RESET task management functions.

Use the last one to terminate active commands on iSCSI session termination.
Previous code was aborting only commands doing some data moves.

10 years agoRemove ia64.
marcel [Mon, 7 Jul 2014 00:27:09 +0000 (00:27 +0000)]
Remove ia64.

This includes:
o   All directories named *ia64*
o   All files named *ia64*
o   All ia64-specific code guarded by __ia64__
o   All ia64-specific makefile logic
o   Mention of ia64 in comments and documentation

This excludes:
o   Everything under contrib/
o   Everything under crypto/
o   sys/xen/interface
o   sys/sys/elf_common.h

Discussed at: BSDcan

10 years agoUse common vt_fb parts in ofwfb as far as we are able without sacrificing
nwhitehorn [Mon, 7 Jul 2014 00:12:18 +0000 (00:12 +0000)]
Use common vt_fb parts in ofwfb as far as we are able without sacrificing
performance.

MFC after: 2 weeks

10 years agoUse the appropriate IPv6 hashtype defines when looking up the PCBGROUP
bryanv [Mon, 7 Jul 2014 00:02:49 +0000 (00:02 +0000)]
Use the appropriate IPv6 hashtype defines when looking up the PCBGROUP

Reviewed by: adrian@

10 years agoRemove /usr/share/doc/psd/28.cvs/paper.ps.gz if it exists, as it is
gavin [Sun, 6 Jul 2014 23:08:47 +0000 (23:08 +0000)]
Remove /usr/share/doc/psd/28.cvs/paper.ps.gz if it exists, as it is
obsolete since r251794.

PR: 191003
Submitted by: Vick Khera
MFC after: 3 days

10 years agoMake gcc happy, init idlen2.
andreast [Sun, 6 Jul 2014 20:09:23 +0000 (20:09 +0000)]
Make gcc happy, init idlen2.

10 years agoClose race in r268291 between port destruction, delayed by sessions
mav [Sun, 6 Jul 2014 17:57:59 +0000 (17:57 +0000)]
Close race in r268291 between port destruction, delayed by sessions
teardown, and new port creation during `service ctld restart`.

Close it by returning iSCSI port internal state, that allows to identify
dying ports, which should not be counted as existing, from really alive.

10 years agoIntroduce pmap_unwire(). It will replace pmap_change_wiring(). There are
alc [Sun, 6 Jul 2014 17:42:38 +0000 (17:42 +0000)]
Introduce pmap_unwire().  It will replace pmap_change_wiring().  There are
several reasons for this change:

pmap_change_wiring() has never (in my memory) been used to set the wired
attribute on a virtual page.  We have always used pmap_enter() to do that.
Moreover, it is not really safe to use pmap_change_wiring() to set the wired
attribute on a virtual page.  The description of pmap_change_wiring() says
that it assumes the existence of a mapping in the pmap.  However, non-wired
mappings may be reclaimed by the pmap at any time.  (See pmap_collect().)
Many implementations of pmap_change_wiring() will crash if the mapping does
not exist.

pmap_unwire() accepts a range of virtual addresses, whereas
pmap_change_wiring() acts upon a single virtual page.  Since we are
typically unwiring a range of virtual addresses, pmap_unwire() will be more
efficient.  Moreover, pmap_unwire() allows us to unwire superpage mappings.
Previously, we were forced to demote the superpage mapping, because
pmap_change_wiring() only allowed us to express the unwiring of a single
base page mapping at a time.  This added to the overhead of unwiring for
large ranges of addresses, including the implicit unwiring that occurs at
process termination.

Implementations for arm and powerpc will follow.

Discussed with: jeff, marcel
Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division

10 years agoMake iSCSI initiator keep Initiator Session ID (ISID) across reconnects.
mav [Sun, 6 Jul 2014 17:37:49 +0000 (17:37 +0000)]
Make iSCSI initiator keep Initiator Session ID (ISID) across reconnects.

Previously ISID was changed every time, that made impossible correct
persistent reservation, because reconnected session was identified as
completely new one.

Reviewed by: trasz
MFC after: 1 week

10 years agoIn case we ever support little-endian PowerPC (probably userland only),
nwhitehorn [Sun, 6 Jul 2014 16:20:37 +0000 (16:20 +0000)]
In case we ever support little-endian PowerPC (probably userland only),
avoid hardcoding endianness here.

10 years agoAdd a new CPU id for a POWER8 variant.
nwhitehorn [Sun, 6 Jul 2014 16:19:55 +0000 (16:19 +0000)]
Add a new CPU id for a POWER8 variant.

10 years agoFix OFED startup order: All SYSINIT()'s and modules should be loaded
hselasky [Sun, 6 Jul 2014 14:22:13 +0000 (14:22 +0000)]
Fix OFED startup order: All SYSINIT()'s and modules should be loaded
prior to starting "/sbin/init" which will run all the "/etc/rc.d/xxx"
scripts. Else there can be a race configuring the interfaces via
"/etc/rc.conf".

MFC after: 4 weeks
Sponsored by: Mellanox Technologies

10 years agoFix compile warning.
hselasky [Sun, 6 Jul 2014 14:20:47 +0000 (14:20 +0000)]
Fix compile warning.

MFC after: 4 weeks
Sponsored by: Mellanox Technologies

10 years agoFix some compile warnings.
hselasky [Sun, 6 Jul 2014 14:14:07 +0000 (14:14 +0000)]
Fix some compile warnings.

MFC after: 4 weeks
Sponsored by: Mellanox Technologies

10 years agoAlign the stack in _rtld_bind_start. Normally this is called with the
andrew [Sun, 6 Jul 2014 10:24:06 +0000 (10:24 +0000)]
Align the stack in _rtld_bind_start. Normally this is called with the
correct stack alignment, however when we have a leaf function that uses
thread local storage it calls __aeabi_read_tp to get the thread pointer.
Neither GCC or clang see this as a function call so will align the stack
to a 4-byte boundary. This may be a problem as _rtld_bind expects to be
on an 8-byte boundary.

The solution is to store a copy of the stack pointer and force the
alignment before calling _rtld_bind.

This fixes a problem with armeb where applications would crash in odd ways.
It should also remove the need for a local patch to clang to force the
stack alignment to an 8-byte boundary, even for leaf functions. Further
testing will be needed before reverting this local change to clang as we
may rely on it in other places.

Reviewed by: jmg@

10 years agoAdd support for SCSI Ports (88h) VPD page.
mav [Sun, 6 Jul 2014 07:34:18 +0000 (07:34 +0000)]
Add support for SCSI Ports (88h) VPD page.

10 years agoMake REPORT TARGET PORT GROUPS command report realistic data instead of
mav [Sun, 6 Jul 2014 07:02:36 +0000 (07:02 +0000)]
Make REPORT TARGET PORT GROUPS command report realistic data instead of
hardcoded garbage.

10 years agoMove lun_map() method from command nexus to port.
mav [Sun, 6 Jul 2014 06:21:34 +0000 (06:21 +0000)]
Move lun_map() method from command nexus to port.

Previous implementation made impossible to do some things, such as calling
it for ports other then one through which command arrived.

10 years agoRelax some bit checks for INQUIRY command.
mav [Sun, 6 Jul 2014 06:12:29 +0000 (06:12 +0000)]
Relax some bit checks for INQUIRY command.

FreeBSD still tries to put LUN number in second byte until it get device
protocol version, even that it was obsoleted about 20 years ago.

10 years agosh: Fix overflow checking on 'ulimit' operand.
jilles [Sat, 5 Jul 2014 21:50:59 +0000 (21:50 +0000)]
sh: Fix overflow checking on 'ulimit' operand.

10 years agoAdd support to asmc(4) for Macmini 3,1.
gavin [Sat, 5 Jul 2014 21:34:37 +0000 (21:34 +0000)]
Add support to asmc(4) for Macmini 3,1.

PR: 190195
Submitted by: fbsdbugs2 sentry.org
MFC after: 1 week
Relnotes: yes

10 years agoPass through iSCSI session ISID from LOGIN request to the CTL frontend.
mav [Sat, 5 Jul 2014 21:18:33 +0000 (21:18 +0000)]
Pass through iSCSI session ISID from LOGIN request to the CTL frontend.

ISID is an important part of initiator transport ID for iSCSI.  It is not
used now, but should be to properly implement persistent reservation.

10 years agoCheck the number of returned entries before doing any access to ifm_ulist.
loos [Sat, 5 Jul 2014 20:16:02 +0000 (20:16 +0000)]
Check the number of returned entries before doing any access to ifm_ulist.

10 years agobsd.dep.mk: add support for generating DTrace header files from .d files.
rpaulo [Sat, 5 Jul 2014 20:08:35 +0000 (20:08 +0000)]
bsd.dep.mk: add support for generating DTrace header files from .d files.

MFC after: 3 weeks

10 years agoUse %zu not %zd for printing size_t.
gavin [Sat, 5 Jul 2014 20:08:25 +0000 (20:08 +0000)]
Use %zu not %zd for printing size_t.

PR: 185007
Submitted by: saper saper.info
MFC after: 3 days

10 years agoCorrect format string to fix build of uhsoctl when DEBUG is defined
gavin [Sat, 5 Jul 2014 19:53:21 +0000 (19:53 +0000)]
Correct format string to fix build of uhsoctl when DEBUG is defined

PR: 185007
Submitted by: saper saper.info
MFC after: 3 days

10 years agoAdd the DTrace probe definitions for plockstat support.
rpaulo [Sat, 5 Jul 2014 19:49:31 +0000 (19:49 +0000)]
Add the DTrace probe definitions for plockstat support.

This will be connected to the system later.

Sponsored by: The FreeBSD Foundation

10 years agoFix equation and limerick to be correct. NetBSD fixed this 14 years ago
gavin [Sat, 5 Jul 2014 19:37:38 +0000 (19:37 +0000)]
Fix equation and limerick to be correct.  NetBSD fixed this 14 years ago
(src/games/fortune/datfiles/fortunes2 1.7).

PR: 188714
Submitted by: ksmakoto dd.iij4u.or.jp
Reviewed by: Wolfram Alpha
MFC after: 3 days

10 years agoAllow the PVID setting on CPU port.
loos [Sat, 5 Jul 2014 19:31:22 +0000 (19:31 +0000)]
Allow the PVID setting on CPU port.

Return our static list of supported media for the CPU port.

Tested on TP-Link 1043ND.

10 years agoBurry devid port method, which was a gross hack.
mav [Sat, 5 Jul 2014 19:30:20 +0000 (19:30 +0000)]
Burry devid port method, which was a gross hack.

Instead make ports provide wanted port and target IDs, and LUNs provide
wanted LUN IDs.  After that core Device ID VPD code only had to link all
of them together and add relative port and port group numbers.

LUN ID for iSCSI LUNs no longer created by CTL, but by ctld, and passed
to CTL as "scsiname" LUN option.  This makes LUNs to report the same set
of IDs, independently from the port through which it is accessed, as
required by SCSI specifications.

10 years agoDominion Day became Canada Day in 1982, update the holiday calendar.
gavin [Sat, 5 Jul 2014 19:02:53 +0000 (19:02 +0000)]
Dominion Day became Canada Day in 1982, update the holiday calendar.

PR: 191533
Submitted by: db
Obtained from: http://www.pch.gc.ca/eng/1359137387574/1359137429809
MFC after: 3 days

10 years agoCreate separate CTL port for every iSCSI target (and maybe portal group).
mav [Sat, 5 Jul 2014 18:15:00 +0000 (18:15 +0000)]
Create separate CTL port for every iSCSI target (and maybe portal group).

Having single port for all iSCSI connections makes problematic implementing
some more advanced SCSI functionality in CTL, that require proper ports
enumeration and identification.

This change extends CTL iSCSI API, making ctld daemon to control list of
iSCSI ports in CTL.  When new target is defined in config fine, ctld will
create respective port in CTL.  When target is removed -- port will be
also removed after all active commands through that port properly aborted.
This change require ctld to be rebuilt to match the kernel.

As a minor side effect, this allows to have iSCSI targets without LUNs.
While that may look odd and not very useful, that is not incorrect.

10 years agoMerge from OpenSolaris (24-Jul-2010):
pfg [Sat, 5 Jul 2014 15:36:17 +0000 (15:36 +0000)]
Merge from OpenSolaris (24-Jul-2010):

6679140 asymmetric alloc/dealloc activity can induce dynamic variable drops
6679193 dtrace_dynvar walker produces flood of dtrace_dynhash_sink

This finishes a set of merges from the older OpenSolaris releases.
Still the FreeBSD port has many differences that are difficult to
account for but that seems normal given that the kernels are different.

MFC after: 1 week

10 years agoFix minor copy-paste bug in r268284.
mav [Sat, 5 Jul 2014 15:32:25 +0000 (15:32 +0000)]
Fix minor copy-paste bug in r268284.

10 years agoImprove CTL_BEARG_* flags support, including optional values copyout.
mav [Sat, 5 Jul 2014 14:32:42 +0000 (14:32 +0000)]
Improve CTL_BEARG_* flags support, including optional values copyout.

10 years agoImplement and use ctl_frontend_find().
mav [Sat, 5 Jul 2014 13:50:05 +0000 (13:50 +0000)]
Implement and use ctl_frontend_find().

10 years agoFix compile-time errors when NO_WERROR and WITHOUT_INET6_SUPPORT
cy [Sat, 5 Jul 2014 07:15:19 +0000 (07:15 +0000)]
Fix compile-time errors when NO_WERROR and WITHOUT_INET6_SUPPORT
(NO_INET6) are specified.

Approved by: glebius
MFC after: 1 week

10 years agoWhen getting the initial value of numeric tunables use the
hselasky [Sat, 5 Jul 2014 06:12:48 +0000 (06:12 +0000)]
When getting the initial value of numeric tunables use the
getenv_xxx() functions instead of strtoq(), because the getenv_xxx()
functions include wrappers for various postfixes like G/M/K, which
strtoq() doesn't do.

10 years agoIntroduce new IOCTL CTL_PORT_LIST reporting in more flexible XML format.
mav [Sat, 5 Jul 2014 05:44:26 +0000 (05:44 +0000)]
Introduce new IOCTL CTL_PORT_LIST reporting in more flexible XML format.

Leave old CTL_GET_PORT_LIST in place so far.  Garbage-collect it later.

10 years agoImprove readability of XML generated by CTL_LUN_LIST.
mav [Sat, 5 Jul 2014 04:10:24 +0000 (04:10 +0000)]
Improve readability of XML generated by CTL_LUN_LIST.

10 years agounits(1): Clean up
eadler [Sat, 5 Jul 2014 03:49:20 +0000 (03:49 +0000)]
units(1): Clean up
Remove unused constant.  Add 'static' where able.

10 years agoMake options KPI more generic to allow it to be used for ports too,
mav [Sat, 5 Jul 2014 03:34:52 +0000 (03:34 +0000)]
Make options KPI more generic to allow it to be used for ports too,
not only for LUNs.

10 years agounits(1): Convert units.lib to use '#' instead of '/'.
eadler [Sat, 5 Jul 2014 03:27:31 +0000 (03:27 +0000)]
units(1): Convert units.lib to use '#' instead of '/'.
This allows us to run GNU units against our data files and compare the output.
In addition, current units(1) does not support '/' as a comment at all.

10 years agounits: Support start of line comments with '#'
eadler [Sat, 5 Jul 2014 03:25:26 +0000 (03:25 +0000)]
units: Support start of line comments with '#'
Modern GNU units(1) supports comments anywhere with '#' but take the easy route for now and at least support start of line # comments.

10 years agounits(1): Add 'terse' support
eadler [Sat, 5 Jul 2014 03:17:57 +0000 (03:17 +0000)]
units(1): Add 'terse' support
terse output is used when calling units from another script.

10 years agoExtend capabilities to 64-bits in preparation for some API changes.
grehan [Sat, 5 Jul 2014 02:38:53 +0000 (02:38 +0000)]
Extend capabilities to 64-bits in preparation for some API changes.
The v1.0 virtio spec supports an extended size for guest/host
caps, but in practice 64-bits should last for a long time.

10 years agoUse proper links field for ports linking.
mav [Sat, 5 Jul 2014 01:24:06 +0000 (01:24 +0000)]
Use proper links field for ports linking.

10 years agoThe new NFSv3 server did not generate directory postop attributes for
rmacklem [Fri, 4 Jul 2014 22:47:07 +0000 (22:47 +0000)]
The new NFSv3 server did not generate directory postop attributes for
the reply to ReaddirPlus when the server failed within the loop
that calls VFS_VGET(). This failure is most likely an error
return from VFS_VGET() caused by a bogus d_fileno that was
truncated to 32bits.
This patch fixes the server so that it will return directory postop
attributes for the failure. It does not fix the underlying issue caused
by d_fileno being uint32_t when a file system like ZFS generates
a fileno that is greater than 32bits.

Reported by: jpaetzel
Reviewed by: jpaetzel
MFC after: 1 month

10 years agominor perf enhancement for UTF-8
pfg [Fri, 4 Jul 2014 22:39:39 +0000 (22:39 +0000)]
minor perf enhancement for UTF-8

Reduce some duplicate code.

Reference:
https://www.illumos.org/issues/628

Obtained from: Illumos
MFC after: 1 week

10 years agounits(1): Add 'help' flag
eadler [Fri, 4 Jul 2014 22:19:21 +0000 (22:19 +0000)]
units(1): Add 'help' flag
- Add support for --help for compatibility
- Make usage() static

10 years agounits(1): Fix man page
eadler [Fri, 4 Jul 2014 21:34:48 +0000 (21:34 +0000)]
units(1): Fix man page
Igor walks one way.  I walked the other.

Reported by: wblock

10 years agounits(1): add long options
eadler [Fri, 4 Jul 2014 21:21:05 +0000 (21:21 +0000)]
units(1): add long options
Things brings additional compatibility with units 2.10

Discussed with: wblock (man page)

10 years agogetopt(3): clarify GNU instead of NetBSD.
pfg [Fri, 4 Jul 2014 21:06:48 +0000 (21:06 +0000)]
getopt(3): clarify GNU instead of NetBSD.

The manpage and the code for r267745 came from NetBSD but the
option is inspired on GNU.

Reported by: Ben Kaduk
MFC after: 3 days

10 years agoSeparate concepts of frontend and port.
mav [Fri, 4 Jul 2014 19:27:06 +0000 (19:27 +0000)]
Separate concepts of frontend and port.

Before iSCSI implementation CTL had no knowledge about frontend drivers,
it had only frontends, which really were ports (alike to LUNs, if comparing
to backends).  But iSCSI added there ioctl() method, which does not belong
to frontend as a port, but belongs to a frontend driver.

10 years agoRemove targ_enable()/targ_disable() frontend methods.
mav [Fri, 4 Jul 2014 19:19:03 +0000 (19:19 +0000)]
Remove targ_enable()/targ_disable() frontend methods.

Those methods were never implemented, and I believe that their concept is
wrong, since single frontend (SCSI port) can not handle several targets.

10 years agoDocument the -y option as a unit test option.
marcel [Fri, 4 Jul 2014 18:47:25 +0000 (18:47 +0000)]
Document the -y option as a unit test option.
Add missing -v (and -y) to the usage message.

Requested by: eadler@

10 years agoAfter EFI support was added to the installer, it needed to allow boot
nwhitehorn [Fri, 4 Jul 2014 15:55:32 +0000 (15:55 +0000)]
After EFI support was added to the installer, it needed to allow boot
partitions of types other than "freebsd-boot" (in particular, "efi").
This allows the removal of some nasty hacks for supporting PowerPC systems,
in particular aliasing freebsd-boot to apple-boot on APM and an IBM-specific
code on MBR.

This changes the installer to use the correct names, which also breaks a
degeneracy in the meaning of "freebsd-boot" that allows the addition
of support for some newer IBM systems that can boot from GPT in addition to
MBR. Since I have no idea how to detect which those systems are, leave
the default on IBM PPC systems as MBR for now.

10 years agoadd a hit that you can enable this by default if you want... necessary
jmg [Fri, 4 Jul 2014 14:49:40 +0000 (14:49 +0000)]
add a hit that you can enable this by default if you want...  necessary
if you want the keyboard break to work early in boot..

MFC after: 1 week

10 years agoBREAK_TO_DEBUGGER is not just serial console anymore, it controls all
jmg [Fri, 4 Jul 2014 14:32:15 +0000 (14:32 +0000)]
BREAK_TO_DEBUGGER is not just serial console anymore, it controls all
console's ability to enter the debugger....  rwatson forgot to document
this when he changed it back in 2011...  There is more docs to write
about this, but at least fix this for now...

Reviewed by: emaste
MFC after: 1 week

10 years agoAdopt to current and other changes:
mr [Fri, 4 Jul 2014 09:29:43 +0000 (09:29 +0000)]
Adopt to current and other changes:
use dedicated kernel files with some local settings
use mkimg for ISO building
put images into separate directory and rename them for better consistency

10 years agolook: implement long options
eadler [Fri, 4 Jul 2014 04:47:29 +0000 (04:47 +0000)]
look: implement long options
gentoo has "util-linux 2.24.1" with long options.  Other distributions
have similar.

usage() is intentionally unchanged to keep it short and sweet

Reviewed by: jmg
Discussed with: adrian, jilles

10 years agoFix a typo.
hiren [Thu, 3 Jul 2014 23:12:43 +0000 (23:12 +0000)]
Fix a typo.

10 years agoAdd persistent reservation support to camcontrol(8).
ken [Thu, 3 Jul 2014 23:09:44 +0000 (23:09 +0000)]
Add persistent reservation support to camcontrol(8).

camcontrol(8) now supports a new 'persist' subcommand that allows users to
issue SCSI PERSISTENT RESERVE IN / OUT commands.

sbin/camcontrol/Makefile:
Add persist.c.

sbin/camcontrol/persist.c:
New persistent reservation support for camcontrol(8).

We have support for all known operation modes for PERSISTENT RESERVE
IN and PERSISTENT RESERVE OUT.
exceptions noted above.

sbin/camcontrol/camcontrol.8:
Document the new 'persist' subcommand.

In the section on the Transport ID (-I) option, explain what
Transport IDs for each protocol should look like.  At some point
some of this information could probably get moved off in a
separate man page, either on Transport IDs alone or a man page
documenting the Transport ID parsing code.

Add a number of examples of persistent reservation commands.
Persistent Reservations are complex enough that the average user
probably won't be able to get the commands exactly right by just
reading the man page.  These examples show a few basic and
advanced examples of how to use persistent reservations.

sbin/camcontrol/camcontrol.h:
Move the definition for camcontrol_optret here, so we can use it
for the persistent reservation code.

Add a definition for the new scsipersist() function.

sbin/camcontrol/camcontrol.c:
Add 'persist' to the list of subcommands.

Document 'persist' in the help text.

sys/cam/scsi/scsi_all.c:
Add the scsi_persistent_reserve_in() and
scsi_persistent_reserve_out() CCB building functions.

Add a new function, scsi_transportid_sbuf().  This takes a
SCSI Transport ID (documented in SPC-4), and prints it to
an sbuf(9).  There are some transports (like ATA, USB, and
SSA) for which there is no transport defined.  We need to
come up with a reasonable thing to do if we're presented
with a Transport ID that claims to be for one of those
protocols.

Add new routines scsi_get_nv() and scsi_nv_to_str().

These functions do a table lookup to go between a string and an
integer.  There are lots of table lookups needed in the
persistent reservation code in camcontrol(8).

Add a new function, scsi_parse_transportid(), along with leaf node
functions to parse:
FC, 1394 and SAS (scsi_parse_transportid_64bit())
iSCSI (scsi_parse_transportid_iscsi())
SPI (scsi_parse_transportid_spi())
RDMA (scsi_parse_transportid_rdma())
PCIe (scsi_parse_transportid_sop())

Transport IDs.  Given a string with the general form proto,id these
functions create a SCSI Transport ID structure.

sys/cam/scsi/scsi_all.h:
Update the various persistent reservation data structures to
SPC4r36l, but also rename some fields that were previously
obsolete with the proper names from older SCSI specs.  This
allows using older, obsolete persistent reservation types when
desired.

Add function prototypes for the new persistent reservation CCB
building functions.

Add a data strucure for the READ FULL STATUS service action
of the PERSISTENT RESERVE IN command.

Add Transport ID structures for all protocols described in SPC-4.

Add a new series of SCSI_PROTO_XXX definitions, and
redefine other defines in terms of these new definitions.

Add a prototype for scsi_transportid_sbuf().

Change a couple of "obsolete" persistent reservation data
structure fields into something more meaningful, based on
what the field was called when it was defined in the spec.
(e.g. SPC, SPC-2, etc.)

Create a new define, SPRI_MAX_LEN, for the maximum allocation
length allowed for the PERSISTENT RESERVE IN command.

Add data structures and enumerations for the new name/value
translation functions.

Add data structures for SCSI over PCIe Routing IDs.

Bring the PERSISTENT RESERVE OUT Register and Move parameter list
structure (struct scsi_per_res_out_parms) up to date with SPC-4.

Add a data structure for the transport IDs that can optionally be
appended to the basic PERSISTENT RESERVE OUT parameter list.

Move SCSI protocol macro definitions out of the VPD page 0x83
definition and combine them with the more up to date protocol
definitions higher in the file.

Add function prototypes for scsi_nv_to_str(), scsi_get_nv(),
scsi_parse_transportid_64bit(), scsi_parse_transportid_spi(),
scsi_parse_transportid_rdma(), scsi_parse_transportid_iscsi(),
scsi_parse_transportid_sop(), and scsi_parse_transportid().

Sponsored by: Spectra Logic Corporation
MFC after: 1 week

10 years agoAdd an option, -p, which makes gstat(8) to only display physical providers
delphij [Thu, 3 Jul 2014 21:48:19 +0000 (21:48 +0000)]
Add an option, -p, which makes gstat(8) to only display physical providers
(those with rank of 1).

MFC after: 2 weeks

10 years agoAdd VHD support to mkimg(1). VHD is used by Xen and Microsoft's Hyper-V
marcel [Thu, 3 Jul 2014 20:31:43 +0000 (20:31 +0000)]
Add VHD support to mkimg(1). VHD is used by Xen and Microsoft's Hyper-V
among others.

Add an undocumented option for unit testing (-y). When given, the image
will have UUIDs and timestamps synthesized in a way that gives identical
results across runs. As such, UUIDs stop being unique, globally or
otherwise.

VHD support requested by: gjb@

10 years agoProperly advertise that if_arge can handle long frames (if_arge is set to
loos [Thu, 3 Jul 2014 20:16:48 +0000 (20:16 +0000)]
Properly advertise that if_arge can handle long frames (if_arge is set to
handle packets up to 1536 bytes)

This fixes the need to frag that could happen when using vlans on top of
if_arge (which is a common case for the use the switch ports as individual
NICs).

Previously to this commit any vlan setup with if_arge as parent would have
the MTU of the parent interface reduced by the size of dot1q header
(4 bytes).

Tested on TP-Link 1043ND (where the WAN port is just a switch port setup to
tag packets in a different VLAN than the LAN ports).

Reported and tested by: Harm Weites (harm at weites.com)

10 years agoInitialize the switch vlan table at attachment.
loos [Thu, 3 Jul 2014 19:50:50 +0000 (19:50 +0000)]
Initialize the switch vlan table at attachment.

Update some comments on code, specifying the correct vlans used on switch
setup.

Advertise the proper switch operation mode (the rtl8366rb only support
dot1q vlans).

This fixes the breakage that i introduced on r249752 and make the rtl8366rb
switch works again with etherswitchcfg(8).

Tested on TP-Link 1043ND.

Tested by: me, Harm Weites (harm at weites.com)

10 years agoThe u-boot tarball needed for some boards, BEAGLEBONE for
gjb [Thu, 3 Jul 2014 19:37:25 +0000 (19:37 +0000)]
The u-boot tarball needed for some boards, BEAGLEBONE for
example, explicitly hard-code gcc(1) as the compiler.

Partially revert r264703, which did a post-chroot install
of gcc(1).  This was initially removed because gcc(1) fails
to build usr.bin/dtc/ causing the xdev target to fail.  So
this time, move the gcc(1) installation after xdev is built.

This change is likely applicable to stable/10 arm build
failures, as well.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoMerge from OpenSolaris (30-Jun-2009):
pfg [Thu, 3 Jul 2014 19:25:24 +0000 (19:25 +0000)]
Merge from OpenSolaris (30-Jun-2009):

6851093 system drops to kmdb with anonymous dtrace probes + kmdb

This has no effect on FreeBSD (code is ifdef'ed) but is useful as
reference for future merges.

MFC after: 1 week

10 years agoMerge from OpenSolaris (22-Apr-2008):
pfg [Thu, 3 Jul 2014 19:07:37 +0000 (19:07 +0000)]
Merge from OpenSolaris (22-Apr-2008):

6823388 DTrace ioctl handlers must validate all structure members

MFC after: 1 week

10 years agoSync with head.
marcel [Thu, 3 Jul 2014 18:24:28 +0000 (18:24 +0000)]
Sync with head.

10 years agoDisplay efi framebuffer dimensions on boot
emaste [Thu, 3 Jul 2014 17:53:28 +0000 (17:53 +0000)]
Display efi framebuffer dimensions on boot

The EFI framebuffer produces corrupted output on certain systems.  For
now display the framebuffer parameters (address, dimensions, etc.) on
boot to aid in tracking down these issues.

Sponsored by: The FreeBSD Foundation

10 years agoMerge from OpenSolaris (20-Apr-2008):
pfg [Thu, 3 Jul 2014 17:36:59 +0000 (17:36 +0000)]
Merge from OpenSolaris (20-Apr-2008):

6822482 DOF validation needs to handle loadable sections flagged as unloadable

MFC after: 1 week

10 years agoDescribe kern.vty sc/vt tunable in syscons(4)
emaste [Thu, 3 Jul 2014 13:51:10 +0000 (13:51 +0000)]
Describe kern.vty sc/vt tunable in syscons(4)

Reviewed by: wblock