compat.patch (drbd-9.1.10) | : | compat.patch (drbd-9.1.11) | ||
---|---|---|---|---|
--- ./drbd_int.h | --- ./drbd_int.h | |||
+++ /tmp/cocci-output-401312-c48778-drbd_int.h | ||||
@@ -1763,7 +1763,7 @@ extern sector_t drbd_get_max_capacity( | @@ -1763,7 +1763,7 @@ extern sector_t drbd_get_max_capacity( | |||
* we limit us to a platform agnostic constant here for now. | * we limit us to a platform agnostic constant here for now. | |||
* A followup commit may allow even bigger BIO sizes, | * A followup commit may allow even bigger BIO sizes, | |||
* once we thought that through. */ | * once we thought that through. */ | |||
-#define DRBD_BIO_MAX_PAGES (BIO_MAX_VECS << PAGE_SHIFT) | -#define DRBD_BIO_MAX_PAGES (BIO_MAX_VECS << PAGE_SHIFT) | |||
+#define DRBD_BIO_MAX_PAGES (BIO_MAX_PAGES << PAGE_SHIFT) | +#define DRBD_BIO_MAX_PAGES (BIO_MAX_PAGES << PAGE_SHIFT) | |||
#if DRBD_MAX_BIO_SIZE > DRBD_BIO_MAX_PAGES | #if DRBD_MAX_BIO_SIZE > DRBD_BIO_MAX_PAGES | |||
#error Architecture not supported: DRBD_MAX_BIO_SIZE > (BIO_MAX_VECS << PAGE_SH IFT) | #error Architecture not supported: DRBD_MAX_BIO_SIZE > (BIO_MAX_VECS << PAGE_SH IFT) | |||
#endif | #endif | |||
@@ -1886,7 +1886,7 @@ extern void do_submit(struct work_struct | @@ -1886,7 +1886,7 @@ extern void do_submit(struct work_struct | |||
skipping to change at line 40 | skipping to change at line 40 | |||
@@ -2104,7 +2104,7 @@ static inline void drbd_submit_bio_noacc | @@ -2104,7 +2104,7 @@ static inline void drbd_submit_bio_noacc | |||
bio->bi_status = BLK_STS_IOERR; | bio->bi_status = BLK_STS_IOERR; | |||
bio_endio(bio); | bio_endio(bio); | |||
} else { | } else { | |||
- submit_bio_noacct(bio); | - submit_bio_noacct(bio); | |||
+ generic_make_request(bio); | + generic_make_request(bio); | |||
} | } | |||
} | } | |||
--- drbd-headers/linux/genl_magic_struct.h | --- drbd-headers/linux/genl_magic_struct.h | |||
+++ /tmp/cocci-output-401312-5ce356-genl_magic_struct.h | ||||
@@ -107,7 +107,7 @@ static inline int nla_put_u64_0pad(struc | @@ -107,7 +107,7 @@ static inline int nla_put_u64_0pad(struc | |||
nla_get_u64, nla_put_u64_0pad, false) | nla_get_u64, nla_put_u64_0pad, false) | |||
#define __str_field(attr_nr, attr_flag, name, maxlen) \ | #define __str_field(attr_nr, attr_flag, name, maxlen) \ | |||
__array(attr_nr, attr_flag, name, NLA_NUL_STRING, char, maxlen, \ | __array(attr_nr, attr_flag, name, NLA_NUL_STRING, char, maxlen, \ | |||
- nla_strscpy, nla_put, false) | - nla_strscpy, nla_put, false) | |||
+ nla_strlcpy, nla_put, false) | + nla_strlcpy, nla_put, false) | |||
#define __bin_field(attr_nr, attr_flag, name, maxlen) \ | #define __bin_field(attr_nr, attr_flag, name, maxlen) \ | |||
__array(attr_nr, attr_flag, name, NLA_BINARY, char, maxlen, \ | __array(attr_nr, attr_flag, name, NLA_BINARY, char, maxlen, \ | |||
nla_memcpy, nla_put, false) | nla_memcpy, nla_put, false) | |||
--- drbd_transport_tcp.c | --- drbd_transport_tcp.c | |||
+++ /tmp/cocci-output-401312-0dc097-drbd_transport_tcp.c | ||||
@@ -154,6 +154,33 @@ static struct drbd_path *__drbd_next_pat | @@ -154,6 +154,33 @@ static struct drbd_path *__drbd_next_pat | |||
return drbd_path; | return drbd_path; | |||
} | } | |||
+static void dtt_cork(struct socket *socket) | +static void dtt_cork(struct socket *socket) | |||
+{ | +{ | |||
+ int val = 1; | + int val = 1; | |||
+ (void)kernel_setsockopt(socket, SOL_TCP, TCP_CORK, (char *)&val, | + (void)kernel_setsockopt(socket, SOL_TCP, TCP_CORK, (char *)&val, | |||
+ sizeof(val)); | + sizeof(val)); | |||
+} | +} | |||
skipping to change at line 136 | skipping to change at line 136 | |||
if (socket->sk->sk_socket) | if (socket->sk->sk_socket) | |||
set_bit(SOCK_NOSPACE, &socket->sk->sk_socket->flags); | set_bit(SOCK_NOSPACE, &socket->sk->sk_socket->flags); | |||
break; | break; | |||
case QUICKACK: | case QUICKACK: | |||
- tcp_sock_set_quickack(socket->sk, 2); | - tcp_sock_set_quickack(socket->sk, 2); | |||
+ dtt_quickack(socket); | + dtt_quickack(socket); | |||
break; | break; | |||
default: /* not implemented, but should not trigger error handling */ | default: /* not implemented, but should not trigger error handling */ | |||
return true; | return true; | |||
--- drbd_state.c | --- drbd_state.c | |||
+++ /tmp/cocci-output-401312-221a0a-drbd_state.c | ||||
@@ -147,7 +147,7 @@ static bool may_be_up_to_date(struct drb | @@ -147,7 +147,7 @@ static bool may_be_up_to_date(struct drb | |||
case D_DISKLESS: | case D_DISKLESS: | |||
if (!(peer_md->flags & MDF_PEER_DEVICE_SEEN)) | if (!(peer_md->flags & MDF_PEER_DEVICE_SEEN)) | |||
continue; | continue; | |||
- fallthrough; | - fallthrough; | |||
+ ;/* fallthrough */ | + ;/* fallthrough */ | |||
case D_ATTACHING: | case D_ATTACHING: | |||
case D_DETACHING: | case D_DETACHING: | |||
case D_FAILED: | case D_FAILED: | |||
--- drbd_sender.c | --- drbd_sender.c | |||
+++ /tmp/cocci-output-401312-6cc591-drbd_sender.c | ||||
@@ -23,7 +23,6 @@ | @@ -23,7 +23,6 @@ | |||
#include <linux/random.h> | #include <linux/random.h> | |||
#include <linux/scatterlist.h> | #include <linux/scatterlist.h> | |||
#include <linux/overflow.h> | #include <linux/overflow.h> | |||
-#include <linux/part_stat.h> | -#include <linux/part_stat.h> | |||
#include "drbd_int.h" | #include "drbd_int.h" | |||
#include "drbd_protocol.h" | #include "drbd_protocol.h" | |||
@@ -2063,7 +2062,9 @@ void drbd_rs_controller_reset(struct drb | @@ -2063,7 +2062,9 @@ void drbd_rs_controller_reset(struct drb | |||
atomic_set(&peer_device->device->rs_sect_ev, 0); /* FIXME: ??? */ | atomic_set(&peer_device->device->rs_sect_ev, 0); /* FIXME: ??? */ | |||
skipping to change at line 177 | skipping to change at line 177 | |||
@@ -2777,7 +2778,7 @@ static void re_init_if_first_write(struc | @@ -2777,7 +2778,7 @@ static void re_init_if_first_write(struc | |||
connection->send.current_epoch_writes = 0; | connection->send.current_epoch_writes = 0; | |||
connection->send.last_sent_barrier_jif = jiffies; | connection->send.last_sent_barrier_jif = jiffies; | |||
connection->send.current_dagtag_sector = | connection->send.current_dagtag_sector = | |||
- connection->resource->dagtag_sector - ((BIO_MAX_VECS << P AGE_SHIFT) >> 9) - 1; | - connection->resource->dagtag_sector - ((BIO_MAX_VECS << P AGE_SHIFT) >> 9) - 1; | |||
+ connection->resource->dagtag_sector - ((BIO_MAX_PAGES << PAGE_SHIFT) >> 9) - 1; | + connection->resource->dagtag_sector - ((BIO_MAX_PAGES << PAGE_SHIFT) >> 9) - 1; | |||
} | } | |||
} | } | |||
--- drbd_req.c | --- drbd_req.c | |||
+++ /tmp/cocci-output-401312-7dca89-drbd_req.c | ||||
@@ -507,7 +507,9 @@ void drbd_req_complete(struct drbd_reque | @@ -507,7 +507,9 @@ void drbd_req_complete(struct drbd_reque | |||
start_new_tl_epoch(device->resource); | start_new_tl_epoch(device->resource); | |||
/* Update disk stats */ | /* Update disk stats */ | |||
- bio_end_io_acct(req->master_bio, req->start_jif); | - bio_end_io_acct(req->master_bio, req->start_jif); | |||
+ generic_end_io_acct(req->device->rq_queue, | + generic_end_io_acct(req->device->rq_queue, | |||
+ bio_data_dir(req->master_bio), | + bio_data_dir(req->master_bio), | |||
+ &req->device->vdisk->part0, req->start_jif); | + &req->device->vdisk->part0, req->start_jif); | |||
if (device->cached_err_io) { | if (device->cached_err_io) { | |||
ok = 0; | ok = 0; | |||
@@ -965,7 +967,7 @@ void __req_mod(struct drbd_request *req, | @@ -974,7 +976,7 @@ void __req_mod(struct drbd_request *req, | |||
case READ_COMPLETED_WITH_ERROR: | case READ_COMPLETED_WITH_ERROR: | |||
drbd_set_all_out_of_sync(device, req->i.sector, req->i.size); | drbd_set_all_out_of_sync(device, req->i.sector, req->i.size); | |||
drbd_report_io_error(device, req); | drbd_report_io_error(device, req); | |||
- fallthrough; | - fallthrough; | |||
+ ;/* fallthrough */ | + ;/* fallthrough */ | |||
case READ_AHEAD_COMPLETED_WITH_ERROR: | case READ_AHEAD_COMPLETED_WITH_ERROR: | |||
mod_rq_state(req, m, peer_device, RQ_LOCAL_PENDING, RQ_LOCAL_COMP LETED); | mod_rq_state(req, m, peer_device, RQ_LOCAL_PENDING, RQ_LOCAL_COMP LETED); | |||
break; | break; | |||
@@ -1267,7 +1269,7 @@ static bool remote_due_to_read_balancing | @@ -1276,7 +1278,7 @@ static bool remote_due_to_read_balancing | |||
switch (rbm) { | switch (rbm) { | |||
case RB_CONGESTED_REMOTE: | case RB_CONGESTED_REMOTE: | |||
return bdi_read_congested( | return bdi_read_congested( | |||
- device->ldev->backing_bdev->bd_disk->bdi); | - device->ldev->backing_bdev->bd_disk->bdi); | |||
+ device->ldev->backing_bdev->bd_disk->queue->backing_dev_i nfo); | + device->ldev->backing_bdev->bd_disk->queue->backing_dev_i nfo); | |||
case RB_LEAST_PENDING: | case RB_LEAST_PENDING: | |||
return atomic_read(&device->local_cnt) > | return atomic_read(&device->local_cnt) > | |||
atomic_read(&peer_device->ap_pending_cnt) + atomic_read(& peer_device->rs_pending_cnt); | atomic_read(&peer_device->ap_pending_cnt) + atomic_read(& peer_device->rs_pending_cnt); | |||
@@ -1644,7 +1646,7 @@ drbd_submit_req_private_bio(struct drbd_ | @@ -1653,7 +1655,7 @@ drbd_submit_req_private_bio(struct drbd_ | |||
} else if (bio_op(bio) == REQ_OP_DISCARD) { | } else if (bio_op(bio) == REQ_OP_DISCARD) { | |||
drbd_process_discard_or_zeroes_req(req, EE_TRIM); | drbd_process_discard_or_zeroes_req(req, EE_TRIM); | |||
} else { | } else { | |||
- submit_bio_noacct(bio); | - submit_bio_noacct(bio); | |||
+ generic_make_request(bio); | + generic_make_request(bio); | |||
} | } | |||
put_ldev(device); | put_ldev(device); | |||
} else { | } else { | |||
@@ -1705,7 +1707,10 @@ drbd_request_prepare(struct drbd_device | @@ -1714,7 +1716,10 @@ drbd_request_prepare(struct drbd_device | |||
} | } | |||
/* Update disk stats */ | /* Update disk stats */ | |||
- req->start_jif = bio_start_io_acct(req->master_bio); | - req->start_jif = bio_start_io_acct(req->master_bio); | |||
+ req->start_jif = start_jif; | + req->start_jif = start_jif; | |||
+ generic_start_io_acct(req->device->rq_queue, | + generic_start_io_acct(req->device->rq_queue, | |||
+ bio_data_dir(req->master_bio), req->i.size >> 9, | + bio_data_dir(req->master_bio), req->i.size >> 9, | |||
+ &req->device->vdisk->part0); | + &req->device->vdisk->part0); | |||
if (get_ldev(device)) { | if (get_ldev(device)) { | |||
req->private_bio = bio_clone_fast(bio, GFP_NOIO, &drbd_io_bio_se t); | req->private_bio = bio_clone_fast(bio, GFP_NOIO, &drbd_io_bio_se t); | |||
@@ -2396,9 +2401,9 @@ static bool drbd_fail_request_early(stru | @@ -2405,9 +2410,9 @@ static bool drbd_fail_request_early(stru | |||
return false; | return false; | |||
} | } | |||
-void drbd_submit_bio(struct bio *bio) | -void drbd_submit_bio(struct bio *bio) | |||
+blk_qc_t drbd_make_request(struct request_queue *q, struct bio *bio) | +blk_qc_t drbd_make_request(struct request_queue *q, struct bio *bio) | |||
{ | { | |||
- struct drbd_device *device = bio->bi_bdev->bd_disk->private_data; | - struct drbd_device *device = bio->bi_bdev->bd_disk->private_data; | |||
+ struct drbd_device *device = bio->bi_disk->private_data; | + struct drbd_device *device = bio->bi_disk->private_data; | |||
#ifdef CONFIG_DRBD_TIMING_STATS | #ifdef CONFIG_DRBD_TIMING_STATS | |||
ktime_t start_kt; | ktime_t start_kt; | |||
#endif | #endif | |||
@@ -2407,15 +2412,15 @@ void drbd_submit_bio(struct bio *bio) | @@ -2416,15 +2421,15 @@ void drbd_submit_bio(struct bio *bio) | |||
if (drbd_fail_request_early(device, bio)) { | if (drbd_fail_request_early(device, bio)) { | |||
bio->bi_status = BLK_STS_IOERR; | bio->bi_status = BLK_STS_IOERR; | |||
bio_endio(bio); | bio_endio(bio); | |||
- return; | - return; | |||
+ return BLK_QC_T_NONE; | + return BLK_QC_T_NONE; | |||
} | } | |||
- blk_queue_split(&bio); | - blk_queue_split(&bio); | |||
+ blk_queue_split(bio->bi_disk->queue, &bio); | + blk_queue_split(bio->bi_disk->queue, &bio); | |||
if (device->cached_err_io) { | if (device->cached_err_io) { | |||
bio->bi_status = BLK_STS_IOERR; | bio->bi_status = BLK_STS_IOERR; | |||
bio_endio(bio); | bio_endio(bio); | |||
- return; | - return; | |||
+ return BLK_QC_T_NONE; | + return BLK_QC_T_NONE; | |||
} | } | |||
/* This is both an optimization: READ of size 0, nothing to do | /* This is both an optimization: READ of size 0, nothing to do | |||
@@ -2427,13 +2432,14 @@ void drbd_submit_bio(struct bio *bio) | @@ -2436,13 +2441,14 @@ void drbd_submit_bio(struct bio *bio) | |||
if (bio_op(bio) == REQ_OP_READ && bio->bi_iter.bi_size == 0) { | if (bio_op(bio) == REQ_OP_READ && bio->bi_iter.bi_size == 0) { | |||
WARN_ONCE(1, "size zero read from upper layers"); | WARN_ONCE(1, "size zero read from upper layers"); | |||
bio_endio(bio); | bio_endio(bio); | |||
- return; | - return; | |||
+ return BLK_QC_T_NONE; | + return BLK_QC_T_NONE; | |||
} | } | |||
ktime_get_accounting(start_kt); | ktime_get_accounting(start_kt); | |||
start_jif = jiffies; | start_jif = jiffies; | |||
__drbd_make_request(device, bio, start_kt, start_jif); | __drbd_make_request(device, bio, start_kt, start_jif); | |||
+ return BLK_QC_T_NONE; | + return BLK_QC_T_NONE; | |||
} | } | |||
static unsigned long time_min_in_future(unsigned long now, | static unsigned long time_min_in_future(unsigned long now, | |||
@@ -2709,7 +2715,7 @@ void drbd_handle_io_error_(struct drbd_d | @@ -2718,7 +2724,7 @@ void drbd_handle_io_error_(struct drbd_d | |||
} | } | |||
break; | break; | |||
} | } | |||
- fallthrough; /* for DRBD_META_IO_ERROR or DRBD_FORCE_DETACH */ | - fallthrough; /* for DRBD_META_IO_ERROR or DRBD_FORCE_DETACH */ | |||
+ ;/* fallthrough */ /* for DRBD_META_IO_ERROR or DRBD_FORCE_D ETACH */ | + ;/* fallthrough */ /* for DRBD_META_IO_ERROR or DRBD_FORCE_D ETACH */ | |||
case EP_DETACH: | case EP_DETACH: | |||
case EP_CALL_HELPER: | case EP_CALL_HELPER: | |||
/* Force-detach is not really an IO error, but rather a | /* Force-detach is not really an IO error, but rather a | |||
--- drbd_receiver.c | --- drbd_receiver.c | |||
+++ /tmp/cocci-output-401312-a6d86f-drbd_receiver.c | ||||
@@ -32,7 +32,6 @@ | @@ -32,7 +32,6 @@ | |||
#include <linux/random.h> | #include <linux/random.h> | |||
#include <net/ipv6.h> | #include <net/ipv6.h> | |||
#include <linux/scatterlist.h> | #include <linux/scatterlist.h> | |||
-#include <linux/part_stat.h> | -#include <linux/part_stat.h> | |||
#include "drbd_int.h" | #include "drbd_int.h" | |||
#include "drbd_protocol.h" | #include "drbd_protocol.h" | |||
@@ -1294,8 +1293,7 @@ static void one_flush_endio(struct bio * | @@ -1294,8 +1293,7 @@ static void one_flush_endio(struct bio * | |||
skipping to change at line 444 | skipping to change at line 444 | |||
+ int ____rv0; | + int ____rv0; | |||
+ ____rv0 = sched_setscheduler(current, SCHED_RR, ¶m); | + ____rv0 = sched_setscheduler(current, SCHED_RR, ¶m); | |||
+ if (____rv0 < 0) | + if (____rv0 < 0) | |||
+ drbd_err(connection, | + drbd_err(connection, | |||
+ "drbd_ack_receiver: ERROR set priority, ret=%d\n", | + "drbd_ack_receiver: ERROR set priority, ret=%d\n", | |||
+ ____rv0); | + ____rv0); | |||
while (get_t_state(thi) == RUNNING) { | while (get_t_state(thi) == RUNNING) { | |||
drbd_thread_current_set_cpu(thi); | drbd_thread_current_set_cpu(thi); | |||
--- drbd_nl.c | --- drbd_nl.c | |||
+++ /tmp/cocci-output-401312-e0dc5b-drbd_nl.c | ||||
@@ -1495,7 +1495,8 @@ void drbd_set_my_capacity(struct drbd_de | @@ -1495,7 +1495,8 @@ void drbd_set_my_capacity(struct drbd_de | |||
{ | { | |||
char ppb[10]; | char ppb[10]; | |||
- set_capacity_and_notify(device->vdisk, size); | - set_capacity_and_notify(device->vdisk, size); | |||
+ set_capacity(device->vdisk, size); | + set_capacity(device->vdisk, size); | |||
+ revalidate_disk(device->vdisk); | + revalidate_disk(device->vdisk); | |||
drbd_info(device, "size = %s (%llu KB)\n", | drbd_info(device, "size = %s (%llu KB)\n", | |||
ppsize(ppb, size>>1), (unsigned long long)size>>1); | ppsize(ppb, size>>1), (unsigned long long)size>>1); | |||
skipping to change at line 498 | skipping to change at line 498 | |||
@@ -5513,7 +5520,7 @@ static void device_to_statistics(struct | @@ -5513,7 +5520,7 @@ static void device_to_statistics(struct | |||
s->dev_disk_flags = md->flags; | s->dev_disk_flags = md->flags; | |||
s->dev_lower_blocked = | s->dev_lower_blocked = | |||
- bdi_congested(device->ldev->backing_bdev->bd_disk->bdi, | - bdi_congested(device->ldev->backing_bdev->bd_disk->bdi, | |||
+ bdi_congested(device->ldev->backing_bdev->bd_disk->queue- >backing_dev_info, | + bdi_congested(device->ldev->backing_bdev->bd_disk->queue- >backing_dev_info, | |||
(1 << WB_async_congested) | | (1 << WB_async_congested) | | |||
(1 << WB_sync_congested)); | (1 << WB_sync_congested)); | |||
put_ldev(device); | put_ldev(device); | |||
--- drbd_main.c | --- drbd_main.c | |||
+++ /tmp/cocci-output-401312-91eb13-drbd_main.c | ||||
@@ -70,6 +70,7 @@ MODULE_PARM_DESC(minor_count, "Approxima | @@ -70,6 +70,7 @@ MODULE_PARM_DESC(minor_count, "Approxima | |||
MODULE_ALIAS_BLOCKDEV_MAJOR(DRBD_MAJOR); | MODULE_ALIAS_BLOCKDEV_MAJOR(DRBD_MAJOR); | |||
#include <linux/moduleparam.h> | #include <linux/moduleparam.h> | |||
+#include <linux/vermagic.h> | +#include <linux/vermagic.h> | |||
#ifdef CONFIG_DRBD_FAULT_INJECTION | #ifdef CONFIG_DRBD_FAULT_INJECTION | |||
int drbd_enable_faults; | int drbd_enable_faults; | |||
@@ -149,7 +150,6 @@ struct bio_set drbd_io_bio_set; | @@ -149,7 +150,6 @@ struct bio_set drbd_io_bio_set; | |||
skipping to change at line 755 | skipping to change at line 755 | |||
+ | + | |||
static int __init drbd_init(void) | static int __init drbd_init(void) | |||
{ | { | |||
int err; | int err; | |||
+ if (double_check_for_kabi_breakage()) | + if (double_check_for_kabi_breakage()) | |||
+ return -EINVAL; | + return -EINVAL; | |||
initialize_kref_debugging(); | initialize_kref_debugging(); | |||
--- drbd_debugfs.c | --- drbd_debugfs.c | |||
+++ /tmp/cocci-output-401312-063c01-drbd_debugfs.c | ||||
@@ -1827,6 +1827,44 @@ static const struct file_operations drbd | @@ -1827,6 +1827,44 @@ static const struct file_operations drbd | |||
static int drbd_compat_show(struct seq_file *m, void *ignored) | static int drbd_compat_show(struct seq_file *m, void *ignored) | |||
{ | { | |||
+ seq_puts(m, "blk_queue_split__yes_has_two_parameters\n"); | + seq_puts(m, "blk_queue_split__yes_has_two_parameters\n"); | |||
+ seq_puts(m, "bio_alloc__no_has_4_params\n"); | + seq_puts(m, "bio_alloc__no_has_4_params\n"); | |||
+ seq_puts(m, "bio_bi_bdev__no_present\n"); | + seq_puts(m, "bio_bi_bdev__no_present\n"); | |||
+ seq_puts(m, "blk_alloc_disk__no_present\n"); | + seq_puts(m, "blk_alloc_disk__no_present\n"); | |||
+ seq_puts(m, "submit_bio__no_returns_void\n"); | + seq_puts(m, "submit_bio__no_returns_void\n"); | |||
+ seq_puts(m, "submit_bio__no_present\n"); | + seq_puts(m, "submit_bio__no_present\n"); | |||
skipping to change at line 802 | skipping to change at line 802 | |||
+ seq_puts(m, "gendisk_part0__no_is_block_device\n"); | + seq_puts(m, "gendisk_part0__no_is_block_device\n"); | |||
+ seq_puts(m, "bio_max_vecs__no_present\n"); | + seq_puts(m, "bio_max_vecs__no_present\n"); | |||
+ seq_puts(m, "fs_dax_get_by_bdev__no_takes_start_off\n"); | + seq_puts(m, "fs_dax_get_by_bdev__no_takes_start_off\n"); | |||
+ seq_puts(m, "add_disk__no_returns_int\n"); | + seq_puts(m, "add_disk__no_returns_int\n"); | |||
+ seq_puts(m, "bdev_nr_sectors__no_present\n"); | + seq_puts(m, "bdev_nr_sectors__no_present\n"); | |||
+ seq_puts(m, "genhd_fl_no_part__no_present\n"); | + seq_puts(m, "genhd_fl_no_part__no_present\n"); | |||
return 0; | return 0; | |||
} | } | |||
--- drbd_dax_pmem.c | --- drbd_dax_pmem.c | |||
+++ /tmp/cocci-output-401312-34f029-drbd_dax_pmem.c | ||||
@@ -58,9 +58,8 @@ int drbd_dax_open(struct drbd_backing_de | @@ -58,9 +58,8 @@ int drbd_dax_open(struct drbd_backing_de | |||
{ | { | |||
struct dax_device *dax_dev; | struct dax_device *dax_dev; | |||
int err; | int err; | |||
- u64 part_off; | - u64 part_off; | |||
- dax_dev = fs_dax_get_by_bdev(bdev->md_bdev, &part_off); | - dax_dev = fs_dax_get_by_bdev(bdev->md_bdev, &part_off); | |||
+ dax_dev = fs_dax_get_by_bdev(bdev->md_bdev); | + dax_dev = fs_dax_get_by_bdev(bdev->md_bdev); | |||
if (!dax_dev) | if (!dax_dev) | |||
return -ENODEV; | return -ENODEV; | |||
--- drbd_bitmap.c | --- drbd_bitmap.c | |||
+++ /tmp/cocci-output-401312-e949dd-drbd_bitmap.c | ||||
@@ -365,7 +365,8 @@ static struct page **bm_realloc_pages(st | @@ -365,7 +365,8 @@ static struct page **bm_realloc_pages(st | |||
new_pages = kzalloc(bytes, GFP_NOIO | __GFP_NOWARN); | new_pages = kzalloc(bytes, GFP_NOIO | __GFP_NOWARN); | |||
if (!new_pages) { | if (!new_pages) { | |||
new_pages = __vmalloc(bytes, | new_pages = __vmalloc(bytes, | |||
- GFP_NOIO | __GFP_HIGHMEM | __GFP_ZERO); | - GFP_NOIO | __GFP_HIGHMEM | __GFP_ZERO); | |||
+ GFP_NOIO | __GFP_HIGHMEM | __GFP_ZERO, | + GFP_NOIO | __GFP_HIGHMEM | __GFP_ZERO, | |||
+ PAGE_KERNEL); | + PAGE_KERNEL); | |||
if (!new_pages) | if (!new_pages) | |||
return NULL; | return NULL; | |||
} | } | |||
skipping to change at line 845 | skipping to change at line 845 | |||
/* bio_add_page of a single page to an empty bio will always succeed, | /* bio_add_page of a single page to an empty bio will always succeed, | |||
* according to api. Do we want to assert that? */ | * according to api. Do we want to assert that? */ | |||
bio_add_page(bio, page, len, 0); | bio_add_page(bio, page, len, 0); | |||
bio->bi_private = ctx; | bio->bi_private = ctx; | |||
bio->bi_end_io = drbd_bm_endio; | bio->bi_end_io = drbd_bm_endio; | |||
+ bio->bi_opf = op; | + bio->bi_opf = op; | |||
if (drbd_insert_fault(device, (op == REQ_OP_WRITE) ? DRBD_FAULT_MD_WR : D RBD_FAULT_MD_RD)) { | if (drbd_insert_fault(device, (op == REQ_OP_WRITE) ? DRBD_FAULT_MD_WR : D RBD_FAULT_MD_RD)) { | |||
bio->bi_status = BLK_STS_IOERR; | bio->bi_status = BLK_STS_IOERR; | |||
--- drbd_actlog.c | --- drbd_actlog.c | |||
+++ /tmp/cocci-output-401312-b8955f-drbd_actlog.c | ||||
@@ -94,14 +94,15 @@ static int _drbd_md_sync_page_io(struct | @@ -94,14 +94,15 @@ static int _drbd_md_sync_page_io(struct | |||
device->md_io.done = 0; | device->md_io.done = 0; | |||
device->md_io.error = -ENODEV; | device->md_io.error = -ENODEV; | |||
- bio = bio_alloc_bioset(bdev->md_bdev, 1, op | op_flags, | - bio = bio_alloc_bioset(bdev->md_bdev, 1, op | op_flags, | |||
- GFP_NOIO, &drbd_md_io_bio_set); | - GFP_NOIO, &drbd_md_io_bio_set); | |||
+ bio = bio_alloc_bioset(GFP_NOIO, 1, &drbd_md_io_bio_set); | + bio = bio_alloc_bioset(GFP_NOIO, 1, &drbd_md_io_bio_set); | |||
+ bio_set_dev(bio, bdev->md_bdev); | + bio_set_dev(bio, bdev->md_bdev); | |||
bio->bi_iter.bi_sector = sector; | bio->bi_iter.bi_sector = sector; | |||
err = -EIO; | err = -EIO; | |||
End of changes. 21 change blocks. | ||||
21 lines changed or deleted | 8 lines changed or added |