Allow 'zpool replace' to use short device names

The 'zpool replace' command would fail when given a short name
because unlike on other platforms the short name cannot be
deterministically expanded to a single path.  Multiple path
prefixes must be checked and in addition the partition suffix
for whole disks is determined by the prefix.

To handle this complexity a zfs_strcmp_pathname() function was
added which takes either a short or fully qualified device name.
Short names will be expanded using the prefixes in the default
import search path, or the ZPOOL_IMPORT_PATH environment variable
if it's defined.  All posible expansions are then compared against
the comparison path.  Care is taken to strip redundant slashes to
ensure legitimate matches are not missed.

In the context of this work the existing zfs_resolve_shortname()
function was extended to consider the ZPOOL_IMPORT_PATH when set.
The zfs_append_partition() interface was also simplified to take
only a single buffer.

The vast majority of these changes rework existing Linux specific
code which was originally written to accomidate udev.  However,
there is some minimal cleanup which removes Illumos specific code.
This was done to improve readability but the basic flow and intent
of the upstream code was maintained.

These changes are the logical conclusion of the previos work to
adjust the 'zpool import' search behavior, see commit 44867b6a.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #544
Closes #976
Update spare and cache device names on import

During 'zpool import' all ZPOOL_CONFIG_PATH names are supposed
to be updated by fix_paths().  This was not happening for spare
and cache devices because the proper names were getting filtered
out of the pool_list_t->names.  Interestingly, the names were
being filtered because the spare and cache devices do not
contain the pool name in their vdev label.

The fix is to exclude the device path from the list only if:

  1) has a valid ZPOOL_CONFIG_POOL_NAME key in the label, and
  2) that pool name does not match the specified pool name.

Since the label is valid and because it does properly store the
vdev guid it will be correctly assembled without the pool name.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #725
Remove 'Resized bio's/dio' warning

The following warning was originally added to provide visibility
in to how often a dio gets heavily fragmented in to over 16 bios.
This can happen due to constraints imposed by the block device
and may have a negitive impact on performance but is otherwise
harmless.  To prevent needless confusion and worry the message
has been removed.

  kernel: WARNING: Resized bio's/dio to 32

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Revert "Don't ashift-align vdev read requests."

This reverts commit a5c20e2a0a9046c06d86615fbf51dc04f12bba14 which
accidentally introduced a regression for real 4k sector devices.
See issue #1065 for details.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #1065
Merge branch 'upstream'
Disable Ubuntu 11.04 Natty Narwhal builds.

Distro support for Natty ended October 28th 2012:

  https://lists.ubuntu.com/archives/ubuntu-announce/2012-October/000165.html
Enable Ubuntu 12.10 Quantal Quetzal builds.
Add zdev rules to the initrd for all installations.

Always hook the udev rules that read the `/etc/zfs/zdev.conf` file into the
initrd, even if the system is not using the zfs-initramfs package.

This change ensures that `/dev/disk/zpool` device aliases are ready in time for
`mount` calls early in the init stack.

Amended-by: Darik Horn <dajhorn@vanadac.com>
Closes: dajhorn/pkg-zfs#39
Closes: zfsonlinux/zfs#811
Add dkms build dependency on spl.

Set `BUILD_DEPENDS[0]="spl"` in the `dkms.conf` file. This is an
experimental directive that is not implemented in DKMS upstream.

Closes: dajhorn/pkg-zfs#44
Fix a typo in the root mountpoint seatbelt.

The `zfs set mountpoint=/ "$ZFS_BOOTFS"` command in the initramfs
script had a typo that made it a noop.

This command ensures that the root filesystem has a sensible mountpoint
property. The error wasn't noticed because most of the Solaris userland
goodies for ZFS aren't yet implmented for Linux.

Closes: dajhorn/pkg-zfs#41
PPA 0.6.0.83-0ubuntu1 release.