Skip to content

Commit 4c1fad6

Browse files
committed
Merge tag 'for-f2fs-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs
Pull f2fs updates from Jaegeuk Kim: "In this round, we've investigated how f2fs deals with errors given by our fault injection facility. With this, we could fix several corner cases. And, in order to improve the performance, we set inline_dentry by default and enhance the exisiting discard issue flow. In addition, we added f2fs_migrate_page for better memory management. Enhancements: - set inline_dentry by default - improve discard issue flow - add more fault injection cases in f2fs - allow block preallocation for encrypted files - introduce migrate_page callback function - avoid truncating the next direct node block at every checkpoint Bug fixes: - set page flag correctly between write_begin and write_end - missing error handling cases detected by fault injection - preallocate blocks regarding to 4KB alignement correctly - dentry and filename handling of encryption - lost xattrs of directories" * tag 'for-f2fs-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (69 commits) f2fs: introduce update_ckpt_flags to clean up f2fs: don't submit irrelevant page f2fs: fix to commit bio cache after flushing node pages f2fs: introduce get_checkpoint_version for cleanup f2fs: remove dead variable f2fs: remove redundant io plug f2fs: support checkpoint error injection f2fs: fix to recover old fault injection config in ->remount_fs f2fs: do fault injection initialization in default_options f2fs: remove redundant value definition f2fs: support configuring fault injection per superblock f2fs: adjust display format of segment bit f2fs: remove dirty inode pages in error path f2fs: do not unnecessarily null-terminate encrypted symlink data f2fs: handle errors during recover_orphan_inodes f2fs: avoid gc in cp_error case f2fs: should put_page for summary page f2fs: assign return value in f2fs_gc f2fs: add customized migrate_page callback f2fs: introduce cp_lock to protect updating of ckpt_flags ...
2 parents 0fb3ca4 + e4c5d84 commit 4c1fad6

File tree

23 files changed

+915
-524
lines changed

23 files changed

+915
-524
lines changed

Documentation/filesystems/f2fs.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ inline_dentry Enable the inline dir feature: data in new created
131131
directory entries can be written into inode block. The
132132
space of inode block which is used to store inline
133133
dentries is limited to ~3.4k.
134+
noinline_dentry Diable the inline dentry feature.
134135
flush_merge Merge concurrent cache_flush commands as much as possible
135136
to eliminate redundant command issues. If the underlying
136137
device handles the cache_flush command relatively slowly,

MAINTAINERS

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5105,10 +5105,9 @@ F: include/linux/fscrypto.h
51055105

51065106
F2FS FILE SYSTEM
51075107
M: Jaegeuk Kim <[email protected]>
5108-
M: Changman Lee <[email protected]>
5109-
R: Chao Yu <[email protected]>
5108+
M: Chao Yu <[email protected]>
51105109
5111-
W: http://en.wikipedia.org/wiki/F2FS
5110+
W: https://f2fs.wiki.kernel.org/
51125111
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git
51135112
S: Maintained
51145113
F: Documentation/filesystems/f2fs.txt

fs/f2fs/acl.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,16 @@ static struct posix_acl *f2fs_acl_from_disk(const char *value, size_t size)
109109
return ERR_PTR(-EINVAL);
110110
}
111111

112-
static void *f2fs_acl_to_disk(const struct posix_acl *acl, size_t *size)
112+
static void *f2fs_acl_to_disk(struct f2fs_sb_info *sbi,
113+
const struct posix_acl *acl, size_t *size)
113114
{
114115
struct f2fs_acl_header *f2fs_acl;
115116
struct f2fs_acl_entry *entry;
116117
int i;
117118

118-
f2fs_acl = f2fs_kmalloc(sizeof(struct f2fs_acl_header) + acl->a_count *
119-
sizeof(struct f2fs_acl_entry), GFP_NOFS);
119+
f2fs_acl = f2fs_kmalloc(sbi, sizeof(struct f2fs_acl_header) +
120+
acl->a_count * sizeof(struct f2fs_acl_entry),
121+
GFP_NOFS);
120122
if (!f2fs_acl)
121123
return ERR_PTR(-ENOMEM);
122124

@@ -175,7 +177,7 @@ static struct posix_acl *__f2fs_get_acl(struct inode *inode, int type,
175177

176178
retval = f2fs_getxattr(inode, name_index, "", NULL, 0, dpage);
177179
if (retval > 0) {
178-
value = f2fs_kmalloc(retval, GFP_F2FS_ZERO);
180+
value = f2fs_kmalloc(F2FS_I_SB(inode), retval, GFP_F2FS_ZERO);
179181
if (!value)
180182
return ERR_PTR(-ENOMEM);
181183
retval = f2fs_getxattr(inode, name_index, "", value,
@@ -230,7 +232,7 @@ static int __f2fs_set_acl(struct inode *inode, int type,
230232
}
231233

232234
if (acl) {
233-
value = f2fs_acl_to_disk(acl, &size);
235+
value = f2fs_acl_to_disk(F2FS_I_SB(inode), acl, &size);
234236
if (IS_ERR(value)) {
235237
clear_inode_flag(inode, FI_ACL_MODE);
236238
return (int)PTR_ERR(value);

fs/f2fs/acl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ extern int f2fs_set_acl(struct inode *, struct posix_acl *, int);
4141
extern int f2fs_init_acl(struct inode *, struct inode *, struct page *,
4242
struct page *);
4343
#else
44-
#define f2fs_check_acl NULL
4544
#define f2fs_get_acl NULL
4645
#define f2fs_set_acl NULL
4746

0 commit comments

Comments
 (0)