fs: new API for handling inode->i_version
authorJeff Layton <jlayton@redhat.com>
Mon, 29 Jan 2018 11:41:30 +0000 (06:41 -0500)
committerJeff Layton <jlayton@redhat.com>
Mon, 29 Jan 2018 11:41:30 +0000 (06:41 -0500)
commitae5e165d855dd978a461b22175531b07f54fb61f
tree8b603c15aff71082d3d9e67b7eab089396349ce0
parent7a11ac289c437cb06633620940b191a63dec1f4a
fs: new API for handling inode->i_version

Add a documentation blob that explains what the i_version field is, how
it is expected to work, and how it is currently implemented by various
filesystems.

We already have inode_inc_iversion. Add several other functions for
manipulating and accessing the i_version counter. For now, the
implementation is trivial and basically works the way that all of the
open-coded i_version accesses work today.

Future patches will convert existing users of i_version to use the new
API, and then convert the backend implementation to do things more
efficiently.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
fs/btrfs/file.c
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/xattr.c
fs/ext4/inode.c
fs/ext4/namei.c
fs/inode.c
include/linux/fs.h
include/linux/iversion.h [new file with mode: 0644]