[v4,9/9] btrfs: convert to multigrain timestamps
Commit Message
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
fs/btrfs/delayed-inode.c | 2 +-
fs/btrfs/inode.c | 2 +-
fs/btrfs/super.c | 5 +++--
fs/btrfs/tree-log.c | 2 +-
4 files changed, 6 insertions(+), 5 deletions(-)
Comments
On Thu, May 18, 2023 at 07:47:42AM -0400, Jeff Layton wrote:
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
Acked-by: David Sterba <dsterba@suse.com>
Please add a brief description to the changelog too, there's a similar
text in the patches adding the infrastructure. Something like "Allow to
optimize lot of metadata updates by encoding the status in the cmtime.
The fine grained time is needed for NFS."
On Mon, 2023-05-22 at 11:56 +0200, David Sterba wrote:
> On Thu, May 18, 2023 at 07:47:42AM -0400, Jeff Layton wrote:
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
>
> Acked-by: David Sterba <dsterba@suse.com>
>
> Please add a brief description to the changelog too, there's a similar
> text in the patches adding the infrastructure. Something like "Allow to
> optimize lot of metadata updates by encoding the status in the cmtime.
> The fine grained time is needed for NFS."
Sure thing.
Christian, do you want to just alter the changelog with David's
suggestion, or would you rather I resend the series?
Thanks,
On Mon, May 22, 2023 at 06:08:56AM -0400, Jeff Layton wrote:
> On Mon, 2023-05-22 at 11:56 +0200, David Sterba wrote:
> > On Thu, May 18, 2023 at 07:47:42AM -0400, Jeff Layton wrote:
> > > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> >
> > Acked-by: David Sterba <dsterba@suse.com>
> >
> > Please add a brief description to the changelog too, there's a similar
> > text in the patches adding the infrastructure. Something like "Allow to
> > optimize lot of metadata updates by encoding the status in the cmtime.
> > The fine grained time is needed for NFS."
>
> Sure thing.
>
> Christian, do you want to just alter the changelog with David's
> suggestion, or would you rather I resend the series?
Nah, don't bother resending I'll just add it to the fs specific patches.
I'll end up updating the patch trailers anyway when individual
maintainers add new Acks.
@@ -1810,7 +1810,7 @@ static void fill_stack_inode_item(struct btrfs_trans_handle *trans,
btrfs_set_stack_timespec_sec(&inode_item->ctime,
inode->i_ctime.tv_sec);
btrfs_set_stack_timespec_nsec(&inode_item->ctime,
- inode->i_ctime.tv_nsec);
+ ctime_nsec_peek(inode));
btrfs_set_stack_timespec_sec(&inode_item->otime,
BTRFS_I(inode)->i_otime.tv_sec);
@@ -3970,7 +3970,7 @@ static void fill_inode_item(struct btrfs_trans_handle *trans,
btrfs_set_token_timespec_sec(&token, &item->ctime,
inode->i_ctime.tv_sec);
btrfs_set_token_timespec_nsec(&token, &item->ctime,
- inode->i_ctime.tv_nsec);
+ ctime_nsec_peek(inode));
btrfs_set_token_timespec_sec(&token, &item->otime,
BTRFS_I(inode)->i_otime.tv_sec);
@@ -2144,7 +2144,7 @@ static struct file_system_type btrfs_fs_type = {
.name = "btrfs",
.mount = btrfs_mount,
.kill_sb = btrfs_kill_super,
- .fs_flags = FS_REQUIRES_DEV | FS_BINARY_MOUNTDATA,
+ .fs_flags = FS_REQUIRES_DEV | FS_BINARY_MOUNTDATA | FS_MULTIGRAIN_TS,
};
static struct file_system_type btrfs_root_fs_type = {
@@ -2152,7 +2152,8 @@ static struct file_system_type btrfs_root_fs_type = {
.name = "btrfs",
.mount = btrfs_mount_root,
.kill_sb = btrfs_kill_super,
- .fs_flags = FS_REQUIRES_DEV | FS_BINARY_MOUNTDATA | FS_ALLOW_IDMAP,
+ .fs_flags = FS_REQUIRES_DEV | FS_BINARY_MOUNTDATA |
+ FS_ALLOW_IDMAP | FS_MULTIGRAIN_TS,
};
MODULE_ALIAS_FS("btrfs");
@@ -4150,7 +4150,7 @@ static void fill_inode_item(struct btrfs_trans_handle *trans,
btrfs_set_token_timespec_sec(&token, &item->ctime,
inode->i_ctime.tv_sec);
btrfs_set_token_timespec_nsec(&token, &item->ctime,
- inode->i_ctime.tv_nsec);
+ ctime_nsec_peek(inode));
/*
* We do not need to set the nbytes field, in fact during a fast fsync