]> git.proxmox.com Git - mirror_spl-debian.git/log
mirror_spl-debian.git
13 years agoMerge branch 'upstream'
Darik Horn [Thu, 5 May 2011 15:08:07 +0000 (10:08 -0500)]
Merge branch 'upstream'

13 years agoPrep spl-0.6.0-rc4 tag
Brian Behlendorf [Tue, 3 May 2011 17:31:12 +0000 (10:31 -0700)]
Prep spl-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 [Mon, 2 May 2011 23:57:45 +0000 (18:57 -0500)]
Use git-dch to update the debian/changelog.

13 years agoUse 0.6.0.11 as the unofficial version.
Darik Horn [Mon, 2 May 2011 23:56:53 +0000 (18:56 -0500)]
Use 0.6.0.11 as the unofficial version.

13 years agoMerge branch 'upstream'
Darik Horn [Mon, 2 May 2011 23:56:26 +0000 (18:56 -0500)]
Merge branch 'upstream'

13 years agoCorrect MAXUID
Brian Behlendorf [Fri, 29 Apr 2011 20:58:45 +0000 (13:58 -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.

13 years agoRenamed 'struct fid' for NFS
Gunnar Beutner [Sun, 24 Apr 2011 08:19:28 +0000 (10:19 +0200)]
Renamed 'struct fid' for NFS

Renamed 'struct fid' because its name conflicts with another
struct in the Linux kernel headers.  The fid_t typedef remains
unchanged intentionally.

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

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

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

13 years agoMerged pull request #40 from dajhorn/spl-proc-typos.
Brian Behlendorf [Mon, 25 Apr 2011 21:51:48 +0000 (14:51 -0700)]
Merged pull request #40 from dajhorn/spl-proc-typos.

Correct typos in the spl proc handler.

13 years agoCorrect typos in the spl proc handler.
Darik Horn [Mon, 25 Apr 2011 01:48:56 +0000 (20:48 -0500)]
Correct typos in the spl proc handler.

Correct a format typo that causes /proc/sys/kernel/spl/hostid
to return a decimal number instead of a hexadecimal number.

13 years agoUse git-dch to update the debian/changelog.
Darik Horn [Sat, 23 Apr 2011 16:05:47 +0000 (11:05 -0500)]
Use git-dch to update the debian/changelog.

13 years agoRemove gawk packaging dependency.
Darik Horn [Sat, 23 Apr 2011 16:01:03 +0000 (11:01 -0500)]
Remove gawk packaging dependency.

Per commit 1512fec12893600ce7950e98b039e40f267ee3fc.

13 years agoUse 0.6.0.9 as the unofficial version.
Darik Horn [Sat, 23 Apr 2011 15:58:05 +0000 (10:58 -0500)]
Use 0.6.0.9 as the unofficial version.

13 years agoMerge branch 'upstream'
Darik Horn [Sat, 23 Apr 2011 15:57:13 +0000 (10:57 -0500)]
Merge branch 'upstream'

13 years agoFix 32-bit MAXOFFSET_T definition
Brian Behlendorf [Fri, 22 Apr 2011 23:17:13 +0000 (16:17 -0700)]
Fix 32-bit MAXOFFSET_T definition

The correct definition of MAXOFFSET_T under Solaris is in reality
tied to the maximum size of a 'long long' type.  With this in mind
MAXOFFSET_T is now defined as LLONG_MAX which ensures the correct
value is used on both 32-bit and 64-bit systems.

13 years agoMake the SPL kernel messages consistent with ZFS.
Darik Horn [Thu, 21 Apr 2011 15:11:45 +0000 (10:11 -0500)]
Make the SPL kernel messages consistent with ZFS.

Change the SPL kernel messages for module loading and module
unloading so that they are similar to the ZFS kernel messages.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
13 years agoRemove the gawk dependency.
Darik Horn [Thu, 14 Apr 2011 19:01:22 +0000 (14:01 -0500)]
Remove the gawk dependency.

This reverts commit 1814251453c8140f50170ad29d9105c1273d7e08.

Demote the gawk call back to awk and ensure that stderr is attached.  GNU gawk
tolerates a missing stderr handle, but many utilities do not, which could be
why a regular awk call was unexplainably failing on some systems.

Use argv[0] instead of sh_path for consistency internally and with other Linux
drivers.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
13 years agoImport spl_hostid as a module parameter.
Darik Horn [Mon, 11 Apr 2011 19:49:50 +0000 (14:49 -0500)]
Import spl_hostid as a module parameter.

Provide a call_usermodehelper() alternative by letting the hostid be passed as
a module parameter like this:

  $ modprobe spl spl_hostid=0x12345678

Internally change the spl_hostid variable to unsigned long because that is the
type that the coreutils /usr/bin/hostid returns.

Move the hostid command into GET_HOSTID_CMD for consistency with the similar
GET_KALLSYMS_ADDR_CMD invocation.

Use argv[0] instead of sh_path for consistency internally and with other Linux
drivers.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
13 years agoLinux 2.6.39 compat, zlib_deflate_workspacesize()
Brian Behlendorf [Wed, 20 Apr 2011 21:22:35 +0000 (14:22 -0700)]
Linux 2.6.39 compat, zlib_deflate_workspacesize()

The function zlib_deflate_workspacesize() now take 2 arguments.
This was done to avoid always having to allocate the maximum size
workspace (268K).  The caller can now specific the windowBits and
memLevel compression parameters to get a smaller workspace.

For our purposes we introduce a spl_zlib_deflate_workspacesize()
wrapper which accepts both arguments.  When the two argument
version of zlib_deflate_workspacesize() is available the arguments
are passed through.  When it's not we assume the worst case and
a maximally sized workspace is used.

13 years agoLinux 2.6.39 compat, kern_path_parent()
Brian Behlendorf [Wed, 20 Apr 2011 19:25:59 +0000 (12:25 -0700)]
Linux 2.6.39 compat, kern_path_parent()

The path_lookup() function has been renamed to kern_path_parent()
and the flags argument has been removed.  The only behavior now
offered is that of LOOKUP_PARENT.  The spl already always passed
this flag so dropping the flag does not impact us.

13 years agoLinux 2.6.39 compat, DEFINE_SPINLOCK()
Brian Behlendorf [Wed, 20 Apr 2011 19:01:11 +0000 (12:01 -0700)]
Linux 2.6.39 compat, DEFINE_SPINLOCK()

This is a long over due compatibility change.  Way, way, way back
in 2007 there was a push to remove all consumers of SPIN_LOCK_UNLOCKED.
Finally, in 2011 with 2.6.39 all the consumers have been updated
and SPIN_LOCK_UNLOCKED was removed.  It's about time we use the
new API as well, this change does exactly that.  DEFINE_SPINLOCK()
was available as far back as 2.6.12 so there doesn't need to be
any additional autoconf-foo for this change.

13 years agoUpstream merge; git-dch; 0.6.0.8 unofficial.
Darik Horn [Wed, 20 Apr 2011 12:42:24 +0000 (07:42 -0500)]
Upstream merge; git-dch; 0.6.0.8 unofficial.

13 years agoMerge branch 'upstream'
Darik Horn [Wed, 20 Apr 2011 12:39:10 +0000 (07:39 -0500)]
Merge branch 'upstream'

13 years agoFix unused variable
Brian Behlendorf [Tue, 19 Apr 2011 16:45:36 +0000 (09:45 -0700)]
Fix unused variable

Flagged by the default -Wunused-but-set-variable gcc option when
running under Fedora 15.  Since it's correct this variable is
entirely unused this commit removes it.

13 years agoFix gcc configure warnings
Brian Behlendorf [Tue, 19 Apr 2011 16:26:48 +0000 (09:26 -0700)]
Fix gcc configure warnings

Newer versions of gcc are getting smart enough to detect the sloppy
syntax used for the autoconf tests.  It is now generating warnings
for unused/undeclared variables.  Newer version of gcc even have
the -Wunused-but-set-variable option set by default.  This isn't a
problem except when -Werror is set and they get promoted to an error.
In this case the autoconf test will return an incorrect result which
will result in a build failure latter on.

To handle this I'm tightening up many of the autoconf tests to
explicitly mark variables as unused to suppress the gcc warning.
Remember, all of the autoconf code can never actually be run we
just want to get a clean build error to detect which APIs are
available.  Never using a variable is absolutely fine for this.

13 years agoLinux 2.6.39 compat, invalidate_inodes()
Brian Behlendorf [Mon, 18 Apr 2011 20:47:43 +0000 (13:47 -0700)]
Linux 2.6.39 compat, invalidate_inodes()

To resolve a potiential filesystem corruption issue a second
argument was added to invalidate_inodes().  This argument controls
whether dirty inodes are dropped or treated as busy when invalidating
a super block.  When only the legacy API is available the second
argument will be dropped for compatibility.

13 years agoMerge branch 'upstream'
Darik Horn [Wed, 13 Apr 2011 18:15:04 +0000 (13:15 -0500)]
Merge branch 'upstream'

13 years agoFix rebuildable RPMs for el6/ch5
Brian Behlendorf [Fri, 8 Apr 2011 17:20:08 +0000 (10:20 -0700)]
Fix rebuildable RPMs for el6/ch5

When rebuilding the source RPM under el5 you need to append the
target_cpu.  However, under el6/ch5 things are packaged correctly
and the arch is already part of kver.  For this reason it also
needs to be stripped from kver when setting kverpkg.

13 years agoUse git-dch to update the debian/changelog.
Darik Horn [Thu, 7 Apr 2011 17:28:15 +0000 (12:28 -0500)]
Use git-dch to update the debian/changelog.

13 years agoMerge branch 'upstream'
Darik Horn [Thu, 7 Apr 2011 17:25:05 +0000 (12:25 -0500)]
Merge branch 'upstream'

13 years agoPrep spl-0,6,0-rc3 tag
Brian Behlendorf [Thu, 7 Apr 2011 03:10:57 +0000 (20:10 -0700)]
Prep spl-0,6,0-rc3 tag

Create the third 0.6.0 release candidate tag (rc3).

13 years agoAdd dnlc_reduce_cache() support
Brian Behlendorf [Thu, 31 Mar 2011 00:44:35 +0000 (17:44 -0700)]
Add dnlc_reduce_cache() support

Provide the dnlc_reduce_cache() function which attempts to prune
cached entries from the dcache and icache.  After the entries are
pruned any slabs which they may have been using are reaped.

Note the API takes a reclaim percentage but we don't have easy
access to the total number of cache entries to calculate the
reclaim count.  However, in practice this doesn't need to be
exactly correct.  We simply need to reclaim some useful fraction
(but not all) of the cache.  The caller can determine if more
needs to be done.

13 years agoDecrease target objects per slab
Brian Behlendorf [Wed, 30 Mar 2011 05:38:53 +0000 (22:38 -0700)]
Decrease target objects per slab

By decreasing the number of target objects per slab we increase
the likelyhood that a slab can be freed.  This reduces the level
of fragmentation in the slab which has been observed to be a
problem for certain workloads.  The penalty for this is that we
also decrease the speed which need objects can be allocated.

13 years agoAdd slab usage summeries to /proc
Brian Behlendorf [Sat, 26 Mar 2011 07:03:32 +0000 (00:03 -0700)]
Add slab usage summeries to /proc

One of the most common things you want to know when looking at
the slab is how much memory is being used.  This information was
available in /proc/spl/kmem/slab but only on a per-slab basis.
This commit adds the following /proc/sys/kernel/spl/kmem/slab*
entries to make total slab usage easily available at a glance.

  slab_kmem_total - Total kmem slab size
  slab_kmem_avail - Alloc'd kmem slab size
  slab_kmem_max   - Max observed kmem slab size
  slab_vmem_total - Total vmem slab size
  slab_vmem_avail - Alloc'd vmem slab size
  slab_vmem_max   - Max observed vmem slab size

NOTE: The slab_*_max values are expected to over report because
they show maximum values since boot, not current values.

13 years agoUpdate /proc/spl/kmem/slab output
Brian Behlendorf [Sat, 26 Mar 2011 04:50:40 +0000 (21:50 -0700)]
Update /proc/spl/kmem/slab output

The 'slab_fail', 'slab_create', and 'slab_destroy' columns in the slab
output have been removed because they are virtually always zero and
not very useful.

The much more useful 'size' and 'alloc' columns have been added which
show the total slab size and how much of the total size has been
allocated to objects.

Finally, the formatting has been updated to be much more human
readable while still being friendly for tool like awk to parse.

13 years agoLinux shrinker compat
Brian Behlendorf [Wed, 23 Mar 2011 22:45:55 +0000 (15:45 -0700)]
Linux shrinker compat

The Linux shrinker has gone through three API changes since 2.6.22.
Rather than force every caller to understand all three APIs this
change consolidates the compatibility code in to the mm-compat.h
header.  The caller then can then use a single spl provided
shrinker API which does the right thing for your kernel.

SPL_SHRINKER_CALLBACK_PROTO(shrinker_callback, cb, nr_to_scan, gfp_mask);
SPL_SHRINKER_DECLARE(shrinker_struct, shrinker_callback, seeks);
spl_register_shrinker(&shrinker_struct);
spl_unregister_shrinker(&&shrinker_struct);
spl_exec_shrinker(&shrinker_struct, nr_to_scan, gfp_mask);

13 years agoAdd .va_dentry helper
Brian Behlendorf [Wed, 30 Mar 2011 05:46:38 +0000 (22:46 -0700)]
Add .va_dentry helper

While this extra structure memory does not exist under Solaris
it is needed under Linux to pass the dentry.  This allows the
dentry to be easily instantiated before the inode is unlocked.

13 years agoUse git-dch to update the debian/changelog.
Darik Horn [Wed, 6 Apr 2011 03:28:32 +0000 (22:28 -0500)]
Use git-dch to update the debian/changelog.

13 years agoMerge upstream and use 0.6.0.6 as the unofficial version number.
Darik Horn [Wed, 6 Apr 2011 03:27:17 +0000 (22:27 -0500)]
Merge upstream and use 0.6.0.6 as the unofficial version number.

13 years agoMerge branch 'upstream'
Darik Horn [Wed, 6 Apr 2011 03:26:06 +0000 (22:26 -0500)]
Merge branch 'upstream'

13 years agoUpdate CHAOS 5 Packaging
Brian Behlendorf [Thu, 31 Mar 2011 20:43:49 +0000 (13:43 -0700)]
Update CHAOS 5 Packaging

The CHAOS 5 kernels are now packaged identially to the RHEL6 kernels.
Therefore we can simply use the RHEL6 rules in the spec file when
building packages.

13 years agoUse git-dch to update the debian/changelog.
Darik Horn [Wed, 23 Mar 2011 03:52:52 +0000 (22:52 -0500)]
Use git-dch to update the debian/changelog.

13 years agoMerge upstream and tag as the unofficial spl-0.6.0.5 release.
Darik Horn [Wed, 23 Mar 2011 03:46:23 +0000 (22:46 -0500)]
Merge upstream and tag as the unofficial spl-0.6.0.5 release.

13 years agoMerge branch 'upstream'
Darik Horn [Wed, 23 Mar 2011 03:45:27 +0000 (22:45 -0500)]
Merge branch 'upstream'

13 years agoAdd crgetfsuid()/crgetfsgid() helpers
Brian Behlendorf [Tue, 22 Mar 2011 18:18:15 +0000 (11:18 -0700)]
Add crgetfsuid()/crgetfsgid() helpers

Solaris credentials don't have an fsuid/fsguid field but Linux
credentials do.  To handle this case the Solaris API is being
modestly extended to include the crgetfsuid()/crgetfsgid()
helper functions.

Addititionally, because the crget*() helpers are implemented
identically regardless of HAVE_CRED_STRUCT they have been
moved outside the #ifdef to common code.  This simplification
means we only have one version of the helper to keep to to date.

13 years agoLoad zlib_inflate.ko
Brian Behlendorf [Mon, 21 Mar 2011 23:32:29 +0000 (16:32 -0700)]
Load zlib_inflate.ko

Certain stock kernels (Debian Lenny) are built with zlib_inflate.ko
as a kernel module.  To ensure 'make check' works in-tree load this
module before loading the spl module.  This is now required for the
zlib splat regression test.

13 years agoAdd a gawk dependency to the spl-dkms package.
Darik Horn [Mon, 21 Mar 2011 18:45:30 +0000 (13:45 -0500)]
Add a gawk dependency to the spl-dkms package.

13 years agoAdd the debuild-ppa.sh script for Launchpad PPA build convenience.
Darik Horn [Mon, 21 Mar 2011 18:44:36 +0000 (13:44 -0500)]
Add the debuild-ppa.sh script for Launchpad PPA build convenience.

13 years agoSet extend-diff-ignore='.*' in the debian/source/options file to
Darik Horn [Mon, 21 Mar 2011 18:43:14 +0000 (13:43 -0500)]
Set extend-diff-ignore='.*' in the debian/source/options file to
disable the automatic patch generated by the implied
--single-debian-patch during PPA builds for more than one series.

The debian/patches/debian-changes-* files do not contain a useful
history and only add cruft to the PPA builds.  If this source
package is added to a regular repository, then the
extend-diff-ignore option should be disabled.

13 years agoDisable vmalloc() direct reclaim
Brian Behlendorf [Sun, 20 Mar 2011 22:03:18 +0000 (15:03 -0700)]
Disable vmalloc() direct reclaim

As part of vmalloc() a __pte_alloc_kernel() allocation may occur.  This
internal allocation does not honor the gfp flags passed to vmalloc().
This means even when vmalloc(GFP_NOFS) is called it is possible that a
synchronous reclaim will occur.  This reclaim can trigger file IO which
can result in a deadlock.  This issue can be avoided by explicitly
setting PF_MEMALLOC on the process to subvert synchronous reclaim when
vmalloc() is called with !__GFP_FS.

An example stack of the deadlock can be found here (1), along with the
upstream kernel bug (2), and the original bug discussion on the
linux-mm mailing list (3).  This code can be properly autoconf'ed
when the upstream bug is fixed.

1) http://github.com/behlendorf/zfs/issues/labels/Vmalloc#issue/133
2) http://bugzilla.kernel.org/show_bug.cgi?id=30702
3) http://marc.info/?l=linux-mm&m=128942194520631&w=4

13 years agoRemove default GFP_NOFS allocations
Brian Behlendorf [Sat, 19 Mar 2011 20:49:14 +0000 (13:49 -0700)]
Remove default GFP_NOFS allocations

As originally described in commit 82b8c8fa64737edfb203156b245b48840139d2c1
this was done to prevent certain deadlocks from occuring in the system.
However, as suspected the price for doing this proved to be too high.
The VM is having a hard time effectively reclaiming memory thus we are
reverting this change.

However, we still need to fundamentally handle the issue.  Under
Solaris the KM_PUSHPAGE mask is used commonly in I/O paths to ensure
a memory allocations will succeed.  We leverage this fact and redefine
KM_PUSHPAGE to include GFP_NOFS.  This ensures that in these common
I/O path we don't trigger additional reclaim.  This minimizes the
change to the Solaris code.

13 years agoStabilize the hostid for the zfs-initramfs package.
Darik Horn [Fri, 11 Mar 2011 20:49:05 +0000 (14:49 -0600)]
Stabilize the hostid for the zfs-initramfs package.

The hostname and hostid of the last system to access a ZFS pool are stored in
the ZFS pool itself.  A pool is foreign if, during `zfs import`, the current
hostname and hostid are different than the stored values thereof.

The hostname and hostid on Solaris are intrinsic, but they are not on Linux,
so the spl kernel module invokes /bin/hostname and /usr/bin/hostid from the
userland in its initialization routine.

However, these two indentifiers are usually undefined in the Linux initramfs
environment, so the /etc/hostname and /etc/hostid files must be added to the
initrd.  Things like a DHCP lease change can affect the hostid too.

ZFS requires stable values for hostname and hostid, but basic Linux systems
do not.  The hostid is therefore stabilized by creating the /etc/hostid file
in the regular environment if it does not already exist.  An undefined
hostname is usuallly stable.

Neither /etc/hostname nor /etc/hostid are controlled configuration files in
Debian distributions, but the spl package nevertheless installs a dummy
/etc/hostid file that contains the HW_INVALID_HOSTID sentinal value so that
the package manager will track it.

13 years agoRemove ${shlibs:Depends} from the spl-dkms dependencies.
Darik Horn [Thu, 10 Mar 2011 15:28:36 +0000 (09:28 -0600)]
Remove ${shlibs:Depends} from the spl-dkms dependencies.

13 years agoUpstream spl-0.6.0-rc2 release.
Darik Horn [Thu, 10 Mar 2011 15:17:00 +0000 (09:17 -0600)]
Upstream spl-0.6.0-rc2 release.

13 years agoMerge branch 'upstream'
Darik Horn [Thu, 10 Mar 2011 14:56:53 +0000 (08:56 -0600)]
Merge branch 'upstream'

13 years agoPrep spl-0.6.0-rc2 tag
Brian Behlendorf [Wed, 9 Mar 2011 23:16:10 +0000 (15:16 -0800)]
Prep spl-0.6.0-rc2 tag

Create the second 0.6.0 release candidate tag (rc2).

13 years agoRevert the '+' in the upstream version because it is not recognized by DKMS.
Darik Horn [Wed, 9 Mar 2011 18:20:09 +0000 (12:20 -0600)]
Revert the '+' in the upstream version because it is not recognized by DKMS.

13 years agoNo changes. Increment version number for a bad build.
Darik Horn [Wed, 9 Mar 2011 16:57:38 +0000 (10:57 -0600)]
No changes. Increment version number for a bad build.

13 years agoBegin using the +git upstream naming convention.
Darik Horn [Wed, 9 Mar 2011 16:00:28 +0000 (10:00 -0600)]
Begin using the +git upstream naming convention.

13 years agoMerge branch 'upstream'
Darik Horn [Wed, 9 Mar 2011 15:56:44 +0000 (09:56 -0600)]
Merge branch 'upstream'

13 years agoLinux 2.6.31 compat, include linux/seq_file.h
Brian Behlendorf [Mon, 7 Mar 2011 21:52:00 +0000 (13:52 -0800)]
Linux 2.6.31 compat, include linux/seq_file.h

