]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
8 years agoMFC r295147:
ume [Tue, 5 Apr 2016 14:41:34 +0000 (14:41 +0000)]
MFC r295147:
  Make dynamic link of libiconv from ports work again.
  The symbols of libiconv from ports were changed to
  have prefixed.
  Since we have iconv in our libc these days, we don't
  need it on 10.X and later.  However, 9.X still need
  this.

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

8 years agoCAM: Generalize 4k quirk to all Samsung MZ7* SSDs
dumbbell [Tue, 5 Apr 2016 08:37:21 +0000 (08:37 +0000)]
CAM: Generalize 4k quirk to all Samsung MZ7* SSDs

This adds Samsung PM851 to the list. It can be found in Lenovo Thinkpad
T440 for instance.

MFC of: r297370
Reviewed by: Kevin Bowling <kevin.bowling@kev009.com>,
Jason Wolfe <j@nitrology.com>
Approved by: Kevin Bowling <kevin.bowling@kev009.com>,
Jason Wolfe <j@nitrology.com>
Differential Revision: https://reviews.freebsd.org/D5753

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

8 years agoMFC r297179: Optimize IPMI watchdog patting.
mav [Tue, 5 Apr 2016 06:37:58 +0000 (06:37 +0000)]
MFC r297179: Optimize IPMI watchdog patting.

Set watchdog timer parameters only when they really need to be changed.
In other cases just restart the timer with single Reset command instead
of two (Set and Reset).

From one side this visually reduces amount of CPU time burned in tight
loop waiting while some slow BMC configures its watchdog hardware, that
seems to be much more complicated task then just resetting the timer.

From another side on some BMCs those slow Set commands sometimes tend to
timeout, that leads to noisy log messages and even more CPU time burned,
so avoiding them can provide even bigger bonuses.

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

8 years agoMFC r297364:
wblock [Mon, 4 Apr 2016 16:41:35 +0000 (16:41 +0000)]
MFC r297364:

Fix two more unhappy instances of "user land".

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

8 years agoMFC r297330:
wblock [Mon, 4 Apr 2016 16:20:46 +0000 (16:20 +0000)]
MFC r297330:

Adjust misleading wording of the -G option and simplify a few
surrounding sentences.  From a discussion on -ports.

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

8 years agoMFC: r292563
marius [Mon, 4 Apr 2016 12:21:04 +0000 (12:21 +0000)]
MFC: r292563

loader.efi: strip trailing whitespace

MFC: r293244 (remainder missing in r294275)

Introduce and use new EFI_ERROR_CODE macro for EFI errors

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

8 years agoNow that 10.3-RELEASE is out, move stable/10 back to STABLE.
marius [Mon, 4 Apr 2016 12:15:06 +0000 (12:15 +0000)]
Now that 10.3-RELEASE is out, move stable/10 back to STABLE.

Approved by: re (implicit)

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

8 years agoMFC r297421: Plug open count leak on zvol rename.
mav [Mon, 4 Apr 2016 09:50:28 +0000 (09:50 +0000)]
MFC r297421: Plug open count leak on zvol rename.

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

8 years agoMFC r297420: Switch from using make_dev_p() to make_dev_s() to close races.
mav [Mon, 4 Apr 2016 09:49:45 +0000 (09:49 +0000)]
MFC r297420: Switch from using make_dev_p() to make_dev_s() to close races.

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

8 years agoMFC r297337: Pass through error code from make_dev_p().
mav [Mon, 4 Apr 2016 09:48:58 +0000 (09:48 +0000)]
MFC r297337: Pass through error code from make_dev_p().

ENAMETOOLONG is much more informative in logs then ENXIO.

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

8 years agoMFC r297232: Unify ignoring EEXIST from zvol_create_minor().
mav [Mon, 4 Apr 2016 09:47:39 +0000 (09:47 +0000)]
MFC r297232: Unify ignoring EEXIST from zvol_create_minor().

This fixes creation of zvol devices for snapshots during zfs receive,
that previously failed with "ZFS WARNING: Unable to create ZVOL" message.
This solution is not perfect, but IMHO better then it was before.

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

8 years agoMFC r277504 (by will): Remove commented log messages.
mav [Mon, 4 Apr 2016 09:36:56 +0000 (09:36 +0000)]
MFC r277504 (by will): Remove commented log messages.

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

8 years agoMFC r277450 (by will):
mav [Mon, 4 Apr 2016 09:35:36 +0000 (09:35 +0000)]
MFC r277450 (by will):
Use the "zfs_gfs" tag for GFS vnodes to make them easier to identify.

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

8 years agoMFC r270382 (by delphij): MFV r270197:
mav [Mon, 4 Apr 2016 09:30:57 +0000 (09:30 +0000)]
MFC r270382 (by delphij): MFV r270197:

Illumos issue:
    5066 remove support for non-ANSI compilation
    5068 Remove SCCSID() macro from <macros.h>

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

