Re: [PATCH v2 2/3] fs: record I_DIRTY_TIME even if inode already has I_DIRTY_INODE

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

 



On Wed, Aug 03, 2022 at 12:53:39PM +0200, Lukas Czerner wrote:
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index 9ad5e3520fae..2243797badf2 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -2245,9 +2245,9 @@ static inline void kiocb_clone(struct kiocb *kiocb, struct kiocb *kiocb_src,
>   *			The inode itself only has dirty timestamps, and the
>   *			lazytime mount option is enabled.  We keep track of this
>   *			separately from I_DIRTY_SYNC in order to implement
>   *			lazytime.  This gets cleared if I_DIRTY_INODE
> - *			(I_DIRTY_SYNC and/or I_DIRTY_DATASYNC) gets set.  I.e.
> - *			either I_DIRTY_TIME *or* I_DIRTY_INODE can be set in
> - *			i_state, but not both.  I_DIRTY_PAGES may still be set.
> + *			(I_DIRTY_SYNC and/or I_DIRTY_DATASYNC) gets set. But
> + *			I_DIRTY_TIME can still be set if I_DIRTY_SYNC is already
> + *			in place.

I'm still having a hard time understanding the new semantics.  The first
sentence above needs to be updated since I_DIRTY_TIME no longer means "the inode
itself only has dirty timestamps", right?

Also, have you checked all the places that I_DIRTY_TIME is used and verified
they do the right thing now?  What about inode_is_dirtytime_only()?

Also what is the precise meaning of the flags argument to ->dirty_inode now?

	sb->s_op->dirty_inode(inode,
			flags & (I_DIRTY_INODE | I_DIRTY_TIME));

Note that dirty_inode is documented in Documentation/filesystems/vfs.rst.

- Eric



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux