<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/include, branch zfs-0.6.4</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>Mark all ZPL and ioctl functions as PF_FSTRANS</title>
<updated>2015-04-03T18:38:59+00:00</updated>
<author>
<name>Tim Chase</name>
<email>tim@chase2k.com</email>
</author>
<published>2015-03-31T03:43:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=40d06e3c78c23b199dfd9284809e710fab549391'/>
<id>40d06e3c78c23b199dfd9284809e710fab549391</id>
<content type='text'>
Prevent deadlocks by disabling direct reclaim during all ZPL and ioctl
calls as well as the l2arc and adapt ARC threads.

This obviates the need for MUTEX_FSTRANS so its previous uses and
definition have been eliminated.

Signed-off-by: Tim Chase &lt;tim@chase2k.com&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #3225
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prevent deadlocks by disabling direct reclaim during all ZPL and ioctl
calls as well as the l2arc and adapt ARC threads.

This obviates the need for MUTEX_FSTRANS so its previous uses and
definition have been eliminated.

Signed-off-by: Tim Chase &lt;tim@chase2k.com&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #3225
</pre>
</div>
</content>
</entry>
<entry>
<title>Illumos 5695 - dmu_sync'ed holes do not retain birth time</title>
<updated>2015-03-27T21:51:34+00:00</updated>
<author>
<name>Prakash Surya</name>
<email>prakash.surya@delphix.com</email>
</author>
<published>2015-03-27T02:03:22+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a4069eef2e403a3b2a307b23b7500e2adc6ecae5'/>
<id>a4069eef2e403a3b2a307b23b7500e2adc6ecae5</id>
<content type='text'>
5695 dmu_sync'ed holes do not retain birth time
Reviewed by: Matthew Ahrens &lt;mahrens@delphix.com&gt;
Reviewed by: George Wilson &lt;george@delphix.com&gt;
Reviewed by: Christopher Siden &lt;christopher.siden@delphix.com&gt;
Reviewed by: Bayard Bell &lt;buffer.g.overflow@gmail.com&gt;
Approved by: Dan McDonald &lt;danmcd@omniti.com&gt;

References:
  https://www.illumos.org/issues/5695
  https://github.com/illumos/illumos-gate/commit/70163ac

Ported-by: Chris Dunlop &lt;chris@onthe.net.au&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #3229
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
5695 dmu_sync'ed holes do not retain birth time
Reviewed by: Matthew Ahrens &lt;mahrens@delphix.com&gt;
Reviewed by: George Wilson &lt;george@delphix.com&gt;
Reviewed by: Christopher Siden &lt;christopher.siden@delphix.com&gt;
Reviewed by: Bayard Bell &lt;buffer.g.overflow@gmail.com&gt;
Approved by: Dan McDonald &lt;danmcd@omniti.com&gt;

References:
  https://www.illumos.org/issues/5695
  https://github.com/illumos/illumos-gate/commit/70163ac

Ported-by: Chris Dunlop &lt;chris@onthe.net.au&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #3229
</pre>
</div>
</content>
</entry>
<entry>
<title>Add NULL guard in zfs_zrlock_class event class</title>
<updated>2015-03-27T21:45:32+00:00</updated>
<author>
<name>Ned Bass</name>
<email>bass6@llnl.gov</email>
</author>
<published>2015-03-25T00:22:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=95a6990d9a77a56eb97b76f2880f95f0f42f4fe0'/>
<id>95a6990d9a77a56eb97b76f2880f95f0f42f4fe0</id>
<content type='text'>
The owner field could be NULL in some cases, so add a guard.  Shorten
__entry field names to fit assignment statements in 80 columns.

Signed-off-by: Ned Bass &lt;bass6@llnl.gov&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Fixes #3220
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The owner field could be NULL in some cases, so add a guard.  Shorten
__entry field names to fit assignment statements in 80 columns.

Signed-off-by: Ned Bass &lt;bass6@llnl.gov&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Fixes #3220
</pre>
</div>
</content>
</entry>
<entry>
<title>Check all vdev labels in 'zpool import'</title>
<updated>2015-03-25T21:52:52+00:00</updated>
<author>
<name>Brian Behlendorf</name>
<email>behlendorf1@llnl.gov</email>
</author>
<published>2015-03-20T22:10:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7d90f569b3f05def7cbd0a52ce8ac3040364d702'/>
<id>7d90f569b3f05def7cbd0a52ce8ac3040364d702</id>
<content type='text'>
When using 'zpool import' to scan for available pools prefer vdev names
which reference vdevs with more valid labels.  There should be two labels
at the start of the device and two labels at the end of the device.  If
labels are missing then the device has been damaged or is in some other
way incomplete.  Preferring names with fully intact labels helps weed out
bad paths and improves the likelihood of being able to import the pool.

This behavior only applies when scanning /dev/ for valid pools.  If a
cache file exists the pools described by the cache file will be used.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Signed-off-by: Chris Dunlap &lt;cdunlap@llnl.gov&gt;
Closes #3145
Closes #2844
Closes #3107
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using 'zpool import' to scan for available pools prefer vdev names
which reference vdevs with more valid labels.  There should be two labels
at the start of the device and two labels at the end of the device.  If
labels are missing then the device has been damaged or is in some other
way incomplete.  Preferring names with fully intact labels helps weed out
bad paths and improves the likelihood of being able to import the pool.

This behavior only applies when scanning /dev/ for valid pools.  If a
cache file exists the pools described by the cache file will be used.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Signed-off-by: Chris Dunlap &lt;cdunlap@llnl.gov&gt;
Closes #3145
Closes #2844
Closes #3107
</pre>
</div>
</content>
</entry>
<entry>
<title>Reduce size of zfs_sb_t: allocate z_hold_mtx separately</title>
<updated>2015-03-24T20:17:44+00:00</updated>
<author>
<name>Chris Dunlop</name>
<email>chris@onthe.net.au</email>
</author>
<published>2015-03-16T01:21:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d07b7c7f210e3f92775ad93a7306812edf524bfc'/>
<id>d07b7c7f210e3f92775ad93a7306812edf524bfc</id>
<content type='text'>
zfs_sb_t has grown to the point where using kmem_zalloc() for allocations
is triggering the 32k warning threshold.

We can't safely convert this entire allocation to use vmem_alloc() instead
of kmem_alloc() because the backing_dev_info structure is embedded here.
It depends on the bit_waitqueue() function which won't behave properly
when given a virtual address.

Instead, use vmem_alloc() to allocate the z_hold_mtx array separately.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Signed-off-by: Chris Dunlop &lt;chris@onthe.net.au&gt;
Closes #3178
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
zfs_sb_t has grown to the point where using kmem_zalloc() for allocations
is triggering the 32k warning threshold.

We can't safely convert this entire allocation to use vmem_alloc() instead
of kmem_alloc() because the backing_dev_info structure is embedded here.
It depends on the bit_waitqueue() function which won't behave properly
when given a virtual address.

Instead, use vmem_alloc() to allocate the z_hold_mtx array separately.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Signed-off-by: Chris Dunlop &lt;chris@onthe.net.au&gt;
Closes #3178
</pre>
</div>
</content>
</entry>
<entry>
<title>Restructure per-filesystem reclaim</title>
<updated>2015-03-20T17:35:20+00:00</updated>
<author>
<name>Brian Behlendorf</name>
<email>behlendorf1@llnl.gov</email>
</author>
<published>2015-03-17T22:07:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=2cbb06b561f500732de2214eb590149d0c4f3cf5'/>
<id>2cbb06b561f500732de2214eb590149d0c4f3cf5</id>
<content type='text'>
Originally when the ARC prune callback was introduced the idea was
to register a single callback for the ZPL.  The ARC could invoke this
call back if it needed the ZPL to drop dentries, inodes, or other
cache objects which might be pinning buffers in the ARC.  The ZPL
would iterate over all ZFS super blocks and perform the reclaim.

For the most part this design has worked well but due to limitations
in 2.6.35 and earlier kernels there were some problems.  This patch
is designed to address those issues.

1) iterate_supers_type() is not provided by all kernels which makes
it impossible to safely iterate over all zpl_fs_type filesystems in
a single callback.  The most straight forward and portable way to
resolve this is to register a callback per-filesystem during mount.
The arc_*_prune_callback() functions have always supported multiple
callbacks so this is functionally a very small change.

2) Commit 050d22b removed the non-portable shrink_dcache_memory()
and shrink_icache_memory() functions and didn't replace them with
equivalent functionality.  This meant that for Linux 3.1 and older
kernels the ARC had no mechanism to drop dentries and inodes from
the caches if needed.  This patch adds that missing functionality
by calling shrink_dcache_parent() to release dentries which may be
pinning inodes.  This will result in all unused cache entries being
dropped which is a bit heavy handed but it's the only interface
available for old kernels.

3) A zpl_drop_inode() callback is registered for kernels older than
2.6.35 which do not support the .evict_inode callback.  This ensures
that when the last reference on an inode is dropped it is immediately
removed from the cache.  If this isn't done than inode can end up on
the global unused LRU with no mechanism available to ZFS to drop them.
Since the ARC buffers are not dropped the hottest inodes can still
be recreated without performing disk IO.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Signed-off-by: Pavel Snajdr &lt;snajpa@snajpa.net&gt;
Issue #3160
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Originally when the ARC prune callback was introduced the idea was
to register a single callback for the ZPL.  The ARC could invoke this
call back if it needed the ZPL to drop dentries, inodes, or other
cache objects which might be pinning buffers in the ARC.  The ZPL
would iterate over all ZFS super blocks and perform the reclaim.

For the most part this design has worked well but due to limitations
in 2.6.35 and earlier kernels there were some problems.  This patch
is designed to address those issues.

1) iterate_supers_type() is not provided by all kernels which makes
it impossible to safely iterate over all zpl_fs_type filesystems in
a single callback.  The most straight forward and portable way to
resolve this is to register a callback per-filesystem during mount.
The arc_*_prune_callback() functions have always supported multiple
callbacks so this is functionally a very small change.

2) Commit 050d22b removed the non-portable shrink_dcache_memory()
and shrink_icache_memory() functions and didn't replace them with
equivalent functionality.  This meant that for Linux 3.1 and older
kernels the ARC had no mechanism to drop dentries and inodes from
the caches if needed.  This patch adds that missing functionality
by calling shrink_dcache_parent() to release dentries which may be
pinning inodes.  This will result in all unused cache entries being
dropped which is a bit heavy handed but it's the only interface
available for old kernels.

3) A zpl_drop_inode() callback is registered for kernels older than
2.6.35 which do not support the .evict_inode callback.  This ensures
that when the last reference on an inode is dropped it is immediately
removed from the cache.  If this isn't done than inode can end up on
the global unused LRU with no mechanism available to ZFS to drop them.
Since the ARC buffers are not dropped the hottest inodes can still
be recreated without performing disk IO.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Signed-off-by: Pavel Snajdr &lt;snajpa@snajpa.net&gt;
Issue #3160
</pre>
</div>
</content>
</entry>
<entry>
<title>Illumos 5630 - stale bonus buffer in recycled dnode_t leads to data corruption</title>
<updated>2015-03-12T22:40:39+00:00</updated>
<author>
<name>Justin T. Gibbs</name>
<email>justing@spectralogic.com</email>
</author>
<published>2015-03-12T00:10:35+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4c7b7eedcde7fababf457ca04445e6d9d1617e29'/>
<id>4c7b7eedcde7fababf457ca04445e6d9d1617e29</id>
<content type='text'>
5630 stale bonus buffer in recycled dnode_t leads to data corruption
Author: Justin T. Gibbs &lt;justing@spectralogic.com&gt;
Reviewed by: Matthew Ahrens &lt;mahrens@delphix.com&gt;
Reviewed by: George Wilson &lt;george@delphix.com&gt;
Reviewed by: Will Andrews &lt;will@freebsd.org&gt;
Approved by: Robert Mustacchi &lt;rm@joyent.com&gt;

References:
  https://www.illumos.org/issues/5630
  https://github.com/illumos/illumos-gate/commit/cd485b4

Ported-by: Chris Dunlop &lt;chris@onthe.net.au&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Signed-off-by: Richard Yao &lt;ryao@gentoo.org&gt;
Issue #3172
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
5630 stale bonus buffer in recycled dnode_t leads to data corruption
Author: Justin T. Gibbs &lt;justing@spectralogic.com&gt;
Reviewed by: Matthew Ahrens &lt;mahrens@delphix.com&gt;
Reviewed by: George Wilson &lt;george@delphix.com&gt;
Reviewed by: Will Andrews &lt;will@freebsd.org&gt;
Approved by: Robert Mustacchi &lt;rm@joyent.com&gt;

References:
  https://www.illumos.org/issues/5630
  https://github.com/illumos/illumos-gate/commit/cd485b4

Ported-by: Chris Dunlop &lt;chris@onthe.net.au&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Signed-off-by: Richard Yao &lt;ryao@gentoo.org&gt;
Issue #3172
</pre>
</div>
</content>
</entry>
<entry>
<title>Use cached feature info in spa_add_feature_stats()</title>
<updated>2015-03-05T22:11:10+00:00</updated>
<author>
<name>Ned Bass</name>
<email>bass6@llnl.gov</email>
</author>
<published>2015-02-26T20:24:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=417104bdd3c7ce07ec58674dd078f9891c3bc780'/>
<id>417104bdd3c7ce07ec58674dd078f9891c3bc780</id>
<content type='text'>
Avoid issuing I/O to the pool when retrieving feature flags information.
Trying to read the ZAPs from disk means that zpool clear would hang if
the pool is suspended and recovery would require a reboot. To keep the
feature stats resident in memory, we hang a cached nvlist off of the
spa.  It is built up from disk the first time spa_add_feature_stats() is
called, and refreshed thereafter using the cached feature reference
counts. spa_add_feature_stats() gets called at pool import time so we
can be sure the cached nvlist will be available if the pool is later
suspended.

Signed-off-by: Ned Bass &lt;bass6@llnl.gov&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #3082
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoid issuing I/O to the pool when retrieving feature flags information.
Trying to read the ZAPs from disk means that zpool clear would hang if
the pool is suspended and recovery would require a reboot. To keep the
feature stats resident in memory, we hang a cached nvlist off of the
spa.  It is built up from disk the first time spa_add_feature_stats() is
called, and refreshed thereafter using the cached feature reference
counts. spa_add_feature_stats() gets called at pool import time so we
can be sure the cached nvlist will be available if the pool is later
suspended.

Signed-off-by: Ned Bass &lt;bass6@llnl.gov&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #3082
</pre>
</div>
</content>
</entry>
<entry>
<title>Linux 4.0 compat: bdi_setup_and_register()</title>
<updated>2015-03-03T18:49:45+00:00</updated>
<author>
<name>Brian Behlendorf</name>
<email>behlendorf1@llnl.gov</email>
</author>
<published>2015-02-28T00:09:52+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8c45def24a5c640a3b44ce38cc3482b9c89a3b1d'/>
<id>8c45def24a5c640a3b44ce38cc3482b9c89a3b1d</id>
<content type='text'>
The 'capabilities' argument which was passed to bdi_setup_and_register()
has been removed.  File systems should no longer pass BDI_CAP_MAP_COPY.
For our purposes this means there are now three different interfaces
which must be handled.  A zpl_bdi_setup_and_register() wrapper function
has been introduced to provide a single interface to the ZPL code.

* 2.6.32 - 2.6.33, bdi_setup_and_register() is not exported.
* 2.6.34 - 3.19, bdi_setup_and_register() takes 3 arguments.
* 4.0 - x.y, bdi_setup_and_register() takes 2 arguments.

I've also taken this opportunity to remove HAVE_BDI because kernels
older then 2.6.32 are no longer supported.  All kernels newer than
this will have one of the above interfaces.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Signed-off-by: Chunwei Chen &lt;tuxoko@gmail.com&gt;
Closes #3128
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The 'capabilities' argument which was passed to bdi_setup_and_register()
has been removed.  File systems should no longer pass BDI_CAP_MAP_COPY.
For our purposes this means there are now three different interfaces
which must be handled.  A zpl_bdi_setup_and_register() wrapper function
has been introduced to provide a single interface to the ZPL code.

* 2.6.32 - 2.6.33, bdi_setup_and_register() is not exported.
* 2.6.34 - 3.19, bdi_setup_and_register() takes 3 arguments.
* 4.0 - x.y, bdi_setup_and_register() takes 2 arguments.

I've also taken this opportunity to remove HAVE_BDI because kernels
older then 2.6.32 are no longer supported.  All kernels newer than
this will have one of the above interfaces.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Signed-off-by: Chunwei Chen &lt;tuxoko@gmail.com&gt;
Closes #3128
</pre>
</div>
</content>
</entry>
<entry>
<title>Use MUTEX_FSTRANS mutex type</title>
<updated>2015-03-03T18:46:40+00:00</updated>
<author>
<name>Brian Behlendorf</name>
<email>behlendorf1@llnl.gov</email>
</author>
<published>2015-02-26T23:29:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4ec15b8dcf8038aeb15c7877c50d0fa500b468c6'/>
<id>4ec15b8dcf8038aeb15c7877c50d0fa500b468c6</id>
<content type='text'>
There are regions in the ZFS code where it is desirable to be able
to be set PF_FSTRANS while a specific mutex is held.  The ZFS code
could be updated to set/clear this flag in all the correct places,
but this is undesirable for a few reasons.

1) It would require changes to a significant amount of the ZFS
   code.  This would complicate applying patches from upstream.

2) It would be easy to accidentally miss a critical region in
   the initial patch or to have an future change introduce a
   new one.

Both of these concerns can be addressed by using a new mutex type
which is responsible for managing PF_FSTRANS, support for which was
added to the SPL in commit zfsonlinux/spl@9099312 - Merge branch
'kmem-rework'.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Signed-off-by: Tim Chase &lt;tim@chase2k.com&gt;
Closes #3050
Closes #3055
Closes #3062
Closes #3132
Closes #3142
Closes #2983
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are regions in the ZFS code where it is desirable to be able
to be set PF_FSTRANS while a specific mutex is held.  The ZFS code
could be updated to set/clear this flag in all the correct places,
but this is undesirable for a few reasons.

1) It would require changes to a significant amount of the ZFS
   code.  This would complicate applying patches from upstream.

2) It would be easy to accidentally miss a critical region in
   the initial patch or to have an future change introduce a
   new one.

Both of these concerns can be addressed by using a new mutex type
which is responsible for managing PF_FSTRANS, support for which was
added to the SPL in commit zfsonlinux/spl@9099312 - Merge branch
'kmem-rework'.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Signed-off-by: Tim Chase &lt;tim@chase2k.com&gt;
Closes #3050
Closes #3055
Closes #3062
Closes #3132
Closes #3142
Closes #2983
</pre>
</div>
</content>
</entry>
</feed>
