Hi Pankaj,

On 6/22/2023 4:35 PM, Pankaj Gupta wrote:
>> The following warning was reported when doing fsync on a pmem device:
>>
>>  ------------[ cut here ]------------
>>  WARNING: CPU: 2 PID: 384 at block/blk-core.c:751 
>> submit_bio_noacct+0x340/0x520
SNIP
>> Hi Jens & Dan,
>>
>> I found Pankaj was working on the fix and optimization of virtio-pmem
>> flush bio [0], but considering the last status update was 1/12/2022, so
>> could you please pick the patch up for v6.4 and we can do the flush fix
>> and optimization later ?
>>
>> [0]: 
>> https://lore.kernel.org/lkml/20220111161937.56272-1-pankaj.gupta.li...@gmail.com/T/
>>
>>  drivers/nvdimm/nd_virtio.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/nvdimm/nd_virtio.c b/drivers/nvdimm/nd_virtio.c
>> index c6a648fd8744..97098099f8a3 100644
>> --- a/drivers/nvdimm/nd_virtio.c
>> +++ b/drivers/nvdimm/nd_virtio.c
>> @@ -105,7 +105,7 @@ int async_pmem_flush(struct nd_region *nd_region, struct 
>> bio *bio)
>>          * parent bio. Otherwise directly call nd_region flush.
>>          */
>>         if (bio && bio->bi_iter.bi_sector != -1) {
>> -               struct bio *child = bio_alloc(bio->bi_bdev, 0, REQ_PREFLUSH,
>> +               struct bio *child = bio_alloc(bio->bi_bdev, 0, REQ_OP_WRITE 
>> | REQ_PREFLUSH,
>>                                               GFP_ATOMIC);
>>
>>                 if (!child)
> Fix looks good to me. Will give a run soon.
>
> Yes, [0] needs to be completed. Curious to know if you guys using
> virtio-pmem device?
Sorry about missing the question. We are plan to use DAX to do page
cache offload and now we are just do experiment with virtio-pmem and
nd-pmem.

> Thanks,
> Pankaj


Reply via email to