8 years agoMFC r297139:
kib [Mon, 4 Apr 2016 06:49:20 +0000 (06:49 +0000)]
MFC r297139:
From libthr, remove special and strange code to set up session and
control terminal, activated when running with pid 1.

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

8 years agoMFC r287109 (by trasz): Make it possible to forcibly unmount devfs.
mav [Sun, 3 Apr 2016 14:38:02 +0000 (14:38 +0000)]
MFC r287109 (by trasz): Make it possible to forcibly unmount devfs.

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

8 years agoMFC r297309:
dchagin [Sun, 3 Apr 2016 06:22:36 +0000 (06:22 +0000)]
MFC r297309:

Whitespaces and style(9) fix. No functional changes.

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

8 years agoMFC r297297:
dchagin [Sat, 2 Apr 2016 06:18:19 +0000 (06:18 +0000)]
MFC r297297:

When write(2) on eventfd object fails with the error EAGAIN do not return the number of bytes written.

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

8 years agoMFC r297296:
dchagin [Sat, 2 Apr 2016 06:15:14 +0000 (06:15 +0000)]
MFC r297296:

Implement O_NONBLOCK flag via fcntl(F_SETFL) for eventfd object.

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

8 years agoMFC r297335:
kevlo [Fri, 1 Apr 2016 03:46:16 +0000 (03:46 +0000)]
MFC r297335:

Update superblock and inode structs for ext4.

Reviewed by: pfg

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

8 years agoMFC r297298:
np [Fri, 1 Apr 2016 01:39:44 +0000 (01:39 +0000)]
MFC r297298:
Plug leak in m_unshare.

m_unshare passes on the source mbuf's flags as-is to m_getcl and this
results in a leak if the flags include M_NOFREE.  The fix is to clear
the bits not listed in M_COPYALL before calling m_getcl.  M_RDONLY
should probably be filtered out too but that's outside the scope of this
fix.

Add assertions in the zone_mbuf and zone_pack ctors to catch similar
bugs.

Update netmap_get_mbuf to not pass M_NOFREE to m_getcl.  It's not clear
what the original code was trying to do but it's likely incorrect.
Updated code is no different functionally but it avoids the newly added
assertions.

Sponsored by: Chelsio Communications

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

8 years agoMFC r296984:
ae [Thu, 31 Mar 2016 09:55:21 +0000 (09:55 +0000)]
MFC r296984:
  Change in6_selectsrc() to allow usage of non-local IPv6 addresses in
  IPV6_PKTINFO ancillary data when IPV6_BINDANY socket option is set.

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

8 years agoMFC r296278:
pfg [Thu, 31 Mar 2016 01:36:50 +0000 (01:36 +0000)]
MFC r296278:
mbtowc(3): set errno to EILSEQ if an incomplete character is passed.

According to POSIX, The mbtowc() function shall fail if:
[EILSEQ] An invalid character sequence is detected.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D5496

Obtained from: OpenBSD (Ingo Schwarze)

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

8 years agoMFC r297212:
dim [Wed, 30 Mar 2016 22:12:07 +0000 (22:12 +0000)]
MFC r297212:

For C++, expose long long types and functions (lldiv_t, llabs, lldiv,
etc) in stdlib.h.  These will be needed for newer versions of libc++,
which uses them for defining overloaded versions of abs() and div().

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

8 years agoMFC 296932:
kp [Wed, 30 Mar 2016 18:45:18 +0000 (18:45 +0000)]
MFC 296932:
pf: Improve forwarding detection

When we guess the nature of the outbound packet (output vs. forwarding) we need
to take bridges into account. When bridging the input interface does not match
the output interface, but we're not forwarding. Similarly, it's possible for the
interface to actually be the bridge interface itself (and not a member interface).

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

8 years agor297229 (by hselasky): Add more UHCI PCI IDs.
mav [Tue, 29 Mar 2016 09:14:28 +0000 (09:14 +0000)]
r297229 (by hselasky): Add more UHCI PCI IDs.

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

8 years agoMFC r296585:
bdrewery [Mon, 28 Mar 2016 16:25:07 +0000 (16:25 +0000)]
MFC r296585:

  These group names may be used as a cookie, so replace any non-fs-safe
  characters.

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

8 years agoMFC r296526:
bdrewery [Mon, 28 Mar 2016 16:21:45 +0000 (16:21 +0000)]
MFC r296526:

  Record command exit status in the typescript file when running simple
  commands.

Relnotes: yes

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

8 years agoMFC r296656:
mav [Mon, 28 Mar 2016 09:36:52 +0000 (09:36 +0000)]
MFC r296656:
Don't bother to invoke gmirror or zpool if the module is not loaded.

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

8 years agoMFC r296655, r296673, r296776: Unify and improve metadata wiping.
mav [Mon, 28 Mar 2016 09:35:29 +0000 (09:35 +0000)]
MFC r296655, r296673, r296776: Unify and improve metadata wiping.

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

8 years agoMFC r296654: Use `geom disk list` instead `camcontrol identify`.
mav [Mon, 28 Mar 2016 09:34:14 +0000 (09:34 +0000)]
MFC r296654: Use `geom disk list` instead `camcontrol identify`.

The new way works for almost any disk, while the old only for ATA.

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

8 years agoMFC r297051: Fix incorrect (fortunately bigger) malloc size.
mav [Mon, 28 Mar 2016 09:28:01 +0000 (09:28 +0000)]
MFC r297051: Fix incorrect (fortunately bigger) malloc size.

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

8 years agoMFC r297049: Add IDs for Intel Wellsburg USB controllers.
mav [Mon, 28 Mar 2016 09:26:44 +0000 (09:26 +0000)]
MFC r297049: Add IDs for Intel Wellsburg USB controllers.

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

8 years agoMFC r295463 (by hselasky): Correct PCI device description.
mav [Mon, 28 Mar 2016 09:26:00 +0000 (09:26 +0000)]
MFC r295463 (by hselasky): Correct PCI device description.

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

8 years agoMFC r275137 (by adrian): Add PCI ID for Intel Lynx Point LP controller.
mav [Mon, 28 Mar 2016 09:24:47 +0000 (09:24 +0000)]
MFC r275137 (by adrian):  Add PCI ID for Intel Lynx Point LP controller.

PR: kern/195398

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

8 years agoMFC r296449: Update meaning of -n argument.
mav [Mon, 28 Mar 2016 09:18:18 +0000 (09:18 +0000)]
MFC r296449: Update meaning of -n argument.

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

8 years agoMFC r296095:
pfg [Sun, 27 Mar 2016 19:42:42 +0000 (19:42 +0000)]
MFC r296095:
rpc: fix failure to clear string by passing the wrong size to memset.

Noted by NetBSD's PR/21014

Obtained from: NetBSD (CVS Rev. 1.24, 1.25)

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

8 years agoMFC r297206:
kib [Sun, 27 Mar 2016 08:00:51 +0000 (08:00 +0000)]
MFC r297206:
Fix locking mistake in softdep_waitidle().

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

8 years agoRevert r297303.
dchagin [Sun, 27 Mar 2016 07:34:42 +0000 (07:34 +0000)]
Revert r297303.

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

8 years agoMFC r296501:
dchagin [Sun, 27 Mar 2016 06:55:49 +0000 (06:55 +0000)]
MFC r296501:

Link the newly created process to the corresponding parent as
if CLONE_PARENT is set, then the parent of the new process will be
the same as that of the calling process.

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

8 years agoMFC r296502, r296543, r296546, r297060:
dchagin [Sun, 27 Mar 2016 06:52:40 +0000 (06:52 +0000)]
MFC r296502, r296543, r296546, r297060:

  1. Limit secs to INT32_MAX / 2 to avoid errors from kern_setitimer().
     Assert that kern_setitimer() returns 0.
     Remove bogus cast of secs.
     Fix style(9) issues.

  2. Increment the return value if the remaining tv_usec value more than 500000 as a Linux does.

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

8 years agoMFC r296503, r296504:
dchagin [Sun, 27 Mar 2016 06:43:05 +0000 (06:43 +0000)]
MFC r296503, r296504:

Linux accept() system call return EOPNOTSUPP errno instead of EINVAL for UDP sockets.

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

8 years agoMFC r297063:
dchagin [Sun, 27 Mar 2016 06:21:05 +0000 (06:21 +0000)]
MFC r297063:
   Whitespaces, style(9) fixes. No functional changes.

MFC r297070:
  Return EOVERFLOW in case when actual statfs values are large enough and
  not fit into 32 bit fileds of a Linux struct statfs.

MFC r297072:

  Check bsd_to_linux_statfs() return value.

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

8 years agoMFC r297062:
dchagin [Sun, 27 Mar 2016 06:17:19 +0000 (06:17 +0000)]
MFC r297062:

Regen for r297061 (fstatfs64 Linux syscall).

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

8 years agoMFC r297061;
dchagin [Sun, 27 Mar 2016 06:10:51 +0000 (06:10 +0000)]
MFC r297061;

Implement fstatfs64 system call.

PR: 181012
Submitted by: John Wehle

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

8 years agoMFC r296652:
kib [Fri, 25 Mar 2016 08:26:37 +0000 (08:26 +0000)]
MFC r296652:
Do not perform unneccessary shared recursion on the allproc_lock in
pfs_visible().

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

8 years agoMFC r297037:
pfg [Fri, 25 Mar 2016 01:01:32 +0000 (01:01 +0000)]
MFC r297037:
aio_qphysio(): Avoid uninitialized pointer read on error.

For the !unmap case it may happen that pbuf gets called unreferenced
when vm_fault_quick_hold_pages() fails.
Initialize it so it doesn't cause trouble.

CID: 1352776
Reviewed by: jhb

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

8 years agoMFC r296394:
pfg [Fri, 25 Mar 2016 00:39:01 +0000 (00:39 +0000)]
MFC r296394:
xdr: Fix xdr_rpc* defines.

The defines for xdr_rpc* in xdr.h are wrong. It could be
very well that Solaris did strip the '_t' from xdr_u_int32_t,
but Solaris has a xdr_u_int32 function, we don't have this.
So all of this defines will lead to an unresolved symbol.

This explains why we do not use these functions in FreeBSD
while they are used in Illumos/Solaris.

Obtained from: linux libtirpc (git 7864122e61ffe4db1aa8ace89117358a1e3a391b)

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

8 years agoMFC r292254:
hselasky [Thu, 24 Mar 2016 09:22:58 +0000 (09:22 +0000)]
MFC r292254:

Properly drain callouts in the IPFW subsystem to avoid use after free
panics when unloading the dummynet and IPFW modules:

- The callout drain function can sleep and should not be called having
a non-sleepable lock locked. Remove locks around "ipfw_dyn_uninit(0)".

- Add a new "dn_gone" variable to prevent asynchronous restart of
dummynet callouts when unloading the dummynet kernel module.

- Call "dn_reschedule()" locked so that "dn_gone" can be set and
checked atomically with regard to starting a new callout.

PR: 208171
Requested by: Franco Fichtner (opnsense.org)
Differential Revision: https://reviews.freebsd.org/D3855

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

8 years agoMFC r297137:
kib [Thu, 24 Mar 2016 07:24:33 +0000 (07:24 +0000)]
MFC r297137:
Fix typo.

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

8 years agoMFC r279091.
np [Wed, 23 Mar 2016 20:21:51 +0000 (20:21 +0000)]
MFC r279091.

Add cxl(4) and if_cxl(4) as links to cxgbe(4).

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

8 years agoMFC r296557:
ae [Wed, 23 Mar 2016 18:21:26 +0000 (18:21 +0000)]
MFC r296557:
  Add support for IPPROTO_IPV6 socket layer for getsockopt/setsockopt calls.
  Also add mapping for several options from RFC 3493 and 3542.

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

8 years agoMFC r296766:
ngie [Tue, 22 Mar 2016 19:29:55 +0000 (19:29 +0000)]
MFC r296766:

Better handle filesystems mounted with -o noexec

ftruncate/11, open/20, and truncate/11 copy sleep(1) to a temporary file on the
target filesystem, execute the binary, then expect a result. This doesn't work
with scenarios where the target binary cannot be executed, e.g. the filesystem
was mounted with -o noexec.

Ensure the filesystem hasn't been mounted with -o noexec for the testcases
before executing them.

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

8 years agoMFC r296819:
bdrewery [Mon, 21 Mar 2016 17:51:15 +0000 (17:51 +0000)]
MFC r296819:

  Reword SX_NOADAPTIVE description to be clear that adaptive is default.

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

8 years agoMFC r277629 (by will):
mav [Mon, 21 Mar 2016 07:36:02 +0000 (07:36 +0000)]
MFC r277629 (by will):
When creating or updating a node, use vfs_timestamp() for "now" instead
of gethrestime(), to allow the administrator to decide the appropriate
timestamp precision instead of always using nanosecond precision.

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

8 years agoMFC r296467:
kib [Mon, 21 Mar 2016 03:29:45 +0000 (03:29 +0000)]
MFC r296467:
Convert all panics from the link_elf_obj kernel linker for object
files format into printfs and errors to caller.

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

8 years agoMFC r296816:
pfg [Mon, 21 Mar 2016 01:14:32 +0000 (01:14 +0000)]
MFC r296816:

libdtrace: use calloc(3) instead of malloc(3) when it makes sense.

calloc(3) is faster and occasionally safer than malloc(3) + bzero(3).

In one case, pointed out by Mark[1], this also cleans up a calculation.

Reviewed by: markj [1]

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

8 years agoMFC r296617: Revert r292074 (by smh): Limit stripesize reported from
mav [Mon, 21 Mar 2016 00:34:22 +0000 (00:34 +0000)]
MFC r296617: Revert r292074 (by smh): Limit stripesize reported from
nvd(4) to 4K

I believe that this patch handled the problem from the wrong side.
Instead of making ZFS properly handle large stripe sizes, it made
unrelated driver to lie in reported parameters to workaround that.

Alternative solution for this problem from ZFS side was committed at
r296615.

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

8 years agoMFC r296020:
smh [Mon, 21 Mar 2016 00:31:06 +0000 (00:31 +0000)]
MFC r296020:

Fix NULL pointer dereferences

Sponsored by: Multiplay

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

8 years agoMFC r296615: Make ZFS ignore stripe sizes above SPA_MAXASHIFT (8KB).
mav [Mon, 21 Mar 2016 00:29:00 +0000 (00:29 +0000)]
MFC r296615: Make ZFS ignore stripe sizes above SPA_MAXASHIFT (8KB).