Explicitly include the linux/seq_file.h header in vfs.h.  This header
is required for the sequence handlers and is included indirectly in
newer kernels.

13 years agoMake Missing Modules.symvers Fatal
Brian Behlendorf [Mon, 7 Mar 2011 20:59:30 +0000 (12:59 -0800)]
Make Missing Modules.symvers Fatal

Detect early on in configure if the Modules.symvers file is missing.
Without this file there will be build failures later and it's best
to catch this early and provide a useful error.  In this case the
most likely problem is the kernel-devel packages are not installed.
It may also be possible that they are using an unbuilt custom kernel
in which case they must build the kernel first.

13 years agoMake CONFIG_PREEMPT Fatal
Brian Behlendorf [Mon, 7 Mar 2011 18:58:07 +0000 (10:58 -0800)]
Make CONFIG_PREEMPT Fatal

Until support is added for preemptible kernels detect this at
configure time and make it fatal.  Otherwise, it is possible to
have a successful build and kernel modules with flakey behavior.

13 years agoMerge the behlendorf/xvattr branch and tag it as 0.6.0.2 upstream.
Darik Horn [Sat, 5 Mar 2011 01:15:36 +0000 (19:15 -0600)]
Merge the behlendorf/xvattr branch and tag it as 0.6.0.2 upstream.

13 years agoMerge branch 'upstream'
Darik Horn [Sat, 5 Mar 2011 01:10:38 +0000 (19:10 -0600)]
Merge branch 'upstream'

13 years agoRemove xvattr support
Brian Behlendorf [Tue, 1 Mar 2011 22:02:06 +0000 (14:02 -0800)]
Remove xvattr support

The xvattr support in the spl has always simply consisted of
defining a couple structures and a few #defines.  This was enough
to enable compilation of code which just passed xvattr types
around but not enough to effectively manipulate them.

This change removes even this minimal support leaving it up
to packages which leverage the spl to prove the full xvattr
support.  By removing it from the spl we ensure not conflict
with the higher level packages.

This just leaves minimal vnode support for basical manipulation
of files.  This code is does have the proper support functions
in the spl and a set of regression tests.

Additionally, this change removed the unused 'caller_context_t *'
type and replaces it with a 'void *'.

13 years agoAdd TIMESPEC_OVERFLOW helper
Brian Behlendorf [Tue, 1 Mar 2011 23:21:38 +0000 (15:21 -0800)]
Add TIMESPEC_OVERFLOW helper

Add the TIMESPEC_OVERFLOW helper macro to allow easy checking
of timespec overflow.

13 years agoCheck for a Debian host in PRE_BUILD and configure for split headers.
Darik Horn [Sun, 27 Feb 2011 23:36:41 +0000 (17:36 -0600)]
Check for a Debian host in PRE_BUILD and configure for split headers.

13 years agoRemove the build dependency on linux-headers because it is unnecessary
Darik Horn [Sun, 27 Feb 2011 19:06:01 +0000 (13:06 -0600)]
Remove the build dependency on linux-headers because it is unnecessary
for Ubuntu and prevents building on Debian Squeeze and Debian Sid.

13 years agoAdd version numbers to the debhelper and dkms dependencies.
Darik Horn [Sat, 26 Feb 2011 07:00:26 +0000 (01:00 -0600)]
Add version numbers to the debhelper and dkms dependencies.

13 years agoAdd fix-zlib.patch.
Darik Horn [Sat, 26 Feb 2011 02:37:00 +0000 (20:37 -0600)]
Add fix-zlib.patch.

13 years agoAdd zlib regression test
Brian Behlendorf [Fri, 25 Feb 2011 23:48:18 +0000 (15:48 -0800)]
Add zlib regression test

A zlib regression test has been added to verify the correct behavior
of z_compress_level() and z_uncompress.  The test case simply takes
a 128k buffer, it compresses the buffer, it them uncompresses the
buffer, and finally it compares the buffers after the transform.
If the buffers match then everything is fine and no data was lost.
It performs this test for all 9 zlib compression levels.

13 years agoFix zlib compression
Brian Behlendorf [Fri, 25 Feb 2011 21:26:19 +0000 (13:26 -0800)]
Fix zlib compression

While portions of the code needed to support z_compress_level() and
z_uncompress() where in place.  In reality the current implementation
was non-functional, it just was compilable.

The critical missing component was to setup a workspace for the
compress/uncompress stream structures to use.  A kmem_cache was
added for the workspace area because we require a large chunk
of memory.  This avoids to need to continually alloc/free this
memory and vmap() the pages which is very slow.  Several objects
will reside in the per-cpu kmem_cache making them quick to acquire
and release.  A further optimization would be to adjust the
implementation to additional ensure the memory is local to the cpu.
Currently that may not be the case.

13 years agoRebase the debian/changelog file.
Darik Horn [Fri, 25 Feb 2011 21:09:49 +0000 (15:09 -0600)]
Rebase the debian/changelog file.

13 years agoAdd invalidate-inodes.patch for Linux 2.6.37,
Darik Horn [Fri, 25 Feb 2011 21:07:36 +0000 (15:07 -0600)]
Add invalidate-inodes.patch for Linux 2.6.37,
which superceds the use-linux-flock-struct.patch.

13 years agoAdd invalidate-inodes.patch for Linux 2.6.37, which superceds the use-linux-flock...
Darik Horn [Thu, 24 Feb 2011 03:02:20 +0000 (21:02 -0600)]
Add invalidate-inodes.patch for Linux 2.6.37, which superceds the use-linux-flock-struct.patch.

13 years agoUse Linux flock struct
Brian Behlendorf [Sun, 20 Feb 2011 22:02:48 +0000 (14:02 -0800)]
Use Linux flock struct

Rather than defining our own structure which will conflict with
Linux's version when building 32-bit.  Simply setup a typedef
to always use the correct Linux version for both 32 ad 64-bit
builds.

13 years agoLinux compat 2.6.37, invalidate_inodes()
Brian Behlendorf [Wed, 23 Feb 2011 20:25:45 +0000 (12:25 -0800)]
Linux compat 2.6.37, invalidate_inodes()

In the 2.6.37 kernel the function invalidate_inodes() is no longer
exported for use by modules.  This memory management functionality
is needed to invalidate the inodes attached to a super block without
unmounting the filesystem.

Because this function still exists in the kernel and the prototype
is available is a common header all we strictly need is the symbol
address.  The address is obtained using spl_kallsyms_lookup_name()
and assigned to the variable invalidate_inodes_fn.  Then a #define
is used to replace all instances of invalidate_inodes() with a
call to the acquired address.  All the complexity is hidden behind
HAVE_INVALIDATE_INODES and invalidate_inodes() can be used as usual.

Long term we should try to get this, or another, interface made
available to modules again.

13 years agoUpdate Vcs-Git and Vcs-Browser fields in the control file.
Darik Horn [Tue, 22 Feb 2011 16:21:22 +0000 (10:21 -0600)]
Update Vcs-Git and Vcs-Browser fields in the control file.

13 years agoAdd quilt pc directory.
Darik Horn [Tue, 22 Feb 2011 16:19:52 +0000 (10:19 -0600)]
Add quilt pc directory.

13 years agoInitial master branch for git-buildpackage.
Darik Horn [Tue, 22 Feb 2011 16:13:11 +0000 (10:13 -0600)]
Initial master branch for git-buildpackage.

13 years agoPrep spl-0.6.0-rc1 tag
Brian Behlendorf [Fri, 18 Feb 2011 17:20:02 +0000 (09:20 -0800)]
Prep spl-0.6.0-rc1 tag

Create the first 0.6.0 release candidate tag (rc1).

13 years agoPrefer /lib/modules/$(uname -r)/ links
Brian Behlendorf [Thu, 10 Feb 2011 22:40:57 +0000 (14:40 -0800)]
Prefer /lib/modules/$(uname -r)/ links

Preferentially use the /lib/modules/$(uname -r)/source and
/lib/modules/$(uname -r)/build links.  Only if neither of these
links exist fallback to alternate methods for deducing which
kernel to build with.  This resolves the need to manually
specify --with-linux= and --with-linux-obj= on Debian systems.

13 years agoUpdate META to 0.6.0
Brian Behlendorf [Tue, 8 Feb 2011 00:41:08 +0000 (16:41 -0800)]
Update META to 0.6.0

Roll the version forward to 0.6.0.  While no major changes
really warrant this I want to keep the version in step with
ZFS for now which is the only SPL consumer.

13 years agoBlock in cv_destroy() on all waiters
Brian Behlendorf [Fri, 4 Feb 2011 22:09:08 +0000 (14:09 -0800)]
Block in cv_destroy() on all waiters

Previously we would ASSERT in cv_destroy() if it was ever called
with active waiters.  However, I've now seen several instances in
OpenSolaris code where they do the following:

  cv_broadcast();
  cv_destroy();

This leaves no time for active waiters to be woken up and scheduled
and we trip the ASSERT.  This has not been observed to be an issue
on OpenSolaris because their cv_destroy() basically does nothing.
They still do run the risk of the memory being free'd after the
cv_destroy() and hitting a bad paging request.  But in practice
this race is so small and unlikely it either doesn't happen, or
is so unlikely when it does happen the root cause has not yet been
identified.

Rather than risk the same issue in our code this change updates
cv_destroy() to block until all waiters have been woken and
scheduled.  This may take some time because each waiter must
acquire the mutex.

This change may have an impact on performance for frequently
created and destroyed condition variables.  That however is a price
worth paying it avoid crashing your system.  If performance issues
are observed they can be addressed by the caller.

13 years agoMinor policy interface
Brian Behlendorf [Wed, 22 Dec 2010 21:45:02 +0000 (13:45 -0800)]
Minor policy interface

Simply add the policy function wrappers.  They are completely
non-functional and always return that everything is OK, but once
again they simplify compilation of dependent packages for now.
These can/should be removed once the security policy of the
dependent application is completely understood and intergrade
as appropriate with Linux.

13 years agoAdd missing headers
Brian Behlendorf [Wed, 22 Dec 2010 21:41:57 +0000 (13:41 -0800)]
Add missing headers

Dependent packages require the following missing headers to
simplify compilation.  The headers are basically just stubbed
out with minimal content required.

13 years agoAdd VSA_ACE_* and MAX_ACL_ENTRIES defines
Brian Behlendorf [Wed, 12 Jan 2011 19:34:07 +0000 (11:34 -0800)]
Add VSA_ACE_* and MAX_ACL_ENTRIES defines

The following flags are use to get the proper mask when getting
and setting ACLs.  I'm hopeful this can all largely go away at
some point.

We also add a define for the maximum number of ACL entries.
MAX_ACL_ENTRIES is used as the maximum number of entries for
each type.

13 years agoAdd MAXUID define
Brian Behlendorf [Wed, 12 Jan 2011 19:29:17 +0000 (11:29 -0800)]
Add MAXUID define

For Linux the maximum uid can vary depending on how your kernel
is built.  The Linux kernel still can be compiled with 16 but uids
and gids, although I'm not aware of a major distribution which does
this (maybe an embedded one?).  Given that caviot it is reasonably
safe to define the MAXUID as 2147483647.

13 years agoAdd FIGNORECASE define
Brian Behlendorf [Wed, 12 Jan 2011 19:27:07 +0000 (11:27 -0800)]
Add FIGNORECASE define

The FIGNORECASE case define is now needed, place it with the
related flags.

13 years agoAdd ksid_index_t and ksid_t types
Brian Behlendorf [Wed, 12 Jan 2011 19:25:20 +0000 (11:25 -0800)]
Add ksid_index_t and ksid_t types

Add the ksid_index_t enum and ksid_t type for use.  These types
are now used by packages which depend on the SPL.

13 years agoMinimal VFS additions
Brian Behlendorf [Wed, 12 Jan 2011 19:22:34 +0000 (11:22 -0800)]
Minimal VFS additions

This patch simply removes the place holder vfs_t type and includes
some generic Linux VFS headers.  It also makes some minor fid_t
additions for compatibility.

13 years agoRemove VN_HOLD/VN_RELE/VOP_PUTPAGE
Brian Behlendorf [Tue, 11 Jan 2011 19:46:49 +0000 (11:46 -0800)]
Remove VN_HOLD/VN_RELE/VOP_PUTPAGE

Previously these were defined to noops but rather than give
the misleading impression that these are actually implemented
I'm removing the type entirely for clarity.

13 years agoAdd a few additional vnode #defines
Brian Behlendorf [Tue, 11 Jan 2011 20:00:35 +0000 (12:00 -0800)]
Add a few additional vnode #defines

These additional constants now have users in dependant packages.

13 years agoMake vn_cache|vn_file_cache kmem caches
Brian Behlendorf [Tue, 11 Jan 2011 19:57:02 +0000 (11:57 -0800)]
Make vn_cache|vn_file_cache kmem caches

Both of these caches were previously allowed to be either a
vmem or kmem cache based on the size of the object involved.
Since we know the object won't be to large and performce is
much better for a kmem cache for them to be kmem backed.

13 years agoClean vattr_t and vsecattr_t types
Brian Behlendorf [Tue, 11 Jan 2011 19:56:00 +0000 (11:56 -0800)]
Clean vattr_t and vsecattr_t types

Minor cleanup for the vattr_t and vsecattr_t types.

13 years agoFRSYNC Should Use O_SYNC
Brian Behlendorf [Tue, 11 Jan 2011 19:54:21 +0000 (11:54 -0800)]
FRSYNC Should Use O_SYNC

The Solaris FRSYNC maps most logically to the Linux O_SYNC.  There
is no O_RSYNC on Linux but this wasn't noticed until just recently.

13 years agoAdd vn_mode_to_vtype/vn_vtype to_mode helpers
Brian Behlendorf [Tue, 11 Jan 2011 19:53:05 +0000 (11:53 -0800)]
Add vn_mode_to_vtype/vn_vtype to_mode helpers

Add simple helpers to convert a vnode->v_type to a inode->i_mode.
These should be used sparingly but they are handy to have.