imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,67 +1,67 @@
 int xfs_refcount_finish_one(struct xfs_trans *tp, struct xfs_defer_ops *dfops, enum xfs_refcount_intent_type type, xfs_fsblock_t startblock, xfs_extlen_t blockcount, xfs_fsblock_t *new_fsb, xfs_extlen_t *new_len, struct xfs_btree_cur **pcur) {
   struct xfs_mount *mp = tp->t_mountp;
   struct xfs_btree_cur *rcur;
   struct xfs_buf *agbp = NULL;
   int error = 0;
   xfs_agnumber_t agno;
   xfs_agblock_t bno;
   xfs_agblock_t new_agbno;
   unsigned long nr_ops = 0;
   int shape_changes = 0;
   agno = XFS_FSB_TO_AGNO(mp, startblock);
   ASSERT(agno != NULLAGNUMBER);
   bno = XFS_FSB_TO_AGBNO(mp, startblock);
   trace_xfs_refcount_deferred(mp, XFS_FSB_TO_AGNO(mp, startblock), type, XFS_FSB_TO_AGBNO(mp, startblock), blockcount);
-  if (XFS_TEST_ERROR(false, mp, XFS_ERRTAG_REFCOUNT_FINISH_ONE, XFS_RANDOM_REFCOUNT_FINISH_ONE)) return -EIO;
+  if (XFS_TEST_ERROR(false, mp, XFS_ERRTAG_REFCOUNT_FINISH_ONE)) return -EIO;
   /*
    * If we haven't gotten a cursor or the cursor AG doesn't match
    * the startblock, get one now.
    */
   rcur = *pcur;
   if (rcur != NULL && rcur->bc_private.a.agno != agno) {
     nr_ops = rcur->bc_private.a.priv.refc.nr_ops;
     shape_changes = rcur->bc_private.a.priv.refc.shape_changes;
     xfs_refcount_finish_one_cleanup(tp, rcur, 0);
     rcur = NULL;
     *pcur = NULL;
   }
   if (rcur == NULL) {
     error = xfs_alloc_read_agf(tp->t_mountp, tp, agno, XFS_ALLOC_FLAG_FREEING, &agbp);
     if (error) return error;
     if (!agbp) return -EFSCORRUPTED;
     rcur = xfs_refcountbt_init_cursor(mp, tp, agbp, agno, dfops);
     if (!rcur) {
       error = -ENOMEM;
       goto out_cur;
     }
     rcur->bc_private.a.priv.refc.nr_ops = nr_ops;
     rcur->bc_private.a.priv.refc.shape_changes = shape_changes;
   }
   *pcur = rcur;
   switch (type) {
   case XFS_REFCOUNT_INCREASE:
     error = xfs_refcount_adjust(rcur, bno, blockcount, &new_agbno, new_len, XFS_REFCOUNT_ADJUST_INCREASE, dfops, NULL);
     *new_fsb = XFS_AGB_TO_FSB(mp, agno, new_agbno);
     break;
   case XFS_REFCOUNT_DECREASE:
     error = xfs_refcount_adjust(rcur, bno, blockcount, &new_agbno, new_len, XFS_REFCOUNT_ADJUST_DECREASE, dfops, NULL);
     *new_fsb = XFS_AGB_TO_FSB(mp, agno, new_agbno);
     break;
   case XFS_REFCOUNT_ALLOC_COW:
     *new_fsb = startblock + blockcount;
     *new_len = 0;
     error = __xfs_refcount_cow_alloc(rcur, bno, blockcount, dfops);
     break;
   case XFS_REFCOUNT_FREE_COW:
     *new_fsb = startblock + blockcount;
     *new_len = 0;
     error = __xfs_refcount_cow_free(rcur, bno, blockcount, dfops);
     break;
   default: ASSERT(0); error = -EFSCORRUPTED;
   }
   if (!error && *new_len > 0) trace_xfs_refcount_finish_one_leftover(mp, agno, type, bno, blockcount, new_agbno, *new_len);
   return error;
 out_cur:
   xfs_trans_brelse(tp, agbp);
   return error;
 }<sep>@@
