<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/config/kernel.m4, branch zfs-0.6.2</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=zfs-0.6.2</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=zfs-0.6.2'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2013-08-15T23:19:07Z</updated>
<entry>
<title>Linux 3.11 compat: fops-&gt;iterate()</title>
<updated>2013-08-15T23:19:07Z</updated>
<author>
<name>Richard Yao</name>
<email>ryao@gentoo.org</email>
</author>
<published>2013-08-07T12:53:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0f37d0c8bed442dd0d2c1b1dddd68653fa6eec66'/>
<id>urn:sha1:0f37d0c8bed442dd0d2c1b1dddd68653fa6eec66</id>
<content type='text'>
Commit torvalds/linux@2233f31aade393641f0eaed43a71110e629bb900
replaced -&gt;readdir() with -&gt;iterate() in struct file_operations.
All filesystems must now use the new -&gt;iterate method.

To handle this the code was reworked to use the new -&gt;iterate
interface.  Care was taken to keep the majority of changes
confined to the ZPL layer which is already Linux specific.
However, minor changes were required to the common zfs_readdir()
function.

Compatibility with older kernels was accomplished by adding
versions of the trivial dir_emit* helper functions.  Also the
various *_readdir() functions were reworked in to wrappers
which create a dir_context structure to pass to the new
*_iterate() functions.

Unfortunately, the new dir_emit* functions prevent us from
passing a private pointer to the filldir function.  The xattr
directory code leveraged this ability through zfs_readdir()
to generate the list of xattr names.  Since we can no longer
use zfs_readdir() a simplified zpl_xattr_readdir() function
was added to perform the same task.

Signed-off-by: Richard Yao &lt;ryao@cs.stonybrook.edu&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #1653
Issue #1591
</content>
</entry>
<entry>
<title>Fix arc_adapt() spinning in iterate_supers_type()</title>
<updated>2013-07-17T16:28:06Z</updated>
<author>
<name>Brian Behlendorf</name>
<email>behlendorf1@llnl.gov</email>
</author>
<published>2013-07-15T20:37:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=dba1d705669cf0e33091622d0e950b9459b20e2e'/>
<id>urn:sha1:dba1d705669cf0e33091622d0e950b9459b20e2e</id>
<content type='text'>
The iterate_supers_type() function which was introduced in the
3.0 kernel was supposed to provide a safe way to call an arbitrary
function on all super blocks of a specific type.  Unfortunately,
because a list_head was used a bug was introduced which made it
possible for iterate_supers_type() to get stuck spinning on a
super block which was just deactivated.

This can occur because when the list head is removed from the
fs_supers list it is reinitialized to point to itself.  If the
iterate_supers_type() function happened to be processing the
removed list_head it will get stuck spinning on that list_head.

The bug was fixed in the 3.3 kernel by converting the list_head
to an hlist_node.  However, to resolve the issue for existing
3.0 - 3.2 kernels we detect when a list_head is used.  Then to
prevent the spinning from occurring the .next pointer is set to
the fs_supers list_head which ensures the iterate_supers_type()
function will always terminate.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #1045
Closes #861
Closes #790
</content>
</entry>
<entry>
<title>3.10 API change: block_device_operations-&gt;release() returns void</title>
<updated>2013-07-08T22:41:57Z</updated>
<author>
<name>Chris Dunlop</name>
<email>chris@onthe.net.au</email>
</author>
<published>2013-06-03T06:58:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a1d9543a39942be56879ca9338078afc77c25cea'/>
<id>urn:sha1:a1d9543a39942be56879ca9338078afc77c25cea</id>
<content type='text'>
Linux kernel commit torvalds/linux@db2a144 changed the return type
of block_device_operations-&gt;release() to void.  Detect the expected
prototype and defined our callout accordingly.

