]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/lightnvm/pblk-read.c
lightnvm: pblk: use vmalloc for GC data buffer
[linux.git] / drivers / lightnvm / pblk-read.c
index ed2ea01a0a3864fcf98b0f63dca5dde4906dac66..31d4869b05008a201c8df45a713fd82c5fc704b3 100644 (file)
@@ -462,7 +462,6 @@ int pblk_submit_read_gc(struct pblk *pblk, u64 *lba_list, void *data,
 {
        struct nvm_tgt_dev *dev = pblk->dev;
        struct nvm_geo *geo = &dev->geo;
-       struct request_queue *q = dev->q;
        struct bio *bio;
        struct nvm_rq rqd;
        int ret, data_len;
@@ -491,7 +490,8 @@ int pblk_submit_read_gc(struct pblk *pblk, u64 *lba_list, void *data,
                goto out;
 
        data_len = (*secs_to_gc) * geo->sec_size;
-       bio = bio_map_kern(q, data, data_len, GFP_KERNEL);
+       bio = pblk_bio_map_addr(pblk, data, *secs_to_gc, data_len,
+                                               PBLK_KMALLOC_META, GFP_KERNEL);
        if (IS_ERR(bio)) {
                pr_err("pblk: could not allocate GC bio (%lu)\n", PTR_ERR(bio));
                goto err_free_dma;