If device has stripe size bigger then maximal sector size supported by
ZFS, there is nothing can be done to avoid read-modify-write cycles.
Taking that stripe size into account will only reduce space efficiency
and pointlessly bother user with warnings that can not be fixed.

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

8 years agoMFC r296613: Make ZFS more picky to GEOM stripe sizes and offsets.
mav [Mon, 21 Mar 2016 00:28:13 +0000 (00:28 +0000)]
MFC r296613: Make ZFS more picky to GEOM stripe sizes and offsets.

Use of misaligned or non-power-of-2 stripes is not really useful for ZFS,
since increased ashift won't help to avoid read-modify-write cycles, and
only reduce pool space efficiency and compression rates.

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

8 years agoMFC r296541: MFV r296540: 4448 zfs diff misprints unicode characters
mav [Mon, 21 Mar 2016 00:27:00 +0000 (00:27 +0000)]
MFC r296541: MFV r296540: 4448 zfs diff misprints unicode characters

Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author: Joshua M. Clulow <jmc@joyent.com>

illumos/illumos-gate@b211eb9181f99c20acbf4c528f94cb44b4ca8c31

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

8 years agoMFC r296539: MFV r296538:
mav [Mon, 21 Mar 2016 00:26:14 +0000 (00:26 +0000)]
MFC r296539: MFV r296538:
6544 incorrect comment in libzfs.h about offline status

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Gerhard Roethlin <git@the-color-black.net>

illumos/illumos-gate@cb605c4d8ab24b5a900b8b4ca85db65c22d05fad

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

8 years agoMFC r296537: MFV r296536: 6551 cmd/zpool: cleanup gcc warnings
mav [Mon, 21 Mar 2016 00:25:26 +0000 (00:25 +0000)]
MFC r296537: MFV r296536: 6551 cmd/zpool: cleanup gcc warnings

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Approved by: Robert Mustacchi <rm@joyent.com>

illumos/illumos-gate@b327cd3f3b4dab4f29e7140159b1e01ed2ceef2a

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

8 years agoMFC r296535: MFV r296534: 6550 cmd/zfs: cleanup gcc warnings
mav [Mon, 21 Mar 2016 00:24:37 +0000 (00:24 +0000)]
MFC r296535: MFV r296534: 6550 cmd/zfs: cleanup gcc warnings

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Igor Kozhukhov <ikozhukhov@gmail.com>

illumos/illumos-gate@c16bcc4577f389573eff411c7b7e040294078c3b

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

8 years agoMFC r296533: MFV r296532: 6637 replacing "dontclose" with "should_close"
mav [Mon, 21 Mar 2016 00:23:51 +0000 (00:23 +0000)]
MFC r296533: MFV r296532: 6637 replacing "dontclose" with "should_close"

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: David Schwartz <dschwartz783@gmail.com>

illumos/illumos-gate@d189620258b3c9b0e2f7e2104840be2eee7c68e5

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

8 years agoMFC r296530: MFV r296529:
mav [Mon, 21 Mar 2016 00:22:55 +0000 (00:22 +0000)]
MFC r296530: MFV r296529:
6672 arc_reclaim_thread() should use gethrtime() instead of ddi_get_lbolt()
6673 want a macro to convert seconds to nanoseconds and vice-versa

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Eli Rosenthal <eli.rosenthal@delphix.com>

illumos/illumos-gate@a8f6344fa0921599e1f4511e41b5f9a25c38c0f9

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

8 years agoMFC r296528: MFV r296527: 6659 nvlist_free(NULL) is a no-op
mav [Mon, 21 Mar 2016 00:22:09 +0000 (00:22 +0000)]
MFC r296528: MFV r296527:  6659 nvlist_free(NULL) is a no-op

Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Marcel Telka <marcel@telka.sk>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>

illumos/illumos-gate@aab83bb83be7342f6cfccaed8d5fe0b2f404855d

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

8 years agoMFC r296523: MFV r296522:
mav [Mon, 21 Mar 2016 00:20:49 +0000 (00:20 +0000)]
MFC r296523: MFV r296522:
6541 Pool feature-flag check defeated if "verify" is included in the dedup
property value

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Richard Laager <rlaager@wiktel.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: ilovezfs <ilovezfs@icloud.com>

illumos/illumos-gate@971640e6aa954c91b0706543741aa4570299f4d7

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

8 years agoMFC r296521: MFV r296520:
mav [Mon, 21 Mar 2016 00:19:42 +0000 (00:19 +0000)]
MFC r296521: MFV r296520:
6562 Refquota on receive doesn't account for overage

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Dan McDonald <danmcd@omniti.com>

illumos/illumos-gate@5f7a8e6d750cb070a3347f045201c6206caee6aa

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

8 years agoMFC r296519: MFV r296518: 5027 zfs large block support (add copyright)
mav [Mon, 21 Mar 2016 00:18:38 +0000 (00:18 +0000)]
MFC r296519: MFV r296518:  5027 zfs large block support (add copyright)

