]> git.proxmox.com Git - mirror_zfs-debian.git/log
mirror_zfs-debian.git
13 years agoUse 0.6.0.20 as the unofficial version.
Darik Horn [Sun, 26 Jun 2011 03:15:14 +0000 (22:15 -0500)]
Use 0.6.0.20 as the unofficial version.

Also refresh patches.

13 years agoMerge branch 'upstream'
Darik Horn [Sun, 26 Jun 2011 03:14:20 +0000 (22:14 -0500)]
Merge branch 'upstream'

13 years agoMultipath device manageability improvements
Ned A. Bass [Tue, 21 Jun 2011 23:18:27 +0000 (16:18 -0700)]
Multipath device manageability improvements

Update udev helper scripts to deal with device-mapper devices created
by multipathd.  These enhancements are targeted at a particular
storage network topology under evaluation at LLNL consisting of two
SAS switches providing redundant connectivity between multiple server
nodes and disk enclosures.

The key to making these systems manageable is to create shortnames for
each disk that conveys its physical location in a drawer.  In a
direct-attached topology we infer a disk's enclosure from the PCI bus
number and HBA port number in the by-path name provided by udev.  In a
switched topology, however, multiple drawers are accessed via a single
HBA port.  We therefore resort to assigning drawer identifiers based
on which switch port a drive's enclosure is connected to.  This
information is available from sysfs.

Add options to zpool_layout to generate an /etc/zfs/zdev.conf using
symbolic links in /dev/disk/by-id of the form
<label>-<UUID>-switch-port:<X>-slot:<Y>.  <label> is a string that
depends on the subsystem that created the link and defaults to
"dm-uuid-mpath" (this prefix is used by multipathd).  <UUID> is a
unique identifier for the disk typically obtained from the scsi_id
program, and <X> and <Y> denote the switch port and disk slot numbers,
respectively.

Add a callout script sas_switch_id for use by multipathd to help
create symlinks of the form described above.  Update zpool_id and the
udev zpool rules file to handle both multipath devices and
conventional drives.

13 years agoLinux 3.0 compat, shrinker compatibility
Brian Behlendorf [Tue, 21 Jun 2011 21:26:51 +0000 (14:26 -0700)]
Linux 3.0 compat, shrinker compatibility

To accomindate the updated Linux 3.0 shrinker API the spl
shrinker compatibility code was updated.  Unfortunately, this
couldn't be done cleanly without slightly adjusting the comapt
API.  See spl commit a55bcaad181096d764e12d847e3091cd7b15509a.

This commit updates the ZFS code to use the slightly modified
API.  You must use the latest SPL if your building ZFS.

13 years agoFix unlink/xattr deadlock
Gunnar Beutner [Mon, 20 Jun 2011 17:36:58 +0000 (10:36 -0700)]
Fix unlink/xattr deadlock

The problem here is that prune_icache() tries to evict/delete
both the xattr directory inode as well as at least one xattr
inode contained in that directory. Here's what happens:

1. File is created.
2. xattr is created for that file (behind the scenes a xattr
   directory and a file in that xattr directory are created)
3. File is deleted.
4. Both the xattr directory inode and at least one xattr
   inode from that directory are evicted by prune_icache();
   prune_icache() acquires a lock on both inodes before it
   calls ->evict() on the inodes

When the xattr directory inode is evicted zfs_zinactive attempts
to delete the xattr files contained in that directory. While
enumerating these files zfs_zget() is called to obtain a reference
to the xattr file znode - which tries to lock the xattr inode.
However that very same xattr inode was already locked by
prune_icache() further up the call stack, thus leading to a
deadlock.

This can be reliably reproduced like this:
$ touch test
$ attr -s a -V b test
$ rm test
$ echo 3 > /proc/sys/vm/drop_caches

This patch fixes the deadlock by moving the zfs_purgedir() call to
zfs_unlinked_drain().  Instead zfs_rmnode() now checks whether the
xattr dir is empty and leaves the xattr dir in the unlinked set if
it finds any xattrs.

To ensure zfs_unlinked_drain() never accesses a stale super block
zfsvfs_teardown() has been update to block until the iput taskq
has been drained.  This avoids a potential race where a file with
an xattr directory is removed and the file system is immediately
unmounted.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #266

13 years agoRemoved erroneous zfs_inode_destroy() calls from zfs_rmnode().
Gunnar Beutner [Thu, 16 Jun 2011 18:59:56 +0000 (20:59 +0200)]
Removed erroneous zfs_inode_destroy() calls from zfs_rmnode().

iput_final() already calls zpl_inode_destroy() -> zfs_inode_destroy()
for us after zfs_zinactive(), thus making sure that the inode is
properly cleaned up.

The zfs_inode_destroy() calls in zfs_rmnode() would lead to a
double-free.

Fixes #282

13 years agoUse 0.6.0.19 as the unofficial version.
Darik Horn [Sun, 19 Jun 2011 18:12:52 +0000 (13:12 -0500)]
Use 0.6.0.19 as the unofficial version.

13 years agoRefresh patches.
Darik Horn [Sun, 19 Jun 2011 18:06:21 +0000 (13:06 -0500)]
Refresh patches.

13 years agoMerge branch 'upstream'
Darik Horn [Sun, 19 Jun 2011 17:26:55 +0000 (12:26 -0500)]
Merge branch 'upstream'

13 years agoAdd "ashift" property to zpool create
Christian Kohlschütter [Thu, 16 Jun 2011 19:56:38 +0000 (21:56 +0200)]
Add "ashift" property to zpool create

Some disks with internal sectors larger than 512 bytes (e.g., 4k) can
suffer from bad write performance when ashift is not configured
correctly.  This is caused by the disk not reporting its actual sector
size, but a sector size of 512 bytes.  The drive may behave this way
for compatibility reasons.  For example, the WDC WD20EARS disks are
known to exhibit this behavior.

When creating a zpool, ZFS takes that wrong sector size and sets the
"ashift" property accordingly (to 9: 1<<9=512), whereas it should be
set to 12 for 4k sectors (1<<12=4096).

This patch allows an adminstrator to manual specify the known correct
ashift size at 'zpool create' time.  This can significantly improve
performance in certain cases.  However, it will have an impact on your
total pool capacity.  See the updated ashift property description
in the zpool.8 man page for additional details.

Valid values for the ashift property range from 9 to 17 (512B-128KB).
Additionally, you may set the ashift to 0 if you wish to auto-detect
the sector size based on what the disk reports, this is the default
behavior.  The most common ashift values are 9 and 12.

  Example:
  zpool create -o ashift=12 tank raidz2 sda sdb sdc sdd

Closes #280

Original-patch-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
13 years agoLinux 2.6.37 compat, WRITE_FLUSH_FUA
Brian Behlendorf [Thu, 16 Jun 2011 18:20:22 +0000 (20:20 +0200)]
Linux 2.6.37 compat, WRITE_FLUSH_FUA

The WRITE_FLUSH, WRITE_FUA, and WRITE_FLUSH_FUA flags have been
introduced as a replacement for WRITE_BARRIER.  This was done
to allow richer semantics to be expressed to the block layer.
It is the block layers responsibility to choose the correct way
to implement these semantics.

This change simply updates the bio's to use the new kernel API
which should be absolutely safe.  However, since ZFS depends
entirely on this working as designed for correctness we do
want to be careful.

Closes #281

13 years agoUpdate rpm/deb packages to be FHS compliant
Brian Behlendorf [Fri, 17 Jun 2011 18:47:45 +0000 (11:47 -0700)]
Update rpm/deb packages to be FHS compliant

This change is the first step towards updating the default
rpm/deb packages to be FHS compliant.  It accomplishes this
by passing the following options to ./configure to ensure the
zfs build products are installed in FHS compliant locations.

  ./configure --prefix=/ --bindir=/lib/udev \
    --libexecdir=/usr/libexec --datadir=/usr/share

The core zfs utilities (zfs, zpool, zdb) are now be installed
in /sbin, the core libraries in /lib, and the udev helpers
(zpool_id, zvol_id) are in /lib/udev with the other udev
helpers.

The remaining files in the zfs package remain in their
previous locations under /usr.

13 years agoAutogen refresh.
Darik Horn [Fri, 17 Jun 2011 17:12:25 +0000 (10:12 -0700)]
Autogen refresh.

Run autogen.sh using the same autotools versions as upstream:

 * autoconf-2.63
 * automake-1.11.1
 * libtool-2.2.6b

13 years agoUse datadir not datarootdir for dracut
Brian Behlendorf [Fri, 17 Jun 2011 19:23:21 +0000 (12:23 -0700)]
Use datadir not datarootdir for dracut

The zfs dracut modules should be installed under the --datadir
not --datarootdir path.  This was just an oversight in the
original Makefile.am.

After this change %{_datadir} can now be set safely in the
zfs.spec file.  The 'make install' location is now consistent
with the location expected by the spec file.

13 years agoFix autoconf variable substitution in udev rules.
Darik Horn [Fri, 17 Jun 2011 15:02:36 +0000 (10:02 -0500)]
Fix autoconf variable substitution in udev rules.

Change the variable substitution in the udev rule templates
according to the method described in the Autoconf manual;
Chapter 4.7.2: Installation Directory Variables.

The udev rules are improperly generated if the bindir parameter
overrides the prefix parameter during configure. For example:

  # ./configure --prefix=/usr/local --bindir=/opt/zfs/bin

The udev helper is installed as /opt/zfs/bin/zpool_id, but the
corresponding udev rule has a different path:

  # /usr/local/etc/udev/rules.d/60-zpool.rules
  ENV{DEVTYPE}=="disk", IMPORT{program}="/usr/local/bin/zpool_id -d %p"

The @bindir@ variable expands to "${exec_prefix}/bin", so it cannot
be used instead of @prefix@ directly.

This also applies to the zvol_id helper.

Closes #283.

13 years agoUse 0.6.0.18 as the unofficial version.
Darik Horn [Thu, 16 Jun 2011 14:42:12 +0000 (09:42 -0500)]
Use 0.6.0.18 as the unofficial version.

13 years agoMerge branch 'upstream'
Darik Horn [Wed, 15 Jun 2011 15:21:40 +0000 (10:21 -0500)]
Merge branch 'upstream'

13 years agoHandle /etc/mtab -> /proc/mounts symlink
Brian Behlendorf [Tue, 14 Jun 2011 23:25:29 +0000 (16:25 -0700)]
Handle /etc/mtab -> /proc/mounts symlink

Under Fedora 15 /etc/mtab is now a symlink to /proc/mounts by
default.  When /etc/mtab is a symlink the mount.zfs helper
should not update it.   There was code in place to handle this
case but it used stat() which traverses the link and then issues
the stat on /proc/mounts.  We need to use lstat() to prevent the
link traversal and instead stat /etc/mtab.

Closes #270

13 years agoAlways check -Wno-unused-but-set-variable gcc support
Brian Behlendorf [Tue, 14 Jun 2011 22:09:05 +0000 (15:09 -0700)]
Always check -Wno-unused-but-set-variable gcc support

The previous commit 8a7e1ceefa430988c8f888ca708ab307333b4464 wasn't
quite right.  This check applies to both the user and kernel space
build and as such we must make sure it runs regardless of what
the --with-config option is set too.

For example, if --with-config=kernel then the autoconf test does
not run and we generate build warnings when compiling the kernel
packages.

13 years agoCheck for -Wno-unused-but-set-variable gcc support
Brian Behlendorf [Tue, 14 Jun 2011 18:02:13 +0000 (11:02 -0700)]
Check for -Wno-unused-but-set-variable gcc support

Gcc versions 4.3.2 and earlier do not support the compiler flag
-Wno-unused-but-set-variable.  This can lead to build failures
on older Linux platforms such as Debian Lenny.  Since this is
an optional build argument this changes add a new autoconf check
for the option.  If it is supported by the installed version of
gcc then it is used otherwise it is omited.

See commit's 12c1acde76683108441827ae9affba1872f3afe5 and
79713039a2b6e0ed223d141b4a8a8455f282d2f2 for the reason the
-Wno-unused-but-set-variable options was originally added.

13 years agoAdd default stack checking
Brian Behlendorf [Sun, 12 Jun 2011 05:48:49 +0000 (22:48 -0700)]
Add default stack checking

When your kernel is built with kernel stack tracing enabled and you
have the debugfs filesystem mounted.  Then the zfs.sh script will clear
the worst observed kernel stack depth on module load and check the worst
case usage on module removal.  If the stack depth ever exceeds 7000
bytes the full stack will be printed for debugging.  This is dangerously
close to overrunning the default 8k stack.

This additional advisory debugging is particularly valuable when running
the regression tests on a kernel built with 16k stacks.  In this case,
almost no matter how bad the stack overrun is you will see be able to
get a clean stack trace for debugging.  Since the worst case stack usage
can be highly variable it's helpful to always check the worst case usage.

13 years agoPass -f option for import
Brian Behlendorf [Fri, 10 Jun 2011 18:20:34 +0000 (11:20 -0700)]
Pass -f option for import

If a pool was not cleanly exported passing the -f flag may be required
at 'zpool import' time.  Since this test is simply validating that the
pool can be successfully imported in the absense of the cache file
always pass the -f to ensure it succeeds.  This failure was observed
under RHEL6.1.

13 years agoFix 'zfs send -D' segfault
Brian Behlendorf [Thu, 9 Jun 2011 20:41:55 +0000 (13:41 -0700)]
Fix 'zfs send -D' segfault

Sending pools with dedup results in a segfault due to a Solaris
portability issue.  Under Solaris the pipe(2) library call
creates a bidirectional data channel.  Unfortunately, on Linux
pipe(2) call creates unidirection data channel.  The fix is to
use the socketpair(2) function to create the expected
bidirectional channel.

Seth Heeren did the original leg work on this issue for zfs-fuse.
We finally just rediscovered the same portability issue and
dfurphy was able to point me at the original issue for the fix.

Closes #268

13 years agoUse 0.6.0.17 as the unofficial version.
Darik Horn [Mon, 6 Jun 2011 01:33:27 +0000 (20:33 -0500)]
Use 0.6.0.17 as the unofficial version.

Also use git-dch to update the debian/changelog.

13 years agoMerge branch 'upstream'
Darik Horn [Mon, 6 Jun 2011 01:32:19 +0000 (20:32 -0500)]
Merge branch 'upstream'

13 years agoSanatize zpios-sanity.sh environment
Brian Behlendorf [Fri, 3 Jun 2011 22:08:49 +0000 (15:08 -0700)]
Sanatize zpios-sanity.sh environment

Just like zconfig.sh the zpios-sanity.sh tests should run in a
sanatized environment.  This ensures they never conflict with an
installed /etc/zfs/zpool.cache file.

This commit additionally improves the -c cleanup option.  It now
removes the modules stack if loaded and destroys relevant md devices.
This behavior is now identical to zconfig.sh.

13 years agoDelay before destroying loopback devices
Brian Behlendorf [Fri, 3 Jun 2011 21:13:25 +0000 (14:13 -0700)]
Delay before destroying loopback devices

Generally I don't approve of just adding an arbitrary delay to
avoid a problem but in this case I'm going to let it slide.  We
may need to delay briefly after 'zpool destroy' returns to ensure
the loopback devices are closed.  If they aren't closed than
losetup -d will not be able to destroy them.  Unfortunately,
there's no easy state the check so we'll have to make due with
a simple delay.

13 years agoAlways unload zpios.ko on exit
Brian Behlendorf [Thu, 2 Jun 2011 17:25:35 +0000 (10:25 -0700)]
Always unload zpios.ko on exit

We should always unload zpios.ko on exit.  This ensures
that subsequent calls to 'zfs.sh -u' from other utilities
will be able to unload the module stack and properly
cleanup.  This is important for the the --cleanup option
which can be passed to zconfig.sh and zfault.sh.

13 years agoFix zpios-sanity.sh return code
Brian Behlendorf [Thu, 2 Jun 2011 17:13:15 +0000 (10:13 -0700)]
Fix zpios-sanity.sh return code

The zpios-sanity.sh script should return failure when any
of the individual zpios.sh tests fail.  The previous code
would always return success suppressing real failures.

13 years agoFix stack ddt_class_contains()
Brian Behlendorf [Wed, 25 May 2011 20:56:40 +0000 (13:56 -0700)]
Fix stack ddt_class_contains()

Stack usage for ddt_class_contains() reduced from 524 bytes to 68
bytes.  This large stack allocation significantly contributed to
the likelyhood of a stack overflow when scrubbing/resilvering
dedup pools.

13 years agoFix stack ddt_zap_lookup()
Brian Behlendorf [Wed, 25 May 2011 21:13:18 +0000 (14:13 -0700)]
Fix stack ddt_zap_lookup()

Stack usage for ddt_zap_lookup() reduced from 368 bytes to 120
bytes.  This large stack allocation significantly contributed to
the likelyhood of a stack overflow when scrubbing/resilvering
dedup pools.

13 years agoRevert "Fix stack traverse_visitbp()"
Brian Behlendorf [Wed, 25 May 2011 23:09:57 +0000 (16:09 -0700)]
Revert "Fix stack traverse_visitbp()"

This abomination is no longer required because the zio's issued
during this recursive call path will now be handled asynchronously
by the taskq thread pool.

This reverts commit 6656bf56216f36805731298ee0f4de87ae6b6b3d.

13 years agoMake tgx_sync_thread zio's async
Brian Behlendorf [Wed, 25 May 2011 22:22:04 +0000 (15:22 -0700)]
Make tgx_sync_thread zio's async

The majority of the recursive operations performed by the dsl
are done either in the context of the tgx_sync_thread or during
pool import.  It is these recursive operations which contribute
greatly to the stack depth.  When this recursion is coupled with
a synchronous I/O in the same context overflow becomes possible.

Previously to handle this case I have focused on keeping the
individual stack frames as light as possible.  This is a good
idea as long as it can be done in a way which doesn't overly
complicate the code.  However, there is a better solution.

If we treat all zio's issued by the tgx_sync_thread as async then
we can use the tgx_sync_thread stack for the recursive parts, and
the zio_* threads for the I/O parts.  This effectively doubles our
available stack space with the only drawback being a small delay
to schedule the I/O.  However, in practice the scheduling time
is so much smaller than the actual I/O time this isn't an issue.
Another benefit of making the zio async is that the zio pipeline
is now parallel.  That should mean for CPU intensive pipelines
such as compression or dedup performance may be improved.

With this change in place the worst case stack usage observed so
far is 6902 bytes.  This is still higher than I'd like but
significantly improved.  Additional changes to specific functions
should improve this further.  This change allows us to revent
commit 6656bf5 which did some horrible things to the recursive
traverse_visitbp() callpath in the name of saving stack.

13 years agoUse 0.6.0.16 as the unofficial version.
Darik Horn [Sat, 28 May 2011 20:48:14 +0000 (15:48 -0500)]
Use 0.6.0.16 as the unofficial version.

Also use git-dch to update the debian/changelog.

13 years agoMerge branch 'upstream'
Darik Horn [Sat, 28 May 2011 20:45:54 +0000 (15:45 -0500)]
Merge branch 'upstream'

13 years agoFix 4K sector support
Brian Behlendorf [Thu, 26 May 2011 23:48:16 +0000 (16:48 -0700)]
Fix 4K sector support

Yesterday I ran across a 3TB drive which exposed 4K sectors to
Linux.  While I thought I had gotten this support correct it
turns out there were 2 subtle bugs which prevented it from
working.

  sudo ./cmd/zpool/zpool create -f large-sector /dev/sda
  cannot create 'large-sector': one or more devices is currently unavailable

1) The first issue was that it was possible that bdev_capacity()
would return the number of 512 byte sectors rather than the number
of 4096 sectors.  Internally, certain Linux functions only operate
with 512 byte sectors so you need to be careful.  To avoid any
confusion in the future I've updated bdev_capacity() to simply
return the device (or partition) capacity in bytes.  The higher
levels of ZFS want the value in bytes anyway so this is cleaner.

2) When creating a bio the ->bi_sector count must always be
expressed in 512 byte sectors.  The existing code would scale
the byte offset by the logical sector size.   Until now this was
always 512 so it never caused problems.  Trying a 4K sector drive
clearly exposed the issue.  The problem has been fixed by
hard coding the 512 byte sector which is exactly what the bio
code does internally.

With these changes I'm now able to create ZFS pools using 4K
sector drives.  No issues were observed during fairly extensive
testing.  This is also a low risk change if your using 512b
sectors devices because none of the logic changes.

Closes #256

13 years agoUse 0.6.0.15 as the unofficial version.
Darik Horn [Mon, 23 May 2011 14:20:22 +0000 (09:20 -0500)]
Use 0.6.0.15 as the unofficial version.

Merge upstream and use git-dch to update the debian/changelog.

13 years agoMerge branch 'upstream'
Darik Horn [Mon, 23 May 2011 14:14:17 +0000 (09:14 -0500)]
Merge branch 'upstream'

13 years agoUse vmem_alloc() for zfs_ioc_userspace_many()
Brian Behlendorf [Fri, 20 May 2011 21:23:18 +0000 (14:23 -0700)]
Use vmem_alloc() for zfs_ioc_userspace_many()

The default buffer size when requesting multiple quota entries
is 100 times the zfs_useracct_t size.  In practice this works out
to exactly 27200 bytes.  Since this will be a short lived buffer
in a non-performance critical path it is preferable to vmem_alloc()
the needed memory.

13 years agoDefault to internal 'zfs userspace' implementation
Brian Behlendorf [Fri, 20 May 2011 17:25:41 +0000 (10:25 -0700)]
Default to internal 'zfs userspace' implementation

We will never bring over the pyzfs.py helper script from Solaris
to Linux.  Instead the missing functionality will be directly
integrated in to the zfs commands and libraries.  To avoid
confusion remove the warning about the missing pyzfs.py utility
and simply use the default internal support.

The Illumous developers are of the same mind and have proposed an
initial patch to do this which has been integrated in to the 'allow'
development branch.  After some additional testing this code
can be merged in to master as the right long term solution.

13 years agoPass caller's credential in zfsdev_ioctl()
Brian Behlendorf [Fri, 20 May 2011 17:12:25 +0000 (10:12 -0700)]
Pass caller's credential in zfsdev_ioctl()

Initially when zfsdev_ioctl() was ported to Linux we didn't have
any credential support implemented.  So at the time we simply
passed NULL which wasn't much of a problem since most of the
secpolicy code was disabled.

However, one exception is quota handling which does require the
credential.  Now that proper credentials are supported we can
safely start passing the callers credential.  This is also an
initial step towards fully implemented the zfs secpolicy.

13 years agoFix 'negative objects to delete' warning
Brian Behlendorf [Mon, 9 May 2011 19:18:46 +0000 (12:18 -0700)]
Fix 'negative objects to delete' warning

Normally when the arc_shrinker_func() function is called the return
value should be:

   >=0 - To indicate the number of freeable objects in the cache, or
   -1  - To indicate this cache should be skipped

However, when the shrinker callback is called with 'nr_to_scan' equal
to zero.  The caller simply wants the number of freeable objects in
the cache and we must never return -1.  This patch reorders the
first two conditionals in arc_shrinker_func() to ensure this behavior.

This patch also now explictly casts arc_size and arc_c_min to signed
int64_t types so MAX(x, 0) works as expected.  As unsigned types
we would never see an negative value which defeated the purpose of
the MAX() lower bound and broke the shrinker logic.

Finally, when nr_to_scan is non-zero we explictly prevent all reclaim
below arc_c_min.  This is done to prevent the Linux page cache from
completely crowding out the ARC.  This limit is tunable and some
experimentation is likely going to be required to set it exactly right.
For now we're sticking with the OpenSolaris defaults.

Closes #218
Closes #243

13 years agoFix distribution detection for gentoo
Alexey Shvetsov [Sat, 14 May 2011 14:25:37 +0000 (18:25 +0400)]
Fix distribution detection for gentoo

Also this may fix other distros because some of them also provide
/etc/lsb-release not only ubuntu.

Closes #244

13 years agoUpdate synchronous open zfs_close() comment
Brian Behlendorf [Fri, 13 May 2011 15:16:10 +0000 (08:16 -0700)]
Update synchronous open zfs_close() comment

The comment in zfs_close() pertaining to decrementing the synchronous
open count needs to be updated for Linux.  The code was already
updated to be correct, but the comment was missed and is now misleading.
Under Linux the zfs_close() hook is only called once when the final
reference is dropped.  This differs from Solaris where zfs_close()
is called for each close.

Closes #237

13 years agoRemove root 'ls' after mount workaround
Alexey Shvetsov [Thu, 12 May 2011 21:54:03 +0000 (14:54 -0700)]
Remove root 'ls' after mount workaround

This workaround was introduced to workaround issue #164.  This
issue was fixed by commit 5f35b19 so the workaround can be safely
dropped from both the zfs.fedora and zfs.gentoo init scripts.

13 years agoFix zfs.gentoo init script logic
Alexey Shvetsov [Tue, 10 May 2011 20:22:35 +0000 (00:22 +0400)]
Fix zfs.gentoo init script logic

* Fix zfs.ko module check
* Check 'zfs umount -a' return value

13 years agoMake zfs.gentoo init script more gentoo style.
Alexey Shvetsov [Tue, 10 May 2011 19:45:19 +0000 (23:45 +0400)]
Make zfs.gentoo init script more gentoo style.

* Improved compatibility with openrc
* Removed LOCKFILE
* Improved checksystem() function
* Remove /etc/mtab check for /
* General cleanup

13 years agoUse git-dch to update the debian/changelog.
Darik Horn [Thu, 12 May 2011 01:29:12 +0000 (20:29 -0500)]
Use git-dch to update the debian/changelog.

13 years agoUse 0.6.0.14 as the unofficial version.
Darik Horn [Thu, 12 May 2011 01:27:59 +0000 (20:27 -0500)]
Use 0.6.0.14 as the unofficial version.

13 years agoMerge branch 'upstream'
Darik Horn [Thu, 12 May 2011 01:27:03 +0000 (20:27 -0500)]
Merge branch 'upstream'

13 years agoMerge pull request #235 from nedbass/rdev
Brian Behlendorf [Mon, 9 May 2011 23:41:28 +0000 (16:41 -0700)]
Merge pull request #235 from nedbass/rdev

Don't store rdev in SA for FIFOs and sockets

13 years agoDon't store rdev in SA for FIFOs and sockets
Ned A. Bass [Mon, 9 May 2011 19:31:56 +0000 (12:31 -0700)]
Don't store rdev in SA for FIFOs and sockets

Update the handling of named pipes and sockets to be consistent with
other platforms with regard to the rdev attribute.  While all ZFS
ipmlementations store the rdev for device files in a system attribute
(SA), this is not the case for FIFOs and sockets.  Indeed, Linux always
passes rdev=0 to mknod() for FIFOs and sockets, so the value is not
needed.  Add an ASSERT that rdev==0 for FIFOs and sockets to detect if
the expected behavior ever changes.

Closes #216

13 years agoDisable direct reclaim for z_wr_* threads
Brian Behlendorf [Fri, 6 May 2011 22:12:15 +0000 (15:12 -0700)]
Disable direct reclaim for z_wr_* threads

The direct reclaim path in the z_wr_* threads must be disabled
to ensure forward progress is always maintained for txg processing.
This ensures that a txg will never get stuck waiting on itself
because it entered the following memory reclaim callpath.

  ->prune_icache()->dispose_list()->zpl_clear_inode()->zfs_inactive()
  ->dmu_tx_assign()->dmu_tx_wait()->tgx_wait_open()

It would be preferable to target this exact code path but the
kernel offers no way to do this without custom patches.  To avoid
this we are forced to disable all reclaim for these threads.  It
should not be necessary to do this for other other z_* threads
because they will not hold a txg open.

Closes #232

13 years agoHandle NULL in nfsd .fsync() hook
Brian Behlendorf [Fri, 6 May 2011 19:23:34 +0000 (12:23 -0700)]
Handle NULL in nfsd .fsync() hook

How nfsd handles .fsync() has been changed a couple of times in the
recent kernels.  But basically there are three cases we need to
consider.

Linux 2.6.12 - 2.6.33
* The .fsync() hook takes 3 arguments
* The nfsd will call .fsync() with a NULL file struct pointer.

Linux 2.6.34
* The .fsync() hook takes 3 arguments
* The nfsd no longer calls .fsync() but instead used sync_inode()

Linux 2.6.35 - 2.6.x
* The .fsync() hook takes 2 arguments
* The nfsd no longer calls .fsync() but instead used sync_inode()

For once it looks like we've gotten lucky.  The first two cases can
actually be collased in to one if we stop using the file struct
pointer entirely.  Since the dentry is still passed in both cases
this is possible.  The last case can then be safely handled by
unconditionally using the dentry in the file struct pointer now
that we know the nfsd caller has been removed.

Closes #230

13 years agoFix awk usage
Brian Behlendorf [Fri, 6 May 2011 17:16:04 +0000 (10:16 -0700)]
Fix awk usage

The zpool_id and zpool_layout helper scripts have been updated to
use the more common /usr/bin/awk symlink.  On Fedora/Redhat systems
there are both /bin/awk and /usr/bin/awk symlinks to your installed
version of awk.  On Debian/Ubuntu systems only the /usr/bin/awk
symlink exists.

Additionally, add the '\<' token to the beginning of the regex
pattern to prevent partial matches.  This pattern only appears to
work with gawk despite the mawk man page claiming to support this
extended regex.  Thus you will need to have gawk installed to use
these optional helper scripts.  A comment has been added to the
script to reflect this reality.

13 years agoUse vmem_alloc() for zfs_ioc_pool_get_history()
Brian Behlendorf [Fri, 6 May 2011 16:59:52 +0000 (09:59 -0700)]
Use vmem_alloc() for zfs_ioc_pool_get_history()

The default buffer size when requesting history is 128k.  This
is far to large for a kmem_alloc() so instead use the slower
vmem_alloc().  This path has no performance concerns and the
buffer is immediately free'd after its contents are copied to
the user space buffer.

13 years agoUse git-dch to update the debian/changelog.
Darik Horn [Fri, 6 May 2011 01:49:04 +0000 (20:49 -0500)]
Use git-dch to update the debian/changelog.

13 years agoUse 0.6.0.13.rc4 as the unofficial version.
Darik Horn [Fri, 6 May 2011 01:47:35 +0000 (20:47 -0500)]
Use 0.6.0.13.rc4 as the unofficial version.

13 years agoRemove snapshot-mount.patch
Darik Horn [Fri, 6 May 2011 01:46:29 +0000 (20:46 -0500)]
Remove snapshot-mount.patch

13 years agoMerge branch 'upstream'
Darik Horn [Fri, 6 May 2011 01:45:47 +0000 (20:45 -0500)]
Merge branch 'upstream'

13 years agoUse git-dch to update the debian/changelog.
Darik Horn [Fri, 6 May 2011 00:52:24 +0000 (19:52 -0500)]
Use git-dch to update the debian/changelog.

13 years agoAdd snapshot-mount.patch
Darik Horn [Fri, 6 May 2011 00:47:07 +0000 (19:47 -0500)]
Add snapshot-mount.patch

The upstream zfs-0.6.0-rc4 tag was pushed back to include commit
3613204cd7e3ab1ae658e31dac875e58827a6655, which fixes a regression
that prevents mounting snapshots.

13 years agoSpecify a distro section for each package.
Darik Horn [Thu, 5 May 2011 21:04:54 +0000 (16:04 -0500)]
Specify a distro section for each package.

Resolve this lintian warning:

W: libzfs-dev: wrong-section-according-to-package-name libzfs-dev => libdevel
N:
N:    This package has a name suggesting that it belongs to a section other
N:    than the one it is currently categorized in.
N:
N:    Severity: normal, Certainty: possible
N:

13 years agoRemove unused zfs-dkms.postrm script.
Darik Horn [Thu, 5 May 2011 20:42:13 +0000 (15:42 -0500)]
Remove unused zfs-dkms.postrm script.

Resolve this lintian warning:

W: zfs-dkms: maintainer-script-empty postrm
N:
N:    The maintainer script doesn't seem to contain any code other than
N:    comments and boilerplate (set -e, exit statements, and the case
N:    statement to parse options). While this is harmless in most cases, it is
N:    probably not what you wanted, may mean the package will leave
N:    unnecessary files behind until purged, and may even lead to problems in
N:    rare situations where dpkg would fail if no maintainer script was
N:    present.
N:
N:    If the package currently doesn't need to do anything in this maintainer
N:    script, it shouldn't be included in the package.
N:
N:    Severity: minor, Certainty: certain
N:

13 years agoAdd -e switch to the zfs-dkms.prerm whackbang.
Darik Horn [Thu, 5 May 2011 20:40:52 +0000 (15:40 -0500)]
Add -e switch to the zfs-dkms.prerm whackbang.

Resolve this lintian warning:

W: zfs-dkms: maintainer-script-ignores-errors prerm
N:
N:    The maintainer script doesn't seem to set the -e flag which ensures that
N:    the script's execution is aborted when any executed command fails.
N:
N:    Refer to Debian Policy Manual section 10.4 (Scripts) for details.
N:
N:    Severity: normal, Certainty: certain
N:

13 years agoRemove unused zfs-dkms.preinst script.
Darik Horn [Thu, 5 May 2011 20:38:00 +0000 (15:38 -0500)]
Remove unused zfs-dkms.preinst script.

Resolve this lintian warning:

W: zfs-dkms: maintainer-script-empty preinst
N:
N:    The maintainer script doesn't seem to contain any code other than
N:    comments and boilerplate (set -e, exit statements, and the case
N:    statement to parse options). While this is harmless in most cases, it is
N:    probably not what you wanted, may mean the package will leave
N:    unnecessary files behind until purged, and may even lead to problems in
N:    rare situations where dpkg would fail if no maintainer script was
N:    present.
N:
N:    If the package currently doesn't need to do anything in this maintainer
N:    script, it shouldn't be included in the package.
N:
N:    Severity: minor, Certainty: certain
N:

13 years agoAdd whackbang to the ltmain.sh script.
Darik Horn [Thu, 5 May 2011 20:36:48 +0000 (15:36 -0500)]
Add whackbang to the ltmain.sh script.

Resolve this lintian warning:

W: zfs-dkms: executable-not-elf-or-script usr/src/zfs-0.6.0/config/ltmain.sh
N:
N:    This executable file is not an ELF format binary, and does not start
N:    with the #! sequence that marks interpreted scripts. It might be a sh
N:    script that fails to name /bin/sh as its shell, or it may be incorrectly
N:    marked as executable. Sometimes upstream files developed on Windows are
N:    marked unnecessarily as executable on other systems.
N:
N:    If you are using debhelper to build your package, running dh_fixperms
N:    will often correct this problem for you.
N:
N:    Refer to Debian Policy Manual section 10.4 (Scripts) for details.
N:
N:    Severity: normal, Certainty: certain
N:

13 years agoDisable scripts distribution.
Darik Horn [Thu, 5 May 2011 20:14:15 +0000 (15:14 -0500)]
Disable scripts distribution.

Lintian complains about the installation of the libexec scripts
to the DKMS source in /usr/src. Resolve the lintian warning by
disabling the scripts dist rule.

This change supercedes commit f500cf9868d77ee2535902afed363688a1e154c9.

W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/common.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpios-test/lustre.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/dm0-raid0.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/file-raid0.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/file-raid10.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/file-raidz.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/file-raidz2.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/hda-raid0.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/lo-faulty-raid0.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/lo-faulty-raid10.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/lo-faulty-raidz.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/lo-faulty-raidz2.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/lo-faulty-raidz3.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/lo-raid0.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/lo-raid10.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/lo-raidz.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/lo-raidz2.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/md0-raid10.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/md0-raid5.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/ram0-raid0.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/scsi_debug-noraid.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/scsi_debug-raid0.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/scsi_debug-raid10.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/scsi_debug-raidz.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/scsi_debug-raidz2.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/scsi_debug-raidz3.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/sda-raid0.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/zpool-raid0.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/zpool-raid10.sh
W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/scripts/zpool-config/zpool-raidz.sh
N:
N:    This file starts with the #! sequence that marks interpreted scripts,
N:    but it is not executable.
N:
N:    Severity: normal, Certainty: certain
N:

13 years agoAdd -e switch to the zfs-dkms.postinst whackbang.
Darik Horn [Thu, 5 May 2011 20:07:09 +0000 (15:07 -0500)]
Add -e switch to the zfs-dkms.postinst whackbang.

Resolve this lintian warning:

W: zfs-dkms: maintainer-script-ignores-errors postinst
N:
N:    The maintainer script doesn't seem to set the -e flag which ensures that
N:    the script's execution is aborted when any executed command fails.
N:
N:    Refer to Debian Policy Manual section 10.4 (Scripts) for details.
N:
N:    Severity: normal, Certainty: certain
N:

13 years agoFlag autogen.sh as executable.
Darik Horn [Thu, 5 May 2011 20:05:12 +0000 (15:05 -0500)]
Flag autogen.sh as executable.

Resolve this lintian warning:

W: zfs-dkms: script-not-executable usr/src/zfs-0.6.0/autogen.sh
N:
N:    This file starts with the #! sequence that marks interpreted scripts,
N:    but it is not executable.
N:
N:    Severity: normal, Certainty: certain
N:

13 years agoAdd -e switch to the zfs-initramfs.preinst whackbang.
Darik Horn [Thu, 5 May 2011 20:02:58 +0000 (15:02 -0500)]
Add -e switch to the zfs-initramfs.preinst whackbang.

Resolve this lintian warning:

W: zfs-initramfs: maintainer-script-ignores-errors preinst
N:
N:    The maintainer script doesn't seem to set the -e flag which ensures that
N:    the script's execution is aborted when any executed command fails.
N:
N:    Refer to Debian Policy Manual section 10.4 (Scripts) for details.
N:
N:    Severity: normal, Certainty: certain
N:

13 years agoPackage libexec scripts as examples.
Darik Horn [Thu, 5 May 2011 19:47:24 +0000 (14:47 -0500)]
Package libexec scripts as examples.

Move the libexec scripts into the package examples to resolve these
lintian warnings:

W: zfsutils: non-standard-dir-in-usr usr/libexec/
N:
N:    The FHS says "No large software packages should use a direct
N:    subdirectory under the /usr hierarchy". This package contains a
N:    directory in /usr that is not mentioned in the Filesystem Hierarchy
N:    Standard.
N:
N:    Refer to Filesystem Hierarchy Standard (The /usr Hierarchy) for details.
N:
N:    Severity: normal, Certainty: certain
N:

W: zfsutils: file-in-unusual-dir usr/libexec/zfs/common.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zconfig.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zfault.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zfs.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios-profile/zpios-profile-disk.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios-profile/zpios-profile-pids.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios-profile/zpios-profile-post.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios-profile/zpios-profile-pre.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios-profile/zpios-profile.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios-sanity.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios-survey.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios-test/16th-8192rc-4rs-1cs-4off.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios-test/1th-16rc-4rs-1cs-4off.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios-test/1x256th-65536rc-4rs-1cs-4off.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios-test/256th-65536rc-4rs-1cs-4off.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios-test/4th-1024rc-4rs-1cs-4off.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios-test/large-thread-survey.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios-test/large.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios-test/lustre.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios-test/medium.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios-test/small.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios-test/tiny.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpios.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/dm0-raid0.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/file-raid0.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/file-raid10.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/file-raidz.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/file-raidz2.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/hda-raid0.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/lo-faulty-raid0.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/lo-faulty-raid10.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/lo-faulty-raidz.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/lo-faulty-raidz2.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/lo-faulty-raidz3.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/lo-raid0.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/lo-raid10.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/lo-raidz.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/lo-raidz2.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/md0-raid10.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/md0-raid5.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/ram0-raid0.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/scsi_debug-noraid.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/scsi_debug-raid0.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/scsi_debug-raid10.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/scsi_debug-raidz.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/scsi_debug-raidz2.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/scsi_debug-raidz3.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/sda-raid0.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/zpool-raid0.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/zpool-raid10.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-config/zpool-raidz.sh
W: zfsutils: file-in-unusual-dir usr/libexec/zfs/zpool-create.sh
N:
N:    This file or symbolic link is in a directory where files are not
N:    normally installed by Debian packages.
N:
N:    Severity: normal, Certainty: certain
N:

13 years agoAdd docs file for each package.
Darik Horn [Thu, 5 May 2011 19:39:21 +0000 (14:39 -0500)]
Add docs file for each package.

Resolve this lintian warning:

W: zfsutils: extra-license-file usr/share/doc/zfsutils/COPYING
N:
N:    All license information should be collected in the debian/copyright
N:    file. This usually makes it unnecessary for the package to install this
N:    information in other places as well.
N:
N:    Refer to Debian Policy Manual section 12.5 (Copyright information) for
N:    details.
N:
N:    Severity: normal, Certainty: possible
N:

13 years agoAdd -e switch to the zfsutils.preinst whackbang.
Darik Horn [Thu, 5 May 2011 18:53:40 +0000 (13:53 -0500)]
Add -e switch to the zfsutils.preinst whackbang.

Resolve this lintian warning:

W: zfsutils: maintainer-script-ignores-errors preinst
N:
N:    The maintainer script doesn't seem to set the -e flag which ensures that
N:    the script's execution is aborted when any executed command fails.
N:
N:    Refer to Debian Policy Manual section 10.4 (Scripts) for details.
N:
N:    Severity: normal, Certainty: certain
N:

13 years agoDisable zpool-layout distribution.
Darik Horn [Thu, 5 May 2011 18:51:01 +0000 (13:51 -0500)]
Disable zpool-layout distribution.

Resolve this lintian warning by disabling the zpool-layout example:

W: zfsutils: executable-not-elf-or-script usr/libexec/zfs/zpool-layout/dragon.llnl.conf
W: zfsutils: executable-not-elf-or-script usr/libexec/zfs/zpool-layout/dragon.ddn.conf
N:
N:    This executable file is not an ELF format binary, and does not start
N:    with the #! sequence that marks interpreted scripts. It might be a sh
N:    script that fails to name /bin/sh as its shell, or it may be incorrectly
N:    marked as executable. Sometimes upstream files developed on Windows are
N:    marked unnecessarily as executable on other systems.
N:
N:    If you are using debhelper to build your package, running dh_fixperms
N:    will often correct this problem for you.
N:
N:    Refer to Debian Policy Manual section 10.4 (Scripts) for details.
N:
N:    Severity: normal, Certainty: certain
N:

13 years agoAdd extended package descriptions.
Darik Horn [Thu, 5 May 2011 18:28:42 +0000 (13:28 -0500)]
Add extended package descriptions.

Resolve this lintian error:

E: zfsutils: extended-description-is-empty
N:
N:    The extended description (the lines after the first line of the
N:    "Description:" field) is empty.
N:
N:    Severity: serious, Certainty: certain
N:

13 years agoAdd the debehelper token to zfsutils.preinst
Darik Horn [Thu, 5 May 2011 17:50:49 +0000 (12:50 -0500)]
Add the debehelper token to zfsutils.preinst

Resolve this lintian warning:

W: zfs-linux source: maintainer-script-lacks-debhelper-token debian/zfsutils.preinst
N:
N:    This package is built using debhelper commands that may modify
N:    maintainer scripts, but the maintainer scripts do not contain the
N:    "#DEBHELPER#" token debhelper uses to modify them.
N:
N:    Adding the token to the scripts is recommended.
N:
N:    Severity: normal, Certainty: possible
N:

13 years agoAdd the debhelper token to zfs-initramfs.preinst
Darik Horn [Thu, 5 May 2011 17:49:35 +0000 (12:49 -0500)]
Add the debhelper token to zfs-initramfs.preinst

Resolve this lintian warning:

W: zfs-linux source: maintainer-script-lacks-debhelper-token debian/zfs-initramfs.preinst
N:
N:    This package is built using debhelper commands that may modify
N:    maintainer scripts, but the maintainer scripts do not contain the
N:    "#DEBHELPER#" token debhelper uses to modify them.
N:
N:    Adding the token to the scripts is recommended.
N:
N:    Severity: normal, Certainty: possible
N:

13 years agoAllow mounting of read-only snapshots
Brian Behlendorf [Thu, 5 May 2011 16:40:57 +0000 (09:40 -0700)]
Allow mounting of read-only snapshots

With the addition of the mount helper we accidentally regressed
the ability to manually mount snapshots.  This commit updates
the mount helper to expect the possibility of a ZFS_TYPE_SNAPSHOT.
All snapshot will be automatically treated as 'legacy' type mounts
so they can be mounted manually.

13 years agoUse git-dch to update the debian/changelog.
Darik Horn [Thu, 5 May 2011 15:19:17 +0000 (10:19 -0500)]
Use git-dch to update the debian/changelog.

13 years agoQuilt refresh.
Darik Horn [Thu, 5 May 2011 15:18:25 +0000 (10:18 -0500)]
Quilt refresh.

13 years agoUse 0.6.0.12.rc4 as the unofficial version.
Darik Horn [Thu, 5 May 2011 15:17:42 +0000 (10:17 -0500)]
Use 0.6.0.12.rc4 as the unofficial version.

13 years agoMerge commit 'upstream/0.6.0.12.rc4'
Darik Horn [Thu, 5 May 2011 15:15:24 +0000 (10:15 -0500)]
Merge commit 'upstream/0.6.0.12.rc4'

13 years agoAdd missing ZFS tunables
Brian Behlendorf [Tue, 3 May 2011 22:09:28 +0000 (15:09 -0700)]
Add missing ZFS tunables

This commit adds module options for all existing zfs tunables.
Ideally the average user should never need to modify any of these
values.  However, in practice sometimes you do need to tweak these
values for one reason or another.  In those cases it's nice not to
have to resort to rebuilding from source.  All tunables are visable
to modinfo and the list is as follows:

$ modinfo module/zfs/zfs.ko
filename:       module/zfs/zfs.ko
license:        CDDL
author:         Sun Microsystems/Oracle, Lawrence Livermore National Laboratory
description:    ZFS
srcversion:     8EAB1D71DACE05B5AA61567
depends:        spl,znvpair,zcommon,zunicode,zavl
vermagic:       2.6.32-131.0.5.el6.x86_64 SMP mod_unload modversions
parm:           zvol_major:Major number for zvol device (uint)
parm:           zvol_threads:Number of threads for zvol device (uint)
parm:           zio_injection_enabled:Enable fault injection (int)
parm:           zio_bulk_flags:Additional flags to pass to bulk buffers (int)
parm:           zio_delay_max:Max zio millisec delay before posting event (int)
parm:           zio_requeue_io_start_cut_in_line:Prioritize requeued I/O (bool)
parm:           zil_replay_disable:Disable intent logging replay (int)
parm:           zfs_nocacheflush:Disable cache flushes (bool)
parm:           zfs_read_chunk_size:Bytes to read per chunk (long)
parm:           zfs_vdev_max_pending:Max pending per-vdev I/Os (int)
parm:           zfs_vdev_min_pending:Min pending per-vdev I/Os (int)
parm:           zfs_vdev_aggregation_limit:Max vdev I/O aggregation size (int)
parm:           zfs_vdev_time_shift:Deadline time shift for vdev I/O (int)
parm:           zfs_vdev_ramp_rate:Exponential I/O issue ramp-up rate (int)
parm:           zfs_vdev_read_gap_limit:Aggregate read I/O over gap (int)
parm:           zfs_vdev_write_gap_limit:Aggregate write I/O over gap (int)
parm:           zfs_vdev_scheduler:I/O scheduler (charp)
parm:           zfs_vdev_cache_max:Inflate reads small than max (int)
parm:           zfs_vdev_cache_size:Total size of the per-disk cache (int)
parm:           zfs_vdev_cache_bshift:Shift size to inflate reads too (int)
parm:           zfs_scrub_limit:Max scrub/resilver I/O per leaf vdev (int)
parm:           zfs_recover:Set to attempt to recover from fatal errors (int)
parm:           spa_config_path:SPA config file (/etc/zfs/zpool.cache) (charp)
parm:           zfs_zevent_len_max:Max event queue length (int)
parm:           zfs_zevent_cols:Max event column width (int)
parm:           zfs_zevent_console:Log events to the console (int)
parm:           zfs_top_maxinflight:Max I/Os per top-level (int)
parm:           zfs_resilver_delay:Number of ticks to delay resilver (int)
parm:           zfs_scrub_delay:Number of ticks to delay scrub (int)
parm:           zfs_scan_idle:Idle window in clock ticks (int)
parm:           zfs_scan_min_time_ms:Min millisecs to scrub per txg (int)
parm:           zfs_free_min_time_ms:Min millisecs to free per txg (int)
parm:           zfs_resilver_min_time_ms:Min millisecs to resilver per txg (int)
parm:           zfs_no_scrub_io:Set to disable scrub I/O (bool)
parm:           zfs_no_scrub_prefetch:Set to disable scrub prefetching (bool)
parm:           zfs_txg_timeout:Max seconds worth of delta per txg (int)
parm:           zfs_no_write_throttle:Disable write throttling (int)
parm:           zfs_write_limit_shift:log2(fraction of memory) per txg (int)
parm:           zfs_txg_synctime_ms:Target milliseconds between tgx sync (int)
parm:           zfs_write_limit_min:Min tgx write limit (ulong)
parm:           zfs_write_limit_max:Max tgx write limit (ulong)
parm:           zfs_write_limit_inflated:Inflated tgx write limit (ulong)
parm:           zfs_write_limit_override:Override tgx write limit (ulong)
parm:           zfs_prefetch_disable:Disable all ZFS prefetching (int)
parm:           zfetch_max_streams:Max number of streams per zfetch (uint)
parm:           zfetch_min_sec_reap:Min time before stream reclaim (uint)
parm:           zfetch_block_cap:Max number of blocks to fetch at a time (uint)
parm:           zfetch_array_rd_sz:Number of bytes in a array_read (ulong)
parm:           zfs_pd_blks_max:Max number of blocks to prefetch (int)
parm:           zfs_dedup_prefetch:Enable prefetching dedup-ed blks (int)
parm:           zfs_arc_min:Min arc size (ulong)
parm:           zfs_arc_max:Max arc size (ulong)
parm:           zfs_arc_meta_limit:Meta limit for arc size (ulong)
parm:           zfs_arc_reduce_dnlc_percent:Meta reclaim percentage (int)
parm:           zfs_arc_grow_retry:Seconds before growing arc size (int)
parm:           zfs_arc_shrink_shift:log2(fraction of arc to reclaim) (int)
parm:           zfs_arc_p_min_shift:arc_c shift to calc min/max arc_p (int)

13 years agoPrep zfs-0.6.0-rc4 tag
Brian Behlendorf [Tue, 3 May 2011 17:29:05 +0000 (10:29 -0700)]
Prep zfs-0.6.0-rc4 tag

Create the fourth 0.6.0 release candidate tag (rc4).

13 years agoUse git-dch to update the debian/changelog.
Darik Horn [Tue, 3 May 2011 00:08:29 +0000 (19:08 -0500)]
Use git-dch to update the debian/changelog.

13 years agoQuilt refresh.
Darik Horn [Tue, 3 May 2011 00:07:13 +0000 (19:07 -0500)]
Quilt refresh.

13 years agoUse 0.6.0.11 as the unofficial version.
Darik Horn [Tue, 3 May 2011 00:04:20 +0000 (19:04 -0500)]
Use 0.6.0.11 as the unofficial version.

13 years agoMerge branch 'upstream'
Darik Horn [Tue, 3 May 2011 00:02:31 +0000 (19:02 -0500)]
Merge branch 'upstream'

13 years agoAdd Gentoo/Lunar/Redhat Init Scripts
Brian Behlendorf [Mon, 2 May 2011 22:39:59 +0000 (15:39 -0700)]
Add Gentoo/Lunar/Redhat Init Scripts

Every distribution has slightly different requirements for their
init scripts.  Because of this the zfs package contains several
init scripts for various distributions.  These scripts have been
contributed by, and are supported by, the larger zfs community.
Init scripts for Gentoo/Lunar/Redhat have been contributed by:

  Gentoo - devsk <devsku@gmail.com>
  Lunar  - Jean-Michel Bruenn <jean.bruenn@ip-minds.de>
  Redhat - Fajar A. Nugraha <list@fajar.net>

13 years agoFully update inode when created
Brian Behlendorf [Mon, 2 May 2011 21:04:19 +0000 (14:04 -0700)]
Fully update inode when created

When a new znode/inode pair is created both the znode and the inode
should be immediately updated to the correct values.  This was done
for the znode and for most of the values in the inode, but not all
of them.  This normally wasn't a problem because most subsequent
operations would cause the inode to be immediately updated.  This
change ensures the inode is now fully updated before it is inserted
in to the inode hash.

Closes #116
Closes #146
Closes #164

13 years agoFix 'zfs set volsize=N pool/dataset'
Brian Behlendorf [Fri, 25 Feb 2011 07:36:01 +0000 (14:36 +0700)]
Fix 'zfs set volsize=N pool/dataset'

This change fixes a kernel panic which would occur when resizing
a dataset which was not open.  The objset_t stored in the
zvol_state_t will be set to NULL when the block device is closed.
To avoid this issue we pass the correct objset_t as the third arg.

The code has also been updated to correctly notify the kernel
when the block device capacity changes.  For 2.6.28 and newer
kernels the capacity change will be immediately detected.  For
earlier kernels the capacity change will be detected when the
device is next opened.  This is a known limitation of older
kernels.

Online ext3 resize test case passes on 2.6.28+ kernels:
$ dd if=/dev/zero of=/tmp/zvol bs=1M count=1 seek=1023
$ zpool create tank /tmp/zvol
$ zfs create -V 500M tank/zd0
$ mkfs.ext3 /dev/zd0
$ mkdir /mnt/zd0
$ mount /dev/zd0 /mnt/zd0
$ df -h /mnt/zd0
$ zfs set volsize=800M tank/zd0
$ resize2fs /dev/zd0
$ df -h /mnt/zd0

Original-patch-by: Fajar A. Nugraha <github@fajar.net>
Closes #68
Closes #84

13 years agoAdd zpl_export.c to the list of targets.
Alejandro R. Sedeño [Sat, 30 Apr 2011 02:13:23 +0000 (22:13 -0400)]
Add zpl_export.c to the list of targets.

13 years agoCorrect MAXUID
Brian Behlendorf [Fri, 29 Apr 2011 21:03:12 +0000 (14:03 -0700)]
Correct MAXUID

The uid_t on most systems is in fact and unsigned 32-bit value.
This is almost always correct, however you could compile your
kernel to use an unsigned 16-bit value for uid_t.  In practice
I've never encountered a distribution which does this so I'm
willing to overlook this corner case for now.

Closes #165

13 years agoImplemented NFS export_operations.
Gunnar Beutner [Thu, 28 Apr 2011 16:35:50 +0000 (18:35 +0200)]
Implemented NFS export_operations.

Implemented the required NFS operations for exporting ZFS datasets
using the in-kernel NFS daemon.

13 years agoSuppress 'vdev_metaslab_init' memory warning
Brian Behlendorf [Wed, 27 Apr 2011 16:32:51 +0000 (09:32 -0700)]
Suppress 'vdev_metaslab_init' memory warning

The vdev_metaslab_init() function has been observed to allocate
larger than 8k chunks.  However, they are not much larger than 8k
and it does this infrequently so it is allowed and the warning is
supressed.

13 years agoUse git-dch to update the debian/changelog.
Darik Horn [Wed, 27 Apr 2011 16:24:54 +0000 (11:24 -0500)]
Use git-dch to update the debian/changelog.

13 years agoUse substvars versions in the debian/control.
Darik Horn [Wed, 27 Apr 2011 16:19:16 +0000 (11:19 -0500)]
Use substvars versions in the debian/control.

Use ${source:Upstream-Version} to depend on the spl-dkms package
instead of manually updating the version number.

13 years agoUse 0.6.0.10 as the unofficial version.
Darik Horn [Wed, 27 Apr 2011 16:18:17 +0000 (11:18 -0500)]
Use 0.6.0.10 as the unofficial version.

13 years agoMerge branch 'upstream'
Darik Horn [Wed, 27 Apr 2011 16:15:09 +0000 (11:15 -0500)]
Merge branch 'upstream'