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]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux