Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ecf38009 authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

f2fs: updates on 4.15-rc1



Pull f2fs updates from Jaegeuk Kim:
 "In this round, we introduce sysfile-based quota support which is
  required for Android by default. In addition, we allow that users are
  able to reserve some blocks in runtime to mitigate performance drops
  in low free space.

 Enhancements:
  - assign proper data segments according to write_hints given by user
  - issue cache_flush on dirty devices only among multiple devices
  - exploit cp_error flag and add more faults to enhance fault
    injection test
  - conduct more readaheads during f2fs_readdir
  - add a range for discard commands

Bug fixes:
 - fix zero stat->st_blocks when inline_data is set
 - drop crypto key and free stale memory pointer while evict_inode is
   failing
 - fix some corner cases in free space and segment management
 - fix wrong last_disk_size

This series includes lots of clean-ups and code enhancement in terms
of xattr operations, discard/flush command control. In addition, it
adds versatile debugfs entries to monitor f2fs status"

Cherry-picked from origin/upstream-f2fs-stable-linux-3.18.y:

c6f66cb7 f2fs: deny accessing encryption policy if encryption is off
f3c3ffad f2fs: inject fault in inc_valid_node_count
bc7ed7f3 f2fs: expose quota information in debugfs
c269d143 f2fs: separate nat entry mem alloc from nat_tree_lock
52c43204 f2fs: validate before set/clear free nat bitmap
2007e708 f2fs: avoid opened loop codes in __add_ino_entry
5799a6dd f2fs: apply write hints to select the type of segments for buffered write
d62ae05c f2fs: introduce scan_curseg_cache for cleanup
59b90517 f2fs: optimize the way of traversing free_nid_bitmap
d3754d20 f2fs: keep scanning until enough free nids are acquired
44131bb6 f2fs: trace checkpoint reason in fsync()
e1c850fe f2fs: keep isize once block is reserved cross EOF
9d154a40 f2fs: avoid race in between GC and block exchange
1dd480ac f2fs: save a multiplication for last_nid calculation
5bef5b29 f2fs: fix summary info corruption
a1cc64f1 f2fs: remove dead code in update_meta_page
d86513f6 f2fs: remove unneeded semicolon
24f6fa05 f2fs: don't bother with inode->i_version
c86b0e23 f2fs: check curseg space before foreground GC
4fd29af3 f2fs: use rw_semaphore to protect SIT cache
722458db f2fs: support quota sys files
e5617e7a f2fs: add quota_ino feature infra
468c6095 f2fs: optimize __update_nat_bits
51349d88 f2fs: modify for accurate fggc node io stat
0e42a915 Revert "f2fs: handle dirty segments inside refresh_sit_entry"
71b40527 f2fs: add a function to move nid
8f5dcea4 f2fs: export SSR allocation threshold
1ead0d06 f2fs: give correct trimmed blocks in fstrim
be5d050a f2fs: support bio allocation error injection
710adf1c f2fs: support get_page error injection
a0daae09 f2fs: add missing sysfs description
2606cff9 f2fs: support soft block reservation
30d0b7c1 f2fs: handle error case when adding xattr entry
e254d1a6 f2fs: support flexible inline xattr size
eb25e774 f2fs: show current cp state
bf85becc f2fs: add missing quota_initialize
c3290d76 f2fs: show # of dirty segments via sysfs
02fe062b f2fs: stop all the operations by cp_error flag
d2d06691 f2fs: remove several redundant assignments
04e41a9f f2fs: avoid using timespec
8be4d9e5 f2fs: fix to correct no_fggc_candidate
ec8a71ac Revert "f2fs: return wrong error number on f2fs_quota_write"
c68705b8 f2fs: remove obsolete pointer for truncate_xattr_node
fee61cec f2fs: retry ENOMEM for quota_read|write
585398f7 f2fs: limit # of inmemory pages
e0ac8d0a f2fs: update ctx->pos correctly when hitting hole in directory
f6e29ede f2fs: relocate readahead codes in readdir()
d88ba788 f2fs: allow readdir() to be interrupted
710c0b07 f2fs: trace f2fs_readdir
6ff204b6 f2fs: trace f2fs_lookup
0c33cb26 f2fs: skip searching non-exist range in truncate_hole
1aead705 f2fs: expose some sectors to user in inline data or dentry case
b9da516c f2fs: avoid stale fi->gdirty_list pointer
68a76f16 f2fs/crypto: drop crypto key at evict_inode only
93bb7f1d f2fs: fix to avoid race when accessing last_disk_size
cc71a4a9 f2fs: Fix bool initialization/comparison
549f9f84 f2fs: give up CP_TRIMMED_FLAG if it drops discards
87905eb8 f2fs: trace f2fs_remove_discard
b791197f f2fs: reduce cmd_lock coverage in __issue_discard_cmd
d156194c f2fs: split discard policy
4b92a1f4 f2fs: wrap discard policy
0f5a1368 f2fs: support issuing/waiting discard in range
9c9d6ab9 f2fs: fix to flush multiple device in checkpoint
98e85b90 f2fs: enhance multiple device flush
97acaf71 f2fs: fix to show ino management cache size correctly
9e089394 f2fs: drop FI_UPDATE_WRITE tag after f2fs_issue_flush
b5b73718 f2fs: obsolete ALLOC_NID_LIST list
33646c98 f2fs: convert inline data for direct I/O & FI_NO_PREALLOC
8e68de1c f2fs: allow readpages with NULL file pointer
5c1821a8 f2fs: show flush list status in sysfs
ca433f07 f2fs: introduce read_xattr_block
e002c811 f2fs: introduce read_inline_xattr
9944032a Revert "f2fs: reuse nids more aggressively"
bc58a366 Revert "f2fs: node segment is prior to data segment selected victim"

Change-Id: I67cdc08f7bfca2da8b434fec66a779705c0ed5b2
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@google.com>
parent 849650d8
Loading
Loading
Loading
Loading
+36 −1
Original line number Diff line number Diff line
@@ -51,6 +51,18 @@ Description:
		 Controls the dirty page count condition for the in-place-update
		 policies.

What:		/sys/fs/f2fs/<disk>/min_hot_blocks
Date:		March 2017
Contact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
Description:
		 Controls the dirty page count condition for redefining hot data.

What:		/sys/fs/f2fs/<disk>/min_ssr_sections
Date:		October 2017
Contact:	"Chao Yu" <yuchao0@huawei.com>
Description:
		 Controls the fee section threshold to trigger SSR allocation.

What:		/sys/fs/f2fs/<disk>/max_small_discards
Date:		November 2013
Contact:	"Jaegeuk Kim" <jaegeuk.kim@samsung.com>
@@ -102,6 +114,12 @@ Contact: "Jaegeuk Kim" <jaegeuk@kernel.org>
Description:
		 Controls the idle timing.

What:		/sys/fs/f2fs/<disk>/iostat_enable
Date:		August 2017
Contact:	"Chao Yu" <yuchao0@huawei.com>
Description:
		 Controls to enable/disable IO stat.

What:		/sys/fs/f2fs/<disk>/ra_nid_pages
Date:		October 2015
Contact:	"Chao Yu" <chao2.yu@samsung.com>
@@ -122,6 +140,12 @@ Contact: "Shuoran Liu" <liushuoran@huawei.com>
Description:
		 Shows total written kbytes issued to disk.

What:		/sys/fs/f2fs/<disk>/feature
Date:		July 2017
Contact:	"Jaegeuk Kim" <jaegeuk@kernel.org>
Description:
		 Shows all enabled features in current device.

