Re: [PATCH RFC 4/8] fs/ext4: Introduce DAX inode flag

From: Jan Kara
Date: Thu Apr 16 2020 - 06:34:35 EST


On Wed 15-04-20 13:39:25, Ira Weiny wrote:
> > > @@ -813,6 +818,17 @@ static int ext4_ioctl_get_es_cache(struct file *filp, unsigned long arg)
> > > return error;
> > > }
> > >
> > > +static void ext4_dax_dontcache(struct inode *inode, unsigned int flags)
> > > +{
> > > + struct ext4_inode_info *ei = EXT4_I(inode);
> > > +
> > > + if (S_ISDIR(inode->i_mode))
> > > + return;
> > > +
> > > + if ((ei->i_flags ^ flags) == EXT4_DAX_FL)
> > > + inode->i_state |= I_DONTCACHE;
> > > +}
> > > +
> >
> > You probably want to use the function you've introduced in the XFS series
> > here...
>
> you mean:
>
> flag_inode_dontcache()
> ???

Yeah, that's what I meant.

> Yes that is done. I sent this prior to v8 (where that was added) of the other
> series...

Yep, I thought that was the case but I wanted to mention it as a reminder.

Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR