mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-19 13:46:25 +00:00
Update for 2.6.36 based on patch from Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2470 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -21,7 +21,8 @@
|
||||
# Note 2! The CFLAGS definitions are now in the main makefile.
|
||||
|
||||
EXTRA_CFLAGS += -I$(src)/../include -I$(SCST_INC_DIR)
|
||||
EXTRA_CFLAGS += -Wextra -Wno-unused-parameter -Wno-missing-field-initializers
|
||||
EXTRA_CFLAGS += -Wextra -Wno-old-style-declaration -Wno-unused-parameter \
|
||||
-Wno-missing-field-initializers
|
||||
|
||||
EXTRA_CFLAGS += -DCONFIG_SCST_EXTRACHECKS
|
||||
#EXTRA_CFLAGS += -DCONFIG_SCST_TRACING
|
||||
|
||||
@@ -754,7 +754,9 @@ int iscsi_add_attr(struct iscsi_target *target,
|
||||
list_add(&tgt_attr->attrs_list_entry, attrs_list);
|
||||
|
||||
tgt_attr->attr.attr.name = tgt_attr->name;
|
||||
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)
|
||||
tgt_attr->attr.attr.owner = THIS_MODULE;
|
||||
#endif
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
|
||||
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
||||
tgt_attr->attr.attr.key = &__key;
|
||||
|
||||
@@ -91,7 +91,7 @@ void conn_info_show(struct seq_file *seq, struct iscsi_session *session)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
|
||||
"%u.%u.%u.%u", NIPQUAD(inet_sk(sk)->daddr));
|
||||
#else
|
||||
"%u.%u.%u.%u", NIPQUAD(inet_sk(sk)->inet_daddr));
|
||||
"%pI4", &inet_sk(sk)->inet_daddr);
|
||||
#endif
|
||||
break;
|
||||
case AF_INET6:
|
||||
@@ -153,7 +153,7 @@ static ssize_t iscsi_get_initiator_ip(struct iscsi_conn *conn,
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
|
||||
"%u.%u.%u.%u", NIPQUAD(inet_sk(sk)->daddr));
|
||||
#else
|
||||
"%u.%u.%u.%u", NIPQUAD(inet_sk(sk)->inet_daddr));
|
||||
"%pI4", &inet_sk(sk)->inet_daddr);
|
||||
#endif
|
||||
break;
|
||||
case AF_INET6:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
diff -upkr linux-2.6.36/include/linux/mm_types.h linux-2.6.36/include/linux/mm_types.h
|
||||
--- linux-2.6.36/include/linux/mm_types.h 2010-05-17 01:17:36.000000000 +0400
|
||||
+++ linux-2.6.36/include/linux/mm_types.h 2010-05-24 14:51:40.000000000 +0400
|
||||
--- linux-2.6.36/include/linux/mm_types.h 2010-10-21 00:30:22.000000000 +0400
|
||||
+++ linux-2.6.36/include/linux/mm_types.h 2010-10-26 12:01:40.651752329 +0400
|
||||
@@ -100,6 +100,18 @@ struct page {
|
||||
*/
|
||||
void *shadow;
|
||||
@@ -21,8 +21,8 @@ diff -upkr linux-2.6.36/include/linux/mm_types.h linux-2.6.36/include/linux/mm_t
|
||||
|
||||
/*
|
||||
diff -upkr linux-2.6.36/include/linux/net.h linux-2.6.36/include/linux/net.h
|
||||
--- linux-2.6.36/include/linux/net.h 2010-05-17 01:17:36.000000000 +0400
|
||||
+++ linux-2.6.36/include/linux/net.h 2010-05-24 14:51:40.000000000 +0400
|
||||
--- linux-2.6.36/include/linux/net.h 2010-10-21 00:30:22.000000000 +0400
|
||||
+++ linux-2.6.36/include/linux/net.h 2010-10-26 12:01:40.651752329 +0400
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <linux/socket.h>
|
||||
@@ -77,9 +77,9 @@ diff -upkr linux-2.6.36/include/linux/net.h linux-2.6.36/include/linux/net.h
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _LINUX_NET_H */
|
||||
diff -upkr linux-2.6.36/net/core/dev.c linux-2.6.36/net/core/dev.c
|
||||
--- linux-2.6.36/net/core/dev.c 2010-05-17 01:17:36.000000000 +0400
|
||||
+++ linux-2.6.36/net/core/dev.c 2010-05-24 14:51:40.000000000 +0400
|
||||
@@ -3130,7 +3130,7 @@ pull:
|
||||
--- linux-2.6.36/net/core/dev.c 2010-10-21 00:30:22.000000000 +0400
|
||||
+++ linux-2.6.36/net/core/dev.c 2010-10-26 12:01:40.651752329 +0400
|
||||
@@ -3140,7 +3140,7 @@ pull:
|
||||
skb_shinfo(skb)->frags[0].size -= grow;
|
||||
|
||||
if (unlikely(!skb_shinfo(skb)->frags[0].size)) {
|
||||
@@ -87,10 +87,10 @@ diff -upkr linux-2.6.36/net/core/dev.c linux-2.6.36/net/core/dev.c
|
||||
+ net_put_page(skb_shinfo(skb)->frags[0].page);
|
||||
memmove(skb_shinfo(skb)->frags,
|
||||
skb_shinfo(skb)->frags + 1,
|
||||
--skb_shinfo(skb)->nr_frags);
|
||||
--skb_shinfo(skb)->nr_frags * sizeof(skb_frag_t));
|
||||
diff -upkr linux-2.6.36/net/core/skbuff.c linux-2.6.36/net/core/skbuff.c
|
||||
--- linux-2.6.36/net/core/skbuff.c 2010-05-17 01:17:36.000000000 +0400
|
||||
+++ linux-2.6.36/net/core/skbuff.c 2010-05-24 14:51:40.000000000 +0400
|
||||
--- linux-2.6.36/net/core/skbuff.c 2010-10-21 00:30:22.000000000 +0400
|
||||
+++ linux-2.6.36/net/core/skbuff.c 2010-10-26 12:01:40.655752708 +0400
|
||||
@@ -76,13 +76,13 @@ static struct kmem_cache *skbuff_fclone_
|
||||
static void sock_pipe_buf_release(struct pipe_inode_info *pipe,
|
||||
struct pipe_buffer *buf)
|
||||
@@ -126,7 +126,7 @@ diff -upkr linux-2.6.36/net/core/skbuff.c linux-2.6.36/net/core/skbuff.c
|
||||
skb_shinfo(n)->nr_frags = i;
|
||||
}
|
||||
@@ -820,7 +820,7 @@ int pskb_expand_head(struct sk_buff *skb
|
||||
sizeof(struct skb_shared_info));
|
||||
offsetof(struct skb_shared_info, frags[skb_shinfo(skb)->nr_frags]));
|
||||
|
||||
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
|
||||
- get_page(skb_shinfo(skb)->frags[i].page);
|
||||
@@ -215,7 +215,7 @@ diff -upkr linux-2.6.36/net/core/skbuff.c linux-2.6.36/net/core/skbuff.c
|
||||
}
|
||||
|
||||
/* Reposition in the original skb */
|
||||
@@ -2598,7 +2598,7 @@ struct sk_buff *skb_segment(struct sk_bu
|
||||
@@ -2601,7 +2601,7 @@ struct sk_buff *skb_segment(struct sk_bu
|
||||
|
||||
while (pos < offset + len && i < nfrags) {
|
||||
*frag = skb_shinfo(skb)->frags[i];
|
||||
@@ -225,9 +225,9 @@ diff -upkr linux-2.6.36/net/core/skbuff.c linux-2.6.36/net/core/skbuff.c
|
||||
|
||||
if (pos < offset) {
|
||||
diff -upkr linux-2.6.36/net/ipv4/ip_output.c linux-2.6.36/net/ipv4/ip_output.c
|
||||
--- linux-2.6.36/net/ipv4/ip_output.c 2010-05-17 01:17:36.000000000 +0400
|
||||
+++ linux-2.6.36/net/ipv4/ip_output.c 2010-05-24 14:51:40.000000000 +0400
|
||||
@@ -1035,7 +1035,7 @@ alloc_new_skb:
|
||||
--- linux-2.6.36/net/ipv4/ip_output.c 2010-10-21 00:30:22.000000000 +0400
|
||||
+++ linux-2.6.36/net/ipv4/ip_output.c 2010-10-26 12:01:40.655752708 +0400
|
||||
@@ -1040,7 +1040,7 @@ alloc_new_skb:
|
||||
err = -EMSGSIZE;
|
||||
goto error;
|
||||
}
|
||||
@@ -236,7 +236,7 @@ diff -upkr linux-2.6.36/net/ipv4/ip_output.c linux-2.6.36/net/ipv4/ip_output.c
|
||||
skb_fill_page_desc(skb, i, page, sk->sk_sndmsg_off, 0);
|
||||
frag = &skb_shinfo(skb)->frags[i];
|
||||
}
|
||||
@@ -1194,7 +1194,7 @@ ssize_t ip_append_page(struct sock *sk,
|
||||
@@ -1199,7 +1199,7 @@ ssize_t ip_append_page(struct sock *sk,
|
||||
if (skb_can_coalesce(skb, i, page, offset)) {
|
||||
skb_shinfo(skb)->frags[i-1].size += len;
|
||||
} else if (i < MAX_SKB_FRAGS) {
|
||||
@@ -246,8 +246,8 @@ diff -upkr linux-2.6.36/net/ipv4/ip_output.c linux-2.6.36/net/ipv4/ip_output.c
|
||||
} else {
|
||||
err = -EMSGSIZE;
|
||||
diff -upkr linux-2.6.36/net/ipv4/Makefile linux-2.6.36/net/ipv4/Makefile
|
||||
--- linux-2.6.36/net/ipv4/Makefile 2010-05-17 01:17:36.000000000 +0400
|
||||
+++ linux-2.6.36/net/ipv4/Makefile 2010-05-24 14:51:40.000000000 +0400
|
||||
--- linux-2.6.36/net/ipv4/Makefile 2010-10-21 00:30:22.000000000 +0400
|
||||
+++ linux-2.6.36/net/ipv4/Makefile 2010-10-26 12:01:40.655752708 +0400
|
||||
@@ -49,6 +49,7 @@ obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o
|
||||
obj-$(CONFIG_TCP_CONG_YEAH) += tcp_yeah.o
|
||||
obj-$(CONFIG_TCP_CONG_ILLINOIS) += tcp_illinois.o
|
||||
@@ -257,9 +257,9 @@ diff -upkr linux-2.6.36/net/ipv4/Makefile linux-2.6.36/net/ipv4/Makefile
|
||||
obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \
|
||||
xfrm4_output.o
|
||||
diff -upkr linux-2.6.36/net/ipv4/tcp.c linux-2.6.36/net/ipv4/tcp.c
|
||||
--- linux-2.6.36/net/ipv4/tcp.c 2010-05-17 01:17:36.000000000 +0400
|
||||
+++ linux-2.6.36/net/ipv4/tcp.c 2010-05-24 14:51:40.000000000 +0400
|
||||
@@ -801,7 +801,7 @@ new_segment:
|
||||
--- linux-2.6.36/net/ipv4/tcp.c 2010-10-21 00:30:22.000000000 +0400
|
||||
+++ linux-2.6.36/net/ipv4/tcp.c 2010-10-26 12:01:40.659752056 +0400
|
||||
@@ -806,7 +806,7 @@ new_segment:
|
||||
if (can_coalesce) {
|
||||
skb_shinfo(skb)->frags[i - 1].size += copy;
|
||||
} else {
|
||||
@@ -268,7 +268,7 @@ diff -upkr linux-2.6.36/net/ipv4/tcp.c linux-2.6.36/net/ipv4/tcp.c
|
||||
skb_fill_page_desc(skb, i, page, offset, copy);
|
||||
}
|
||||
|
||||
@@ -1010,7 +1010,7 @@ new_segment:
|
||||
@@ -1015,7 +1015,7 @@ new_segment:
|
||||
goto new_segment;
|
||||
} else if (page) {
|
||||
if (off == PAGE_SIZE) {
|
||||
@@ -277,7 +277,7 @@ diff -upkr linux-2.6.36/net/ipv4/tcp.c linux-2.6.36/net/ipv4/tcp.c
|
||||
TCP_PAGE(sk) = page = NULL;
|
||||
off = 0;
|
||||
}
|
||||
@@ -1051,9 +1051,9 @@ new_segment:
|
||||
@@ -1056,9 +1056,9 @@ new_segment:
|
||||
} else {
|
||||
skb_fill_page_desc(skb, i, page, off, copy);
|
||||
if (TCP_PAGE(sk)) {
|
||||
@@ -290,9 +290,9 @@ diff -upkr linux-2.6.36/net/ipv4/tcp.c linux-2.6.36/net/ipv4/tcp.c
|
||||
}
|
||||
}
|
||||
diff -upkr linux-2.6.36/net/ipv4/tcp_output.c linux-2.6.36/net/ipv4/tcp_output.c
|
||||
--- linux-2.6.36/net/ipv4/tcp_output.c 2010-05-17 01:17:36.000000000 +0400
|
||||
+++ linux-2.6.36/net/ipv4/tcp_output.c 2010-05-24 14:51:40.000000000 +0400
|
||||
@@ -1085,7 +1085,7 @@ static void __pskb_trim_head(struct sk_b
|
||||
--- linux-2.6.36/net/ipv4/tcp_output.c 2010-10-21 00:30:22.000000000 +0400
|
||||
+++ linux-2.6.36/net/ipv4/tcp_output.c 2010-10-26 12:01:40.659752056 +0400
|
||||
@@ -1086,7 +1086,7 @@ static void __pskb_trim_head(struct sk_b
|
||||
k = 0;
|
||||
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
|
||||
if (skb_shinfo(skb)->frags[i].size <= eat) {
|
||||
@@ -302,9 +302,9 @@ diff -upkr linux-2.6.36/net/ipv4/tcp_output.c linux-2.6.36/net/ipv4/tcp_output.c
|
||||
} else {
|
||||
skb_shinfo(skb)->frags[k] = skb_shinfo(skb)->frags[i];
|
||||
diff -upkr linux-2.6.36/net/ipv4/tcp_zero_copy.c linux-2.6.36/net/ipv4/tcp_zero_copy.c
|
||||
--- linux-2.6.36/net/ipv4/tcp_zero_copy.c 2010-03-01 17:30:31.000000000 +0300
|
||||
+++ linux-2.6.36/net/ipv4/tcp_zero_copy.c 2010-05-24 14:51:40.000000000 +0400
|
||||
@@ -0,0 +1,49 @@
|
||||
--- linux-2.6.36/net/ipv4/tcp_zero_copy.c 2010-10-26 12:02:24.519252006 +0400
|
||||
+++ linux-2.6.36/net/ipv4/tcp_zero_copy.c 2010-10-26 12:01:40.659752056 +0400
|
||||
@@ -1 +1,49 @@
|
||||
+/*
|
||||
+ * Support routines for TCP zero copy transmit
|
||||
+ *
|
||||
@@ -314,7 +314,7 @@ diff -upkr linux-2.6.36/net/ipv4/tcp_zero_copy.c linux-2.6.36/net/ipv4/tcp_zero_
|
||||
+ * modify it under the terms of the GNU General Public License
|
||||
+ * version 2 as published by the Free Software Foundation.
|
||||
+ */
|
||||
+
|
||||
|
||||
+#include <linux/skbuff.h>
|
||||
+
|
||||
+net_get_page_callback_t net_get_page_callback __read_mostly;
|
||||
@@ -355,9 +355,9 @@ diff -upkr linux-2.6.36/net/ipv4/tcp_zero_copy.c linux-2.6.36/net/ipv4/tcp_zero_
|
||||
+}
|
||||
+EXPORT_SYMBOL(net_set_get_put_page_callbacks);
|
||||
diff -upkr linux-2.6.36/net/ipv6/ip6_output.c linux-2.6.36/net/ipv6/ip6_output.c
|
||||
--- linux-2.6.36/net/ipv6/ip6_output.c 2010-05-17 01:17:36.000000000 +0400
|
||||
+++ linux-2.6.36/net/ipv6/ip6_output.c 2010-05-24 14:51:40.000000000 +0400
|
||||
@@ -1383,7 +1383,7 @@ alloc_new_skb:
|
||||
--- linux-2.6.36/net/ipv6/ip6_output.c 2010-10-21 00:30:22.000000000 +0400
|
||||
+++ linux-2.6.36/net/ipv6/ip6_output.c 2010-10-26 12:01:40.659752056 +0400
|
||||
@@ -1391,7 +1391,7 @@ alloc_new_skb:
|
||||
err = -EMSGSIZE;
|
||||
goto error;
|
||||
}
|
||||
@@ -367,8 +367,8 @@ diff -upkr linux-2.6.36/net/ipv6/ip6_output.c linux-2.6.36/net/ipv6/ip6_output.c
|
||||
frag = &skb_shinfo(skb)->frags[i];
|
||||
}
|
||||
diff -upkr linux-2.6.36/net/Kconfig linux-2.6.36/net/Kconfig
|
||||
--- linux-2.6.36/net/Kconfig 2010-05-17 01:17:36.000000000 +0400
|
||||
+++ linux-2.6.36/net/Kconfig 2010-05-24 14:51:40.000000000 +0400
|
||||
--- linux-2.6.36/net/Kconfig 2010-10-21 00:30:22.000000000 +0400
|
||||
+++ linux-2.6.36/net/Kconfig 2010-10-26 12:01:40.659752056 +0400
|
||||
@@ -72,6 +72,18 @@ config INET
|
||||
|
||||
Short answer: say Y.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
diff -upkr linux-2.6.36/block/blk-map.c linux-2.6.36/block/blk-map.c
|
||||
--- linux-2.6.36/block/blk-map.c 2010-05-17 01:17:36.000000000 +0400
|
||||
+++ linux-2.6.36/block/blk-map.c 2010-05-24 15:19:49.000000000 +0400
|
||||
--- linux-2.6.36/block/blk-map.c 2010-10-21 00:30:22.000000000 +0400
|
||||
+++ linux-2.6.36/block/blk-map.c 2010-10-26 15:41:45.911251773 +0400
|
||||
@@ -5,6 +5,8 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/bio.h>
|
||||
@@ -195,7 +195,7 @@ diff -upkr linux-2.6.36/block/blk-map.c linux-2.6.36/block/blk-map.c
|
||||
+ }
|
||||
+
|
||||
+ if (rw == WRITE)
|
||||
+ bio->bi_rw |= 1 << BIO_RW;
|
||||
+ bio->bi_rw |= REQ_WRITE;
|
||||
+
|
||||
+ bios++;
|
||||
+ bio->bi_private = bw;
|
||||
@@ -350,9 +350,9 @@ diff -upkr linux-2.6.36/block/blk-map.c linux-2.6.36/block/blk-map.c
|
||||
* blk_rq_map_kern - map kernel data to a request, for REQ_TYPE_BLOCK_PC usage
|
||||
* @q: request queue where request should be inserted
|
||||
diff -upkr linux-2.6.36/include/linux/blkdev.h linux-2.6.36/include/linux/blkdev.h
|
||||
--- linux-2.6.36/include/linux/blkdev.h 2010-05-17 01:17:36.000000000 +0400
|
||||
+++ linux-2.6.36/include/linux/blkdev.h 2010-05-24 14:51:22.000000000 +0400
|
||||
@@ -717,6 +717,8 @@ extern unsigned long blk_max_low_pfn, bl
|
||||
--- linux-2.6.36/include/linux/blkdev.h 2010-10-21 00:30:22.000000000 +0400
|
||||
+++ linux-2.6.36/include/linux/blkdev.h 2010-10-26 12:00:15.899759399 +0400
|
||||
@@ -629,6 +629,8 @@ extern unsigned long blk_max_low_pfn, bl
|
||||
#define BLK_DEFAULT_SG_TIMEOUT (60 * HZ)
|
||||
#define BLK_MIN_SG_TIMEOUT (7 * HZ)
|
||||
|
||||
@@ -361,7 +361,7 @@ diff -upkr linux-2.6.36/include/linux/blkdev.h linux-2.6.36/include/linux/blkdev
|
||||
#ifdef CONFIG_BOUNCE
|
||||
extern int init_emergency_isa_pool(void);
|
||||
extern void blk_queue_bounce(struct request_queue *q, struct bio **bio);
|
||||
@@ -832,6 +834,9 @@ extern int blk_rq_map_kern(struct reques
|
||||
@@ -746,6 +748,9 @@ extern int blk_rq_map_kern(struct reques
|
||||
extern int blk_rq_map_user_iov(struct request_queue *, struct request *,
|
||||
struct rq_map_data *, struct sg_iovec *, int,
|
||||
unsigned int, gfp_t);
|
||||
@@ -372,8 +372,8 @@ diff -upkr linux-2.6.36/include/linux/blkdev.h linux-2.6.36/include/linux/blkdev
|
||||
struct request *, int);
|
||||
extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *,
|
||||
diff -upkr linux-2.6.36/include/linux/scatterlist.h linux-2.6.36/include/linux/scatterlist.h
|
||||
--- linux-2.6.36/include/linux/scatterlist.h 2010-05-17 01:17:36.000000000 +0400
|
||||
+++ linux-2.6.36/include/linux/scatterlist.h 2010-05-24 14:51:22.000000000 +0400
|
||||
--- linux-2.6.36/include/linux/scatterlist.h 2010-10-21 00:30:22.000000000 +0400
|
||||
+++ linux-2.6.36/include/linux/scatterlist.h 2010-10-26 12:00:15.899759399 +0400
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <asm/types.h>
|
||||
@@ -394,9 +394,9 @@ diff -upkr linux-2.6.36/include/linux/scatterlist.h linux-2.6.36/include/linux/s
|
||||
* Maximum number of entries that will be allocated in one piece, if
|
||||
* a list larger than this is required then chaining will be utilized.
|
||||
diff -upkr linux-2.6.36/lib/scatterlist.c linux-2.6.36/lib/scatterlist.c
|
||||
--- linux-2.6.36/lib/scatterlist.c 2010-05-17 01:17:36.000000000 +0400
|
||||
+++ linux-2.6.36/lib/scatterlist.c 2010-05-24 14:51:22.000000000 +0400
|
||||
@@ -494,3 +494,132 @@ size_t sg_copy_to_buffer(struct scatterl
|
||||
--- linux-2.6.36/lib/scatterlist.c 2010-10-21 00:30:22.000000000 +0400
|
||||
+++ linux-2.6.36/lib/scatterlist.c 2010-10-26 12:00:15.899759399 +0400
|
||||
@@ -517,3 +517,132 @@ size_t sg_copy_to_buffer(struct scatterl
|
||||
return sg_copy_buffer(sgl, nents, buf, buflen, 1);
|
||||
}
|
||||
EXPORT_SYMBOL(sg_copy_to_buffer);
|
||||
@@ -529,3 +529,4 @@ diff -upkr linux-2.6.36/lib/scatterlist.c linux-2.6.36/lib/scatterlist.c
|
||||
+ return res;
|
||||
+}
|
||||
+EXPORT_SYMBOL(sg_copy);
|
||||
|
||||
|
||||
@@ -2845,7 +2845,11 @@ static void blockio_endio(struct bio *bio, int error)
|
||||
/* To protect from several bios finishing simultaneously */
|
||||
spin_lock_bh(&blockio_endio_lock);
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
|
||||
if (bio->bi_rw & (1 << BIO_RW))
|
||||
#else
|
||||
if (bio->bi_rw & REQ_WRITE)
|
||||
#endif
|
||||
scst_set_cmd_error(blockio_work->cmd,
|
||||
SCST_LOAD_SENSE(scst_sense_write_error));
|
||||
else
|
||||
@@ -2937,15 +2941,19 @@ static void blockio_exec_rw(struct scst_cmd *cmd, struct scst_vdisk_thr *thr,
|
||||
* Better to fail fast w/o any local recovery
|
||||
* and retries.
|
||||
*/
|
||||
#ifdef BIO_RW_FAILFAST
|
||||
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 27)
|
||||
bio->bi_rw |= (1 << BIO_RW_FAILFAST);
|
||||
#else
|
||||
#elif LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)
|
||||
bio->bi_rw |= (1 << BIO_RW_FAILFAST_DEV) |
|
||||
(1 << BIO_RW_FAILFAST_TRANSPORT) |
|
||||
(1 << BIO_RW_FAILFAST_DRIVER);
|
||||
#else
|
||||
bio->bi_rw |= REQ_FAILFAST_DEV |
|
||||
REQ_FAILFAST_TRANSPORT |
|
||||
REQ_FAILFAST_DRIVER;
|
||||
#endif
|
||||
#if 0 /* It could be win, but could be not, so a performance study is needed */
|
||||
bio->bi_rw |= 1 << BIO_RW_SYNC;
|
||||
bio->bi_rw |= REQ_SYNC;
|
||||
#endif
|
||||
if (!hbio)
|
||||
hbio = tbio = bio;
|
||||
|
||||
@@ -3847,7 +3847,9 @@ int scst_acn_sysfs_create(struct scst_acn *acn)
|
||||
}
|
||||
strlcpy((char *)attr->attr.name, acn->name, len);
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
|
||||
attr->attr.owner = THIS_MODULE;
|
||||
#endif
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
|
||||
#ifdef CONFIG_DEBUG_LOCK_ALLOC
|
||||
attr->attr.key = &__key;
|
||||
|
||||
Reference in New Issue
Block a user