2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-18 02:04:05 +08:00
linux-next/fs/f2fs
Jaegeuk Kim b2f2c390c5 f2fs: fix the bitmap consistency of dirty segments
Like below, there are 8 segment bitmaps for SSR victim candidates.

enum dirty_type {
	DIRTY_HOT_DATA,		/* dirty segments assigned as hot data logs */
	DIRTY_WARM_DATA,	/* dirty segments assigned as warm data logs */
	DIRTY_COLD_DATA,	/* dirty segments assigned as cold data logs */
	DIRTY_HOT_NODE,		/* dirty segments assigned as hot node logs */
	DIRTY_WARM_NODE,	/* dirty segments assigned as warm node logs */
	DIRTY_COLD_NODE,	/* dirty segments assigned as cold node logs */
	DIRTY,			/* to count # of dirty segments */
	PRE,			/* to count # of entirely obsolete segments */
	NR_DIRTY_TYPE
};

The upper 6 bitmaps indicates segments dirtied by active log areas respectively.
And, the DIRTY bitmap integrates all the 6 bitmaps.

For example,
 o DIRTY_HOT_DATA : 1010000
 o DIRTY_WARM_DATA: 0100000
 o DIRTY_COLD_DATA: 0001000
 o DIRTY_HOT_NODE : 0000010
 o DIRTY_WARM_NODE: 0000001
 o DIRTY_COLD_NODE: 0000000
In this case,
 o DIRTY          : 1111011,

 which means that we should guarantee the consistency between DIRTY and other
 bitmaps concreately.

However, the SSR mode selects victims freely from any log types, which can set
multiple bits across the various bitmap types.

So, this patch eliminates this inconsistency.

Reviewed-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-04-03 17:27:51 +09:00
..
acl.c f2fs: avoid null dereference in f2fs_acl_from_disk 2013-01-04 09:46:27 +09:00
acl.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00
checkpoint.c f2fs: change GC bitmaps to apply the section granularity 2013-04-03 17:27:49 +09:00
data.c f2fs: do not skip writing file meta during fsync 2013-03-27 09:16:16 +09:00
debug.c f2fs: change GC bitmaps to apply the section granularity 2013-04-03 17:27:49 +09:00
dir.c f2fs: align f2fs maximum name length to linux based filesystem 2013-03-18 21:00:35 +09:00
f2fs.h f2fs: change GC bitmaps to apply the section granularity 2013-04-03 17:27:49 +09:00
file.c f2fs: fix to give correct parent inode number for roll forward 2013-03-27 09:16:25 +09:00
gc.c f2fs: avoid race for summary information 2013-04-03 17:27:51 +09:00
gc.h f2fs: clarify and enhance the f2fs_gc flow 2013-02-12 07:15:02 +09:00
hash.c f2fs: unify string length declarations and usage 2012-12-28 11:27:53 +09:00
inode.c f2fs: do not skip writing file meta during fsync 2013-03-27 09:16:16 +09:00
Kconfig f2fs: resolve build failures 2012-12-11 13:43:43 +09:00
Makefile f2fs: update Kconfig and Makefile 2012-12-11 13:43:42 +09:00
namei.c f2fs: fix to give correct parent inode number for roll forward 2013-03-27 09:16:25 +09:00
node.c f2fs: avoid race for summary information 2013-04-03 17:27:51 +09:00
node.h f2fs: remove redundant lock_page calls 2013-04-03 17:27:42 +09:00
recovery.c f2fs: fix the recovery flow to handle errors correctly 2013-03-27 09:16:06 +09:00
segment.c f2fs: fix the bitmap consistency of dirty segments 2013-04-03 17:27:51 +09:00
segment.h f2fs: change GC bitmaps to apply the section granularity 2013-04-03 17:27:49 +09:00
super.c f2fs: avoid race for summary information 2013-04-03 17:27:51 +09:00
xattr.c f2fs: reorganize f2fs_setxattr 2013-03-20 18:30:15 +09:00
xattr.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00