Author: Matthew Ahrens <matt@mahrens.org>

illumos/illumos-gate@c3d26abc9ee97b4f60233556aadeb57e0bd30bb9

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

8 years agoMFC r296516: MFV r296515:
mav [Mon, 21 Mar 2016 00:16:42 +0000 (00:16 +0000)]
MFC r296516: MFV r296515:
6536 zfs send: want a way to disable setting of DRR_FLAG_FREERECORDS

Reviewed by: Anil Vijarnia <avijarnia@racktopsystems.com>
Reviewed by: Kim Shrier <kshrier@racktopsystems.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Andrew Stormont <astormont@racktopsystems.com>

illumos/illumos-gate@880094b6062aebeec8eda6a8651757611c83b13e

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

8 years agoMFC r296514: MFV r296513:
mav [Mon, 21 Mar 2016 00:15:41 +0000 (00:15 +0000)]
MFC r296514: MFV r296513:
6450 scrub/resilver unnecessarily traverses snapshots created after the
scrub started

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@38d61036746e2273cc18f6698392e1e29f87d1bf

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

8 years agoMFC r296512: MFV r296511: 6537 Panic on zpool scrub with DEBUG kernel
mav [Mon, 21 Mar 2016 00:14:30 +0000 (00:14 +0000)]
MFC r296512: MFV r296511: 6537 Panic on zpool scrub with DEBUG kernel

Reviewed by: Steve Gonczi <gonczi@comcast.net>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author: Gary Mills <gary_mills@fastmail.fm>

illumos/illumos-gate@8c04a1fa3f7d569d48fe9b5342d0bd4c533179b9

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

8 years agoMFC r296510, r296563, r296567: MFV r296505:
mav [Mon, 21 Mar 2016 00:13:39 +0000 (00:13 +0000)]
MFC r296510, r296563, r296567: MFV r296505:
6531 Provide mechanism to artificially limit disk performance

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Prakash Surya <prakash.surya@delphix.com>

illumos/illumos-gate@97e81309571898df9fdd94aab1216dfcf23e060b

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

8 years agoMFC r296021 (by smh): Removed unused label and fix mutex_exit order
mav [Mon, 21 Mar 2016 00:09:56 +0000 (00:09 +0000)]
MFC r296021 (by smh): Removed unused label and fix mutex_exit order

Remove unused done label from zfs_setacl fixing PVS-Studio V729.

Fix mutex_exit order to mirror the mutex_enter order.

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

8 years agoMFC r295125: MFV r294821:
mav [Mon, 21 Mar 2016 00:07:56 +0000 (00:07 +0000)]
MFC r295125: MFV r294821:
6529 Properly handle updates of variably-sized SA entries.

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Ned Bass <bass6@llnl.gov>
Reviewed by: Tim Chase <tim@chase2k.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Andriy Gapon <avg@icyb.net.ua>

illumos/illumos-gate@e7e978b1f75353cb29673af9b35453c20c2827bf

During the update process in sa_modify_attrs(), the sizes of existing
variably-sized SA entries are obtained from sa_lengths[]. The case where
a variably-sized SA was being replaced neglected to increment the index
into sa_lengths[], so subsequent variable-length SAs would be rewritten
with the wrong length. This patch adds the missing increment operation
so all variably-sized SA entries are stored with their correct lengths.

Another problem was that index into attr_desc[] was increased even when
an attribute was removed. If that attribute was not the last attribute,
then the last attribute was lost.

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

8 years agoMFC r295047: MFV 295046:
mav [Mon, 21 Mar 2016 00:06:42 +0000 (00:06 +0000)]
MFC r295047: MFV 295046:
6358 A faulted pool with only unavailable vdevs triggers assertion
failure in libzfs

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: Serban Maduta <serban.maduta@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Dan Vatca <dan.vatca@gmail.com>

illumos/illumos-gate@b289d045e084af53efcc025255af8242e41f28fa

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

8 years agoMFC r294820: MFV r294819: 6495 Fix mutex leak in dmu_objset_find_dp
mav [Mon, 21 Mar 2016 00:04:53 +0000 (00:04 +0000)]
MFC r294820: MFV r294819: 6495 Fix mutex leak in dmu_objset_find_dp

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Albert Lee <trisk@omniti.com>
Author: Steven Hartland <steven.hartland@multiplay.co.uk>

illumos/illumos-gate@2bad22584defe4667f99737e3158d336e4dcca11

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

8 years agoMFC r294817: MFV r294816:
mav [Mon, 21 Mar 2016 00:03:55 +0000 (00:03 +0000)]
MFC r294817: MFV r294816:
4986 receiving replication stream fails if any snapshot exceeds refquota

Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gordon.ross@nexenta.com>
Author: Dan McDonald <danmcd@omniti.com>

illumos/illumos-gate@5878fad70d76d8711f6608c1f80b0447601261c6

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

