• Chao Yu's avatar
    f2fs: restrict setting up inode.i_advise · 797c1cb5
    Chao Yu authored
    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: default avatarChao Yu <yuchao0@huawei.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    797c1cb5
xattr.c 17.4 KB