mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
Linux compat: Minimum kernel version 3.10
Increase the minimum supported kernel version from 2.6.32 to 3.10.
This removes support for the following Linux enterprise distributions.
Distribution | Kernel | End of Life
---------------- | ------ | -------------
Ubuntu 12.04 LTS | 3.2 | Apr 28, 2017
SLES 11 | 3.0 | Mar 32, 2019
RHEL / CentOS 6 | 2.6.32 | Nov 30, 2020
The following changes were made as part of removing support.
* Updated `configure` to enforce a minimum kernel version as
specified in the META file (Linux-Minimum: 3.10).
configure: error:
*** Cannot build against kernel version 2.6.32.
*** The minimum supported kernel version is 3.10.
* Removed all `configure` kABI checks and matching C code for
interfaces which solely predate the Linux 3.10 kernel.
* Updated all `configure` kABI checks to fail when an interface is
missing which was in the 3.10 kernel up to the latest 5.1 kernel.
Removed the HAVE_* preprocessor defines for these checks and
updated the code to unconditionally use the verified interface.
* Inverted the detection logic in several kABI checks to match
the new interface as it appears in 3.10 and newer and not the
legacy interface.
* Consolidated the following checks in to individual files. Due
the large number of changes in the checks it made sense to handle
this now. It would be desirable to group other related checks in
the same fashion, but this as left as future work.
- config/kernel-blkdev.m4 - Block device kABI checks
- config/kernel-blk-queue.m4 - Block queue kABI checks
- config/kernel-bio.m4 - Bio interface kABI checks
* Removed the kABI checks for sops->nr_cached_objects() and
sops->free_cached_objects(). These interfaces are currently unused.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #9566
This commit is contained in:
@@ -40,24 +40,12 @@ typedef struct cred cred_t;
|
||||
#define GROUP_AT(gi, i) ((gi)->gid[i])
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_KUIDGID_T
|
||||
|
||||
#define KUID_TO_SUID(x) (__kuid_val(x))
|
||||
#define KGID_TO_SGID(x) (__kgid_val(x))
|
||||
#define SUID_TO_KUID(x) (KUIDT_INIT(x))
|
||||
#define SGID_TO_KGID(x) (KGIDT_INIT(x))
|
||||
#define KGIDP_TO_SGIDP(x) (&(x)->val)
|
||||
|
||||
#else /* HAVE_KUIDGID_T */
|
||||
|
||||
#define KUID_TO_SUID(x) (x)
|
||||
#define KGID_TO_SGID(x) (x)
|
||||
#define SUID_TO_KUID(x) (x)
|
||||
#define SGID_TO_KGID(x) (x)
|
||||
#define KGIDP_TO_SGIDP(x) (x)
|
||||
|
||||
#endif /* HAVE_KUIDGID_T */
|
||||
|
||||
extern void crhold(cred_t *cr);
|
||||
extern void crfree(cred_t *cr);
|
||||
extern uid_t crgetuid(const cred_t *cr);
|
||||
|
||||
@@ -27,10 +27,6 @@
|
||||
|
||||
#include <linux/proc_fs.h>
|
||||
|
||||
#ifndef HAVE_PDE_DATA
|
||||
#define PDE_DATA(x) (PDE(x)->data)
|
||||
#endif
|
||||
|
||||
extern struct proc_dir_entry *proc_spl_kstat;
|
||||
|
||||
int spl_proc_init(void);
|
||||
|
||||
@@ -28,13 +28,6 @@
|
||||
#include <linux/mm.h>
|
||||
#include <linux/fs.h>
|
||||
|
||||
#if !defined(HAVE_SHRINK_CONTROL_STRUCT)
|
||||
struct shrink_control {
|
||||
gfp_t gfp_mask;
|
||||
unsigned long nr_to_scan;
|
||||
};
|
||||
#endif /* HAVE_SHRINK_CONTROL_STRUCT */
|
||||
|
||||
/*
|
||||
* Due to frequent changes in the shrinker API the following
|
||||
* compatibility wrappers should be used. They are as follows:
|
||||
@@ -84,60 +77,10 @@ struct shrink_control {
|
||||
#define spl_register_shrinker(x) register_shrinker(x)
|
||||
#define spl_unregister_shrinker(x) unregister_shrinker(x)
|
||||
|
||||
/*
|
||||
* Linux 2.6.23 - 2.6.34 Shrinker API Compatibility.
|
||||
*/
|
||||
#if defined(HAVE_2ARGS_OLD_SHRINKER_CALLBACK)
|
||||
#define SPL_SHRINKER_DECLARE(s, x, y) \
|
||||
static struct shrinker s = { \
|
||||
.shrink = x, \
|
||||
.seeks = y \
|
||||
}
|
||||
|
||||
#define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \
|
||||
static int fn(int nr_to_scan, unsigned int gfp_mask)
|
||||
|
||||
#define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \
|
||||
static int \
|
||||
fn(int nr_to_scan, unsigned int gfp_mask) \
|
||||
{ \
|
||||
struct shrink_control sc; \
|
||||
\
|
||||
sc.nr_to_scan = nr_to_scan; \
|
||||
sc.gfp_mask = gfp_mask; \
|
||||
\
|
||||
return (__ ## fn(NULL, &sc)); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Linux 2.6.35 to 2.6.39 Shrinker API Compatibility.
|
||||
*/
|
||||
#elif defined(HAVE_3ARGS_SHRINKER_CALLBACK)
|
||||
#define SPL_SHRINKER_DECLARE(s, x, y) \
|
||||
static struct shrinker s = { \
|
||||
.shrink = x, \
|
||||
.seeks = y \
|
||||
}
|
||||
|
||||
#define SPL_SHRINKER_CALLBACK_FWD_DECLARE(fn) \
|
||||
static int fn(struct shrinker *, int, unsigned int)
|
||||
|
||||
#define SPL_SHRINKER_CALLBACK_WRAPPER(fn) \
|
||||
static int \
|
||||
fn(struct shrinker *shrink, int nr_to_scan, unsigned int gfp_mask) \
|
||||
{ \
|
||||
struct shrink_control sc; \
|
||||
\
|
||||
sc.nr_to_scan = nr_to_scan; \
|
||||
sc.gfp_mask = gfp_mask; \
|
||||
\
|
||||
return (__ ## fn(shrink, &sc)); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Linux 3.0 to 3.11 Shrinker API Compatibility.
|
||||
*/
|
||||
#elif defined(HAVE_2ARGS_NEW_SHRINKER_CALLBACK)
|
||||
#if defined(HAVE_SINGLE_SHRINKER_CALLBACK)
|
||||
#define SPL_SHRINKER_DECLARE(s, x, y) \
|
||||
static struct shrinker s = { \
|
||||
.shrink = x, \
|
||||
|
||||
@@ -28,8 +28,4 @@
|
||||
#define bcopy(src, dest, size) memmove(dest, src, size)
|
||||
#define bcmp(src, dest, size) memcmp((src), (dest), (size_t)(size))
|
||||
|
||||
#ifndef HAVE_KSTRTOUL
|
||||
#define kstrtoul strict_strtoul
|
||||
#endif
|
||||
|
||||
#endif /* _SPL_SYS_STRINGS_H */
|
||||
|
||||
@@ -27,15 +27,13 @@
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/sched/rt.h>
|
||||
#include <linux/cpumask.h>
|
||||
#include <sys/debug.h>
|
||||
#include <sys/zone.h>
|
||||
#include <sys/signal.h>
|
||||
#include <asm/page.h>
|
||||
|
||||
#ifdef HAVE_SCHED_RT_HEADER
|
||||
#include <linux/sched/rt.h>
|
||||
#endif
|
||||
|
||||
#ifndef _KERNEL
|
||||
#define _KERNEL __KERNEL__
|
||||
|
||||
@@ -53,20 +53,6 @@
|
||||
|
||||
#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)
|
||||
|
||||
@@ -59,14 +59,6 @@
|
||||
#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,
|
||||
|
||||
Reference in New Issue
Block a user