Signed-off-by: Chris Dunlop &lt;chris@onthe.net.au&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #1494
</content>
</entry>
<entry>
<title>Add SEEK_DATA/SEEK_HOLE to lseek()/llseek()</title>
<updated>2013-07-02T16:24:43Z</updated>
<author>
<name>Li Dongyang</name>
<email>dongyang.li@anu.edu.au</email>
</author>
<published>2013-06-13T17:51:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=802e7b5feb0135483de119eac1da192404eb5bb7'/>
<id>urn:sha1:802e7b5feb0135483de119eac1da192404eb5bb7</id>
<content type='text'>
The approach taken was the rework zfs_holey() as little as
possible and then just wrap the code as needed to ensure
correct locking and error handling.

Tested with xfstests 285 and 286.  All tests pass except for
7-9 of 285 which try to reserve blocks first via fallocate(2)
and fail because fallocate(2) is not yet supported.

Note that the filp-&gt;f_lock spinlock did not exist prior to
Linux 2.6.30, but we avoid the need for autotools check by
virtue of the fact that SEEK_DATA/SEEK_HOLE support was not
added until Linux 3.1.

An autoconf check was added for lseek_execute() which is
currently a private function but the expectation is that it
will be exported perhaps as early as Linux 3.11.

Reviewed-by: Richard Laager &lt;rlaager@wiktel.com&gt;
Signed-off-by: Richard Yao &lt;ryao@gentoo.org&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #1384
</content>
</entry>
<entry>
<title>Ensure --with-spl-timeout waits for spl_config.h and symvers</title>
<updated>2013-05-02T22:40:44Z</updated>
<author>
<name>Carlos Alberto Lopez Perez</name>
<email>clopez@igalia.com</email>
</author>
<published>2013-04-27T18:18:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5165473737e488447edfe25209c68704e08b3a2d'/>
<id>urn:sha1:5165473737e488447edfe25209c68704e08b3a2d</id>
<content type='text'>
The previous code was only waiting for the symver file. But the
postinst target of the DKMS script for SPL will not only create
the symvers file, but also the header spl_config.h.

If we are waiting in the configure script of ZFS for the SPL
symvers file, then we also need to wait for spl_config.h.
Otherwise the configure script will abort because the spl_config.h
is not yet available.

On top of that, the function ZFS_AC_SPL_MODULE_SYMVERS is moved
to the end of the function ZFS_AC_SPL to allow both checks share
the with-spl-timeout parameter.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #1431
</content>
</entry>
<entry>
<title>build: resolve orthographic and other grammatical errors</title>
<updated>2013-04-02T17:44:52Z</updated>
<author>
<name>Jan Engelhardt</name>
<email>jengelh@inai.de</email>
</author>
<published>2013-03-30T02:27:50Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4e95cc99b029f519ec1d3fd86df2910e7cb0d156'/>
<id>urn:sha1:4e95cc99b029f519ec1d3fd86df2910e7cb0d156</id>
<content type='text'>
Signed-off-by: Jan Engelhardt &lt;jengelh@inai.de&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
</content>
</entry>
<entry>
<title>Configure --with-spl{-obj} auto-detect cleanup</title>
<updated>2013-03-13T20:42:16Z</updated>
<author>
<name>Brian Behlendorf</name>
<email>behlendorf1@llnl.gov</email>
</author>
<published>2013-02-22T23:50:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9b2af9a097c119b818bd584eb89ca51ba475c7f2'/>
<id>urn:sha1:9b2af9a097c119b818bd584eb89ca51ba475c7f2</id>
<content type='text'>
Because the install location for the spl/zfs-devel headers was
changed we need to refresh the auto-detect code.  Note that
for packaging which already explicitly calls --with-spl{-obj}
nothing has changed.

The updated code is now structured like that in ZFS_AC_KERNEL
and should be cleaner and easier to maintain.  In addition,
it's stricter about detecting a valid source and object
directory.  It requires:

* The source directory contains the file 'spl.release'
* The object directory contains the file 'spl_config.h'
* The following paths will be checked.  Notice the /var/lib/
  and /usr/src paths require that the spl and zfs version be
  matched.  This is done to prevent accidentally mixing releases.

        dnl # 1) /var/lib/dkms/spl/&lt;version&gt;/build
        dnl # 2) /usr/src/spl-&lt;version&gt;/&lt;kernel-version&gt;
        dnl # 3) /usr/src/spl-&lt;version&gt;
        dnl # 4) ../spl
        dnl # 5) /usr/src/kernels/&lt;kernel-version&gt;

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
</content>
</entry>
<entry>
<title>Remove the bio_empty_barrier() check.</title>
<updated>2013-02-24T18:22:34Z</updated>
<author>
<name>Etienne Dechamps</name>
<email>etienne@edechamps.fr</email>
</author>
<published>2013-02-24T11:22:07Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d9b0ebbe824469d178a05b0fb9004e4afce86009'/>
<id>urn:sha1:d9b0ebbe824469d178a05b0fb9004e4afce86009</id>
<content type='text'>
To determine whether the kernel is capable of handling empty barrier
BIOs, we check for the presence of the bio_empty_barrier() macro,
which was introduced in 2.6.24. If this macro is defined, then we can
flush disk vdevs; if it isn't, then flushing is disabled.

Unfortunately, the bio_empty_barrier() macro was removed in 2.6.37,
even though the kernel is still capable of handling empty barrier BIOs.

As a result, flushing is effectively disabled on kernels &gt;= 2.6.37,
meaning that starting from this kernel version, zfs doesn't use
barriers to guarantee on-disk data consistency. This is quite bad and
can lead to potential data corruption on power failures.

This patch fixes the issue by removing the configure check for
bio_empty_barrier(), as we don't support kernels &lt;= 2.6.24 anymore.

Thanks to Richard Kojedzinszky for catching this nasty bug.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #1318
</content>
</entry>
<entry>
<title>Use -Werror for all kernel configure tests.</title>
<updated>2013-02-24T18:20:28Z</updated>
<author>
<name>Etienne Dechamps</name>
<email>etienne@edechamps.fr</email>
</author>
<published>2013-02-24T12:42:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d75af3c0ebb4e31ece087aeecfeff282cb6f1361'/>
<id>urn:sha1:d75af3c0ebb4e31ece087aeecfeff282cb6f1361</id>
<content type='text'>
As a matter of fact, we're already using -Werror for most tests because
of a bug in kernel-bio-empty-barrier.m4 which sets -Werror without
reverting it afterwards. This meant that all tests which ran after this
one was using -Werror.

This patch simply makes it clear that we're using -Werror and makes
the code more readable and more predictable.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #1317
</content>
</entry>
<entry>
<title>Linux 2.6.26 compat, lookup_bdev()</title>
<updated>2013-01-28T23:35:00Z</updated>
<author>
<name>Brian Behlendorf</name>
<email>behlendorf1@llnl.gov</email>
</author>
<published>2013-01-28T22:15:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2b7ab9d4d9b307c354795e2805ff313ddd01985d'/>
<id>urn:sha1:2b7ab9d4d9b307c354795e2805ff313ddd01985d</id>
<content type='text'>
It's doubtful many people were impacted by this but commit 6c28567
accidentally broke ZFS builds for 2.6.26 and earlier kernels.  This
commit depends on the lookup_bdev() function which exists in 2.6.26
but wasn't exported until 2.6.27.

The availability of the function isn't critical so a wrapper is
introduced which returns ERR_PTR(-ENOTSUP) when the function isn't
defined.  This will have the effect of causing zvol_is_zvol() to
always fail for 2.6.26 kernels.  This in turn means vdevs will
always get opened concurrently which is good for normal usage.
This will only become an issue if your using a zvol as a vdev in
another pool.  In which case you really should be using a newer
kernel anyway.

Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Closes #1205
</content>
</entry>
</feed>
