Prepare SPL repo to merge with ZFS repo

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 <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf
2018-02-14 17:01:15 -08:00
parent 1149b62d20
commit a91258913f
222 changed files with 777 additions and 16870 deletions
-18
View File
@@ -1,18 +0,0 @@
SUBDIRS = fs linux rpc sharefs sys util vm
COMMON_H =
KERNEL_H = \
$(top_srcdir)/include/splat-ctl.h \
$(top_srcdir)/include/spl-ctl.h \
$(top_srcdir)/include/strings.h \
$(top_srcdir)/include/unistd.h
USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL
kerneldir = @prefix@/src/spl-$(VERSION)/include
kernel_HEADERS = $(KERNEL_H)
endif
-13
View File
@@ -1,13 +0,0 @@
COMMON_H =
KERNEL_H = \
$(top_srcdir)/include/fs/fs_subr.h
USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL
kerneldir = @prefix@/src/spl-$(VERSION)/include/fs
kernel_HEADERS = $(KERNEL_H)
endif
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_FS_FS_SUBR_H
#define _SPL_FS_FS_SUBR_H
#endif /* SPL_FS_FS_SUBR_H */
-23
View File
@@ -1,23 +0,0 @@
COMMON_H =
KERNEL_H = \
$(top_srcdir)/include/linux/bitops_compat.h \
$(top_srcdir)/include/linux/compiler_compat.h \
$(top_srcdir)/include/linux/delay_compat.h \
$(top_srcdir)/include/linux/file_compat.h \
$(top_srcdir)/include/linux/list_compat.h \
$(top_srcdir)/include/linux/math64_compat.h \
$(top_srcdir)/include/linux/mm_compat.h \
$(top_srcdir)/include/linux/proc_compat.h \
$(top_srcdir)/include/linux/rwsem_compat.h \
$(top_srcdir)/include/linux/wait_compat.h \
$(top_srcdir)/include/linux/zlib_compat.h
USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL
kerneldir = @prefix@/src/spl-$(VERSION)/include/linux
kernel_HEADERS = $(KERNEL_H)
endif
-30
View File
@@ -1,30 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_BITOPS_COMPAT_H
#define _SPL_BITOPS_COMPAT_H
#include <linux/bitops.h>
#endif /* _SPL_BITOPS_COMPAT_H */
-47
View File
@@ -1,47 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_COMPILER_COMPAT_H
#define _SPL_COMPILER_COMPAT_H
#include <linux/compiler.h>
#ifndef ACCESS_ONCE
/*
* Prevent the compiler from merging or refetching accesses. The compiler
* is also forbidden from reordering successive instances of ACCESS_ONCE(),
* but only when the compiler is aware of some particular ordering. One way
* to make the compiler aware of ordering is to put the two invocations of
* ACCESS_ONCE() in different C statements.
*
* This macro does absolutely -nothing- to prevent the CPU from reordering,
* merging, or refetching absolutely anything at any time. Its main intended
* use is to mediate communication between process-level code and irq/NMI
* handlers, all running on the same CPU.
*/
/* Taken from 2.6.33.2 */
#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
#endif
#endif /* _SPL_COMPILER_COMPAT_H */
-47
View File
@@ -1,47 +0,0 @@
/*
* Copyright (C) 2007-2013 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_DELAY_COMPAT_H
#define _SPL_DELAY_COMPAT_H
#include <linux/delay.h>
#include <linux/time.h>
/* usleep_range() introduced in 2.6.36 */
#ifndef HAVE_USLEEP_RANGE
static inline void
usleep_range(unsigned long min, unsigned long max)
{
unsigned int min_ms = min / USEC_PER_MSEC;
if (min >= MAX_UDELAY_MS)
msleep(min_ms);
else
udelay(min);
}
#endif /* HAVE_USLEEP_RANGE */
#endif /* _SPL_DELAY_COMPAT_H */
-140
View File
@@ -1,140 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_FILE_COMPAT_H
#define _SPL_FILE_COMPAT_H
#include <linux/fs.h>
#include <linux/uaccess.h>
#ifdef HAVE_FDTABLE_HEADER
#include <linux/fdtable.h>
#endif
static inline struct file *
spl_filp_open(const char *name, int flags, int mode, int *err)
{
struct file *filp = NULL;
int rc;
filp = filp_open(name, flags, mode);
if (IS_ERR(filp)) {
rc = PTR_ERR(filp);
if (err)
*err = rc;
filp = NULL;
}
return (filp);
}
#define spl_filp_close(f) filp_close(f, NULL)
#define spl_filp_poff(f) (&(f)->f_pos)
#define spl_filp_write(fp, b, s, p) (fp)->f_op->write((fp), (b), (s), p)
static inline int
spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len)
{
int error = -EOPNOTSUPP;
#ifdef HAVE_FILE_FALLOCATE
if (fp->f_op->fallocate)
error = fp->f_op->fallocate(fp, mode, offset, len);
#else
#ifdef HAVE_INODE_FALLOCATE
if (fp->f_dentry && fp->f_dentry->d_inode &&
fp->f_dentry->d_inode->i_op->fallocate)
error = fp->f_dentry->d_inode->i_op->fallocate(
fp->f_dentry->d_inode, mode, offset, len);
#endif /* HAVE_INODE_FALLOCATE */
#endif /* HAVE_FILE_FALLOCATE */
return (error);
}
static inline ssize_t
spl_kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos)
{
#if defined(HAVE_KERNEL_WRITE_PPOS)
return (kernel_write(file, buf, count, pos));
#else
mm_segment_t saved_fs;
ssize_t ret;
saved_fs = get_fs();
set_fs(get_ds());
ret = vfs_write(file, (__force const char __user *)buf, count, pos);
set_fs(saved_fs);
return (ret);
#endif
}
static inline ssize_t
spl_kernel_read(struct file *file, void *buf, size_t count, loff_t *pos)
{
#if defined(HAVE_KERNEL_READ_PPOS)
return (kernel_read(file, buf, count, pos));
#else
mm_segment_t saved_fs;
ssize_t ret;
saved_fs = get_fs();
set_fs(get_ds());
ret = vfs_read(file, (void __user *)buf, count, pos);
set_fs(saved_fs);
return (ret);
#endif
}
#ifdef HAVE_2ARGS_VFS_FSYNC
#define spl_filp_fsync(fp, sync) vfs_fsync(fp, sync)
#else
#define spl_filp_fsync(fp, sync) vfs_fsync(fp, (fp)->f_dentry, sync)
#endif /* HAVE_2ARGS_VFS_FSYNC */
#ifdef HAVE_INODE_LOCK_SHARED
#define spl_inode_lock(ip) inode_lock(ip)
#define spl_inode_unlock(ip) inode_unlock(ip)
#define spl_inode_lock_shared(ip) inode_lock_shared(ip)
#define spl_inode_unlock_shared(ip) inode_unlock_shared(ip)
#define spl_inode_trylock(ip) inode_trylock(ip)
#define spl_inode_trylock_shared(ip) inode_trylock_shared(ip)
#define spl_inode_is_locked(ip) inode_is_locked(ip)
#define spl_inode_lock_nested(ip, s) inode_lock_nested(ip, s)
#else
#define spl_inode_lock(ip) mutex_lock(&(ip)->i_mutex)
#define spl_inode_unlock(ip) mutex_unlock(&(ip)->i_mutex)
#define spl_inode_lock_shared(ip) mutex_lock(&(ip)->i_mutex)
#define spl_inode_unlock_shared(ip) mutex_unlock(&(ip)->i_mutex)
#define spl_inode_trylock(ip) mutex_trylock(&(ip)->i_mutex)
#define spl_inode_trylock_shared(ip) mutex_trylock(&(ip)->i_mutex)
#define spl_inode_is_locked(ip) mutex_is_locked(&(ip)->i_mutex)
#define spl_inode_lock_nested(ip, s) mutex_lock_nested(&(ip)->i_mutex, s)
#endif
#endif /* SPL_FILE_COMPAT_H */
-50
View File
@@ -1,50 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_LIST_COMPAT_H
#define _SPL_LIST_COMPAT_H
#include <linux/list.h>
#ifndef list_for_each_entry_safe_reverse
/*
* list_for_each_entry_safe_reverse
* @pos: the type * to use as a loop cursor.
* @n: another type * to use as temporary storage
* @head: the head for your list.
* @member: the name of the list_struct within the struct.
*
* Iterate backwards over list of given type, safe against removal
* of list entry.
*/
#define list_for_each_entry_safe_reverse(pos, n, head, member) \
for (pos = list_entry((head)->prev, typeof(*pos), member), \
n = list_entry(pos->member.prev, typeof(*pos), member); \
&pos->member != (head); \
pos = n, n = list_entry(n->member.prev, typeof(*n), member))
#endif /* list_for_each_entry_safe_reverse */
#endif /* SPL_LIST_COMPAT_H */
-33
View File
@@ -1,33 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_MATH64_COMPAT_H
#define _SPL_MATH64_COMPAT_H
#ifndef abs64
/* CSTYLED */
#define abs64(x) ({ uint64_t t = (x) >> 63; ((x) ^ t) - t; })
#endif
#endif /* _SPL_MATH64_COMPAT_H */
-35
View File
@@ -1,35 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_PROC_COMPAT_H
#define _SPL_PROC_COMPAT_H
#include <linux/proc_fs.h>
extern struct proc_dir_entry *proc_spl_kstat;
int spl_proc_init(void);
void spl_proc_fini(void);
#endif /* SPL_PROC_COMPAT_H */
-68
View File
@@ -1,68 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_RWSEM_COMPAT_H
#define _SPL_RWSEM_COMPAT_H
#include <linux/rwsem.h>
#if defined(CONFIG_PREEMPT_RT_FULL)
#define SPL_RWSEM_SINGLE_READER_VALUE (1)
#define SPL_RWSEM_SINGLE_WRITER_VALUE (0)
#elif defined(CONFIG_RWSEM_GENERIC_SPINLOCK)
#define SPL_RWSEM_SINGLE_READER_VALUE (1)
#define SPL_RWSEM_SINGLE_WRITER_VALUE (-1)
#else
#define SPL_RWSEM_SINGLE_READER_VALUE (RWSEM_ACTIVE_READ_BIAS)
#define SPL_RWSEM_SINGLE_WRITER_VALUE (RWSEM_ACTIVE_WRITE_BIAS)
#endif
/* Linux 3.16 changed activity to count for rwsem-spinlock */
#if defined(CONFIG_PREEMPT_RT_FULL)
#define RWSEM_COUNT(sem) sem->read_depth
#elif defined(HAVE_RWSEM_ACTIVITY)
#define RWSEM_COUNT(sem) sem->activity
/* Linux 4.8 changed count to an atomic_long_t for !rwsem-spinlock */
#elif defined(HAVE_RWSEM_ATOMIC_LONG_COUNT)
#define RWSEM_COUNT(sem) atomic_long_read(&(sem)->count)
#else
#define RWSEM_COUNT(sem) sem->count
#endif
int rwsem_tryupgrade(struct rw_semaphore *rwsem);
#if defined(RWSEM_SPINLOCK_IS_RAW)
#define spl_rwsem_lock_irqsave(lk, fl) raw_spin_lock_irqsave(lk, fl)
#define spl_rwsem_unlock_irqrestore(lk, fl) \
raw_spin_unlock_irqrestore(lk, fl)
#define spl_rwsem_trylock_irqsave(lk, fl) raw_spin_trylock_irqsave(lk, fl)
#else
#define spl_rwsem_lock_irqsave(lk, fl) spin_lock_irqsave(lk, fl)
#define spl_rwsem_unlock_irqrestore(lk, fl) spin_unlock_irqrestore(lk, fl)
#define spl_rwsem_trylock_irqsave(lk, fl) spin_trylock_irqsave(lk, fl)
#endif /* RWSEM_SPINLOCK_IS_RAW */
#define spl_rwsem_is_locked(rwsem) rwsem_is_locked(rwsem)
#endif /* _SPL_RWSEM_COMPAT_H */
-37
View File
@@ -1,37 +0,0 @@
/*
* Copyright (C) 2011 Lawrence Livermore National Security, LLC.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_ZLIB_COMPAT_H
#define _SPL_ZLIB_COMPAT_H
#include <linux/zlib.h>
#ifdef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE
#define spl_zlib_deflate_workspacesize(wb, ml) \
zlib_deflate_workspacesize(wb, ml)
#else
#define spl_zlib_deflate_workspacesize(wb, ml) \
zlib_deflate_workspacesize()
#endif /* HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */
#endif /* SPL_ZLIB_COMPAT_H */
-14
View File
@@ -1,14 +0,0 @@
COMMON_H =
KERNEL_H = \
$(top_srcdir)/include/rpc/types.h \
$(top_srcdir)/include/rpc/xdr.h
USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL
kerneldir = @prefix@/src/spl-$(VERSION)/include/rpc
kernel_HEADERS = $(KERNEL_H)
endif
-30
View File
@@ -1,30 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_RPC_TYPES_H
#define _SPL_RPC_TYPES_H
typedef int bool_t;
#endif /* SPL_RPC_TYPES_H */
-13
View File
@@ -1,13 +0,0 @@
COMMON_H =
KERNEL_H = \
$(top_srcdir)/include/sharefs/share.h
USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL
kerneldir = @prefix@/src/spl-$(VERSION)/include/sharefs
kernel_HEADERS = $(KERNEL_H)
endif
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_SHARE_H
#define _SPL_SHARE_H
#endif /* SPL_SHARE_H */
-45
View File
@@ -1,45 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _DEBUG_CTL_H
#define _DEBUG_CTL_H
/*
* Contains shared definitions which both the user space
* and kernel space portions of splat must agree on.
*/
typedef struct spl_debug_header {
int ph_len;
int ph_flags;
int ph_subsys;
int ph_mask;
int ph_cpu_id;
int ph_sec;
long ph_usec;
int ph_stack;
int ph_pid;
int ph_line_num;
} spl_debug_header_t;
#endif /* _DEBUG_CTL_H */
+2 -1
View File
@@ -23,7 +23,8 @@
#define _SPL_RPC_XDR_H
#include <sys/types.h>
#include <rpc/types.h>
typedef int bool_t;
/*
* XDR enums and types.
+79
View File
@@ -0,0 +1,79 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_ATOMIC_H
#define _SPL_ATOMIC_H
#include <linux/module.h>
#include <linux/spinlock.h>
#include <sys/types.h>
/*
* Map the atomic_* functions to the Linux counterparts. This relies on the
* fact that the atomic types are internally really a uint32 or uint64. If
* this were to change an alternate approach would be needed.
*
* N.B. Due to the limitations of the original API atomicity is not strictly
* preserved when using the 64-bit functions on a 32-bit system. In order
* to support this all consumers would need to be updated to use the Linux
* provided atomic_t and atomic64_t types.
*/
#define atomic_inc_32(v) atomic_inc((atomic_t *)(v))
#define atomic_dec_32(v) atomic_dec((atomic_t *)(v))
#define atomic_add_32(v, i) atomic_add((i), (atomic_t *)(v))
#define atomic_sub_32(v, i) atomic_sub((i), (atomic_t *)(v))
#define atomic_inc_32_nv(v) atomic_inc_return((atomic_t *)(v))
#define atomic_dec_32_nv(v) atomic_dec_return((atomic_t *)(v))
#define atomic_add_32_nv(v, i) atomic_add_return((i), (atomic_t *)(v))
#define atomic_sub_32_nv(v, i) atomic_sub_return((i), (atomic_t *)(v))
#define atomic_cas_32(v, x, y) atomic_cmpxchg((atomic_t *)(v), x, y)
#define atomic_swap_32(v, x) atomic_xchg((atomic_t *)(v), x)
#define atomic_inc_64(v) atomic64_inc((atomic64_t *)(v))
#define atomic_dec_64(v) atomic64_dec((atomic64_t *)(v))
#define atomic_add_64(v, i) atomic64_add((i), (atomic64_t *)(v))
#define atomic_sub_64(v, i) atomic64_sub((i), (atomic64_t *)(v))
#define atomic_inc_64_nv(v) atomic64_inc_return((atomic64_t *)(v))
#define atomic_dec_64_nv(v) atomic64_dec_return((atomic64_t *)(v))
#define atomic_add_64_nv(v, i) atomic64_add_return((i), (atomic64_t *)(v))
#define atomic_sub_64_nv(v, i) atomic64_sub_return((i), (atomic64_t *)(v))
#define atomic_cas_64(v, x, y) atomic64_cmpxchg((atomic64_t *)(v), x, y)
#define atomic_swap_64(v, x) atomic64_xchg((atomic64_t *)(v), x)
#ifdef _LP64
static __inline__ void *
atomic_cas_ptr(volatile void *target, void *cmp, void *newval)
{
return ((void *)atomic_cas_64((volatile uint64_t *)target,
(uint64_t)cmp, (uint64_t)newval));
}
#else /* _LP64 */
static __inline__ void *
atomic_cas_ptr(volatile void *target, void *cmp, void *newval)
{
return ((void *)atomic_cas_32((volatile uint32_t *)target,
(uint32_t)cmp, (uint32_t)newval));
}
#endif /* _LP64 */
#endif /* _SPL_ATOMIC_H */
@@ -28,6 +28,11 @@
#include <asm/byteorder.h>
#include <sys/isa_defs.h>
#define BSWAP_8(x) ((x) & 0xff)
#define BSWAP_16(x) ((BSWAP_8(x) << 8) | BSWAP_8((x) >> 8))
#define BSWAP_32(x) ((BSWAP_16(x) << 16) | BSWAP_16((x) >> 16))
#define BSWAP_64(x) ((BSWAP_32(x) << 32) | BSWAP_32((x) >> 32))
#define LE_16(x) cpu_to_le16(x)
#define LE_32(x) cpu_to_le32(x)
#define LE_64(x) cpu_to_le64(x)
@@ -25,7 +25,7 @@
#ifndef _SPL_CMN_ERR_H
#define _SPL_CMN_ERR_H
#include <sys/varargs.h>
#include <stdarg.h>
#define CE_CONT 0 /* continuation */
#define CE_NOTE 1 /* notice */
@@ -34,8 +34,8 @@
#define CE_IGNORE 4 /* print nothing */
extern void cmn_err(int, const char *, ...);
extern void vcmn_err(int, const char *, __va_list);
extern void vpanic(const char *, __va_list);
extern void vcmn_err(int, const char *, va_list);
extern void vpanic(const char *, va_list);
#define fm_panic panic
@@ -26,11 +26,10 @@
#define _SPL_CONDVAR_H
#include <linux/module.h>
#include <linux/wait_compat.h>
#include <linux/delay_compat.h>
#include <sys/kmem.h>
#include <sys/mutex.h>
#include <sys/callo.h>
#include <sys/wait.h>
/*
* The kcondvar_t struct is protected by mutex taken externally before
@@ -26,6 +26,7 @@
#define _SPL_CRED_H
#include <linux/module.h>
#include <linux/cred.h>
#include <sys/types.h>
#include <sys/vfs.h>
+23 -2
View File
@@ -25,7 +25,28 @@
#ifndef _SPL_FILE_H
#define _SPL_FILE_H
#define FIGNORECASE 0x00080000
#define FKIOCTL 0x80000000
#define FIGNORECASE 0x00080000
#define FKIOCTL 0x80000000
#define ED_CASE_CONFLICT 0x10
#ifdef HAVE_INODE_LOCK_SHARED
#define spl_inode_lock(ip) inode_lock(ip)
#define spl_inode_unlock(ip) inode_unlock(ip)
#define spl_inode_lock_shared(ip) inode_lock_shared(ip)
#define spl_inode_unlock_shared(ip) inode_unlock_shared(ip)
#define spl_inode_trylock(ip) inode_trylock(ip)
#define spl_inode_trylock_shared(ip) inode_trylock_shared(ip)
#define spl_inode_is_locked(ip) inode_is_locked(ip)
#define spl_inode_lock_nested(ip, s) inode_lock_nested(ip, s)
#else
#define spl_inode_lock(ip) mutex_lock(&(ip)->i_mutex)
#define spl_inode_unlock(ip) mutex_unlock(&(ip)->i_mutex)
#define spl_inode_lock_shared(ip) mutex_lock(&(ip)->i_mutex)
#define spl_inode_unlock_shared(ip) mutex_unlock(&(ip)->i_mutex)
#define spl_inode_trylock(ip) mutex_trylock(&(ip)->i_mutex)
#define spl_inode_trylock_shared(ip) mutex_trylock(&(ip)->i_mutex)
#define spl_inode_is_locked(ip) mutex_is_locked(&(ip)->i_mutex)
#define spl_inode_lock_nested(ip, s) mutex_lock_nested(&(ip)->i_mutex, s)
#endif
#endif /* SPL_FILE_H */
@@ -26,11 +26,11 @@
#define _SPL_KSTAT_H
#include <linux/module.h>
#include <linux/proc_compat.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/kmem.h>
#include <sys/mutex.h>
#include <sys/proc.h>
#define KSTAT_STRLEN 255
#define KSTAT_RAW_MAX (128*1024)
@@ -72,10 +72,6 @@ list_link_init(list_node_t *node)
static inline void
list_create(list_t *list, size_t size, size_t offset)
{
ASSERT(list);
ASSERT(size > 0);
ASSERT(size >= offset + sizeof (list_node_t));
list->list_size = size;
list->list_offset = offset;
INIT_LIST_HEAD(&list->list_head);
@@ -84,9 +80,6 @@ list_create(list_t *list, size_t size, size_t offset)
static inline void
list_destroy(list_t *list)
{
ASSERT(list);
ASSERT(list_is_empty(list));
list_del(&list->list_head);
}
@@ -123,7 +116,6 @@ list_insert_before(list_t *list, void *object, void *nobject)
static inline void
list_remove(list_t *list, void *object)
{
ASSERT(!list_is_empty(list));
list_del(list_d2l(list, object));
}
@@ -206,9 +198,6 @@ spl_list_move_tail(list_t *dst, list_t *src)
static inline void
list_link_replace(list_node_t *old_node, list_node_t *new_node)
{
ASSERT(list_link_active(old_node));
ASSERT(!list_link_active(new_node));
new_node->next = old_node->next;
new_node->prev = old_node->prev;
old_node->prev->next = new_node;
@@ -27,7 +27,6 @@
#include <sys/types.h>
#include <linux/mutex.h>
#include <linux/compiler_compat.h>
#include <linux/lockdep.h>
typedef enum {
@@ -25,4 +25,11 @@
#ifndef _SPL_PROC_H
#define _SPL_PROC_H
#include <linux/proc_fs.h>
extern struct proc_dir_entry *proc_spl_kstat;
int spl_proc_init(void);
void spl_proc_fini(void);
#endif /* SPL_PROC_H */
@@ -27,7 +27,43 @@
#include <sys/types.h>
#include <linux/rwsem.h>
#include <linux/rwsem_compat.h>
/* Linux kernel compatibility */
#if defined(CONFIG_PREEMPT_RT_FULL)
#define SPL_RWSEM_SINGLE_READER_VALUE (1)
#define SPL_RWSEM_SINGLE_WRITER_VALUE (0)
#elif defined(CONFIG_RWSEM_GENERIC_SPINLOCK)
#define SPL_RWSEM_SINGLE_READER_VALUE (1)
#define SPL_RWSEM_SINGLE_WRITER_VALUE (-1)
#else
#define SPL_RWSEM_SINGLE_READER_VALUE (RWSEM_ACTIVE_READ_BIAS)
#define SPL_RWSEM_SINGLE_WRITER_VALUE (RWSEM_ACTIVE_WRITE_BIAS)
#endif
/* Linux 3.16 changed activity to count for rwsem-spinlock */
#if defined(CONFIG_PREEMPT_RT_FULL)
#define RWSEM_COUNT(sem) sem->read_depth
#elif defined(HAVE_RWSEM_ACTIVITY)
#define RWSEM_COUNT(sem) sem->activity
/* Linux 4.8 changed count to an atomic_long_t for !rwsem-spinlock */
#elif defined(HAVE_RWSEM_ATOMIC_LONG_COUNT)
#define RWSEM_COUNT(sem) atomic_long_read(&(sem)->count)
#else
#define RWSEM_COUNT(sem) sem->count
#endif
#if defined(RWSEM_SPINLOCK_IS_RAW)
#define spl_rwsem_lock_irqsave(lk, fl) raw_spin_lock_irqsave(lk, fl)
#define spl_rwsem_unlock_irqrestore(lk, fl) \
raw_spin_unlock_irqrestore(lk, fl)
#define spl_rwsem_trylock_irqsave(lk, fl) raw_spin_trylock_irqsave(lk, fl)
#else
#define spl_rwsem_lock_irqsave(lk, fl) spin_lock_irqsave(lk, fl)
#define spl_rwsem_unlock_irqrestore(lk, fl) spin_unlock_irqrestore(lk, fl)
#define spl_rwsem_trylock_irqsave(lk, fl) spin_trylock_irqsave(lk, fl)
#endif /* RWSEM_SPINLOCK_IS_RAW */
#define spl_rwsem_is_locked(rwsem) rwsem_is_locked(rwsem)
typedef enum {
RW_DRIVER = 2,
@@ -232,5 +268,6 @@ RW_LOCK_HELD(krwlock_t *rwp)
int spl_rw_init(void);
void spl_rw_fini(void);
int rwsem_tryupgrade(struct rw_semaphore *rwsem);
#endif /* _SPL_RWLOCK_H */
@@ -22,8 +22,8 @@
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_MM_COMPAT_H
#define _SPL_MM_COMPAT_H
#ifndef _SPL_SHRINKER_H
#define _SPL_SHRINKER_H
#include <linux/mm.h>
#include <linux/fs.h>
@@ -206,4 +206,4 @@ typedef int spl_shrinker_t;
#define SHRINK_STOP (-1)
#endif
#endif /* SPL_MM_COMPAT_H */
#endif /* SPL_SHRINKER_H */
@@ -1,7 +1,6 @@
/*
* Copyright (C) 2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2018 Lawrence Livermore National Security, LLC.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
@@ -20,10 +19,13 @@
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_SYS_STRINGS_H
#define _SPL_SYS_STRINGS_H
#ifndef _SPL_IDMAP_H
#define _SPL_IDMAP_H
#include <linux/string.h>
#define IDMAP_WK_CREATOR_OWNER_UID 2147483648U
#define bzero(ptr, size) memset(ptr, 0, size)
#define bcopy(src, dest, size) memmove(dest, src, size)
#define bcmp(src, dest, size) memcmp((src), (dest), (size_t)(size))
#endif /* SPL_IDMAP_H */
#endif /* _SPL_SYS_STRINGS_H */
@@ -27,7 +27,6 @@
#include <sys/cred.h>
#include <sys/uio.h>
#include <sys/sunldi.h>
#include <sys/mutex.h>
#include <sys/u8_textprep.h>
#include <sys/vnode.h>
@@ -29,7 +29,6 @@
#include <linux/sched.h>
#include <linux/cpumask.h>
#include <sys/debug.h>
#include <sys/varargs.h>
#include <sys/zone.h>
#include <sys/signal.h>
#include <asm/page.h>
@@ -66,11 +65,10 @@
#define UINT64_MIN ULLONG_MIN
#define NBBY 8
#define ENOTSUP EOPNOTSUPP
#define MAXMSGLEN 256
#define MAXNAMELEN 256
#define MAXPATHLEN PATH_MAX
#define MAXPATHLEN 4096
#define MAXOFFSET_T LLONG_MAX
#define MAXBSIZE 8192
#define DEV_BSIZE 512
@@ -117,19 +115,6 @@
#define PAGESHIFT PAGE_SHIFT
#endif
/* from Solaris sys/byteorder.h */
#define BSWAP_8(x) ((x) & 0xff)
#define BSWAP_16(x) ((BSWAP_8(x) << 8) | BSWAP_8((x) >> 8))
#define BSWAP_32(x) ((BSWAP_16(x) << 16) | BSWAP_16((x) >> 16))
#define BSWAP_64(x) ((BSWAP_32(x) << 32) | BSWAP_32((x) >> 32))
/*
* Map some simple functions.
*/
#define bzero(ptr, size) memset(ptr, 0, size)
#define bcopy(src, dest, size) memmove(dest, src, size)
#define bcmp(src, dest, size) memcmp((src), (dest), (size_t)(size))
/* Dtrace probes do not exist in the linux kernel */
#ifdef DTRACE_PROBE
#undef DTRACE_PROBE
@@ -30,10 +30,10 @@
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/kthread.h>
#include <linux/wait_compat.h>
#include <sys/types.h>
#include <sys/thread.h>
#include <sys/rwlock.h>
#include <sys/wait.h>
#define TASKQ_NAMELEN 31
@@ -62,6 +62,8 @@ extern kthread_t *__thread_create(caddr_t stk, size_t stksize,
int state, pri_t pri);
extern void __thread_exit(void);
extern struct task_struct *spl_kthread_create(int (*func)(void *),
void *data, const char namefmt[], ...);
void *data, const char namefmt[], ...);
extern proc_t p0;
#endif /* _SPL_THREAD_H */
@@ -26,7 +26,9 @@
#define _SPL_TIMER_H
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/time.h>
#include <linux/timer.h>
#define lbolt ((clock_t)jiffies)
@@ -51,6 +53,20 @@
#define delay(ticks) schedule_timeout_uninterruptible(ticks)
/* usleep_range() introduced in 2.6.36 */
#ifndef HAVE_USLEEP_RANGE
static inline void
usleep_range(unsigned long min, unsigned long max)
{
unsigned int min_ms = min / USEC_PER_MSEC;
if (min >= MAX_UDELAY_MS)
msleep(min_ms);
else
udelay(min);
}
#endif /* HAVE_USLEEP_RANGE */
#define SEC_TO_TICK(sec) ((sec) * HZ)
#define MSEC_TO_TICK(ms) msecs_to_jiffies(ms)
#define USEC_TO_TICK(us) usecs_to_jiffies(us)
+30 -28
View File
@@ -26,7 +26,6 @@
#define _SPL_TYPES_H
#include <linux/types.h>
#include <sys/sysmacros.h>
#ifndef ULLONG_MAX
#define ULLONG_MAX (~0ULL)
@@ -36,33 +35,36 @@
#define LLONG_MAX ((long long)(~0ULL>>1))
#endif
typedef enum { B_FALSE = 0, B_TRUE = 1 } boolean_t;
typedef unsigned long intptr_t;
typedef unsigned long ulong_t;
typedef unsigned int uint_t;
typedef unsigned char uchar_t;
typedef unsigned long long u_longlong_t;
typedef unsigned long long u_offset_t;
typedef unsigned long long rlim64_t;
typedef long long longlong_t;
typedef long long offset_t;
typedef struct task_struct kthread_t;
typedef struct task_struct proc_t;
typedef short pri_t;
typedef struct timespec timestruc_t; /* definition per SVr4 */
typedef struct timespec timespec_t;
typedef longlong_t hrtime_t;
typedef unsigned short ushort_t;
typedef u_longlong_t len_t;
typedef longlong_t diskaddr_t;
typedef ushort_t o_mode_t;
typedef uint_t major_t;
typedef uint_t minor_t;
typedef ulong_t pgcnt_t;
typedef long spgcnt_t;
typedef short index_t;
typedef int id_t;
typedef enum {
B_FALSE = 0,
B_TRUE = 1
} boolean_t;
extern proc_t p0;
typedef unsigned char uchar_t;
typedef unsigned short ushort_t;
typedef unsigned int uint_t;
typedef unsigned long ulong_t;
typedef unsigned long long u_longlong_t;
typedef long long longlong_t;
typedef unsigned long intptr_t;
typedef unsigned long long rlim64_t;
typedef struct task_struct kthread_t;
typedef struct task_struct proc_t;
typedef struct timespec timestruc_t;
typedef struct timespec timespec_t;
typedef longlong_t hrtime_t;
typedef int id_t;
typedef short pri_t;
typedef short index_t;
typedef longlong_t offset_t;
typedef u_longlong_t u_offset_t;
typedef ulong_t pgcnt_t;
typedef int major_t;
typedef int minor_t;
#endif /* _SPL_TYPES_H */
@@ -25,7 +25,6 @@
#ifndef _SPL_TYPES32_H
#define _SPL_TYPES32_H
#include <sys/int_types.h>
#include <sys/types.h>
typedef uint32_t caddr32_t;
@@ -41,7 +41,6 @@
#include <sys/time.h>
#include <sys/uio.h>
#include <sys/user.h>
#include <sys/sunldi.h>
/*
* Prior to linux-2.6.33 only O_DSYNC semantics were implemented and
@@ -22,8 +22,8 @@
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_WAIT_COMPAT_H
#define _SPL_WAIT_COMPAT_H
#ifndef _SPL_WAIT_H
#define _SPL_WAIT_H
#include <linux/sched.h>
#include <linux/wait.h>
@@ -52,4 +52,4 @@ typedef wait_queue_head_t spl_wait_queue_head_t;
typedef wait_queue_t spl_wait_queue_entry_t;
#endif
#endif /* SPL_WAIT_COMPAT_H */
#endif /* SPL_WAIT_H */
@@ -59,6 +59,14 @@
#include <sys/types.h>
#include <linux/zlib.h>
#ifdef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE
#define spl_zlib_deflate_workspacesize(wb, ml) \
zlib_deflate_workspacesize(wb, ml)
#else
#define spl_zlib_deflate_workspacesize(wb, ml) \
zlib_deflate_workspacesize()
#endif /* HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */
extern int z_compress_level(void *dest, size_t *destLen, const void *source,
size_t sourceLen, int level);
extern int z_uncompress(void *dest, size_t *destLen, const void *source,
-109
View File
@@ -1,109 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPLAT_CTL_H
#define _SPLAT_CTL_H
#include <linux/types.h>
/*
* Contains shared definitions for both user space and kernel space. To
* ensure 32-bit/64-bit interoperability over ioctl()'s only types with
* fixed sizes can be used.
*/
#define SPLAT_NAME "splatctl"
#define SPLAT_DEV "/dev/splatctl"
#define SPLAT_NAME_SIZE 20
#define SPLAT_DESC_SIZE 60
typedef struct splat_user {
char name[SPLAT_NAME_SIZE]; /* Short name */
char desc[SPLAT_DESC_SIZE]; /* Short description */
__u32 id; /* Unique numeric id */
} splat_user_t;
#define SPLAT_CFG_MAGIC 0x15263748U
typedef struct splat_cfg {
__u32 cfg_magic; /* Unique magic */
__u32 cfg_cmd; /* Configure command */
__s32 cfg_arg1; /* Configure command arg 1 */
__s32 cfg_rc1; /* Configure response 1 */
union {
struct {
__u32 size;
splat_user_t descs[0];
} splat_subsystems;
struct {
__u32 size;
splat_user_t descs[0];
} splat_tests;
} cfg_data;
} splat_cfg_t;
#define SPLAT_CMD_MAGIC 0x9daebfc0U
typedef struct splat_cmd {
__u32 cmd_magic; /* Unique magic */
__u32 cmd_subsystem; /* Target subsystem */
__u32 cmd_test; /* Subsystem test */
__u32 cmd_data_size; /* Opaque data size */
char cmd_data_str[0]; /* Opaque data region */
} splat_cmd_t;
/* Valid ioctls */
#define SPLAT_CFG _IOWR('f', 101, splat_cfg_t)
#define SPLAT_CMD _IOWR('f', 102, splat_cmd_t)
/* Valid configuration commands */
#define SPLAT_CFG_BUFFER_CLEAR 0x001 /* Clear text buffer */
#define SPLAT_CFG_BUFFER_SIZE 0x002 /* Resize text buffer */
#define SPLAT_CFG_SUBSYSTEM_COUNT 0x101 /* Number of subsystem */
#define SPLAT_CFG_SUBSYSTEM_LIST 0x102 /* List of N subsystems */
#define SPLAT_CFG_TEST_COUNT 0x201 /* Number of tests */
#define SPLAT_CFG_TEST_LIST 0x202 /* List of N tests */
/*
* Valid subsystem and test commands are defined in each subsystem as
* SPLAT_SUBSYSTEM_*. We do need to be careful to avoid collisions, the
* currently defined subsystems are as follows:
*/
#define SPLAT_SUBSYSTEM_KMEM 0x0100
#define SPLAT_SUBSYSTEM_TASKQ 0x0200
#define SPLAT_SUBSYSTEM_KRNG 0x0300
#define SPLAT_SUBSYSTEM_MUTEX 0x0400
#define SPLAT_SUBSYSTEM_CONDVAR 0x0500
#define SPLAT_SUBSYSTEM_THREAD 0x0600
#define SPLAT_SUBSYSTEM_RWLOCK 0x0700
#define SPLAT_SUBSYSTEM_TIME 0x0800
#define SPLAT_SUBSYSTEM_VNODE 0x0900
#define SPLAT_SUBSYSTEM_KOBJ 0x0a00
#define SPLAT_SUBSYSTEM_ATOMIC 0x0b00
#define SPLAT_SUBSYSTEM_LIST 0x0c00
#define SPLAT_SUBSYSTEM_GENERIC 0x0d00
#define SPLAT_SUBSYSTEM_CRED 0x0e00
#define SPLAT_SUBSYSTEM_ZLIB 0x0f00
#define SPLAT_SUBSYSTEM_LINUX 0x1000
#define SPLAT_SUBSYSTEM_UNKNOWN 0xff00
#endif /* _SPLAT_CTL_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_STRINGS_H
#define _SPL_STRINGS_H
#endif /* SPL_STRINGS_H */
-113
View File
@@ -1,113 +0,0 @@
SUBDIRS = fm fs
COMMON_H =
KERNEL_H = \
$(top_srcdir)/include/sys/acl.h \
$(top_srcdir)/include/sys/acl_impl.h \
$(top_srcdir)/include/sys/atomic.h \
$(top_srcdir)/include/sys/attr.h \
$(top_srcdir)/include/sys/bitmap.h \
$(top_srcdir)/include/sys/bootconf.h \
$(top_srcdir)/include/sys/bootprops.h \
$(top_srcdir)/include/sys/buf.h \
$(top_srcdir)/include/sys/byteorder.h \
$(top_srcdir)/include/sys/callb.h \
$(top_srcdir)/include/sys/callo.h \
$(top_srcdir)/include/sys/cmn_err.h \
$(top_srcdir)/include/sys/compress.h \
$(top_srcdir)/include/sys/condvar.h \
$(top_srcdir)/include/sys/conf.h \
$(top_srcdir)/include/sys/console.h \
$(top_srcdir)/include/sys/cpupart.h \
$(top_srcdir)/include/sys/cpuvar.h \
$(top_srcdir)/include/sys/crc32.h \
$(top_srcdir)/include/sys/cred.h \
$(top_srcdir)/include/sys/ctype.h \
$(top_srcdir)/include/sys/ddi.h \
$(top_srcdir)/include/sys/debug.h \
$(top_srcdir)/include/sys/dirent.h \
$(top_srcdir)/include/sys/disp.h \
$(top_srcdir)/include/sys/dkio.h \
$(top_srcdir)/include/sys/dkioc_free_util.h \
$(top_srcdir)/include/sys/dklabel.h \
$(top_srcdir)/include/sys/dnlc.h \
$(top_srcdir)/include/sys/dumphdr.h \
$(top_srcdir)/include/sys/efi_partition.h \
$(top_srcdir)/include/sys/errno.h \
$(top_srcdir)/include/sys/extdirent.h \
$(top_srcdir)/include/sys/fcntl.h \
$(top_srcdir)/include/sys/file.h \
$(top_srcdir)/include/sys/idmap.h \
$(top_srcdir)/include/sys/int_limits.h \
$(top_srcdir)/include/sys/int_types.h \
$(top_srcdir)/include/sys/inttypes.h \
$(top_srcdir)/include/sys/isa_defs.h \
$(top_srcdir)/include/sys/kidmap.h \
$(top_srcdir)/include/sys/kmem.h \
$(top_srcdir)/include/sys/kmem_cache.h \
$(top_srcdir)/include/sys/kobj.h \
$(top_srcdir)/include/sys/kstat.h \
$(top_srcdir)/include/sys/list.h \
$(top_srcdir)/include/sys/mkdev.h \
$(top_srcdir)/include/sys/mntent.h \
$(top_srcdir)/include/sys/modctl.h \
$(top_srcdir)/include/sys/mode.h \
$(top_srcdir)/include/sys/mount.h \
$(top_srcdir)/include/sys/mutex.h \
$(top_srcdir)/include/sys/note.h \
$(top_srcdir)/include/sys/open.h \
$(top_srcdir)/include/sys/param.h \
$(top_srcdir)/include/sys/pathname.h \
$(top_srcdir)/include/sys/policy.h \
$(top_srcdir)/include/sys/pool.h \
$(top_srcdir)/include/sys/priv_impl.h \
$(top_srcdir)/include/sys/processor.h \
$(top_srcdir)/include/sys/proc.h \
$(top_srcdir)/include/sys/pset.h \
$(top_srcdir)/include/sys/random.h \
$(top_srcdir)/include/sys/refstr.h \
$(top_srcdir)/include/sys/resource.h \
$(top_srcdir)/include/sys/rwlock.h \
$(top_srcdir)/include/sys/sdt.h \
$(top_srcdir)/include/sys/sid.h \
$(top_srcdir)/include/sys/signal.h \
$(top_srcdir)/include/sys/stat.h \
$(top_srcdir)/include/sys/stropts.h \
$(top_srcdir)/include/sys/sunddi.h \
$(top_srcdir)/include/sys/sunldi.h \
$(top_srcdir)/include/sys/sysdc.h \
$(top_srcdir)/include/sys/sysmacros.h \
$(top_srcdir)/include/sys/systeminfo.h \
$(top_srcdir)/include/sys/systm.h \
$(top_srcdir)/include/sys/taskq.h \
$(top_srcdir)/include/sys/thread.h \
$(top_srcdir)/include/sys/time.h \
$(top_srcdir)/include/sys/timer.h \
$(top_srcdir)/include/sys/t_lock.h \
$(top_srcdir)/include/sys/tsd.h \
$(top_srcdir)/include/sys/types32.h \
$(top_srcdir)/include/sys/types.h \
$(top_srcdir)/include/sys/u8_textprep.h \
$(top_srcdir)/include/sys/uio.h \
$(top_srcdir)/include/sys/unistd.h \
$(top_srcdir)/include/sys/user.h \
$(top_srcdir)/include/sys/va_list.h \
$(top_srcdir)/include/sys/varargs.h \
$(top_srcdir)/include/sys/vfs.h \
$(top_srcdir)/include/sys/vfs_opreg.h \
$(top_srcdir)/include/sys/vmem.h \
$(top_srcdir)/include/sys/vmsystm.h \
$(top_srcdir)/include/sys/vnode.h \
$(top_srcdir)/include/sys/zmod.h \
$(top_srcdir)/include/sys/zone.h
USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL
kerneldir = @prefix@/src/spl-$(VERSION)/include/sys
kernel_HEADERS = $(KERNEL_H)
endif
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_ACL_IMPL_H
#define _SPL_ACL_IMPL_H
#endif /* _SPL_ACL_IMPL_H */
-313
View File
@@ -1,313 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_ATOMIC_H
#define _SPL_ATOMIC_H
#include <linux/module.h>
#include <linux/spinlock.h>
#include <sys/types.h>
/*
* Two approaches to atomic operations are implemented each with its
* own benefits are drawbacks imposed by the Solaris API. Neither
* approach handles the issue of word breaking when using a 64-bit
* atomic variable on a 32-bit arch. The Solaris API would need to
* add an atomic read call to correctly support this.
*
* When ATOMIC_SPINLOCK is defined all atomic operations will be
* serialized through global spin locks. This is bad for performance
* but it does allow a simple generic implementation.
*
* When ATOMIC_SPINLOCK is not defined the Linux atomic operations
* are used. This is safe as long as the core Linux implementation
* doesn't change because we are relying on the fact that an atomic
* type is really just a uint32 or uint64. If this changes at some
* point in the future we need to fall-back to the spin approach.
*/
#ifdef ATOMIC_SPINLOCK
extern spinlock_t atomic32_lock;
extern spinlock_t atomic64_lock;
static __inline__ void
atomic_inc_32(volatile uint32_t *target)
{
spin_lock(&atomic32_lock);
(*target)++;
spin_unlock(&atomic32_lock);
}
static __inline__ void
atomic_dec_32(volatile uint32_t *target)
{
spin_lock(&atomic32_lock);
(*target)--;
spin_unlock(&atomic32_lock);
}
static __inline__ void
atomic_add_32(volatile uint32_t *target, int32_t delta)
{
spin_lock(&atomic32_lock);
*target += delta;
spin_unlock(&atomic32_lock);
}
static __inline__ void
atomic_sub_32(volatile uint32_t *target, int32_t delta)
{
spin_lock(&atomic32_lock);
*target -= delta;
spin_unlock(&atomic32_lock);
}
static __inline__ uint32_t
atomic_inc_32_nv(volatile uint32_t *target)
{
uint32_t nv;
spin_lock(&atomic32_lock);
nv = ++(*target);
spin_unlock(&atomic32_lock);
return (nv);
}
static __inline__ uint32_t
atomic_dec_32_nv(volatile uint32_t *target)
{
uint32_t nv;
spin_lock(&atomic32_lock);
nv = --(*target);
spin_unlock(&atomic32_lock);
return (nv);
}
static __inline__ uint32_t
atomic_add_32_nv(volatile uint32_t *target, uint32_t delta)
{
uint32_t nv;
spin_lock(&atomic32_lock);
*target += delta;
nv = *target;
spin_unlock(&atomic32_lock);
return (nv);
}
static __inline__ uint32_t
atomic_sub_32_nv(volatile uint32_t *target, uint32_t delta)
{
uint32_t nv;
spin_lock(&atomic32_lock);
*target -= delta;
nv = *target;
spin_unlock(&atomic32_lock);
return (nv);
}
static __inline__ uint32_t
atomic_cas_32(volatile uint32_t *target, uint32_t cmp, uint32_t newval)
{
uint32_t rc;
spin_lock(&atomic32_lock);
rc = *target;
if (*target == cmp)
*target = newval;
spin_unlock(&atomic32_lock);
return (rc);
}
static __inline__ uint32_t
atomic_swap_32(volatile uint32_t *target, uint32_t newval)
{
uint32_t rc;
spin_lock(&atomic32_lock);
rc = *target;
*target = newval;
spin_unlock(&atomic32_lock);
return (rc);
}
static __inline__ void
atomic_inc_64(volatile uint64_t *target)
{
spin_lock(&atomic64_lock);
(*target)++;
spin_unlock(&atomic64_lock);
}
static __inline__ void
atomic_dec_64(volatile uint64_t *target)
{
spin_lock(&atomic64_lock);
(*target)--;
spin_unlock(&atomic64_lock);
}
static __inline__ void
atomic_add_64(volatile uint64_t *target, uint64_t delta)
{
spin_lock(&atomic64_lock);
*target += delta;
spin_unlock(&atomic64_lock);
}
static __inline__ void
atomic_sub_64(volatile uint64_t *target, uint64_t delta)
{
spin_lock(&atomic64_lock);
*target -= delta;
spin_unlock(&atomic64_lock);
}
static __inline__ uint64_t
atomic_inc_64_nv(volatile uint64_t *target)
{
uint64_t nv;
spin_lock(&atomic64_lock);
nv = ++(*target);
spin_unlock(&atomic64_lock);
return (nv);
}
static __inline__ uint64_t
atomic_dec_64_nv(volatile uint64_t *target)
{
uint64_t nv;
spin_lock(&atomic64_lock);
nv = --(*target);
spin_unlock(&atomic64_lock);
return (nv);
}
static __inline__ uint64_t
atomic_add_64_nv(volatile uint64_t *target, uint64_t delta)
{
uint64_t nv;
spin_lock(&atomic64_lock);
*target += delta;
nv = *target;
spin_unlock(&atomic64_lock);
return (nv);
}
static __inline__ uint64_t
atomic_sub_64_nv(volatile uint64_t *target, uint64_t delta)
{
uint64_t nv;
spin_lock(&atomic64_lock);
*target -= delta;
nv = *target;
spin_unlock(&atomic64_lock);
return (nv);
}
static __inline__ uint64_t
atomic_cas_64(volatile uint64_t *target, uint64_t cmp, uint64_t newval)
{
uint64_t rc;
spin_lock(&atomic64_lock);
rc = *target;
if (*target == cmp)
*target = newval;
spin_unlock(&atomic64_lock);
return (rc);
}
static __inline__ uint64_t
atomic_swap_64(volatile uint64_t *target, uint64_t newval)
{
uint64_t rc;
spin_lock(&atomic64_lock);
rc = *target;
*target = newval;
spin_unlock(&atomic64_lock);
return (rc);
}
#else /* ATOMIC_SPINLOCK */
#define atomic_inc_32(v) atomic_inc((atomic_t *)(v))
#define atomic_dec_32(v) atomic_dec((atomic_t *)(v))
#define atomic_add_32(v, i) atomic_add((i), (atomic_t *)(v))
#define atomic_sub_32(v, i) atomic_sub((i), (atomic_t *)(v))
#define atomic_inc_32_nv(v) atomic_inc_return((atomic_t *)(v))
#define atomic_dec_32_nv(v) atomic_dec_return((atomic_t *)(v))
#define atomic_add_32_nv(v, i) atomic_add_return((i), (atomic_t *)(v))
#define atomic_sub_32_nv(v, i) atomic_sub_return((i), (atomic_t *)(v))
#define atomic_cas_32(v, x, y) atomic_cmpxchg((atomic_t *)(v), x, y)
#define atomic_swap_32(v, x) atomic_xchg((atomic_t *)(v), x)
#define atomic_inc_64(v) atomic64_inc((atomic64_t *)(v))
#define atomic_dec_64(v) atomic64_dec((atomic64_t *)(v))
#define atomic_add_64(v, i) atomic64_add((i), (atomic64_t *)(v))
#define atomic_sub_64(v, i) atomic64_sub((i), (atomic64_t *)(v))
#define atomic_inc_64_nv(v) atomic64_inc_return((atomic64_t *)(v))
#define atomic_dec_64_nv(v) atomic64_dec_return((atomic64_t *)(v))
#define atomic_add_64_nv(v, i) atomic64_add_return((i), (atomic64_t *)(v))
#define atomic_sub_64_nv(v, i) atomic64_sub_return((i), (atomic64_t *)(v))
#define atomic_cas_64(v, x, y) atomic64_cmpxchg((atomic64_t *)(v), x, y)
#define atomic_swap_64(v, x) atomic64_xchg((atomic64_t *)(v), x)
#endif /* ATOMIC_SPINLOCK */
#ifdef _LP64
static __inline__ void *
atomic_cas_ptr(volatile void *target, void *cmp, void *newval)
{
return ((void *)atomic_cas_64((volatile uint64_t *)target,
(uint64_t)cmp, (uint64_t)newval));
}
#else /* _LP64 */
static __inline__ void *
atomic_cas_ptr(volatile void *target, void *cmp, void *newval)
{
return ((void *)atomic_cas_32((volatile uint32_t *)target,
(uint32_t)cmp, (uint32_t)newval));
}
#endif /* _LP64 */
#endif /* _SPL_ATOMIC_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_ATTR_H
#define _SPL_ATTR_H
#endif /* SPL_ATTR_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_BITMAP_H
#define _SPL_BITMAP_H
#endif /* SPL_BITMAP_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_BOOTCONF_H
#define _SPL_BOOTCONF_H
#endif /* SPL_BOOTCONF_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_BOOTPROPS_H
#define _SPL_BOOTPROPS_H
#endif /* SPL_BOOTPROPS_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_BUF_H
#define _SPL_BUF_H
#endif /* SPL_BUF_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_COMPRESS_H
#define _SPL_COMPRESS_H
#endif /* SPL_COMPRESS_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_CONF_H
#define _SPL_CONF_H
#endif /* SPL_CONF_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_CPUPART_H
#define _SPL_CPUPART_H
#endif /* SPL_CPUPART_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_CPUVAR_H
#define _SPL_CPUVAR_H
#endif /* SPL_CPUVAR_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_CRC32_H
#define _SPL_CRC32_H
#endif /* SPL_CRC32_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_DDI_H
#define _SPL_DDI_H
#endif /* SPL_DDI_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_DIRENT_H
#define _SPL_DIRENT_H
#endif /* SPL_DIRENT_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_DKLABEL_H
#define _SPL_DKLABEL_H
#endif /* _SPL_DKLABEL_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_DNLC_H
#define _SPL_DNLC_H
#endif /* SPL_DNLC_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_DUMPHDR_H
#define _SPL_DUMPHDR_H
#endif /* SPL_DUMPHDR_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_EFI_PARTITION_H
#define _SPL_EFI_PARTITION_H
#endif /* SPL_EFI_PARTITION_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_ERRNO_H
#define _SPL_ERRNO_H
#endif /* SPL_ERRNO_H */
-29
View File
@@ -1,29 +0,0 @@
/*
* Copyright (C) 2010 Lawrence Livermore National Security, LLC.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_EXTDIRENT_H
#define _SPL_EXTDIRENT_H
#define ED_CASE_CONFLICT 0x10
#endif /* _SPL_EXTDIRENT_H */
-14
View File
@@ -1,14 +0,0 @@
COMMON_H =
KERNEL_H = \
$(top_srcdir)/include/sys/fm/protocol.h \
$(top_srcdir)/include/sys/fm/util.h
USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL
kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/fm
kernel_HEADERS = $(KERNEL_H)
endif
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_FM_PROTOCOL_H
#define _SPL_FM_PROTOCOL_H
#endif /* _SPL_FM_PROTOCOL_H */
-28
View File
@@ -1,28 +0,0 @@
/*
* Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
* Copyright (C) 2007 The Regents of the University of California.
* Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
* Written by Brian Behlendorf <behlendorf1@llnl.gov>.
* UCRL-CODE-235197
*
* This file is part of the SPL, Solaris Porting Layer.
* For details, see <http://zfsonlinux.org/>.
*
* The SPL is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* The SPL is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with the SPL. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _SPL_FM_UTIL_H
#define _SPL_FM_UTIL_H
#endif /* _SPL_FM_UTIL_H */
-13
View File
@@ -1,13 +0,0 @@
COMMON_H =
KERNEL_H = \
$(top_srcdir)/include/sys/fs/swapnode.h
USER_H =
EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
if CONFIG_KERNEL
kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/fs
kernel_HEADERS = $(KERNEL_H)
endif

Some files were not shown because too many files have changed in this diff Show More