Re: [PATCH] block: add bio_iov_iter_nvecs for figuring out nr_vecs
From: Ming Lei <hidden>
Date: 2020-12-08 01:23:13
Also in:
linux-fsdevel
From: Ming Lei <hidden>
Date: 2020-12-08 01:23:13
Also in:
linux-fsdevel
On Mon, Dec 07, 2020 at 06:07:39PM +0000, Pavel Begunkov wrote:
On 01/12/2020 12:06, Ming Lei wrote:quoted
Pavel reported that iov_iter_npages is a bit heavy in case of bvec iter. Turns out it isn't necessary to iterate every page in the bvec iter, and we call iov_iter_npages() just for figuring out how many bio vecs need to be allocated. And we can simply map each vector in bvec iter to bio's vec, so just return iter->nr_segs from bio_iov_iter_nvecs() for bvec iter. Also rename local variable 'nr_pages' as 'nr_vecs' which exactly matches its real usage. This patch is based on Mathew's post:Tried this, the system didn't boot + discovered a filesystem blowned after booting with a stable kernel. That's on top of 4498a8536c816 ("block: use an xarray for disk->part_tbl"), which works fine. Ideas?
Is share any log to show the issue? Can you share us the kernel .config? And what is your root disk? Not see any issue on this kernel in my KVM test. Thanks, Ming