Re: [PATCH 15/19] xfs: simplify xfs_buf_submit_bio

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

 



On Thu, May 01, 2025 at 12:51:03PM -0700, Darrick J. Wong wrote:
> > +	bio = bio_alloc(bp->b_target->bt_bdev, nr_vecs, xfs_buf_bio_op(bp),
> > +			GFP_NOIO);
> > +	if (is_vmalloc_addr(bp->b_addr))
> > +		bio_add_vmalloc(bio, bp->b_addr, len);
> 
> I wonder, do we need a debug assertion on the return value?  AFAICT,
> bio_add_max_vecs should result in a bio that's big enough to handle the
> vmalloc area, but those could be famous last words. :P

Buffers are way smaller than the maximum size, but yes error checking
would be nice here.  That'll need an error return value or shutdown,
which means changes to the code structure.  As the existing code didn't
have that (which happens to be my fault..) I don't want to add it in a
block layer series.  I'll add it in the next merge window for future
proofing.





[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