Re: [PATCH] block: don't use for-inside-for in bio_for_each_segment_all

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

 



On Sun, Apr 07, 2019 at 03:54:16PM +0800, Ming Lei wrote:
> > OK, will move index check into mp_bvec_advance.
> 
> oops, I recall the above line, because:
> 
> 1) the index check expression is quite straight-forward
> 
> 2) it has been in my todo list to re-use bvec_advance() to re-write
> iterate_bvec()
> given bvec_advance() is much light-weight than for_each_bvec(). If we
> move the index check into bvec_advance(), the helper has to be moved
> to bio.h, then we can't use that for iterate_bvec().

You can always create a tiny wrapper around bvec_advance() that sits
in bio.h.  Which in general is much better style than complex
expressions inside of loops inside of macros..



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

  Powered by Linux