Re: [PATCH v8 06/10] iomap: fix iomap_dio_zero() for fs bs > system page size

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

 



On Tue, Jul 02, 2024 at 04:13:29PM +0000, Pankaj Raghav (Samsung) wrote:
> On Tue, Jul 02, 2024 at 05:42:16PM +0200, Christoph Hellwig wrote:
> > On Tue, Jul 02, 2024 at 02:01:23PM +0000, Pankaj Raghav (Samsung) wrote:
> > +static int iomap_dio_zero(const struct iomap_iter *iter, struct iomap_dio *dio,
> > >                 loff_t pos, unsigned len)
> > >  {
> > >         struct inode *inode = file_inode(dio->iocb->ki_filp);
> > >         struct bio *bio;
> > >  
> > > +       if (!len)
> > > +               return 0;
> > >         /*
> > >          * Max block size supported is 64k
> > >          */
> > > -       WARN_ON_ONCE(len > ZERO_PAGE_64K_SIZE);
> > > +       if (len > ZERO_PAGE_64K_SIZE)
> > > +               return -EINVAL;
> > 
> > The should probably be both WARN_ON_ONCE in addition to the error
> > return (and ZERO_PAGE_64K_SIZE really needs to go away..)
> 
> Yes, I will rename it to ZERO_PAGE_SZ_64K as you suggested.

No.  It needs a symbolic name that doesn't include the actual size.
Maybe ZERO_PAGE_IO_MAX.  Christoph suggested using SZ_64K to define
it, not to include it in the name.





[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