]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - fs/f2fs/f2fs.h
f2fs: restrict setting up inode.i_advise
authorChao Yu <yuchao0@huawei.com>
Thu, 19 Jul 2018 15:57:54 +0000 (23:57 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 1 Aug 2018 18:52:36 +0000 (11:52 -0700)
commit797c1cb56ba58bf42742e9446226345a6216d832
treedf0c8215c666c02446cb6bffab81df1e031d436d
parente6b0b159cf2f62de69561f585fe8515d3d9189d4
f2fs: restrict setting up inode.i_advise

In order to give advise to f2fs to recognize hot/cold file, it is possible
that we can set specific bit in inode.i_advise through setxattr(), but
there are several bits which are used internally, such as encrypt_bit,
keep_size_bit, they should never be changed through setxattr().

So that this patch 1) adds FADVISE_MODIFIABLE_BITS to filter modifiable
bits user given, 2) supports to clear {hot,cold}_file bits.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/xattr.c