Skip to content

Commit c9e561c

Browse files
jtlaytonkdave
authored andcommitted
btrfs: update i_version in update_dev_time
When updating the ctime, we also want to update i_version. This is just something I noticed by inspection. There is probably no way to test this today unless you can somehow get to this inode via nfsd. Still, I think it's the right thing to do for consistency's sake. David Sterba's comment: I don't see anything wrong with setting the iversion bit, however I also don't see where this would be useful. Agreed with the consistency, otherwise the time is updated when device super block is wiped or a device initialized, both are big events so missing that due to lack of iversion update seems unlikely. I'll add it to the queue, thanks. Signed-off-by: Jeff Layton <jlayton@kernel.org> [ add comments ] Signed-off-by: David Sterba <dsterba@suse.com>
1 parent e794203 commit c9e561c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/volumes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1928,7 +1928,7 @@ static void update_dev_time(const char *device_path)
19281928
return;
19291929

19301930
now = current_time(d_inode(path.dentry));
1931-
inode_update_time(d_inode(path.dentry), &now, S_MTIME | S_CTIME);
1931+
inode_update_time(d_inode(path.dentry), &now, S_MTIME | S_CTIME | S_VERSION);
19321932
path_put(&path);
19331933
}
19341934

0 commit comments

Comments
 (0)