linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@oracle.com>
To: Itaru Kitayama <kitayama@cl.bb4u.ne.jp>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Log parent inode if it is newer than the last commit
Date: Mon, 08 Nov 2010 08:50:21 -0500	[thread overview]
Message-ID: <1289224052-sup-1226@think> (raw)
In-Reply-To: <20101106200305.5d9eb7e0.kitayama@cl.bb4u.ne.jp>

Excerpts from Itaru Kitayama's message of 2010-11-06 07:03:05 -0400:
> 
> In the file sync path, file's parent inode is logged if it is newer than the last
> commit. This patch checks also the last_trans field as well as generation.
> 
> As btrfs_log_inode updates the logged_trans field of parent dir's inode, tree-log
> lookup operations are suppressed upon unlink.

Is there a specific test case you're working on for this?  The idea
behind the logging code is that we use the backrefs in the inode to
recreate the inode in the directory if we crash.

This doesn't work if the directory doesn't exist when we come back, so
the code logs the directory if it is newer than the last commit.

As long as the directory exists in the tree, we should be able to safely
continue replay without logging it again.

-chris

  parent reply	other threads:[~2010-11-08 13:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-06 11:03 [PATCH] Log parent inode if it is newer than the last commit Itaru Kitayama
2010-11-06 14:19 ` Josef Bacik
2010-11-08 13:50 ` Chris Mason [this message]
2010-11-08 14:27   ` Itaru Kitayama
2010-11-08 20:26     ` Chris Mason

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=1289224052-sup-1226@think \
    --to=chris.mason@oracle.com \
    --cc=kitayama@cl.bb4u.ne.jp \
    --cc=linux-btrfs@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).