summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'zfsonlinux/merge-spl'Brian Behlendorf2018-05-2998-0/+16031
|\ | | | | | | | | | | | | | | | | | | Merge a minimal version of the zfsonlinux/spl repository in to the zfsonlinux/zfs repository. Care was taken to prevent file conflicts when merging and to preserve the spl repository history. The spl kernel module remains under the GPLv2 license as documented by the additional THIRDPARTYLICENSE.gplv2 file. Signed-off-by: Brian Behlendorf <[email protected]>
| * Prepare SPL repo to merge with ZFS repoBrian Behlendorf2018-05-29222-16870/+777
| | | | | | | | | | | | | | | | | | This commit removes everything from the repository except the core SPL implementation for Linux. Those files which remain have been moved to non-conflicting locations to facilitate the merge. The README.md and associated files have been updated accordingly. Signed-off-by: Brian Behlendorf <[email protected]>
| * Update README: run autogen firstMatthew Ahrens2018-05-071-0/+2
| | | | | | | | | | | | | | | | Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Matthew Ahrens <[email protected]> Closes #704
| * Fix undefined RPM macrosBrian Behlendorf2018-05-022-4/+6
| | | | | | | | | | | | | | | | | | | | Always invoke the SPL_AC_DEBUG* macro's when running configure so RPM_DEFINE_COMMON is correctly expanded. A similar change was already applied to ZFS. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #703
| * Exclude python scripts from RPM shebang checkTony Hutter2018-04-162-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newest Fedora packaging rules print warnings for scripts using the /usr/bin/python shebang: *** WARNING: mangling shebang in /usr/src/spl-0.7.0/cmd/splslab/splslab.py from #!/usr/bin/python to #!/usr/bin/python2. This will become an ERROR, fix it manually! Fedora wants all cross compatible scripts to pick python3. Since we don't want our users to have to pick a specific version of python, we exclude our scripts from the RPM build check. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes: #699 Closes: #700
| * Linux compat 4.16: SECTOR_SIZEGiuseppe Di Natale2018-04-091-0/+6
| | | | | | | | | | | | | | | | | | | | As of https://github.com/torvalds/linux/commit/233bde21, SECTOR_SIZE is defined in linux/blkdev.h. Define SECTOR_SIZE in sunldi.h only if it's not already defined. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Giuseppe Di Natale <[email protected]> Closes #697
| * Remove syseventsBrian Behlendorf2018-04-045-72/+1
| | | | | | | | | | | | | | | | These headers are provided in the ZFS repository and never used by the SPL. Remove them to ensure the right ones are included. Reviewed-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #696
| * Fix spl-kmod builds when using rpm >= 4.14LOLi2018-03-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | With rpm-software-management/rpm@5e94633 a package version containing invalid characters (most commonly a double '-') causes the kmod package generation to terminate with an error. This change takes advantage of the newly introduced rpm macro "_wrong_version_format_terminate_build" to allow kmod packages to be built. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: loli10K <[email protected]> Closes #691
| * Fix more cstyle warningsBrian Behlendorf2018-02-249-34/+51
| | | | | | | | | | | | | | | | | | | | This patch contains no functional changes. It is solely intended to resolve cstyle warnings in order to facilitate moving the spl source code in to the zfs repository. Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed by: George Melikov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #687
| * Fix function name typosTomohiro Kusumi2018-02-211-3/+3
| | | | | | | | | | | | | | | | vn_init() and vn_fini() had been renamed by 12ff95ff in 2011. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tomohiro Kusumi <[email protected]> Closes #686
| * Staticize kstat_default_update()Tomohiro Kusumi2018-02-211-1/+1
| | | | | | | | | | | | | | | | | | This is only used via ->ks_update of `kstat_t *`. This isn't exported nor do headers have its prototype. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tomohiro Kusumi <[email protected]> Closes #686
| * Fix multiple evaluations of VERIFY() and ASSERT() on failuresDeHackEd2018-02-211-6/+9
| | | | | | | | | | | | | | Reviewed-by: loli10K <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: DHE <[email protected]> Closes #684 Closes #685
| * Split spl-build.m4Brian Behlendorf2018-02-0722-956/+932
| | | | | | | | | | | | | | | | | | Split the kernel interface configure checks in to seperate m4 macro files. This is intended to facilitate moving the spl source code in to the zfs repository. Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #682
| * Fix cstyle warningsBrian Behlendorf2018-02-07121-1621/+1633
| | | | | | | | | | | | | | | | This patch contains no functional changes. It is solely intended to resolve cstyle warnings in order to facilitate moving the spl source code in to the zfs repository. Signed-off-by: Brian Behlendorf <[email protected]> Closes #681
| * Add cv_timedwait_io()Brian Behlendorf2018-01-243-8/+73
| | | | | | | | | | | | | | | | Add missing helper function cv_timedwait_io(), it should be used when waiting on IO with a specified timeout. Reviewed-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #674
| * Fix Debian packaging on ARMv7/ARM64LOLi2018-01-181-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building packages on Debian-based systems specify the target architecture used by 'alien' to convert .rpm packages into .deb: this avoids detecting an incorrect value which results in the following errors: <package>.aarch64.rpm is for architecture aarch64 ; the package cannot be built on this system <package>.armv7l.rpm is for architecture armel ; the package cannot be built on this system Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: loli10K <[email protected]> Closes zfsonlinux/zfs#7046 Closes #678
| * Linux 4.15 compat: timer updatesTony Hutter2017-12-212-2/+59
| | | | | | | | | | | | | | | | Use timer_setup() macro and new timeout function definition. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #670 Closes #671
| * Linux 4.14 compat: vfs_read & vfs_writeBrian Behlendorf2017-11-153-17/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kernel_read & kernel_write functions have always wrapped the vfs_read & vfs_write functions respectively. However, they could not be used by vn_rdwr() since the offset wasn't passed as a pointer. This prevented us from being able to properly update the file offset. Linux 4.14 unexported vfs_read & vfs_write but also changed the signature of kernel_read & kernel_write to provide the needed functionality. Use these updated functions when available. Reviewed-by: Pritam Baral <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #656 Closes #667
| * Remove all spin_is_locked callsJames Cowgill2017-10-304-20/+0
| | | | | | | | | | | | | | | | | | | | On systems with CONFIG_SMP turned off, spin_is_locked always returns false causing these assertions to fail. Remove them as suggested in zfsonlinux/zfs#6558. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: James Cowgill <[email protected]> Closes #665
| * Remove vn_rename and vn_removeBrian Behlendorf2017-10-274-416/+0
| | | | | | | | | | | | | | | | | | | | Both vn_rename and vn_remove have been historically problematic to implement reliably. Rather than fixing them yet again they are being removed. Reviewed-by: Arkadiusz Bubala <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #648 Closes #661
| * Update spl module parameters man5 with missing parameter detailsabraunegg2017-10-271-1/+15
| | | | | | | | | | | | | | | | Update spl module parameters man5 with the following missing parameter details for spl_panic_halt. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Alex Braunegg <[email protected]> Closes #664
| * Add DKMS package on Debian-based distributionsNeal Gompa (ニール・ゴンパ)2017-10-153-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | * config/deb.am: Enable building DKMS packages for Debian * rpm/generic/spl-dkms.spec.in: Adjust spec to be Debian-compatible * Condition kernel-devel Requires to RPM distros * Ensure that --rpm_safe_upgrade isn't used on non-RPM distros * config/deb.am: Drop CONFIG_KERNEL and CONFIG_USER guards * Makefile.am: Add pkg-dkms target Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Neal Gompa <[email protected]> Closes #657
| * Add parenthesis to btop and ptob macrosBrian Behlendorf2017-10-101-2/+2
| | | | | | | | | | | | | | | | | | Add missing parenthesis around btop and ptob macros to ensure operation ordering is preserved after expansion. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #660
| * Make include/linux/ conform to ZFS style standardOlaf Faaland2017-10-0911-53/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No semantic changes. Fix the following types of style issues: blank after preprocessor # #define followed by space instead of tab improper first line of block comment indent by spaces instead of tabs last line in file is blank missing blank after open comment missing space before left brace non-continuation indented 4 spaces spaces instead of tabs unparenthesized return expression Signed-off-by: Olaf Faaland <[email protected]>
| * Make file headers conform to ZFS style standardOlaf Faaland2017-10-09154-308/+308
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No semantic changes. Change /************\ and \************/ to /* and */ Signed-off-by: Olaf Faaland <[email protected]>
| * Pool io stat shows wlentime instead of rlentimeRichard Elling2017-09-251-1/+1
| | | | | | | | | | | | | | | | | | Reviewed-by: Tim Chase <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Richard Elling <[email protected]> Closes #652 Closes #651
| * Allow longer SPA names in statsgaurkuma2017-08-112-5/+10
| | | | | | | | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: gaurkuma <[email protected]> Closes #641
| * make module/spl/spl-kmem.c non-executable (again)Fabian-Gruenbichler2017-08-101-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This was probably accidentally committed in aeb9baa618beea1458ab3ab22cbc0f39213da6cf Fix: handle NULL case in spl_kmem_free_track() Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Gvozden Neskovic <[email protected]> Signed-off-by: Fabian Grünbichler <[email protected]> Closes #644
| * spl-module-parameters.5 manpage: fix macroFabian-Gruenbichler2017-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | There is no '.sh' macro in troff/groff/man, only '.SH' for section headers. I assume .sp for a line break was intended here like in the rest of the man page. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Closes #643
| * splat.1 manpage: fix spelling of 'hexadecimal'Fabian-Gruenbichler2017-08-101-4/+4
| | | | | | | | | | | | Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Closes #642
| * Add assert under lock to detect cases of dispach of a preallocatedBoris Protopopov2017-08-081-0/+6
| | | | | | | | | | | | | | | | taskq work item to more than one queue concurrently. Also, please see discussion in zfsonlinux/zfs#3840. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Boris Protopopov <[email protected]> Closes #609
| * Fix use-after-free in taskq_seq_show_implChunwei Chen2017-08-041-26/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | taskq_seq_show_impl walks the tq_active_list to show the tqent_func and tqent_arg. However for taskq_dispatch_ent, it's very likely that the task entry will be freed during the function call, and causes a use-after-free bug. To fix this, we duplicate the task entry to an on-stack struct, and assign it instead to tqt_task. This way, the tq_lock alone will guarantee its safety. Reviewed-by: Tim Chase <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes #638 Closes #640
| * Add __divmoddi4 and __udivmoddi4 for 32-bit archChunwei Chen2017-08-031-0/+43
| | | | | | | | | | | | | | | | | | | | gcc-7 seems to use __udivmoddi4 for 64-bit division on 32-bit arch. This patch implement them so we don't get undefined reference error. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: loli10K <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes zfsonlinux/zfs#6417 Closes #636
| * Remove misguided HAVE_MUTEX_OWNER check, take 2Oleg Drokin2017-08-022-45/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is just plain unsafe to peek inside in-kernel mutex structure and make assumptions about what kernel does with those internal fields like owner. Kernel is all too happy to stop doing the expected things like tracing lock owner once you load a tainted module like spl/zfs that is not GPL. As such you will get instant assertion failures like this: VERIFY3(((*(volatile typeof((&((&zo->zo_lock)->m_mutex))->owner) *)& ((&((&zo->zo_lock)->m_mutex))->owner))) == ((void *)0)) failed (ffff88030be28500 == (null)) PANIC at zfs_onexit.c:104:zfs_onexit_destroy() Showing stack for process 3626 CPU: 0 PID: 3626 Comm: mkfs.lustre Tainted: P OE ------------ 3.10.0-debug #1 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 Call Trace: dump_stack+0x19/0x1b spl_dumpstack+0x44/0x50 [spl] spl_panic+0xbf/0xf0 [spl] zfs_onexit_destroy+0x17c/0x280 [zfs] zfsdev_release+0x48/0xd0 [zfs] Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Chunwei Chen <[email protected]> Reviewed-by: Gvozden Neskovic <[email protected]> Signed-off-by: Oleg Drokin <[email protected]> Closes #639 Closes #632
| * spl-mutex: fix race in mutex_exitGvozden Neskovic2017-08-021-3/+4
| | | | | | | | | | | | | | | | | | | | Prevent race on accessing kmutex_t when the mutex is embedded in a ref counted structure. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Chunwei Chen <[email protected]> Signed-off-by: Gvozden Neskovic <[email protected]> Closes zfsonlinux/zfs#6401 Closes #637
| * Revert "Remove misguided HAVE_MUTEX_OWNER check"Brian Behlendorf2017-08-022-0/+40
| | | | | | | | | | | | | | | | | | This reverts commit d89616fda88bc030aaff758d37ede7d35e58841a which introduced some build failures which need to be resolved before this can be merged. Signed-off-by: Brian Behlendorf <[email protected]> Issue #633
| * Remove misguided HAVE_MUTEX_OWNER checkOleg Drokin2017-08-022-40/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is just plain unsafe to peek inside in-kernel mutex structure and make assumptions about what kernel does with those internal fields like owner. Kernel is all too happy to stop doing the expected things like tracing lock owner once you load a tainted module like spl/zfs that is not GPL. As such you will get instant assertion failures like this: VERIFY3(((*(volatile typeof((&((&zo->zo_lock)->m_mutex))->owner) *)& ((&((&zo->zo_lock)->m_mutex))->owner))) == ((void *)0)) failed (ffff88030be28500 == (null)) PANIC at zfs_onexit.c:104:zfs_onexit_destroy() Showing stack for process 3626 CPU: 0 PID: 3626 Comm: mkfs.lustre Tainted: P OE ------------ 3.10.0-debug #1 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 Call Trace: dump_stack+0x19/0x1b spl_dumpstack+0x44/0x50 [spl] spl_panic+0xbf/0xf0 [spl] zfs_onexit_destroy+0x17c/0x280 [zfs] zfsdev_release+0x48/0xd0 [zfs] Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Chunwei Chen <[email protected]> Signed-off-by: Oleg Drokin <[email protected]> Closes #632 Closes #633
| * Fix aarch64 buildBrian Behlendorf2017-07-292-4/+4
| | | | | | | | | | | | | | Add aarch64 to the list of architecture which do not sanitize the LDFLAGS from the environment. See e0aacd9b for details. Signed-off-by: Brian Behlendorf <[email protected]> Closes #635
| * Tag spl-0.7.0Brian Behlendorf2017-07-263-23/+7
| | | | | | | | | | | | META file and changelog updated. Signed-off-by: Brian Behlendorf <[email protected]>
| * Module parameter to enable spl_panic() to panic the kernelOleg Drokin2017-07-251-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | In unattended operations it's often more useful to have node panic and reboot when it encounters problems as opposed to sit there indefinitely waiting for somebody to discover it. This implements an spl_panic_crash module parameter, set it to nonzero to cause spl_panic() to call panic(). Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Oleg Drokin <[email protected]> Closes #634
| * Avoid WARN() from procfs on kstat collisionLOLi2017-07-241-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we load a ZFS pool having spa_name equals to some existing kstat we would have to create a duplicate entry, which procfs doesn't like. For instance a ZFS pool named "zil" would have its kstat "txgs" (module "zfs/zil") intalled under "/proc/spl/kstat/zfs/zil": unfortunately we already have a kstat named "zil" (module "zfs") installed in the same procfs location. Avoid this issue by skipping the duplicate entry creation in procfs. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: loli10K <[email protected]> Closes #628
| * Linux 4.13 compat: wait queuesBrian Behlendorf2017-07-2310-14/+91
| | | | | | | | | | | | | | | | | | | | | | | | Commit torvalds/linux@ac6424b9 - Renamed struct wait_queue -> struct wait_queue_entry. Commit torvalds/linux@2055da97 - Renamed wait_queue_head::task_list -> wait_queue_head::head - Renamed wait_queue_entry::task_list -> wait_queue_entry::entry Reviewed-by: Chunwei Chen <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #629
| * Tag 0.7.0-rc5Brian Behlendorf2017-07-131-1/+1
| | | | | | | | | | | | Fifth release candidate. Signed-off-by: Brian Behlendorf <[email protected]>
| * Don't cache the system hostidBrian Behlendorf2017-07-132-46/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | Historically the SPL cached the system hostid the first time it was accessed. This was done to speed up subsequent accesses. But in practice the system host id is rarely accessed and its inconvenient that it doesn't promptly detect /etc/hostid configuration changes. Therefore, zone_get_hostid() has been updated to always refresh the system hostid reported. Reviewed-by: Olaf Faaland <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #626
| * Add ASSERT3B/VERIFY3B/USEC2NSEC/NSEC2USEC macrosPrakash Surya2017-07-132-2/+10
| | | | | | | | | | | | Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Prakash Surya <[email protected]> Closes #627
| * Fix RWSEM_SPINLOCK_IS_RAW check failedChunwei Chen2017-06-281-1/+2
| | | | | | | | | | | | | | | | | | | | Initialize dummy_lock to fix the build error in gcc 7.1.1 with: error: ‘dummy_lock’ is used uninitialized in this function Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes #622
| * config: allow --with-linux without --with-linux-objChunwei Chen2017-05-251-1/+2
| | | | | | | | | | | | | | | | | | Don't use `uname -r` to determine kernel build directory when the user specified kernel source with --with-linux. Otherwise, the user is forced to use --with-linux-obj even if they are the same directory, which is very counterintuitive. Signed-off-by: Chunwei Chen <[email protected]>
| * Improve gitignoreChunwei Chen2017-05-253-1/+4
| | | | | | | | | | | | | | Exclude Makefile.in in module/ and fix the gitignore in cmd/ Also, ignore *.patch and *.orig files Signed-off-by: Chunwei Chen <[email protected]>
| * Fix cv_timedwait timeoutBrian Behlendorf2017-05-251-18/+12
| | | | | | | | | | | | | | | | | | | | | | Perform the already past expiration time check before updating cvp->cv_mutex with the provided mutex. This check only depends on local state. Doing it first ensures that cvp->cv_mutex will not be updated in the timeout case or if it's ever called with an expire_time <= now. Reviewed-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #616
| * Linux 4.12 compat: PF_FSTRANS was removedChunwei Chen2017-05-092-10/+39
| | | | | | | | | | | | | | | | Change SPL_FSTRANS to optionally contains PF_FSTRANS. Also, add __spl_pf_fstrans_check for the checks specifically for PF_FSTRANS. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes #614