mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
f2fs: add an ioctl to disable GC for specific file
This patch gives a flag to disable GC on given file, which would be useful, when user wants to keep its block map. It also conducts in-place-update for dontmove file. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
9ac1e2d88d
commit
1ad71a2712
7 changed files with 136 additions and 2 deletions
|
@ -212,6 +212,7 @@ struct f2fs_extent {
|
|||
#define F2FS_DATA_EXIST 0x08 /* file inline data exist flag */
|
||||
#define F2FS_INLINE_DOTS 0x10 /* file having implicit dot dentries */
|
||||
#define F2FS_EXTRA_ATTR 0x20 /* file having extra attribute */
|
||||
#define F2FS_PIN_FILE 0x40 /* file should not be gced */
|
||||
|
||||
struct f2fs_inode {
|
||||
__le16 i_mode; /* file mode */
|
||||
|
@ -229,7 +230,13 @@ struct f2fs_inode {
|
|||
__le32 i_ctime_nsec; /* change time in nano scale */
|
||||
__le32 i_mtime_nsec; /* modification time in nano scale */
|
||||
__le32 i_generation; /* file version (for NFS) */
|
||||
__le32 i_current_depth; /* only for directory depth */
|
||||
union {
|
||||
__le32 i_current_depth; /* only for directory depth */
|
||||
__le16 i_gc_failures; /*
|
||||
* # of gc failures on pinned file.
|
||||
* only for regular files.
|
||||
*/
|
||||
};
|
||||
__le32 i_xattr_nid; /* nid to save xattr */
|
||||
__le32 i_flags; /* file attributes */
|
||||
__le32 i_pino; /* parent inode number */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue