mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-23 05:31:28 +00:00
Merge branch 'svn-trunk'
This commit is contained in:
@@ -3,29 +3,29 @@
|
||||
ABT_DETAILS="x86_64"
|
||||
ABT_JOBS=5
|
||||
ABT_KERNELS=" \
|
||||
4.20 \
|
||||
4.19.13-nc \
|
||||
4.20.2 \
|
||||
4.19.15-nc \
|
||||
4.18.18-nc \
|
||||
4.17.18-nc \
|
||||
4.16.18-nc \
|
||||
4.15.18-nc \
|
||||
4.14.85-nc \
|
||||
4.14.93-nc \
|
||||
4.13.16-nc \
|
||||
4.12.14-nc \
|
||||
4.11.12-nc \
|
||||
4.10.17-nc \
|
||||
4.9.142-nc \
|
||||
4.9.150-nc \
|
||||
4.8.17-nc \
|
||||
4.7.10-nc \
|
||||
4.6.7-nc \
|
||||
4.5.7-nc \
|
||||
4.4.166-nc \
|
||||
4.4.170-nc \
|
||||
4.3.6-nc \
|
||||
4.2.8-nc \
|
||||
4.1.52-nc \
|
||||
4.0.9-nc \
|
||||
3.19.8-nc \
|
||||
3.18.128-nc \
|
||||
3.18.132-nc \
|
||||
3.17.8-nc \
|
||||
3.16.60-nc \
|
||||
3.15.10-nc \
|
||||
@@ -56,5 +56,5 @@ ABT_KERNELS=" \
|
||||
2.6.31.14-nc \
|
||||
2.6.30.10-nc \
|
||||
2.6.29.6-nc \
|
||||
2.6.27.62-nc \
|
||||
2.6.27.52-nc \
|
||||
"
|
||||
|
||||
@@ -647,7 +647,10 @@ do
|
||||
patchdir="patchdir-${kv}"
|
||||
k="${kv}"
|
||||
|
||||
download_kernel "$k" || continue
|
||||
if ! download_kernel "$k"; then
|
||||
echo "Downloading kernel version $k failed"
|
||||
continue
|
||||
fi
|
||||
generate_kernel_patch "$k" "${generate_kernel_patch_options}" || continue
|
||||
(
|
||||
cd "${outputdir}" &&
|
||||
|
||||
@@ -119,11 +119,25 @@ static inline unsigned int queue_max_hw_sectors(struct request_queue *q)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32)
|
||||
/* See also commit ac481c20ef8f ("block: Topology ioctls") # v2.6.32 */
|
||||
static inline int bdev_io_opt(struct block_device *bdev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* <linux/blk-mq.h> */
|
||||
|
||||
static inline unsigned int scst_blk_rq_cpu(struct request *rq)
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 21, 0)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)
|
||||
/*
|
||||
* See also commit c7c22e4d5c1f ("block: add support for IO CPU
|
||||
* affinity") # v2.6.28.
|
||||
*/
|
||||
return 0;
|
||||
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 21, 0)
|
||||
return rq->cpu;
|
||||
#else
|
||||
return blk_mq_rq_cpu(rq);
|
||||
@@ -420,6 +434,33 @@ static inline ssize_t call_write_iter(struct file *file, struct kiocb *kio,
|
||||
}
|
||||
#endif
|
||||
|
||||
/* See also commit bdd1d2d3d251 ("fs: fix kernel_read prototype") # v4.14 */
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
|
||||
static inline ssize_t
|
||||
kernel_read_backport(struct file *file, void *buf, size_t count, loff_t *pos)
|
||||
{
|
||||
return kernel_read(file, *pos, buf, count);
|
||||
}
|
||||
|
||||
#define kernel_read(file, buf, count, pos) \
|
||||
kernel_read_backport((file), (buf), (count), (pos))
|
||||
|
||||
/*
|
||||
* See also commit 7bb307e894d5 ("export kernel_write(), convert open-coded
|
||||
* instances") # v3.10.
|
||||
*/
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
|
||||
static inline ssize_t
|
||||
kernel_write_backport(struct file *file, void *buf, size_t count, loff_t *pos)
|
||||
{
|
||||
return kernel_write(file, *pos, buf, count);
|
||||
}
|
||||
|
||||
#define kernel_write(file, buf, count, pos) \
|
||||
kernel_write_backport((file), (buf), (count), (pos))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* <linux/iocontext.h> */
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) || \
|
||||
LINUX_VERSION_CODE >= KERNEL_VERSION(4, 21, 0)
|
||||
@@ -963,7 +1004,7 @@ struct t10_pi_tuple {
|
||||
#undef DEFINE_TIMER
|
||||
#define DEFINE_TIMER(_name, _function) \
|
||||
struct timer_list _name = TIMER_INITIALIZER( \
|
||||
(void (*)(unsigned long))(_function), 0, \
|
||||
(void (*)(unsigned long))(unsigned long)(_function), 0, \
|
||||
(unsigned long)&(_name))
|
||||
#endif
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#ifndef INSIDE_KERNEL_TREE
|
||||
#include <linux/version.h>
|
||||
#endif
|
||||
#include <linux/wait.h>
|
||||
#include <linux/aio.h>
|
||||
#include <linux/file.h>
|
||||
#include <linux/fs.h>
|
||||
|
||||
@@ -156,7 +156,11 @@ module_param(use_node_guid_in_target_name, bool, 0444);
|
||||
MODULE_PARM_DESC(use_node_guid_in_target_name,
|
||||
"Use HCA node GUID as SCST target name.");
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)
|
||||
static int srpt_get_u64_x(char *buffer, struct kernel_param *kp)
|
||||
#else
|
||||
static int srpt_get_u64_x(char *buffer, const struct kernel_param *kp)
|
||||
#endif
|
||||
{
|
||||
return sprintf(buffer, "0x%016llx", *(u64 *)kp->arg);
|
||||
}
|
||||
@@ -1094,6 +1098,7 @@ static int srpt_zerolength_write(struct srpt_rdma_ch *ch)
|
||||
|
||||
static inline void *srpt_get_desc_buf(struct srp_cmd *srp_cmd)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
|
||||
/*
|
||||
* The pointer computations below will only be compiled correctly
|
||||
* if srp_cmd::add_data is declared as s8*, u8*, s8[] or u8[], so check
|
||||
@@ -1101,6 +1106,7 @@ static inline void *srpt_get_desc_buf(struct srp_cmd *srp_cmd)
|
||||
*/
|
||||
BUILD_BUG_ON(!__same_type(srp_cmd->add_data[0], (s8)0) &&
|
||||
!__same_type(srp_cmd->add_data[0], (u8)0));
|
||||
#endif
|
||||
|
||||
/*
|
||||
* According to the SRP spec, the lower two bits of the 'ADDITIONAL
|
||||
|
||||
Reference in New Issue
Block a user