expression e1,e2,e3,e4;
@@
XFS_TEST_ERROR(e1,e2,e3
-                      ,e4
   )
--- initial
+++ final
@@ -1,15 +1,15 @@
 static bool xfs_refcount_still_have_space(struct xfs_btree_cur *cur) {
   unsigned long overhead;
   overhead = cur->bc_private.a.priv.refc.shape_changes * xfs_allocfree_log_count(cur->bc_mp, 1);
   overhead *= cur->bc_mp->m_sb.sb_blocksize;
   /*
    * Only allow 2 refcount extent updates per transaction if the
    * refcount continue update "error" has been injected.
    */
-  if (cur->bc_private.a.priv.refc.nr_ops > 2 && XFS_TEST_ERROR(false, cur->bc_mp, XFS_ERRTAG_REFCOUNT_CONTINUE_UPDATE, XFS_RANDOM_REFCOUNT_CONTINUE_UPDATE)) return false;
+  if (cur->bc_private.a.priv.refc.nr_ops > 2 && XFS_TEST_ERROR(false, cur->bc_mp, XFS_ERRTAG_REFCOUNT_CONTINUE_UPDATE)) return false;
   if (cur->bc_private.a.priv.refc.nr_ops == 0)
     return true;
   else if (overhead > cur->bc_tp->t_log_res)
     return false;
   return cur->bc_tp->t_log_res - overhead > cur->bc_private.a.priv.refc.nr_ops * XFS_REFCOUNT_ITEM_OVERHEAD;
 }<sep>@@
expression e1,e2,e3,e4;
@@
XFS_TEST_ERROR(e1,e2,e3
-                      ,e4
   )
--- initial
+++ final
@@ -1,59 +1,59 @@
 int xfs_rmap_finish_one(struct xfs_trans *tp, enum xfs_rmap_intent_type type, uint64_t owner, int whichfork, xfs_fileoff_t startoff, xfs_fsblock_t startblock, xfs_filblks_t blockcount, xfs_exntst_t state, struct xfs_btree_cur **pcur) {
   struct xfs_mount *mp = tp->t_mountp;
   struct xfs_btree_cur *rcur;
   struct xfs_buf *agbp = NULL;
   int error = 0;
   xfs_agnumber_t agno;
   struct xfs_owner_info oinfo;
   xfs_agblock_t bno;
   bool unwritten;
   agno = XFS_FSB_TO_AGNO(mp, startblock);
   ASSERT(agno != NULLAGNUMBER);
   bno = XFS_FSB_TO_AGBNO(mp, startblock);
   trace_xfs_rmap_deferred(mp, agno, type, bno, owner, whichfork, startoff, blockcount, state);
-  if (XFS_TEST_ERROR(false, mp, XFS_ERRTAG_RMAP_FINISH_ONE, XFS_RANDOM_RMAP_FINISH_ONE)) return -EIO;
+  if (XFS_TEST_ERROR(false, mp, XFS_ERRTAG_RMAP_FINISH_ONE)) return -EIO;
   /*
    * If we haven't gotten a cursor or the cursor AG doesn't match
    * the startblock, get one now.
    */
   rcur = *pcur;
   if (rcur != NULL && rcur->bc_private.a.agno != agno) {
     xfs_rmap_finish_one_cleanup(tp, rcur, 0);
     rcur = NULL;
     *pcur = NULL;
   }
   if (rcur == NULL) {
     /*
      * Refresh the freelist before we start changing the
      * rmapbt, because a shape change could cause us to
      * allocate blocks.
      */
     error = xfs_free_extent_fix_freelist(tp, agno, &agbp);
     if (error) return error;
     if (!agbp) return -EFSCORRUPTED;
     rcur = xfs_rmapbt_init_cursor(mp, tp, agbp, agno);
     if (!rcur) {
       error = -ENOMEM;
       goto out_cur;
     }
   }
   *pcur = rcur;
   xfs_rmap_ino_owner(&oinfo, owner, whichfork, startoff);
   unwritten = state == XFS_EXT_UNWRITTEN;
   bno = XFS_FSB_TO_AGBNO(rcur->bc_mp, startblock);
   switch (type) {
   case XFS_RMAP_ALLOC:
   case XFS_RMAP_MAP: error = xfs_rmap_map(rcur, bno, blockcount, unwritten, &oinfo); break;
   case XFS_RMAP_MAP_SHARED: error = xfs_rmap_map_shared(rcur, bno, blockcount, unwritten, &oinfo); break;
   case XFS_RMAP_FREE:
   case XFS_RMAP_UNMAP: error = xfs_rmap_unmap(rcur, bno, blockcount, unwritten, &oinfo); break;
   case XFS_RMAP_UNMAP_SHARED: error = xfs_rmap_unmap_shared(rcur, bno, blockcount, unwritten, &oinfo); break;
   case XFS_RMAP_CONVERT: error = xfs_rmap_convert(rcur, bno, blockcount, !unwritten, &oinfo); break;
   case XFS_RMAP_CONVERT_SHARED: error = xfs_rmap_convert_shared(rcur, bno, blockcount, !unwritten, &oinfo); break;
   default: ASSERT(0); error = -EFSCORRUPTED;
   }
   return error;
 out_cur:
   xfs_trans_brelse(tp, agbp);
   return error;
 }<sep>@@