What:		/sys/fs/f2fs/<disk>/inject_rate
Date:		May 2016
Contact:	"Sheng Yong" <shengyong1@huawei.com>
@@ -138,7 +162,18 @@ What: /sys/fs/f2fs/<disk>/reserved_blocks
Date:		June 2017
Contact:	"Chao Yu" <yuchao0@huawei.com>
Description:
		 Controls current reserved blocks in system.
		 Controls target reserved blocks in system, the threshold
		 is soft, it could exceed current available user space.

What:		/sys/fs/f2fs/<disk>/current_reserved_blocks
Date:		October 2017
Contact:	"Yunlong Song" <yunlong.song@huawei.com>
Contact:	"Chao Yu" <yuchao0@huawei.com>
Description:
		 Shows current reserved blocks in system, it may be temporarily
		 smaller than target_reserved_blocks, but will gradually
		 increase to target_reserved_blocks when more free blocks are
		 freed by user later.

What:		/sys/fs/f2fs/<disk>/gc_urgent
Date:		August 2017
+3 −0
Original line number Diff line number Diff line
@@ -250,6 +250,9 @@ static int __f2fs_set_acl(struct inode *inode, int type,

int f2fs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
{
	if (unlikely(f2fs_cp_error(F2FS_I_SB(inode))))
		return -EIO;

	return __f2fs_set_acl(inode, type, acl, NULL);
}

+49 −15
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ struct kmem_cache *inode_entry_slab;
void f2fs_stop_checkpoint(struct f2fs_sb_info *sbi, bool end_io)
{
	set_ckpt_flags(sbi, CP_ERROR_FLAG);
	sbi->sb->s_flags |= MS_RDONLY;
	if (!end_io)
		f2fs_flush_merged_writes(sbi);
}
@@ -402,24 +401,23 @@ const struct address_space_operations f2fs_meta_aops = {
#endif
};

static void __add_ino_entry(struct f2fs_sb_info *sbi, nid_t ino, int type)
static void __add_ino_entry(struct f2fs_sb_info *sbi, nid_t ino,
						unsigned int devidx, int type)
{
	struct inode_management *im = &sbi->im[type];
	struct ino_entry *e, *tmp;

	tmp = f2fs_kmem_cache_alloc(ino_entry_slab, GFP_NOFS);
retry:

	radix_tree_preload(GFP_NOFS | __GFP_NOFAIL);

	spin_lock(&im->ino_lock);
	e = radix_tree_lookup(&im->ino_root, ino);
	if (!e) {
		e = tmp;
		if (radix_tree_insert(&im->ino_root, ino, e)) {
			spin_unlock(&im->ino_lock);
			radix_tree_preload_end();
			goto retry;
		}
		if (unlikely(radix_tree_insert(&im->ino_root, ino, e)))
			f2fs_bug_on(sbi, 1);

		memset(e, 0, sizeof(struct ino_entry));
		e->ino = ino;

@@ -427,6 +425,10 @@ retry:
		if (type != ORPHAN_INO)
			im->ino_num++;
	}

	if (type == FLUSH_INO)
		f2fs_set_bit(devidx, (char *)&e->dirty_device);

	spin_unlock(&im->ino_lock);
	radix_tree_preload_end();

@@ -455,7 +457,7 @@ static void __remove_ino_entry(struct f2fs_sb_info *sbi, nid_t ino, int type)
void add_ino_entry(struct f2fs_sb_info *sbi, nid_t ino, int type)
{
	/* add new dirty ino entry into list */
	__add_ino_entry(sbi, ino, type);
	__add_ino_entry(sbi, ino, 0, type);
}

void remove_ino_entry(struct f2fs_sb_info *sbi, nid_t ino, int type)
@@ -481,7 +483,7 @@ void release_ino_entry(struct f2fs_sb_info *sbi, bool all)
	struct ino_entry *e, *tmp;
	int i;

	for (i = all ? ORPHAN_INO: APPEND_INO; i <= UPDATE_INO; i++) {
	for (i = all ? ORPHAN_INO : APPEND_INO; i < MAX_INO_ENTRY; i++) {
		struct inode_management *im = &sbi->im[i];

		spin_lock(&im->ino_lock);
@@ -495,6 +497,27 @@ void release_ino_entry(struct f2fs_sb_info *sbi, bool all)
	}
}

void set_dirty_device(struct f2fs_sb_info *sbi, nid_t ino,
					unsigned int devidx, int type)
{
	__add_ino_entry(sbi, ino, devidx, type);
}

bool is_dirty_device(struct f2fs_sb_info *sbi, nid_t ino,
					unsigned int devidx, int type)
{
	struct inode_management *im = &sbi->im[type];
	struct ino_entry *e;
	bool is_dirty = false;

	spin_lock(&im->ino_lock);
	e = radix_tree_lookup(&im->ino_root, ino);
	if (e && f2fs_test_bit(devidx, (char *)&e->dirty_device))
		is_dirty = true;
	spin_unlock(&im->ino_lock);
	return is_dirty;
}

int acquire_orphan_inode(struct f2fs_sb_info *sbi)
{
	struct inode_management *im = &sbi->im[ORPHAN_INO];
@@ -531,7 +554,7 @@ void release_orphan_inode(struct f2fs_sb_info *sbi)
void add_orphan_inode(struct inode *inode)
{
	/* add new orphan ino entry into list */
	__add_ino_entry(F2FS_I_SB(inode), inode->i_ino, ORPHAN_INO);
	__add_ino_entry(F2FS_I_SB(inode), inode->i_ino, 0, ORPHAN_INO);
	update_inode_page(inode);
}

@@ -555,7 +578,7 @@ static int recover_orphan_inode(struct f2fs_sb_info *sbi, nid_t ino)
		return err;
	}

	__add_ino_entry(sbi, ino, ORPHAN_INO);
	__add_ino_entry(sbi, ino, 0, ORPHAN_INO);

	inode = f2fs_iget_retry(sbi->sb, ino);
	if (IS_ERR(inode)) {
@@ -591,6 +614,9 @@ int recover_orphan_inodes(struct f2fs_sb_info *sbi)
	block_t start_blk, orphan_blocks, i, j;
	unsigned int s_flags = sbi->sb->s_flags;
	int err = 0;
#ifdef CONFIG_QUOTA
	int quota_enabled;
#endif

	if (!is_set_ckpt_flags(sbi, CP_ORPHAN_PRESENT_FLAG))
		return 0;
@@ -603,8 +629,9 @@ int recover_orphan_inodes(struct f2fs_sb_info *sbi)
#ifdef CONFIG_QUOTA
	/* Needed for iput() to work correctly and not trash data */
	sbi->sb->s_flags |= MS_ACTIVE;

	/* Turn on quotas so that they are updated correctly */
	f2fs_enable_quota_files(sbi);
	quota_enabled = f2fs_enable_quota_files(sbi, s_flags & MS_RDONLY);
#endif

	start_blk = __start_cp_addr(sbi) + 1 + __cp_payload(sbi);
@@ -632,6 +659,7 @@ int recover_orphan_inodes(struct f2fs_sb_info *sbi)
out:
#ifdef CONFIG_QUOTA
	/* Turn quotas off */
	if (quota_enabled)
		f2fs_quota_off_umount(sbi->sb);
#endif
	sbi->sb->s_flags = s_flags; /* Restore MS_RDONLY status */
@@ -987,7 +1015,7 @@ int f2fs_sync_inode_meta(struct f2fs_sb_info *sbi)
				update_inode_page(inode);
			iput(inode);
		}
	};
	}
	return 0;
}

@@ -1147,6 +1175,7 @@ static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)
	struct super_block *sb = sbi->sb;
	struct curseg_info *seg_i = CURSEG_I(sbi, CURSEG_HOT_NODE);
	u64 kbytes_written;
	int err;

	/* Flush all the NAT/SIT pages */
	while (get_pages(sbi, F2FS_DIRTY_META)) {
@@ -1240,6 +1269,11 @@ static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)
	if (unlikely(f2fs_cp_error(sbi)))
		return -EIO;

	/* flush all device cache */
	err = f2fs_flush_device_cache(sbi);
	if (err)
		return err;

	/* write out checkpoint buffer at block 0 */
	update_meta_page(sbi, ckpt, start_blk++);

+27 −11
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ static struct bio *__bio_alloc(struct f2fs_sb_info *sbi, block_t blk_addr,
{
	struct bio *bio;

	bio = f2fs_bio_alloc(npages);
	bio = f2fs_bio_alloc(sbi, npages, true);

	f2fs_target_device(sbi, blk_addr, bio);
	bio->bi_end_io = is_read ? f2fs_read_end_io : f2fs_write_end_io;
@@ -418,8 +418,8 @@ next:

	bio_page = fio->encrypted_page ? fio->encrypted_page : fio->page;

	/* set submitted = 1 as a return value */
	fio->submitted = 1;
	/* set submitted = true as a return value */
	fio->submitted = true;

	inc_page_count(sbi, WB_DATA_TYPE(bio_page));

@@ -473,7 +473,7 @@ static struct bio *f2fs_grab_read_bio(struct inode *inode, block_t blkaddr,
		f2fs_wait_on_block_writeback(sbi, blkaddr);
	}

	bio = bio_alloc(GFP_KERNEL, min_t(int, nr_pages, BIO_MAX_PAGES));
	bio = f2fs_bio_alloc(sbi, min_t(int, nr_pages, BIO_MAX_PAGES), false);
	if (!bio) {
		if (ctx)
			fscrypt_release_ctx(ctx);
@@ -833,6 +833,13 @@ int f2fs_preallocate_blocks(struct inode *inode, loff_t pos,
	struct f2fs_map_blocks map;
	int err = 0;

	/* convert inline data for Direct I/O*/
	if (dio) {
		err = f2fs_convert_inline_inode(inode);
		if (err)
			return err;
	}

	map.m_lblk = F2FS_BLK_ALIGN(pos);
	map.m_len = F2FS_BYTES_TO_BLK(pos + count);
	if (map.m_len > map.m_lblk)
@@ -842,15 +849,11 @@ int f2fs_preallocate_blocks(struct inode *inode, loff_t pos,

	map.m_next_pgofs = NULL;

	if (dio) {
		err = f2fs_convert_inline_inode(inode);
		if (err)
			return err;
	if (dio)
		return f2fs_map_blocks(inode, &map, 1,
			__force_buffered_io(inode, WRITE) ?
				F2FS_GET_BLOCK_PRE_AIO :
				F2FS_GET_BLOCK_PRE_DIO);
	}
	if (pos + count > MAX_INLINE_DATA(inode)) {
		err = f2fs_convert_inline_inode(inode);
		if (err)
@@ -1330,7 +1333,7 @@ static int f2fs_read_data_pages(struct file *file,
			struct address_space *mapping,
			struct list_head *pages, unsigned nr_pages)
{
	struct inode *inode = file->f_mapping->host;
	struct inode *inode = mapping->host;
	struct page *page = list_last_entry(pages, struct page, lru);

	trace_f2fs_readpages(inode, page, nr_pages);
@@ -1491,6 +1494,7 @@ static int __write_data_page(struct page *page, bool *submitted,
	int err = 0;
	struct f2fs_io_info fio = {
		.sbi = sbi,
		.ino = inode->i_ino,
		.type = DATA,
		.op = REQ_OP_WRITE,
		.op_flags = wbc_to_write_flags(wbc),
@@ -1562,8 +1566,11 @@ write:
			err = do_write_data_page(&fio);
		}
	}

	down_write(&F2FS_I(inode)->i_sem);
	if (F2FS_I(inode)->last_disk_size < psize)
		F2FS_I(inode)->last_disk_size = psize;
	up_write(&F2FS_I(inode)->i_sem);

done:
	if (err && err != -ENOENT)
@@ -1942,6 +1949,12 @@ static int f2fs_write_begin(struct file *file, struct address_space *mapping,
	}
	trace_f2fs_write_begin(inode, pos, len, flags);

	if (f2fs_is_atomic_file(inode) &&
			!available_free_memory(sbi, INMEM_PAGES)) {
		err = -ENOMEM;
		goto fail;
	}

	/*
	 * We should check this at this moment to avoid deadlock on inode page
	 * and #0 page. The locking rule for inline_data conversion should be:
@@ -1957,7 +1970,8 @@ repeat:
	 * Do not use grab_cache_page_write_begin() to avoid deadlock due to
	 * wait_for_stable_page. Will wait that below with our IO control.
	 */
	page = grab_cache_page(mapping, index);
	page = f2fs_pagecache_get_page(mapping, index,
				FGP_LOCK | FGP_WRITE | FGP_CREAT, GFP_NOFS);
	if (!page) {
		err = -ENOMEM;
		goto fail;
@@ -2018,6 +2032,8 @@ repeat:
fail:
	f2fs_put_page(page, 1);
	f2fs_write_failed(mapping, pos + len);
	if (f2fs_is_atomic_file(inode))
		drop_inmem_pages_all(sbi);
	return err;
}

+23 −8
Original line number Diff line number Diff line
@@ -45,9 +45,18 @@ static void update_general_status(struct f2fs_sb_info *sbi)
	si->ndirty_dent = get_pages(sbi, F2FS_DIRTY_DENTS);
	si->ndirty_meta = get_pages(sbi, F2FS_DIRTY_META);
	si->ndirty_data = get_pages(sbi, F2FS_DIRTY_DATA);
	si->ndirty_qdata = get_pages(sbi, F2FS_DIRTY_QDATA);
	si->ndirty_imeta = get_pages(sbi, F2FS_DIRTY_IMETA);
	si->ndirty_dirs = sbi->ndirty_inode[DIR_INODE];
	si->ndirty_files = sbi->ndirty_inode[FILE_INODE];

	si->nquota_files = 0;
	if (f2fs_sb_has_quota_ino(sbi->sb)) {
		for (i = 0; i < MAXQUOTAS; i++) {
			if (f2fs_qf_ino(sbi->sb, i))
				si->nquota_files++;
		}
	}
	si->ndirty_all = sbi->ndirty_inode[DIRTY_META];
	si->inmem_pages = get_pages(sbi, F2FS_INMEM_PAGES);
	si->aw_cnt = atomic_read(&sbi->aw_cnt);
@@ -61,6 +70,8 @@ static void update_general_status(struct f2fs_sb_info *sbi)
			atomic_read(&SM_I(sbi)->fcc_info->issued_flush);
		si->nr_flushing =
			atomic_read(&SM_I(sbi)->fcc_info->issing_flush);
		si->flush_list_empty =
			llist_empty(&SM_I(sbi)->fcc_info->issue_list);
	}
	if (SM_I(sbi) && SM_I(sbi)->dcc_info) {
		si->nr_discarded =
@@ -96,9 +107,9 @@ static void update_general_status(struct f2fs_sb_info *sbi)
	si->dirty_nats = NM_I(sbi)->dirty_nat_cnt;
	si->sits = MAIN_SEGS(sbi);
	si->dirty_sits = SIT_I(sbi)->dirty_sentries;
	si->free_nids = NM_I(sbi)->nid_cnt[FREE_NID_LIST];
	si->free_nids = NM_I(sbi)->nid_cnt[FREE_NID];
	si->avail_nids = NM_I(sbi)->available_nids;
	si->alloc_nids = NM_I(sbi)->nid_cnt[ALLOC_NID_LIST];
	si->alloc_nids = NM_I(sbi)->nid_cnt[PREALLOC_NID];
	si->bg_gc = sbi->bg_gc;
	si->util_free = (int)(free_user_blocks(sbi) >> sbi->log_blocks_per_seg)
		* 100 / (int)(sbi->user_block_count >> sbi->log_blocks_per_seg)
@@ -231,14 +242,14 @@ get_cache:
	}

	/* free nids */
	si->cache_mem += (NM_I(sbi)->nid_cnt[FREE_NID_LIST] +
				NM_I(sbi)->nid_cnt[ALLOC_NID_LIST]) *
	si->cache_mem += (NM_I(sbi)->nid_cnt[FREE_NID] +
				NM_I(sbi)->nid_cnt[PREALLOC_NID]) *
				sizeof(struct free_nid);
	si->cache_mem += NM_I(sbi)->nat_cnt * sizeof(struct nat_entry);
	si->cache_mem += NM_I(sbi)->dirty_nat_cnt *
					sizeof(struct nat_entry_set);
	si->cache_mem += si->inmem_pages * sizeof(struct inmem_pages);
	for (i = 0; i <= ORPHAN_INO; i++)
	for (i = 0; i < MAX_INO_ENTRY; i++)
		si->cache_mem += sbi->im[i].ino_num * sizeof(struct ino_entry);
	si->cache_mem += atomic_read(&sbi->total_ext_tree) *
						sizeof(struct extent_tree);
@@ -264,9 +275,10 @@ static int stat_show(struct seq_file *s, void *v)

		update_general_status(si->sbi);

		seq_printf(s, "\n=====[ partition info(%s). #%d, %s]=====\n",
		seq_printf(s, "\n=====[ partition info(%s). #%d, %s, CP: %s]=====\n",
			bdevname(si->sbi->sb->s_bdev, devname), i++,
			f2fs_readonly(si->sbi->sb) ? "RO": "RW");
			f2fs_readonly(si->sbi->sb) ? "RO": "RW",
			f2fs_cp_error(si->sbi) ? "Error": "Good");
		seq_printf(s, "[SB: 1] [CP: 2] [SIT: %d] [NAT: %d] ",
			   si->sit_area_segs, si->nat_area_segs);
		seq_printf(s, "[SSA: %d] [MAIN: %d",
@@ -351,10 +363,11 @@ static int stat_show(struct seq_file *s, void *v)
		seq_printf(s, "  - Inner Struct Count: tree: %d(%d), node: %d\n",
				si->ext_tree, si->zombie_tree, si->ext_node);
		seq_puts(s, "\nBalancing F2FS Async:\n");
		seq_printf(s, "  - IO (CP: %4d, Data: %4d, Flush: (%4d %4d), "
		seq_printf(s, "  - IO (CP: %4d, Data: %4d, Flush: (%4d %4d %4d), "
			"Discard: (%4d %4d)) cmd: %4d undiscard:%4u\n",
			   si->nr_wb_cp_data, si->nr_wb_data,
			   si->nr_flushing, si->nr_flushed,
			   si->flush_list_empty,
			   si->nr_discarding, si->nr_discarded,
			   si->nr_discard_cmd, si->undiscard_blks);
		seq_printf(s, "  - inmem: %4d, atomic IO: %4d (Max. %4d), "
@@ -367,6 +380,8 @@ static int stat_show(struct seq_file *s, void *v)
			   si->ndirty_dent, si->ndirty_dirs, si->ndirty_all);
		seq_printf(s, "  - datas: %4d in files:%4d\n",
			   si->ndirty_data, si->ndirty_files);
		seq_printf(s, "  - quota datas: %4d in quota files:%4d\n",
			   si->ndirty_qdata, si->nquota_files);
		seq_printf(s, "  - meta: %4d in %4d\n",
			   si->ndirty_meta, si->meta_pages);
		seq_printf(s, "  - imeta: %4d\n",
Loading