diff options
author | Jaegeuk Kim | 2017-01-13 13:12:29 -0800 |
---|---|---|
committer | Jaegeuk Kim | 2017-02-22 20:24:48 -0800 |
commit | dc91de78e5e1d44238b5dd2b57d2e8e67cbc00a1 (patch) | |
tree | d78cc69fe7a50db8a8c3207cb532eab76c051bfd /fs/f2fs/f2fs.h | |
parent | dcc9165dbf9961cf2848af728f8be31f28a3c790 (diff) |
f2fs: do not preallocate blocks which has wrong buffer
Sheng Yong reports needless preallocation if write(small_buffer, large_size)
is called.
In that case, f2fs preallocates large_size, but vfs returns early due to
small_buffer size. Let's detect it before preallocation phase in f2fs.
Reported-by: Sheng Yong <shengyong1@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 5d9731036306..0045ef9a9ad2 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -1665,6 +1665,7 @@ enum { FI_INLINE_DOTS, /* indicate inline dot dentries */ FI_DO_DEFRAG, /* indicate defragment is running */ FI_DIRTY_FILE, /* indicate regular/symlink has dirty pages */ + FI_NO_PREALLOC, /* indicate skipped preallocated blocks */ }; static inline void __mark_inode_dirty_flag(struct inode *inode, |