Re: [PATCH] iomap: Address soft lockup in iomap_finish_ioend()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 05, 2022 at 08:16:05AM +1100, Dave Chinner wrote:
> > > +	if (ioend->io_inline_bio.bi_iter.bi_sector + (ioend->io_size >> 9) !=
> > 
> > This open codes bio_end_sector()
> 
> No, it doesn't. The ioend can have chained bios or have others merged
> and concatenated to the ioend->io_list, so ioend->io_size != length
> of the first bio in the chain....
> 
> > > +	    next->io_inline_bio.bi_iter.bi_sector)
> > 
> > But more importantly I don't think just using the inline_bio makes sense
> > here as the ioend can have multiple bios.  Fortunately we should always
> > have the last built bio available in ->io_bio.
> 
> Except merging chains ioends and modifies the head io_size to
> account for the chained ioends we add to ioend->io_list. Hence
> ioend->io_bio is not the last bio in a contiguous ioend chain.

Indeed.  We could use bio_end_sector on io_bio or this.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux