~wip-kernel/ubuntu-wip-kernel/+git/openzfs-spl:spl-0.6.3-stable

Last commit made on 2015-03-18
Get this branch:
git clone -b spl-0.6.3-stable https://git.launchpad.net/~wip-kernel/ubuntu-wip-kernel/+git/openzfs-spl

Branch merges

Branch information

Name:
spl-0.6.3-stable
Repository:
lp:~wip-kernel/ubuntu-wip-kernel/+git/openzfs-spl

Recent commits

ce4c463... by Brian Behlendorf

Tag spl-0.6.3-1.3

META file updated and .nogitrelease file added to ensure
packages built from this tag use the release in META.

Signed-off-by: Brian Behlendorf <email address hidden>

2ada143... by Brian Behlendorf

Update code to use misc_register()/misc_deregister()

When the SPL was originally written it was designed to use the
device_create() and device_destroy() functions. Unfortunately,
these functions changed considerably over the years making them
difficult to rely on.

As it turns out a better choice would have been to use the
misc_register()/misc_deregister() functions. This interface
for registering character devices has remained stable, is simple,
and provides everything we need.

Therefore the code has been reworked to use this interface. The
higher level ZFS code has always depended on these same interfaces
so this is also as a step towards minimizing our kernel dependencies.

Signed-off-by: Brian Behlendorf <email address hidden>

ec6c5c9... by Tim Chase

Use current_kernel_time() in the time compatibility wrappers

Since the Linux kernel's utimens family of functions uses
current_kernel_time(), we need to do the same in the context of ZFS
or else there can be discrepencies in timestamps (they go backward)
if userland code does:

 fd = creat(FNAME, 0600);
 (void) futimens(fd, NULL);

The getnstimeofday() function generally returns a slightly lower time
value.

Signed-off-by: Tim Chase <email address hidden>
Signed-off-by: Brian Behlendorf <email address hidden>
Closes zfsonlinux/zfs#3006

099c670... by Brian Behlendorf

Tag spl-0.6.3-1.2

META file updated and .nogitrelease file added to ensure
packages built from this tag use the release in META.

Signed-off-by: Brian Behlendorf <email address hidden>

8cd930b... by David Chen

mutex: force serialization on mutex_exit() to fix races

It is known that mutexes in Linux are not safe when using them to
synchronize the freeing of object in which the mutex is embedded:

http://lwn.net/Articles/575477/

The known places in ZFS which are suspected to suffer from the race
condition are zio->io_lock and dbuf->db_mtx.

* zio uses zio->io_lock and zio->io_cv to synchronize freeing
  between zio_wait() and zio_done().
* dbuf uses dbuf->db_mtx to protect reference counting.

This patch fixes this kind of race by forcing serialization on
mutex_exit() with a spin lock, making the mutex safe by sacrificing
a bit of performance and memory overhead.

This issue most commonly manifests itself as a deadlock in the zio
pipeline caused by a process spinning on the damaged mutex. Similar
deadlocks have been reported for the dbuf->db_mtx mutex. And it can
also cause a NULL dereference or bad paging request under the right
circumstances.

This issue any many like it are linked off the zfsonlinux/zfs#2523
issue. Specifically this fix resolves at least the following
outstanding issues:

zfsonlinux/zfs#401
zfsonlinux/zfs#2523
zfsonlinux/zfs#2679
zfsonlinux/zfs#2684
zfsonlinux/zfs#2704
zfsonlinux/zfs#2708
zfsonlinux/zfs#2517
zfsonlinux/zfs#2827
zfsonlinux/zfs#2850
zfsonlinux/zfs#2891
zfsonlinux/zfs#2897
zfsonlinux/zfs#2247
zfsonlinux/zfs#2939

Signed-off-by: Chunwei Chen <email address hidden>
Signed-off-by: Brian Behlendorf <email address hidden>
Signed-off-by: Richard Yao <email address hidden>
Closes #421

17e5cf3... by Tim Chase

Linux 3.12 compat: shrinker semantics

The new shrinker API as of Linux 3.12 modifies "struct shrinker" by
replacing the @shrink callback with the pair of @count_objects and
@scan_objects. It also requires the return value of @count_objects to
return the number of objects actually freed whereas the previous @shrink
callback returned the number of remaining freeable objects.

This patch adds support for the new @scan_objects return value semantics
and updates the splat shrinker test case appropriately.

Signed-off-by: Brian Behlendorf <email address hidden>
Signed-off-by: Tim Chase <email address hidden>
Closes #403

23fcd1e... by Turbo Fredriksson

Linux 3.16 compat: smp_mb__after_clear_bit()

The smp_mb__{before,after}_clear_bit functions have been renamed
smp_mb__{before,after}_atomic. Rather than adding a compatibility
function to handle this the code has been updated to use smp_wmb().

This has the advantage of being a stable functionally equivalent
interface. On many architectures smp_mb__after_clear_bit() expands
to smp_wmb(). Others might be able to do something slightly more
efficient but this will be safe and correct on all of them.

Signed-off-by: Turbo Fredriksson <email address hidden>
Signed-off-by: Brian Behlendorf <email address hidden>
Closes #386

f322c6a... by Ned Bass <email address hidden>

Linux 3.17 compat: remove wait_on_bit action function

Linux kernel 3.17 removes the action function argument from
wait_on_bit(). Add autoconf test and compatibility macro to support
the new interface.

The former "wait_on_bit" interface required an 'action' function to
be provided which does the actual waiting. There were over 20 such
functions in the kernel, many of them identical, though most cases
can be satisfied by one of just two functions: one which uses
io_schedule() and one which just uses schedule(). This API change
was made to consolidate all of those redundant wait functions.

References: torvalds/linux@7431620

Signed-off-by: Ned Bass <email address hidden>
Signed-off-by: Brian Behlendorf <email address hidden>
Closes #378

5c8a0ad... by Brian Behlendorf

Set spl_kmem_cache_slab_limit=16384 to default

For small objects the Linux slab allocator should be used to make the most
efficient use of the memory. However, large objects are not supported by
the Linux slab and therefore the SPL implementation is preferred. A cutoff
of 16K was determined to be optimal for architectures using 4K pages.

Signed-off-by: Brian Behlendorf <email address hidden>
Signed-off-by: DHE <email address hidden>
Issue #356
Closes #379

bf56579... by Brian Behlendorf

Set spl_kmem_cache_reclaim=0 to default

Reinstate the correct default behavior of returning the number of objects
in the cache for reclaim. This behavior was disabled in recent releases
to do occasional reports of spinning in shrink_slabs(). Those issues have
been resolved and can no longer can be reproduced. See commit 376dc35.

Signed-off-by: Brian Behlendorf <email address hidden>
Signed-off-by: DHE <email address hidden>
Issue #358
Closes #379