Fix various generic kmod RPM spec issues.

There are a number of issues with the generic kmod RPM spec in its
current state:
 - The "%{__id_u}" macro seems to not be available on some systems (e.g.
   Debian squeeze). It appears it has been deprecated. Use "${__id} -u"
   instead.
 - The way the "--with-linux=" configure option is generated in the
   non-RHEL/Fedora case is completely wrong with various newline and
   escaping issues (also, $kernel_version is not available in the
   generator context).

The second issue made the generator shell snippet (almost) silently
fail, which under specific circumstances can result in broken builds
against the wrong kernel sources.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1416
Possibility to disable (not start) zfs at bootup.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #1402
Support .nogitrelease file

When building a custom release in a git tree provide the ability
to prevent the release field from being overwritten by the
`git describe` output.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #1402
Add --bump=0 to alien

Preserve the release field when creating Debian packages.  The
--keep-version option was not used because it results in a failure
when the git '<commit>_<hash>' syntax is used for the release.
The '_' is a valid character for RPM packages but not for DEBs.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Issue #1402
Issue #928
Set RPM_DEFINE_COMMON options

When the kmod packaging was introduced the ability to pass the
--enable-debug and --enable-dmu-tx options from configure all
the way through to `make rpm|deb` was accidenally lost.  Update
ZFS_AC_RPM to explicitlu set RPM_DEFINE_COMMON with these
rpmbuild defines.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #1402
Ignore *.{deb,rpm,tar.gz} files in the top directory.

These are build products and should be ignored.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
Issue #1402
Fix txg_quiesce thread deadlock

A deadlock was accidentally introduced by commit e95853a which
can occur when the system is under memory pressure.  What happens
is that while the txg_quiesce thread is holding the tx->tx_cpu
locks it enters memory reclaim.  In the context of this memory
reclaim it then issues synchronous I/O to a ZVOL swap device.
Because the txg_quiesce thread is holding the tx->tx_cpu locks
a new txg cannot be opened to handle the I/O.  Deadlock.

The fix is straight forward.  Move the memory allocation outside
the critical region where the tx->tx_cpu locks are held.  And for
good measure change the offending allocation to KM_PUSHPAGE to
ensure it never attempts to issue I/O during reclaim.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #1274
This is iSCSI sharing for ZoL (shareiscsi).
* Move nfs.c:foreach_nfs_shareopt() to libshare.c:foreach_shareopt()
  so that it can be (re)used in smb.c (and later iscsi.c).
* Add support for options to 'shareiscsi'.
  + name/iqn	Full iSCSI Qualified Name (IQN), including identifier
		Default: Generated by iscsi_generate_target()
  + lun		LUN (0-16384)
		Default: 0
  + type	Share mode (fileio, blockio, nullio, disk, tape)
		Default: blockio
  + iomode	IO mode (wb, wt, ro)
		Default: wt
  + blocksize	Logical block size (512, 1024, 2048, 4096)
		Default: 4096
* Retreive the volume block size and use that (if it's
  usable) when seting the options.
  + Default to 4096 instead of 512 if it isn't.
* Default to 'blockio' as type instead of 'fileio'.
* If shareiscsi=on, then force setting a name value.
  This so that the IQN doesn't change 'next month' (when
  it is regenerated again). Works as long as a 'off'
  and then a 'on' is not done - every time set to 'on'
  the value is regenerated. This patch stops that.
Add support for SCST iSCSI implementation.
+ Script to give a better overview of devices and targets
  and their connection to each other for SCST.
  => lib/libshare/list_scst.sh
Retrive active iSCSI sessions