All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Lukas Czerner <lczerner@redhat.com>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu, jlayton@kernel.org,
	jack@suse.cz, linux-fsdevel@vger.kernel.org, david@fromorbit.com,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH v3 2/3] fs: record I_DIRTY_TIME even if inode already has I_DIRTY_INODE
Date: Fri, 12 Aug 2022 11:01:35 -0700	[thread overview]
Message-ID: <YvaVf1Zl/Y2vHMpi@sol.localdomain> (raw)
In-Reply-To: <20220812123727.46397-2-lczerner@redhat.com>

On Fri, Aug 12, 2022 at 02:37:26PM +0200, Lukas Czerner wrote:
> Fix it by allowing I_DIRTY_TIME to be set even if the inode already has
> I_DIRTY_INODE.

How can this be reconciled with the below code in __mark_inode_dirty(), which
this patch doesn't touch?

	/* I_DIRTY_INODE supersedes I_DIRTY_TIME. */
	flags &= ~I_DIRTY_TIME;

Also inode_is_dirtytime_only(), which I thought I mentioned before:

	/*
	 * Returns true if the given inode itself only has dirty timestamps (its pages
	 * may still be dirty) and isn't currently being allocated or freed.
	 * Filesystems should call this if when writing an inode when lazytime is
	 * enabled, they want to opportunistically write the timestamps of other inodes
	 * located very nearby on-disk, e.g. in the same inode block.  This returns true
	 * if the given inode is in need of such an opportunistic update.  Requires
	 * i_lock, or at least later re-checking under i_lock.
	 */
	static inline bool inode_is_dirtytime_only(struct inode *inode)
	{
		return (inode->i_state & (I_DIRTY_TIME | I_NEW |
					I_FREEING | I_WILL_FREE)) == I_DIRTY_TIME;
	}

- Eric

  reply	other threads:[~2022-08-12 18:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-12 12:37 [PATCH v3 1/3] ext4: don't increase iversion counter for ea_inodes Lukas Czerner
2022-08-12 12:37 ` [PATCH v3 2/3] fs: record I_DIRTY_TIME even if inode already has I_DIRTY_INODE Lukas Czerner
2022-08-12 18:01   ` Eric Biggers [this message]
2022-08-12 18:12   ` Eric Biggers
2022-08-16 11:21     ` Jan Kara
2022-08-21  6:14       ` Christoph Hellwig
2022-08-22  8:33         ` Jan Kara
2022-08-12 18:42   ` Eric Biggers
2022-08-16 11:41     ` Jan Kara
2022-08-12 12:37 ` [PATCH v4 3/3] ext4: unconditionally enable the i_version counter Lukas Czerner
2022-08-12 13:05   ` Christian Brauner
2022-08-16 11:48   ` Jan Kara
2022-08-12 13:04 ` [PATCH v3 1/3] ext4: don't increase iversion counter for ea_inodes Christian Brauner
2022-08-12 18:42 ` Jeff Layton
2022-08-16 11:52   ` Jan Kara
2022-08-16 12:18     ` Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YvaVf1Zl/Y2vHMpi@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=jlayton@kernel.org \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.