1328 Commits

Author SHA1 Message Date
ngie
6e64ecac94 MFC r300870,r300884:
r300870:

Unbreak the zfs(4) build

vm/vm_pageout.h grew a dependency on the bool typedef in r300865

arc.c didn't include sys/types.h, which included the definition for the typedef

Other items (ofed, drm2) might need to be chased for this commit.

Pointyhat to: alc

r300884:

Fix up r300870

The sys/types.h fix I proposed was only tested with zfs(4), not with
libzpool, which is where the build failure actually existed

Remove vm/vm_pageout.h from arc.c and zfs_vnops.c because they're both
unneeded

In collaboration with: kib
2016-06-08 20:47:25 +00:00
ngie
e3659f0f83 MFC r299657:
Include arpa/inet.h to get the htonl(3) definition
2016-06-08 13:21:17 +00:00
avg
91eaa1e181 MFC r300024: zfs_ioc_rename: fix a reversed condition
PR:		209093
2016-05-23 07:15:23 +00:00
avg
c97f6b764e MFC r297848: l2arc: make sure that all writes honor ashift of a cache device
Note: no MFC stable/9 because it has become quite out of date with head,
so the merge would be quite labourious and, thus, risky.
2016-05-17 08:43:50 +00:00
avg
cc2f720172 MFC r298106: zfs_rezget: z_vnode can not be NULL if zp is valid 2016-05-17 08:31:46 +00:00
avg
5e400ac62b MFC r298473,298787: add invpcid, fix sahf/lahf in dtrace disassembler 2016-05-17 08:24:06 +00:00
avg
df87d42ca9 MFC r298472: MFV r298471: 6052 decouple lzc_create() from the
implementation details
2016-05-17 08:20:10 +00:00
asomers
bb22f56baf MFC r298072
Don't corrupt ZFS label's physpath attribute when booting while a disk is
missing

Prior to this change, vdev_geom_open_by_path would call vdev_geom_attach
prior to verifying the device's GUIDs.  vdev_geom_attach calls
vdev_geom_attrchange to set the physpath in the vdev object.  The result is
that if the disk could not be found, then the labels for other disks in the
same TLD would overwrite the missing disk's physpath with the physpath of
whichever disk currently has the same devname as the missing one used to
have.
2016-05-16 17:23:57 +00:00
asomers
485eaa4a1c MFC r297986, r298017 to vdev_geom.c
r297986 | asomers | 2016-04-14 13:20:31 -0600 (Thu, 14 Apr 2016) | 6 lines

Update a debugging message in vdev_geom_open_by_guids for consistency with
similar messages elsewhere in the file.

r298017 | asomers | 2016-04-14 17:14:41 -0600 (Thu, 14 Apr 2016) | 8 lines

Add more debugging statements in vdev_geom.c

Log a debugging message whenever geom functions fail in vdev_geom_attach.
Printing these messages is controlled by vfs.zfs.debug
2016-05-12 15:31:58 +00:00
mav
88ee565882 MFC r297832: MFV r297831: 6322 ZFS indirect block predictive prefetch
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Author: Alexander Motin <mav@FreeBSD.org>

Improve speculative prefetch of indirect blocks.

Scalability of many operations on wide ZFS pool can be limited by
requirement to prefetch indirect blocks first.  Recently added
asynchronous indirect block read partially helped, but did not
solve the problem completely.  This patch extends existing prefetcher
functionality to explicitly work with indirect blocks.

Before this change prefetcher issued reads for up to 8MB of data in
advance.  With this change it also issues indirect block reads
for up to 64MB of data in advance, so that when it will be time to
actually read those data, it can be done immediately.  Alike effect
can be achieved by just increasing maximal data prefetch distance,
but at higher memory cost.

Also this change introduces indirect block prefetch for rewrite
operations, that was never done before.  Previously ARC miss for
Indirect blocks regularly blocked rewrites, converting perfectly
aligned asynchronous operations into synchronous read-write pairs,
significantly reducing maximal rewrite speed.

While being there this issue was also fixed:
 - prefetch was done always, even if caching for the dataset was
completely disabled.

Testing on FreeBSD with zvol on top of 6x striped 2x mirrored pool
of 12 assorted HDDs shown me such performance numbers:
------- BEFORE --------
Write       491363677 bytes/sec
Read        312430631 bytes/sec
Rewrite      97680464 bytes/sec
-------- AFTER --------
Write       493524146 bytes/sec
Read        438598079 bytes/sec
Rewrite     277506044 bytes/sec

Closes #65
Closes #80

openzfs/openzfs@792fd28ac0
2016-05-11 11:35:37 +00:00
mav
7906fccfff MFC r297509: MFV r297506: 6738 zfs send stream padding needs documentation
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Eli Rosenthal <eli.rosenthal@delphix.com>

illumos/illumos-gate@c20404ff77
2016-05-11 11:32:38 +00:00
mav
3815e6354a MFC r297507: MFV r297504:
6681 zfs list burning lots of time in dodefault() via dsl_prop_*

Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author: Alex Wilson <alex.wilson@joyent.com>

illumos/illumos-gate@d09e4475f6
2016-05-11 11:31:51 +00:00
mav
fa7200b98d MFC r297763: MFV r297760: 6418 zpool should have a label clearing command
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Author: Will Andrews <will@firepipe.net>

Closes #83
Closes #32

openzfs/openzfs@9663688425

FreeBSD already had `zpool labelclear` functionality, so this is mostly
just a diff reduction.
2016-05-11 11:24:59 +00:00
asomers
2dcc4d752a MFC 297868
Fix rare double free in vdev_geom_attrchanged

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
        Don't drop the g_topology_lock before freeing old_physpath. That
        opens up a race where one thread can call vdev_geom_attrchanged,
        set old_physpath, drop the g_topology_lock, then block trying to
        acquire the SCL_STATE lock. Then another thread can come into
        vdev_geom_attrchanged, set old_physpath to the same value, and
        proceed to free it. When the first thread resumes, it will free
        the same location.

        It turns out that the SCL_STATE lock isn't needed. It was
        originally added by gibbs to protect vd->vdev_physpath while
        updating the same. However, the update process subsequently was
        switched to an atomic operation (a pointer swap). Now, there is
        no need for the SCL_STATE lock, and hence no need to drop the
        g_topology_lock.
2016-05-10 16:49:50 +00:00
markj
1708fafa25 MFC r298589:
Allow DOF sections with excessively long probe function components.

PR:	207735
2016-05-09 17:13:40 +00:00
avg
246db7e3b0 MFC r297812: zio: align use of "no dump" flag between use_uma and !use_uma cases 2016-05-04 11:40:13 +00:00
markj
34e507b326 MFC r296479:
Fix fasttrap tracepoint locking.
2016-05-03 20:08:05 +00:00
markj
324b497d7e MFC r297771:
Initialize SDT probes during SI_SUB_DTRACE_PROVIDER.
2016-05-03 19:42:58 +00:00
avg
9346083f1b MFC r297513: remove emulation of VFS_HOLD and VFS_RELE from opensolaris compat 2016-04-24 08:39:55 +00:00
avg
51f599208d MFC r297709: zio write issue threads should have lower (numerically
greater) priority
2016-04-22 12:48:53 +00:00
mav
5a7f6237bc MFC r297672: Alike to r293708 relax pool check in vdev_geom_open_by_path().
This made impossible spare disk open by known path, which kind of worked
only because the same fix was applied to vdev_geom_attach_by_guids() in
r293708.
2016-04-14 09:10:09 +00:00
mav
281ccdd8d1 MFC r297421: Plug open count leak on zvol rename. 2016-04-04 09:50:28 +00:00
mav
2bf9d9f911 MFC r297420: Switch from using make_dev_p() to make_dev_s() to close races. 2016-04-04 09:49:45 +00:00
mav
2eb569b386 MFC r297337: Pass through error code from make_dev_p().
ENAMETOOLONG is much more informative in logs then ENXIO.
2016-04-04 09:48:58 +00:00
mav
be0c6e50d7 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.
2016-04-04 09:47:39 +00:00
mav
2dae0103a3 MFC r277504 (by will): Remove commented log messages. 2016-04-04 09:36:56 +00:00
mav
3edfb33a29 MFC r277450 (by will):
Use the "zfs_gfs" tag for GFS vnodes to make them easier to identify.
2016-04-04 09:35:36 +00:00
mav
e049017c9a MFC r270382 (by delphij): MFV r270197:
Illumos issue:
    5066 remove support for non-ANSI compilation
    5068 Remove SCCSID() macro from <macros.h>
2016-04-04 09:30:57 +00:00
mav
af59995fd1 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.
2016-03-21 07:36:02 +00:00
mav
138555afff 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.
2016-03-21 00:29:00 +00:00
mav
e9114f9ca1 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.
2016-03-21 00:28:13 +00:00
mav
724960037f 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@a8f6344fa0
2016-03-21 00:22:55 +00:00
mav
18f23d7871 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@aab83bb83b
2016-03-21 00:22:09 +00:00
mav
e34c027e2e 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@971640e6aa
2016-03-21 00:20:49 +00:00
mav
ad9d624de4 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@5f7a8e6d75
2016-03-21 00:19:42 +00:00
mav
ccc1ec28f5 MFC r296519: MFV r296518: 5027 zfs large block support (add copyright)
Author: Matthew Ahrens <matt@mahrens.org>

illumos/illumos-gate@c3d26abc9e
2016-03-21 00:18:38 +00:00
mav
7ce7341950 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@880094b606
2016-03-21 00:16:42 +00:00
mav
e8c59c3978 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@38d6103674
2016-03-21 00:15:41 +00:00
mav
3d24b75fe3 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@8c04a1fa3f
2016-03-21 00:14:30 +00:00
mav
dbe6d3f59a 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@97e8130957
2016-03-21 00:13:39 +00:00
mav
9a698f756e 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.
2016-03-21 00:09:56 +00:00
mav
745a33b96e 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@e7e978b1f7

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.
2016-03-21 00:07:56 +00:00
mav
be9d2c4881 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@2bad22584d
2016-03-21 00:04:53 +00:00
mav
9f09540feb 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@5878fad70d
2016-03-21 00:03:55 +00:00
mav
fd712914d7 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@68ecb2ec93

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
2016-03-21 00:01:59 +00:00
mav
bdf1ebb4e0 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@3502ed6e7c
2016-03-20 23:58:44 +00:00
mav
220fa555b0 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@eb5bb58421
2016-03-20 23:57:46 +00:00
mav
269ad609c3 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@57deb23282
2016-03-20 23:56:59 +00:00
mav
09be69d816 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@c71c00bbe8
2016-03-20 23:56:02 +00:00
mav
70ee7f1074 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@5bdd995ddb
2016-03-20 23:54:59 +00:00