super.c (b2efb3f0a1db62aff5e824125785ec6731143b6d) super.c (a7ffdbe22cecaed59b5d76a5f003d68907d64240)
1/*
2 * fs/f2fs/super.c
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 352 unchanged lines hidden (view full) ---

361 fi = kmem_cache_alloc(f2fs_inode_cachep, GFP_F2FS_ZERO);
362 if (!fi)
363 return NULL;
364
365 init_once((void *) fi);
366
367 /* Initialize f2fs-specific inode info */
368 fi->vfs_inode.i_version = 1;
1/*
2 * fs/f2fs/super.c
3 *
4 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * http://www.samsung.com/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as

--- 352 unchanged lines hidden (view full) ---

361 fi = kmem_cache_alloc(f2fs_inode_cachep, GFP_F2FS_ZERO);
362 if (!fi)
363 return NULL;
364
365 init_once((void *) fi);
366
367 /* Initialize f2fs-specific inode info */
368 fi->vfs_inode.i_version = 1;
369 atomic_set(&fi->dirty_dents, 0);
369 atomic_set(&fi->dirty_pages, 0);
370 fi->i_current_depth = 1;
371 fi->i_advise = 0;
372 rwlock_init(&fi->ext.ext_lock);
373 init_rwsem(&fi->i_sem);
374
375 set_inode_flag(fi, FI_NEW_INODE);
376
377 if (test_opt(F2FS_SB(sb), INLINE_XATTR))

--- 466 unchanged lines hidden (view full) ---

844 sbi->meta_ino_num = le32_to_cpu(raw_super->meta_ino);
845 sbi->cur_victim_sec = NULL_SECNO;
846 sbi->max_victim_search = DEF_MAX_VICTIM_SEARCH;
847
848 for (i = 0; i < NR_COUNT_TYPE; i++)
849 atomic_set(&sbi->nr_pages[i], 0);
850
851 sbi->dir_level = DEF_DIR_LEVEL;
370 fi->i_current_depth = 1;
371 fi->i_advise = 0;
372 rwlock_init(&fi->ext.ext_lock);
373 init_rwsem(&fi->i_sem);
374
375 set_inode_flag(fi, FI_NEW_INODE);
376
377 if (test_opt(F2FS_SB(sb), INLINE_XATTR))

--- 466 unchanged lines hidden (view full) ---

844 sbi->meta_ino_num = le32_to_cpu(raw_super->meta_ino);
845 sbi->cur_victim_sec = NULL_SECNO;
846 sbi->max_victim_search = DEF_MAX_VICTIM_SEARCH;
847
848 for (i = 0; i < NR_COUNT_TYPE; i++)
849 atomic_set(&sbi->nr_pages[i], 0);
850
851 sbi->dir_level = DEF_DIR_LEVEL;
852 sbi->need_fsck = false;
852}
853
854/*
855 * Read f2fs raw super block.
856 * Because we have two copies of super block, so read the first one at first,
857 * if the first one is invalid, move to read the second one.
858 */
859static int read_raw_super_block(struct super_block *sb,

--- 217 unchanged lines hidden (view full) ---

1077
1078 sbi->s_kobj.kset = f2fs_kset;
1079 init_completion(&sbi->s_kobj_unregister);
1080 err = kobject_init_and_add(&sbi->s_kobj, &f2fs_ktype, NULL,
1081 "%s", sb->s_id);
1082 if (err)
1083 goto free_proc;
1084
853}
854
855/*
856 * Read f2fs raw super block.
857 * Because we have two copies of super block, so read the first one at first,
858 * if the first one is invalid, move to read the second one.
859 */
860static int read_raw_super_block(struct super_block *sb,

--- 217 unchanged lines hidden (view full) ---

1078
1079 sbi->s_kobj.kset = f2fs_kset;
1080 init_completion(&sbi->s_kobj_unregister);
1081 err = kobject_init_and_add(&sbi->s_kobj, &f2fs_ktype, NULL,
1082 "%s", sb->s_id);
1083 if (err)
1084 goto free_proc;
1085
1086 if (!retry)
1087 sbi->need_fsck = true;
1088
1085 /* recover fsynced data */
1086 if (!test_opt(sbi, DISABLE_ROLL_FORWARD)) {
1087 err = recover_fsync_data(sbi);
1088 if (err) {
1089 f2fs_msg(sb, KERN_ERR,
1090 "Cannot recover all fsync data errno=%ld", err);
1091 goto free_kobj;
1092 }

--- 150 unchanged lines hidden ---
1089 /* recover fsynced data */
1090 if (!test_opt(sbi, DISABLE_ROLL_FORWARD)) {
1091 err = recover_fsync_data(sbi);
1092 if (err) {
1093 f2fs_msg(sb, KERN_ERR,
1094 "Cannot recover all fsync data errno=%ld", err);
1095 goto free_kobj;
1096 }

--- 150 unchanged lines hidden ---