linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zach Brown <zab@zabbo.net>
To: David Sterba <dsterba@suse.cz>
Cc: linux-btrfs@vger.kernel.org, chandan r <chandanrmail@gmail.com>
Subject: Re: [PATCH v2] Btrfs: Add code to support file creation time
Date: Thu, 22 Jan 2015 12:01:10 -0800	[thread overview]
Message-ID: <20150122200109.GA688@lenny.home.zabbo.net> (raw)
In-Reply-To: <1421947241-9323-1-git-send-email-dsterba@suse.cz>

> @@ -5729,6 +5744,7 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans,
>  	struct btrfs_path *path;
>  	struct btrfs_inode_ref *ref;
>  	struct btrfs_key key[2];
> +	struct timespec current_time;
>  	u32 sizes[2];
>  	int nitems = name ? 2 : 1;
>  	unsigned long ptr;
> @@ -5824,7 +5840,13 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans,
>  
>  	inode_init_owner(inode, dir, mode);
>  	inode_set_bytes(inode, 0);
> -	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
> +
> +	current_time = CURRENT_TIME;
> +	inode->i_mtime = current_time;
> +	inode->i_atime = current_time;
> +	inode->i_ctime = current_time;
> +	BTRFS_I(inode)->i_otime = current_time;

I might have just set mtime to CURRENT_TIME then the rest to mtime.
It'd be a touch less noisy.  Author's choice, though :).

Any plans to add it to send/recv?

766702ef (Alexander Block           2012-07-28 14:11:31 +0200 2480)
	/* TODO Add otime support when the otime patches get into upstream */

- z

  reply	other threads:[~2015-01-22 20:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22 17:20 [PATCH v2] Btrfs: Add code to support file creation time David Sterba
2015-01-22 20:01 ` Zach Brown [this message]
2015-01-23 12:20   ` David Sterba
2015-01-23 13:28 ` [PATCH v3] " David Sterba

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=20150122200109.GA688@lenny.home.zabbo.net \
    --to=zab@zabbo.net \
    --cc=chandanrmail@gmail.com \
    --cc=dsterba@suse.cz \
    --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).