expression e1,e2,e3,e4;
@@
XFS_TEST_ERROR(e1,e2,e3
-                      ,e4
   )
--- initial
+++ final
@@ -1,12 +1,12 @@
 static int __init init_bio(void) {
   bio_slab_max = 2;
   bio_slab_nr = 0;
   bio_slabs = kzalloc(bio_slab_max * sizeof(struct bio_slab), GFP_KERNEL);
   if (!bio_slabs) panic("bio: can't allocate bios\n");
   bio_integrity_init();
   biovec_init_slabs();
-  fs_bio_set = bioset_create(BIO_POOL_SIZE, 0);
+  fs_bio_set = bioset_create(BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS);
   if (!fs_bio_set) panic("bio: can't allocate bios\n");
   if (bioset_integrity_create(fs_bio_set, BIO_POOL_SIZE)) panic("bio: can't create integrity pool\n");
   return 0;
 }<sep>@@
expression e1,e2;
@@
-bioset_create(e1,e2)
+bioset_create(e1,e2,BIOSET_NEED_BVECS)
--- initial
+++ final
@@ -1,63 +1,63 @@
 struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id) {
   struct request_queue *q;
   q = kmem_cache_alloc_node(blk_requestq_cachep, gfp_mask | __GFP_ZERO, node_id);
   if (!q) return NULL;
   q->id = ida_simple_get(&blk_queue_ida, 0, 0, gfp_mask);
   if (q->id < 0) goto fail_q;
-  q->bio_split = bioset_create(BIO_POOL_SIZE, 0);
+  q->bio_split = bioset_create(BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS);
   if (!q->bio_split) goto fail_id;
   q->backing_dev_info = bdi_alloc_node(gfp_mask, node_id);
   if (!q->backing_dev_info) goto fail_split;
   q->stats = blk_alloc_queue_stats();
   if (!q->stats) goto fail_stats;
   q->backing_dev_info->ra_pages = (VM_MAX_READAHEAD * 1024) / PAGE_SIZE;
   q->backing_dev_info->capabilities = BDI_CAP_CGROUP_WRITEBACK;
   q->backing_dev_info->name = "block";
   q->node = node_id;
   setup_timer(&q->backing_dev_info->laptop_mode_wb_timer, laptop_mode_timer_fn, (unsigned long)q);
   setup_timer(&q->timeout, blk_rq_timed_out_timer, (unsigned long)q);
   INIT_LIST_HEAD(&q->queue_head);
   INIT_LIST_HEAD(&q->timeout_list);
   INIT_LIST_HEAD(&q->icq_list);
 #ifdef CONFIG_BLK_CGROUP
   INIT_LIST_HEAD(&q->blkg_list);
 #endif
   INIT_DELAYED_WORK(&q->delay_work, blk_delay_work);
   kobject_init(&q->kobj, &blk_queue_ktype);
   mutex_init(&q->sysfs_lock);
   spin_lock_init(&q->__queue_lock);
   /*
    * By default initialize queue_lock to internal lock and driver can
    * override it later if need be.
    */
   q->queue_lock = &q->__queue_lock;
   /*
    * A queue starts its life with bypass turned on to avoid
    * unnecessary bypass on/off overhead and nasty surprises during
    * init.  The initial bypass will be finished when the queue is
    * registered by blk_register_queue().
    */
   q->bypass_depth = 1;
   __set_bit(QUEUE_FLAG_BYPASS, &q->queue_flags);
   init_waitqueue_head(&q->mq_freeze_wq);
   /*
    * Init percpu_ref in atomic mode so that it's faster to shutdown.
    * See blk_register_queue() for details.
    */
   if (percpu_ref_init(&q->q_usage_counter, blk_queue_usage_counter_release, PERCPU_REF_INIT_ATOMIC, GFP_KERNEL)) goto fail_bdi;
   if (blkcg_init_queue(q)) goto fail_ref;
   return q;
 fail_ref:
   percpu_ref_exit(&q->q_usage_counter);
 fail_bdi:
   blk_free_queue_stats(q->stats);
 fail_stats:
   bdi_put(q->backing_dev_info);
 fail_split:
   bioset_free(q->bio_split);
 fail_id:
   ida_simple_remove(&blk_queue_ida, q->id);
 fail_q:
   kmem_cache_free(blk_requestq_cachep, q);
   return NULL;
 }<sep>@@
expression e1,e2;
@@
-bioset_create(e1,e2)
+bioset_create(e1,e2,BIOSET_NEED_BVECS)
--- initial
+++ final
@@ -1,5 +1,5 @@
 static __init int blkdev_init(void) {
-  blkdev_dio_pool = bioset_create(4, offsetof(struct blkdev_dio, bio));
+  blkdev_dio_pool = bioset_create(4, offsetof(struct blkdev_dio, bio), BIOSET_NEED_BVECS);
   if (!blkdev_dio_pool) return -ENOMEM;
   return 0;
 }<sep>@@
expression e1,e2;
@@
-bioset_create(e1,e2)
+bioset_create(e1,e2,BIOSET_NEED_BVECS)
--- initial
+++ final
@@ -1,15 +1,15 @@
 struct dm_io_client *dm_io_client_create(void) {
   struct dm_io_client *client;
   unsigned min_ios = dm_get_reserved_bio_based_ios();
   client = kmalloc(sizeof(*client), GFP_KERNEL);
   if (!client) return ERR_PTR(-ENOMEM);
   client->pool = mempool_create_slab_pool(min_ios, _dm_io_cache);
   if (!client->pool) goto bad;
-  client->bios = bioset_create(min_ios, 0);
+  client->bios = bioset_create(min_ios, 0, BIOSET_NEED_BVECS);
   if (!client->bios) goto bad;
   return client;
 bad:
   mempool_destroy(client->pool);
   kfree(client);
   return ERR_PTR(-ENOMEM);
 }<sep>@@
expression e1,e2;
@@
-bioset_create(e1,e2)
+bioset_create(e1,e2,BIOSET_NEED_BVECS)
--- initial
+++ final
@@ -1,30 +1,30 @@
 struct dm_md_mempools *dm_alloc_md_mempools(struct mapped_device *md, enum dm_queue_mode type, unsigned integrity, unsigned per_io_data_size) {
   struct dm_md_mempools *pools = kzalloc_node(sizeof(*pools), GFP_KERNEL, md->numa_node_id);
   unsigned int pool_size = 0;
   unsigned int front_pad;
   if (!pools) return NULL;
   switch (type) {
   case DM_TYPE_BIO_BASED:
   case DM_TYPE_DAX_BIO_BASED:
     pool_size = dm_get_reserved_bio_based_ios();
     front_pad = roundup(per_io_data_size, __alignof__(struct dm_target_io)) + offsetof(struct dm_target_io, clone);
 
     pools->io_pool = mempool_create_slab_pool(pool_size, _io_cache);
     if (!pools->io_pool) goto out;
     break;
   case DM_TYPE_REQUEST_BASED:
   case DM_TYPE_MQ_REQUEST_BASED:
     pool_size = dm_get_reserved_rq_based_ios();
     front_pad = offsetof(struct dm_rq_clone_bio_info, clone);
     /* per_io_data_size is used for blk-mq pdu at queue allocation */
     break;
   default: BUG();
   }
-  pools->bs = bioset_create_nobvec(pool_size, front_pad);
+  pools->bs = bioset_create(pool_size, front_pad, 0);
   if (!pools->bs) goto out;
   if (integrity && bioset_integrity_create(pools->bs, pool_size)) goto out;
   return pools;
 out:
   dm_free_md_mempools(pools);
   return NULL;
 }<sep>@@
expression e1,e2;
@@
-       bioset_create_nobvec(e1,e2)
+       bioset_create(e1,e2,0)
--- initial
+++ final
@@ -1,45 +1,45 @@
 static int drbd_create_mempools(void) {
   struct page *page;
   const int number = (DRBD_MAX_BIO_SIZE / PAGE_SIZE) * minor_count;
   int i;
   /* prepare our caches and mempools */
   drbd_request_mempool = NULL;
   drbd_ee_cache = NULL;
   drbd_request_cache = NULL;
   drbd_bm_ext_cache = NULL;
   drbd_al_ext_cache = NULL;
   drbd_pp_pool = NULL;
   drbd_md_io_page_pool = NULL;
   drbd_md_io_bio_set = NULL;
   /* caches */
   drbd_request_cache = kmem_cache_create("drbd_req", sizeof(struct drbd_request), 0, 0, NULL);
   if (drbd_request_cache == NULL) goto Enomem;
   drbd_ee_cache = kmem_cache_create("drbd_ee", sizeof(struct drbd_peer_request), 0, 0, NULL);
   if (drbd_ee_cache == NULL) goto Enomem;
   drbd_bm_ext_cache = kmem_cache_create("drbd_bm", sizeof(struct bm_extent), 0, 0, NULL);
   if (drbd_bm_ext_cache == NULL) goto Enomem;
   drbd_al_ext_cache = kmem_cache_create("drbd_al", sizeof(struct lc_element), 0, 0, NULL);
   if (drbd_al_ext_cache == NULL) goto Enomem;
   /* mempools */
-  drbd_md_io_bio_set = bioset_create(DRBD_MIN_POOL_PAGES, 0);
+  drbd_md_io_bio_set = bioset_create(DRBD_MIN_POOL_PAGES, 0, BIOSET_NEED_BVECS);
   if (drbd_md_io_bio_set == NULL) goto Enomem;
   drbd_md_io_page_pool = mempool_create_page_pool(DRBD_MIN_POOL_PAGES, 0);
   if (drbd_md_io_page_pool == NULL) goto Enomem;
   drbd_request_mempool = mempool_create_slab_pool(number, drbd_request_cache);
   if (drbd_request_mempool == NULL) goto Enomem;
   drbd_ee_mempool = mempool_create_slab_pool(number, drbd_ee_cache);
   if (drbd_ee_mempool == NULL) goto Enomem;
   /* drbd's page pool */
   spin_lock_init(&drbd_pp_lock);
   for (i = 0; i < number; i++) {
     page = alloc_page(GFP_HIGHUSER);
     if (!page) goto Enomem;
     set_page_private(page, (unsigned long)drbd_pp_pool);
     drbd_pp_pool = page;
   }
   drbd_pp_vacant = number;
   return 0;
 Enomem:
   drbd_destroy_mempools(); /* in case we allocated some */
   return -ENOMEM;
 }<sep>@@
expression e1,e2;
@@
-bioset_create(e1,e2)
+bioset_create(e1,e2,BIOSET_NEED_BVECS)
--- initial
+++ final
@@ -1,20 +1,20 @@
 int __init extent_io_init(void) {
   extent_state_cache = kmem_cache_create("btrfs_extent_state", sizeof(struct extent_state), 0, SLAB_MEM_SPREAD, NULL);
   if (!extent_state_cache) return -ENOMEM;
   extent_buffer_cache = kmem_cache_create("btrfs_extent_buffer", sizeof(struct extent_buffer), 0, SLAB_MEM_SPREAD, NULL);
   if (!extent_buffer_cache) goto free_state_cache;
-  btrfs_bioset = bioset_create(BIO_POOL_SIZE, offsetof(struct btrfs_io_bio, bio));
+  btrfs_bioset = bioset_create(BIO_POOL_SIZE, offsetof(struct btrfs_io_bio, bio), BIOSET_NEED_BVECS);
   if (!btrfs_bioset) goto free_buffer_cache;
   if (bioset_integrity_create(btrfs_bioset, BIO_POOL_SIZE)) goto free_bioset;
   return 0;
 free_bioset:
   bioset_free(btrfs_bioset);
   btrfs_bioset = NULL;
 free_buffer_cache:
   kmem_cache_destroy(extent_buffer_cache);
   extent_buffer_cache = NULL;
 free_state_cache:
   kmem_cache_destroy(extent_state_cache);
   extent_state_cache = NULL;
   return -ENOMEM;
 }<sep>@@
expression e1,e2;
@@
-bioset_create(e1,e2)
+bioset_create(e1,e2,BIOSET_NEED_BVECS)
--- initial
+++ final
@@ -1,65 +1,65 @@
 static struct r10conf *setup_conf(struct mddev *mddev) {
   struct r10conf *conf = NULL;
   int err = -EINVAL;
   struct geom geo;
   int copies;
   copies = setup_geo(&geo, mddev, geo_new);
   if (copies == -2) {
     pr_warn("md/raid10:%s: chunk size must be at least PAGE_SIZE(%ld) and be a power of 2.\n", mdname(mddev), PAGE_SIZE);
     goto out;
   }
   if (copies < 2 || copies > mddev->raid_disks) {
     pr_warn("md/raid10:%s: unsupported raid10 layout: 0x%8x\n", mdname(mddev), mddev->new_layout);
     goto out;
   }
   err = -ENOMEM;
   conf = kzalloc(sizeof(struct r10conf), GFP_KERNEL);
   if (!conf) goto out;
   /* FIXME calc properly */
   conf->mirrors = kzalloc(sizeof(struct raid10_info) * (mddev->raid_disks + max(0, -mddev->delta_disks)), GFP_KERNEL);
   if (!conf->mirrors) goto out;
   conf->tmppage = alloc_page(GFP_KERNEL);
   if (!conf->tmppage) goto out;
   conf->geo = geo;
   conf->copies = copies;
   conf->r10bio_pool = mempool_create(NR_RAID10_BIOS, r10bio_pool_alloc, r10bio_pool_free, conf);
   if (!conf->r10bio_pool) goto out;
-  conf->bio_split = bioset_create(BIO_POOL_SIZE, 0);
+  conf->bio_split = bioset_create(BIO_POOL_SIZE, 0, 0);
   if (!conf->bio_split) goto out;
   calc_sectors(conf, mddev->dev_sectors);
   if (mddev->reshape_position == MaxSector) {
     conf->prev = conf->geo;
     conf->reshape_progress = MaxSector;
   } else {
     if (setup_geo(&conf->prev, mddev, geo_old) != conf->copies) {
       err = -EINVAL;
       goto out;
     }
     conf->reshape_progress = mddev->reshape_position;
     if (conf->prev.far_offset)
       conf->prev.stride = 1 << conf->prev.chunk_shift;
     else
       /* far_copies must be 1 */
       conf->prev.stride = conf->dev_sectors;
   }
   conf->reshape_safe = conf->reshape_progress;
   spin_lock_init(&conf->device_lock);
   INIT_LIST_HEAD(&conf->retry_list);
   INIT_LIST_HEAD(&conf->bio_end_io_list);
   spin_lock_init(&conf->resync_lock);
   init_waitqueue_head(&conf->wait_barrier);
   atomic_set(&conf->nr_pending, 0);
   conf->thread = md_register_thread(raid10d, mddev, "raid10");
   if (!conf->thread) goto out;
   conf->mddev = mddev;
   return conf;
 out:
   if (conf) {
     mempool_destroy(conf->r10bio_pool);
     kfree(conf->mirrors);
     safe_put_page(conf->tmppage);
     if (conf->bio_split) bioset_free(conf->bio_split);
     kfree(conf);
   }
   return ERR_PTR(err);
 }<sep>@@
expression e1,e2;
identifier f,x;
@@
f(...,struct mddev *x,...) {
<...
-bioset_create(e1,e2)
+bioset_create(e1,e2,0)
...> }
--- initial
+++ final
@@ -1,71 +1,71 @@
 int r5l_init_log(struct r5conf *conf, struct md_rdev *rdev) {
   struct request_queue *q = bdev_get_queue(rdev->bdev);
   struct r5l_log *log;
   char b[BDEVNAME_SIZE];
   pr_debug("md/raid:%s: using device %s as journal\n", mdname(conf->mddev), bdevname(rdev->bdev, b));
   if (PAGE_SIZE != 4096) return -EINVAL;
   /*
    * The PAGE_SIZE must be big enough to hold 1 r5l_meta_block and
    * raid_disks r5l_payload_data_parity.
    *
    * Write journal and cache does not work for very big array
    * (raid_disks > 203)
    */
   if (sizeof(struct r5l_meta_block) + ((sizeof(struct r5l_payload_data_parity) + sizeof(__le32)) * conf->raid_disks) > PAGE_SIZE) {
     pr_err("md/raid:%s: write journal/cache doesn't work for array with %d disks\n", mdname(conf->mddev), conf->raid_disks);
     return -EINVAL;
   }
   log = kzalloc(sizeof(*log), GFP_KERNEL);
   if (!log) return -ENOMEM;
   log->rdev = rdev;
   log->need_cache_flush = test_bit(QUEUE_FLAG_WC, &q->queue_flags) != 0;
   log->uuid_checksum = crc32c_le(~0, rdev->mddev->uuid, sizeof(rdev->mddev->uuid));
   mutex_init(&log->io_mutex);
   spin_lock_init(&log->io_list_lock);
   INIT_LIST_HEAD(&log->running_ios);
   INIT_LIST_HEAD(&log->io_end_ios);
   INIT_LIST_HEAD(&log->flushing_ios);
   INIT_LIST_HEAD(&log->finished_ios);
   bio_init(&log->flush_bio, NULL, 0);
   log->io_kc = KMEM_CACHE(r5l_io_unit, 0);
   if (!log->io_kc) goto io_kc;
   log->io_pool = mempool_create_slab_pool(R5L_POOL_SIZE, log->io_kc);
   if (!log->io_pool) goto io_pool;
-  log->bs = bioset_create(R5L_POOL_SIZE, 0);
+  log->bs = bioset_create(R5L_POOL_SIZE, 0, BIOSET_NEED_BVECS);
   if (!log->bs) goto io_bs;
   log->meta_pool = mempool_create_page_pool(R5L_POOL_SIZE, 0);
   if (!log->meta_pool) goto out_mempool;
   spin_lock_init(&log->tree_lock);
   INIT_RADIX_TREE(&log->big_stripe_tree, GFP_NOWAIT | __GFP_NOWARN);
   log->reclaim_thread = md_register_thread(r5l_reclaim_thread, log->rdev->mddev, "reclaim");
   if (!log->reclaim_thread) goto reclaim_thread;
   log->reclaim_thread->timeout = R5C_RECLAIM_WAKEUP_INTERVAL;
   init_waitqueue_head(&log->iounit_wait);
   INIT_LIST_HEAD(&log->no_mem_stripes);
   INIT_LIST_HEAD(&log->no_space_stripes);
   spin_lock_init(&log->no_space_stripes_lock);
   INIT_WORK(&log->deferred_io_work, r5l_submit_io_async);
   INIT_WORK(&log->disable_writeback_work, r5c_disable_writeback_async);
   log->r5c_journal_mode = R5C_JOURNAL_MODE_WRITE_THROUGH;
   INIT_LIST_HEAD(&log->stripe_in_journal_list);
   spin_lock_init(&log->stripe_in_journal_lock);
   atomic_set(&log->stripe_in_journal_count, 0);
   rcu_assign_pointer(conf->log, log);
   if (r5l_load_log(log)) goto error;
   set_bit(MD_HAS_JOURNAL, &conf->mddev->flags);
   return 0;
 error:
   rcu_assign_pointer(conf->log, NULL);
   md_unregister_thread(&log->reclaim_thread);
 reclaim_thread:
   mempool_destroy(log->meta_pool);
 out_mempool:
   bioset_free(log->bs);
 io_bs:
   mempool_destroy(log->io_pool);
 io_pool:
   kmem_cache_destroy(log->io_kc);
 io_kc:
   kfree(log);
   return -EINVAL;
 }<sep>@@
expression e1,e2;
@@
-bioset_create(e1,e2)
+bioset_create(e1,e2,BIOSET_NEED_BVECS)
--- initial
+++ final
@@ -1,50 +1,50 @@
 static int bcache_device_init(struct bcache_device *d, unsigned block_size, sector_t sectors) {
   struct request_queue *q;
   size_t n;
   int minor;
   if (!d->stripe_size) d->stripe_size = 1 << 31;
   d->nr_stripes = DIV_ROUND_UP_ULL(sectors, d->stripe_size);
   if (!d->nr_stripes || d->nr_stripes > INT_MAX || d->nr_stripes > SIZE_MAX / sizeof(atomic_t)) {
     pr_err("nr_stripes too large or invalid: %u (start sector beyond end of disk?)", (unsigned)d->nr_stripes);
     return -ENOMEM;
   }
   n = d->nr_stripes * sizeof(atomic_t);
   d->stripe_sectors_dirty = kvzalloc(n, GFP_KERNEL);
   if (!d->stripe_sectors_dirty) return -ENOMEM;
   n = BITS_TO_LONGS(d->nr_stripes) * sizeof(unsigned long);
   d->full_dirty_stripes = kvzalloc(n, GFP_KERNEL);
   if (!d->full_dirty_stripes) return -ENOMEM;
   minor = ida_simple_get(&bcache_minor, 0, MINORMASK + 1, GFP_KERNEL);
   if (minor < 0) return minor;
   minor *= BCACHE_MINORS;
-  if (!(d->bio_split = bioset_create(4, offsetof(struct bbio, bio))) || !(d->disk = alloc_disk(BCACHE_MINORS))) {
+  if (!(d->bio_split = bioset_create(4, offsetof(struct bbio, bio), BIOSET_NEED_BVECS)) || !(d->disk = alloc_disk(BCACHE_MINORS))) {
     ida_simple_remove(&bcache_minor, minor);
     return -ENOMEM;
   }
   set_capacity(d->disk, sectors);
   snprintf(d->disk->disk_name, DISK_NAME_LEN, "bcache%i", minor);
   d->disk->major = bcache_major;
   d->disk->first_minor = minor;
   d->disk->fops = &bcache_ops;
   d->disk->private_data = d;
   q = blk_alloc_queue(GFP_KERNEL);
   if (!q) return -ENOMEM;
   blk_queue_make_request(q, NULL);
   d->disk->queue = q;
   q->queuedata = d;
   q->backing_dev_info->congested_data = d;
   q->limits.max_hw_sectors = UINT_MAX;
   q->limits.max_sectors = UINT_MAX;
   q->limits.max_segment_size = UINT_MAX;
   q->limits.max_segments = BIO_MAX_PAGES;
   blk_queue_max_discard_sectors(q, UINT_MAX);
   q->limits.discard_granularity = 512;
   q->limits.io_min = block_size;
   q->limits.logical_block_size = block_size;
   q->limits.physical_block_size = block_size;
   set_bit(QUEUE_FLAG_NONROT, &d->disk->queue->queue_flags);
   clear_bit(QUEUE_FLAG_ADD_RANDOM, &d->disk->queue->queue_flags);
   set_bit(QUEUE_FLAG_DISCARD, &d->disk->queue->queue_flags);
   blk_queue_write_cache(q, true, true);
   return 0;
 }<sep>@@
expression e1,e2;
@@
-bioset_create(e1,e2)
+bioset_create(e1,e2,BIOSET_NEED_BVECS)