Re: [PATCH 2/6] iomap: copy the xfs writeback code to iomap.c

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

 



On Mon, Aug 05, 2019 at 02:31:24PM +0200, Andreas Gruenbacher wrote:

> > +       WARN_ON_ONCE(i_blocksize(inode) < PAGE_SIZE && !iop);
> > +       WARN_ON_ONCE(iop && atomic_read(&iop->write_count) != 0);
> 
> How about this instead?
> 
>        if (iop)
>                WARN_ON_ONCE(atomic_read(&iop->write_count) != 0);
>        else
>                WARN_ON_ONCE(i_blocksize(inode) < PAGE_SIZE);

For one I don't really want to change the code from before in a move
patch, but second I also wrote it like that as having conditionals just
around asserts seems a little odd.

This also helps with the next step of the evolution where we'll allocate
the iops on demand and skip it for small block size file systems as long
as a page is only covered by a single extent, as we then can remove the
first assert.



[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