8 years agoMFC r294815: MFV r294814: 6393 zfs receive a full send as a clone
mav [Mon, 21 Mar 2016 00:01:59 +0000 (00:01 +0000)]
MFC r294815: MFV r294814: 6393 zfs receive a full send as a clone

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Paul Dagnelie <pcd@delphix.com>

illumos/illumos-gate@68ecb2ec930c4b0f00acaf8e0abb2b19c4b8b76f

This allows to do a full (non-incremental send) and receive it as a clone
of an existing dataset. It can leverage nopwrite to share blocks with the
origin. This can be used to change the relationship of datasets on the
target. For example, maybe on the source you have:

A ---- B ---- C

And you have sent to the target a full of B, and the incremental B->C:

B ---- C

You later realize that you want to have A on the target. You will have to
do a full send of A, but nopwrite can save you space on the target if you
receive it as a clone of B, assuming that A and B have some blocks inxi
common:

B ---- C
 \
  A

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

8 years agoMFC r294813: MFV r294812:
mav [Sun, 20 Mar 2016 23:58:44 +0000 (23:58 +0000)]
MFC r294813: MFV r294812:
6434 sa_find_sizes() may compute wrong SA header size

Reviewed-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Andriy Gapon <avg@freebsd.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: James Pan <jiaming.pan@yahoo.com>

illumos/illumos-gate@3502ed6e7cb3f3d2e781960ab8fe465fdc884834

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

8 years agoMFC r294811: MFV r294810: 6414 vdev_config_sync could be simpler
mav [Sun, 20 Mar 2016 23:57:46 +0000 (23:57 +0000)]
MFC r294811: MFV r294810: 6414 vdev_config_sync could be simpler

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Will Andrews <will@firepipe.net>

illumos/illumos-gate@eb5bb58421f46cee79155a55688e6c675e7dd361

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

8 years agoMFC r294809: MFV r294808:
mav [Sun, 20 Mar 2016 23:56:59 +0000 (23:56 +0000)]
MFC r294809: MFV r294808:
6421 Add missing multilist_destroy calls to arc_fini

Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Jorgen Lundman <lundman@lundman.net>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Prakash Surya <prakash.surya@delphix.com>

illumos/illumos-gate@57deb2328260c447bf1db25fe74e0eece102733e

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

8 years agoMFC r294807: MFV r294806:
mav [Sun, 20 Mar 2016 23:56:02 +0000 (23:56 +0000)]
MFC r294807: MFV r294806:
6388 Failure of userland copy should return EFAULT

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Richard Yao <ryao@gentoo.org>

illumos/illumos-gate@c71c00bbe8a9cdc7e3f4048b751f48e80441d506

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

8 years agoMFC r294805: MFV r294804:
mav [Sun, 20 Mar 2016 23:54:59 +0000 (23:54 +0000)]
MFC r294805: MFV r294804:
6386 Fix function call with uninitialized value in vdev_inuse

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Richard Yao <ryao@gentoo.org>

illumos/illumos-gate@5bdd995ddb777f538bfbcc5e2d5ff1bed07ae56e

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

8 years agoMFC r294803: MFV r294802: 6334 Cannot unlink files when over quota
mav [Sun, 20 Mar 2016 23:54:05 +0000 (23:54 +0000)]
MFC r294803: MFV r294802: 6334 Cannot unlink files when over quota

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Simon Klinkert <simon.klinkert@gmail.com>

illumos/illumos-gate@6575bca01367958c7237253d88e5fa9ef0b1650a

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

8 years agoMFC r294801: MFV r294800: 6385 Fix unlocking order in zfs_zget
mav [Sun, 20 Mar 2016 23:52:45 +0000 (23:52 +0000)]
MFC r294801: MFV r294800: 6385 Fix unlocking order in zfs_zget

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Andriy Gapon <avg@freebsd.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Richard Yao <ryao@gentoo.org>

illumos/illumos-gate@eaef6a96de3f6afbbccc69bd7a0aed4463689d0a

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

8 years agoMFC r294799: MFV r294798:
mav [Sun, 20 Mar 2016 23:51:56 +0000 (23:51 +0000)]
MFC r294799: MFV r294798:
6292 exporting a pool while an async destroy is running can leave entries
in the deferred tree

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Reviewed by: Fabian Keil <fk@fabiankeil.de>
Approved by: Gordon Ross <gordon.ross@nexenta.com>

illumos/illumos-gate@a443cc80c742af740aa82130db840f02b4389365

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

8 years agoMFC r294797: MFV r294796:
mav [Sun, 20 Mar 2016 23:51:11 +0000 (23:51 +0000)]
MFC r294797: MFV r294796:
6319 assertion failed in zio_ddt_write: bp->blk_birth == txg

Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Dan McDonald <danmcd@omniti.com>

illumos/illumos-gate@b39b744be78c6327db43c1f69d11c2f5909f73cb

This is revert of 5693.

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

8 years agoMFC r294794: MFV r294793:
mav [Sun, 20 Mar 2016 23:49:58 +0000 (23:49 +0000)]
MFC r294794: MFV r294793:
6367 spa_config_tryenter incorrectly handles the multiple-lock case

Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Prashanth Sreenivasa <prashksp@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Steven Hartland <steven.hartland@multiplay.co.uk>
Approved by: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@e495b6e6735b803e422025a630352ef9bba788c5

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

8 years agoMFC r294625 (by trasz):
mav [Sun, 20 Mar 2016 23:48:26 +0000 (23:48 +0000)]
MFC r294625 (by trasz):
Fix ru_oublocks accounting for ZFS. There are two code paths that can be
called from zfs_write() - one of them, through dmu_write(), was handled
correctly; the other wasn't.

Differential Revision:  https://reviews.freebsd.org/D4923

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

8 years agoMFC r293677 (by asomers): Record physical path information in ZFS Vdevs
mav [Sun, 20 Mar 2016 23:43:26 +0000 (23:43 +0000)]
MFC r293677 (by asomers): Record physical path information in ZFS Vdevs

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c:
        If available, record the physical path of a vdev in ZFS meta-data.
        Do this both when opening the vdev, and when receiving an attribute
        change notification from GEOM.

        Make vdev_geom_close() synchronous instead of deferring its work to
        a GEOM event handler. There is no benefit to deferring the work and
        this prevents a future open call from referencing a consumer that is
        scheduled for destruction. The close followed by an immediate open
        will occur during a vdev reprobe triggered by any type of I/O error.

        Consolidate vdev_geom_close() and vdev_geom_detach() into
        vdev_geom_close() and vdev_geom_close_locked(). This also moves the
        cross linking operations between vdev and GEOM consumer into a
        single place (linking in vdev_geom_attach() and unlinking in
        vdev_geom_close_locked()).

Differential Revision:  https://reviews.freebsd.org/D4524

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

8 years agoMFC r292653 (by bapt): Report an error if zdb cannot initialize zfs
mav [Sun, 20 Mar 2016 23:29:58 +0000 (23:29 +0000)]
MFC r292653 (by bapt): Report an error if zdb cannot initialize zfs

If the zfs module is not present and not loadable, report an error
to the user instead of crashing

Differential Revision:  https://reviews.freebsd.org/D4691

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

8 years agoMFC r291637 (by bdrewery): Fix the build for non-amd64.
mav [Sun, 20 Mar 2016 23:26:52 +0000 (23:26 +0000)]
MFC r291637 (by bdrewery): Fix the build for non-amd64.

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

8 years agoMFC r290266 (by avg):
mav [Sun, 20 Mar 2016 23:20:16 +0000 (23:20 +0000)]
MFC r290266 (by avg):
zfs: allow the lookup of extended attributes of an unlinked file

That's required for extattr_get_fd(2) and the like to work properly.

PR: 203201

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

8 years agoMFC r274627 (by avg):
mav [Sun, 20 Mar 2016 20:37:26 +0000 (20:37 +0000)]
MFC r274627 (by avg):
Revert r269093 which introduced physical zio alignment transform

Size of physical ZIOs must never be implicitly adjusted, it's
a responsibility of a caller to make sure that such a ZIO has proper offset
and size.

Discussed with: delphij, gibbs

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

8 years agoMFV r258597 (by pjd):
mav [Sun, 20 Mar 2016 20:33:03 +0000 (20:33 +0000)]
MFV r258597 (by pjd):
When append-only, immutable or read-only flag is set don't allow for
hard links creation. This matches UFS behaviour.

Reported by:    Oleg Ginzburg <olevole@olevole.ru>

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

8 years agoMFC r262990: MFV r262983:
mav [Sun, 20 Mar 2016 20:31:30 +0000 (20:31 +0000)]
MFC r262990: MFV r262983:

4638 Panic in ZFS via rfs3_setattr()/rfs3_write(): dirtying snapshot!

illumos/illumos-gate@2144b121c08e0eb676cc6ca4662ebbc9f9c22fe3

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

8 years agoMFC r272359 (by will):
mav [Sun, 20 Mar 2016 20:27:52 +0000 (20:27 +0000)]
MFC r272359 (by will):
zfsvfs_create(): Refuse to mount datasets whose names are too long.

This is checked for in the zfs_snapshot_004_neg STF/ATF test (currently
still in projects/zfsd rather than head).

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c:
- zfsvfs_create(): Check whether the objset name fits into
  statfs.f_mntfromname, and return ENAMETOOLONG if not.  Although
  the filesystem can be unmounted via the umount(8) command, any
  interface that relies on iterating on statfs (e.g. libzfs) will
  fail to find the filesystem by its objset name, and thus assume
  it's not mounted.  This causes "zfs unmount", "zfs destroy",
  etc. to fail on these filesystems, whether or not -f is passed.

MFSpectraBSD:   974872 on 2013/08/09

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