Re: [dm-devel] [PATCH v16 04/12] block: add emulation for copy

2023-09-26 Thread Nitesh Jagadeesh Shetty
+                write_bio->bi_iter.bi_size = chunk; +                ret = submit_bio_wait(write_bio); +                kfree(write_bio); blk_mq_map_bio_put(write_bio) ? or bio_uninit(write_bio); kfree(write_bio)? hmm... It continuously allocates and releases memory for bio, Why don't you just

Re: [dm-devel] [PATCH v16 04/12] block: add emulation for copy

2023-09-25 Thread Jinyoung Choi
> +static void blkdev_copy_emulation_work(struct work_struct *work) > +{ > +        struct blkdev_copy_emulation_io *emulation_io = container_of(work, > +                        struct blkdev_copy_emulation_io, emulation_work); > +        struct blkdev_copy_io *cio = emulation_io->cio; > +        s

[dm-devel] [PATCH v16 04/12] block: add emulation for copy

2023-09-20 Thread Nitesh Shetty
For the devices which does not support copy, copy emulation is added. It is required for in-kernel users like fabrics, where file descriptor is not available and hence they can't use copy_file_range. Copy-emulation is implemented by reading from source into memory and writing to the corresponding d