On 09/12/2020 14:41, Johannes Thumshirn wrote: > On 09/12/2020 11:18, Johannes Thumshirn wrote: >> On 09/12/2020 11:10, hch@xxxxxxxxxxxxx wrote: >>> On Wed, Dec 09, 2020 at 10:08:53AM +0000, Johannes Thumshirn wrote: >>>> On 09/12/2020 10:34, Christoph Hellwig wrote: >>>>> Btw, another thing I noticed: >>>>> >>>>> when using io_uring to submit a write to btrfs that ends up using Zone >>>>> Append we'll hit the >>>>> >>>>> if (WARN_ON_ONCE(is_bvec)) >>>>> return -EINVAL; >>>>> >>>>> case in bio_iov_iter_get_pages with the changes in this series. >>>> >>>> Yes this warning is totally bogus. It was in there from the beginning of the >>>> zone-append series and I have no idea why I didn't kill it. >>>> >>>> IIRC Chaitanya had a patch in his nvmet zoned series removing it. >>> >>> Yes, but it is wrong. What we need is a version of >>> __bio_iov_bvec_add_pages that takes the hardware limits into account. >>> >> >> Ah now I understand the situation, I'm on it. >> > > OK got something, just need to test it. > I just ran tests with my solution and to verify it worked as expected I ran the test without it. Interestingly the WARN_ON() didn't trigger for me. Here's the fio command line I've used: fio --ioengine io_uring --rw readwrite --bs 1M --size 1G --time_based \ --runtime 1m --filename /mnt/test/io_uring --name io_uring-test \ --direct 1 --numjobs $NPROC I did verify it's using zone append though. What did you use to trigger the warning?