compat.patch (drbd-9.1.10) | : | compat.patch (drbd-9.1.11) | ||
---|---|---|---|---|
--- drbd_receiver.c | --- drbd_receiver.c | |||
+++ /tmp/cocci-output-396702-f084dd-drbd_receiver.c | ||||
@@ -1294,8 +1294,7 @@ static void one_flush_endio(struct bio * | @@ -1294,8 +1294,7 @@ static void one_flush_endio(struct bio * | |||
static void submit_one_flush(struct drbd_device *device, struct issue_flush_con text *ctx) | static void submit_one_flush(struct drbd_device *device, struct issue_flush_con text *ctx) | |||
{ | { | |||
- struct bio *bio = bio_alloc(device->ldev->backing_bdev, 0, | - struct bio *bio = bio_alloc(device->ldev->backing_bdev, 0, | |||
- REQ_OP_FLUSH | REQ_PREFLUSH, GFP_NOIO); | - REQ_OP_FLUSH | REQ_PREFLUSH, GFP_NOIO); | |||
+ struct bio *bio = bio_alloc(GFP_NOIO, 0); | + struct bio *bio = bio_alloc(GFP_NOIO, 0); | |||
struct one_flush_context *octx = kmalloc(sizeof(*octx), GFP_NOIO); | struct one_flush_context *octx = kmalloc(sizeof(*octx), GFP_NOIO); | |||
if (!octx) { | if (!octx) { | |||
skipping to change at line 54 | skipping to change at line 54 | |||
+ bio_set_dev(bio, device->ldev->backing_bdev); | + bio_set_dev(bio, device->ldev->backing_bdev); | |||
/* > peer_req->i.sector, unless this is the first bio */ | /* > peer_req->i.sector, unless this is the first bio */ | |||
bio->bi_iter.bi_sector = sector; | bio->bi_iter.bi_sector = sector; | |||
bio->bi_private = peer_req; | bio->bi_private = peer_req; | |||
bio->bi_end_io = drbd_peer_request_endio; | bio->bi_end_io = drbd_peer_request_endio; | |||
+ bio->bi_opf = peer_req->opf; | + bio->bi_opf = peer_req->opf; | |||
bio->bi_next = bios; | bio->bi_next = bios; | |||
bios = bio; | bios = bio; | |||
--- drbd_nl.c | --- drbd_nl.c | |||
+++ /tmp/cocci-output-396702-a320b8-drbd_nl.c | ||||
@@ -1940,7 +1940,7 @@ static void decide_on_discard_support(st | @@ -1940,7 +1940,7 @@ static void decide_on_discard_support(st | |||
*/ | */ | |||
bool can_do = b ? blk_queue_discard(b) : true; | bool can_do = b ? blk_queue_discard(b) : true; | |||
- if (can_do && b && !queue_discard_zeroes_data(b) && !discard_zeroes_if_al igned) { | - if (can_do && b && !queue_discard_zeroes_data(b) && !discard_zeroes_if_al igned) { | |||
+ if (can_do && b && 1/* !queue_discard_zeroes_data(q) */ && !discard_zeroe s_if_aligned) { | + if (can_do && b && 1/* !queue_discard_zeroes_data(q) */ && !discard_zeroe s_if_aligned) { | |||
can_do = false; | can_do = false; | |||
drbd_info(device, "discard_zeroes_data=0 and discard_zeroes_if_al igned=no: disabling discards\n"); | drbd_info(device, "discard_zeroes_data=0 and discard_zeroes_if_al igned=no: disabling discards\n"); | |||
} | } | |||
@@ -2205,7 +2205,7 @@ static void sanitize_disk_conf(struct dr | @@ -2205,7 +2205,7 @@ static void sanitize_disk_conf(struct dr | |||
disk_conf->al_extents = drbd_al_extents_max(nbc); | disk_conf->al_extents = drbd_al_extents_max(nbc); | |||
if (!blk_queue_discard(q) || | if (!blk_queue_discard(q) || | |||
- (!queue_discard_zeroes_data(q) && !disk_conf->discard_zeroes_if_align ed)) { | - (!queue_discard_zeroes_data(q) && !disk_conf->discard_zeroes_if_align ed)) { | |||
+ (1/* !queue_discard_zeroes_data(q) */ && !disk_conf->discard_zeroes_i f_aligned)) { | + (1/* !queue_discard_zeroes_data(q) */ && !disk_conf->discard_zeroes_i f_aligned)) { | |||
if (disk_conf->rs_discard_granularity) { | if (disk_conf->rs_discard_granularity) { | |||
disk_conf->rs_discard_granularity = 0; /* disable feature */ | disk_conf->rs_discard_granularity = 0; /* disable feature */ | |||
drbd_info(device, "rs_discard_granularity feature disable d\n"); | drbd_info(device, "rs_discard_granularity feature disable d\n"); | |||
--- drbd_main.c | --- drbd_main.c | |||
+++ /tmp/cocci-output-396702-d1e791-drbd_main.c | ||||
@@ -1569,7 +1569,7 @@ int drbd_send_sizes(struct drbd_peer_dev | @@ -1569,7 +1569,7 @@ int drbd_send_sizes(struct drbd_peer_dev | |||
p->qlim->io_opt = cpu_to_be32(bdev_io_opt(bdev)); | p->qlim->io_opt = cpu_to_be32(bdev_io_opt(bdev)); | |||
p->qlim->discard_enabled = blk_queue_discard(q); | p->qlim->discard_enabled = blk_queue_discard(q); | |||
p->qlim->discard_zeroes_data = discard_zeroes_if_aligned || | p->qlim->discard_zeroes_data = discard_zeroes_if_aligned || | |||
- queue_discard_zeroes_data(q) | - queue_discard_zeroes_data(q) | |||
+ 0/* queue_discard_zeroes_data(q) */ | + 0/* queue_discard_zeroes_data(q) */ | |||
/* but that is always false on recent kernels */ | /* but that is always false on recent kernels */ | |||
; | ; | |||
p->qlim->write_same_capable = !disable_write_same && | p->qlim->write_same_capable = !disable_write_same && | |||
@@ -3795,7 +3795,7 @@ enum drbd_ret_code drbd_create_device(st | @@ -3795,7 +3795,7 @@ enum drbd_ret_code drbd_create_device(st | |||
disk->first_minor = minor; | disk->first_minor = minor; | |||
disk->minors = 1; | disk->minors = 1; | |||
disk->fops = &drbd_ops; | disk->fops = &drbd_ops; | |||
- disk->flags |= GENHD_FL_NO_PART; | - disk->flags |= GENHD_FL_NO_PART; | |||
+ disk->flags |= GENHD_FL_NO_PART_SCAN; | + disk->flags |= GENHD_FL_NO_PART_SCAN; | |||
sprintf(disk->disk_name, "drbd%d", minor); | sprintf(disk->disk_name, "drbd%d", minor); | |||
disk->private_data = device; | disk->private_data = device; | |||
--- drbd_debugfs.c | --- drbd_debugfs.c | |||
+++ /tmp/cocci-output-396702-46c1bc-drbd_debugfs.c | ||||
@@ -1827,6 +1827,11 @@ static const struct file_operations drbd | @@ -1827,6 +1827,11 @@ 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, "bio_alloc__no_has_4_params\n"); | + seq_puts(m, "bio_alloc__no_has_4_params\n"); | |||
+ seq_puts(m, "blk_queue_update_readahead__no_present\n"); | + seq_puts(m, "blk_queue_update_readahead__no_present\n"); | |||
+ seq_puts(m, "queue_discard_zeroes_data__no_present\n"); | + seq_puts(m, "queue_discard_zeroes_data__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, "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-396702-4a047e-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-396702-bb6167-drbd_bitmap.c | ||||
@@ -1185,14 +1185,15 @@ static void bm_page_io_async(struct drbd | @@ -1185,14 +1185,15 @@ static void bm_page_io_async(struct drbd | |||
} else | } else | |||
page = b->bm_pages[page_nr]; | page = b->bm_pages[page_nr]; | |||
- bio = bio_alloc_bioset(device->ldev->md_bdev, 1, op, GFP_NOIO, | - bio = bio_alloc_bioset(device->ldev->md_bdev, 1, op, GFP_NOIO, | |||
- &drbd_md_io_bio_set); | - &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, device->ldev->md_bdev); | + bio_set_dev(bio, device->ldev->md_bdev); | |||
bio->bi_iter.bi_sector = on_disk_sector; | bio->bi_iter.bi_sector = on_disk_sector; | |||
/* 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-396702-cb6597-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. 7 change blocks. | ||||
7 lines changed or deleted | 0 lines changed or added |