mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	f2fs: remove obsolete whint_mode
This patch removes obsolete whint_mode.
Fixes: 41d36a9f3e ("fs: remove kiocb.ki_hint")
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
			
			
This commit is contained in:
		
							parent
							
								
									ce522ba9ef
								
							
						
					
					
						commit
						930e260763
					
				
					 4 changed files with 1 additions and 205 deletions
				
			
		| 
						 | 
					@ -235,12 +235,6 @@ offgrpjquota		 Turn off group journalled quota.
 | 
				
			||||||
offprjjquota		 Turn off project journalled quota.
 | 
					offprjjquota		 Turn off project journalled quota.
 | 
				
			||||||
quota			 Enable plain user disk quota accounting.
 | 
					quota			 Enable plain user disk quota accounting.
 | 
				
			||||||
noquota			 Disable all plain disk quota option.
 | 
					noquota			 Disable all plain disk quota option.
 | 
				
			||||||
whint_mode=%s		 Control which write hints are passed down to block
 | 
					 | 
				
			||||||
			 layer. This supports "off", "user-based", and
 | 
					 | 
				
			||||||
			 "fs-based".  In "off" mode (default), f2fs does not pass
 | 
					 | 
				
			||||||
			 down hints. In "user-based" mode, f2fs tries to pass
 | 
					 | 
				
			||||||
			 down hints given by users. And in "fs-based" mode, f2fs
 | 
					 | 
				
			||||||
			 passes down hints with its policy.
 | 
					 | 
				
			||||||
alloc_mode=%s		 Adjust block allocation policy, which supports "reuse"
 | 
					alloc_mode=%s		 Adjust block allocation policy, which supports "reuse"
 | 
				
			||||||
			 and "default".
 | 
								 and "default".
 | 
				
			||||||
fsync_mode=%s		 Control the policy of fsync. Currently supports "posix",
 | 
					fsync_mode=%s		 Control the policy of fsync. Currently supports "posix",
 | 
				
			||||||
| 
						 | 
					@ -751,70 +745,6 @@ In order to identify whether the data in the victim segment are valid or not,
 | 
				
			||||||
F2FS manages a bitmap. Each bit represents the validity of a block, and the
 | 
					F2FS manages a bitmap. Each bit represents the validity of a block, and the
 | 
				
			||||||
bitmap is composed of a bit stream covering whole blocks in main area.
 | 
					bitmap is composed of a bit stream covering whole blocks in main area.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Write-hint Policy
 | 
					 | 
				
			||||||
-----------------
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
1) whint_mode=off. F2FS only passes down WRITE_LIFE_NOT_SET.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
2) whint_mode=user-based. F2FS tries to pass down hints given by
 | 
					 | 
				
			||||||
users.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
===================== ======================== ===================
 | 
					 | 
				
			||||||
User                  F2FS                     Block
 | 
					 | 
				
			||||||
===================== ======================== ===================
 | 
					 | 
				
			||||||
N/A                   META                     WRITE_LIFE_NOT_SET
 | 
					 | 
				
			||||||
N/A                   HOT_NODE                 "
 | 
					 | 
				
			||||||
N/A                   WARM_NODE                "
 | 
					 | 
				
			||||||
N/A                   COLD_NODE                "
 | 
					 | 
				
			||||||
ioctl(COLD)           COLD_DATA                WRITE_LIFE_EXTREME
 | 
					 | 
				
			||||||
extension list        "                        "
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-- buffered io
 | 
					 | 
				
			||||||
WRITE_LIFE_EXTREME    COLD_DATA                WRITE_LIFE_EXTREME
 | 
					 | 
				
			||||||
WRITE_LIFE_SHORT      HOT_DATA                 WRITE_LIFE_SHORT
 | 
					 | 
				
			||||||
WRITE_LIFE_NOT_SET    WARM_DATA                WRITE_LIFE_NOT_SET
 | 
					 | 
				
			||||||
WRITE_LIFE_NONE       "                        "
 | 
					 | 
				
			||||||
WRITE_LIFE_MEDIUM     "                        "
 | 
					 | 
				
			||||||
WRITE_LIFE_LONG       "                        "
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-- direct io
 | 
					 | 
				
			||||||
WRITE_LIFE_EXTREME    COLD_DATA                WRITE_LIFE_EXTREME
 | 
					 | 
				
			||||||
WRITE_LIFE_SHORT      HOT_DATA                 WRITE_LIFE_SHORT
 | 
					 | 
				
			||||||
WRITE_LIFE_NOT_SET    WARM_DATA                WRITE_LIFE_NOT_SET
 | 
					 | 
				
			||||||
WRITE_LIFE_NONE       "                        WRITE_LIFE_NONE
 | 
					 | 
				
			||||||
WRITE_LIFE_MEDIUM     "                        WRITE_LIFE_MEDIUM
 | 
					 | 
				
			||||||
WRITE_LIFE_LONG       "                        WRITE_LIFE_LONG
 | 
					 | 
				
			||||||
===================== ======================== ===================
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
3) whint_mode=fs-based. F2FS passes down hints with its policy.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
===================== ======================== ===================
 | 
					 | 
				
			||||||
User                  F2FS                     Block
 | 
					 | 
				
			||||||
===================== ======================== ===================
 | 
					 | 
				
			||||||
N/A                   META                     WRITE_LIFE_MEDIUM;
 | 
					 | 
				
			||||||
N/A                   HOT_NODE                 WRITE_LIFE_NOT_SET
 | 
					 | 
				
			||||||
N/A                   WARM_NODE                "
 | 
					 | 
				
			||||||
N/A                   COLD_NODE                WRITE_LIFE_NONE
 | 
					 | 
				
			||||||
ioctl(COLD)           COLD_DATA                WRITE_LIFE_EXTREME
 | 
					 | 
				
			||||||
extension list        "                        "
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-- buffered io
 | 
					 | 
				
			||||||
WRITE_LIFE_EXTREME    COLD_DATA                WRITE_LIFE_EXTREME
 | 
					 | 
				
			||||||
WRITE_LIFE_SHORT      HOT_DATA                 WRITE_LIFE_SHORT
 | 
					 | 
				
			||||||
WRITE_LIFE_NOT_SET    WARM_DATA                WRITE_LIFE_LONG
 | 
					 | 
				
			||||||
WRITE_LIFE_NONE       "                        "
 | 
					 | 
				
			||||||
WRITE_LIFE_MEDIUM     "                        "
 | 
					 | 
				
			||||||
WRITE_LIFE_LONG       "                        "
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-- direct io
 | 
					 | 
				
			||||||
WRITE_LIFE_EXTREME    COLD_DATA                WRITE_LIFE_EXTREME
 | 
					 | 
				
			||||||
WRITE_LIFE_SHORT      HOT_DATA                 WRITE_LIFE_SHORT
 | 
					 | 
				
			||||||
WRITE_LIFE_NOT_SET    WARM_DATA                WRITE_LIFE_NOT_SET
 | 
					 | 
				
			||||||
WRITE_LIFE_NONE       "                        WRITE_LIFE_NONE
 | 
					 | 
				
			||||||
WRITE_LIFE_MEDIUM     "                        WRITE_LIFE_MEDIUM
 | 
					 | 
				
			||||||
WRITE_LIFE_LONG       "                        WRITE_LIFE_LONG
 | 
					 | 
				
			||||||
===================== ======================== ===================
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Fallocate(2) Policy
 | 
					Fallocate(2) Policy
 | 
				
			||||||
-------------------
 | 
					-------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -154,7 +154,6 @@ struct f2fs_mount_info {
 | 
				
			||||||
	int s_jquota_fmt;			/* Format of quota to use */
 | 
						int s_jquota_fmt;			/* Format of quota to use */
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	/* For which write hints are passed down to block layer */
 | 
						/* For which write hints are passed down to block layer */
 | 
				
			||||||
	int whint_mode;
 | 
					 | 
				
			||||||
	int alloc_mode;			/* segment allocation policy */
 | 
						int alloc_mode;			/* segment allocation policy */
 | 
				
			||||||
	int fsync_mode;			/* fsync policy */
 | 
						int fsync_mode;			/* fsync policy */
 | 
				
			||||||
	int fs_mode;			/* fs mode: LFS or ADAPTIVE */
 | 
						int fs_mode;			/* fs mode: LFS or ADAPTIVE */
 | 
				
			||||||
| 
						 | 
					@ -1333,12 +1332,6 @@ enum {
 | 
				
			||||||
	FS_MODE_FRAGMENT_BLK,		/* block fragmentation mode */
 | 
						FS_MODE_FRAGMENT_BLK,		/* block fragmentation mode */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum {
 | 
					 | 
				
			||||||
	WHINT_MODE_OFF,		/* not pass down write hints */
 | 
					 | 
				
			||||||
	WHINT_MODE_USER,	/* try to pass down hints given by users */
 | 
					 | 
				
			||||||
	WHINT_MODE_FS,		/* pass down hints with F2FS policy */
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
enum {
 | 
					enum {
 | 
				
			||||||
	ALLOC_MODE_DEFAULT,	/* stay default */
 | 
						ALLOC_MODE_DEFAULT,	/* stay default */
 | 
				
			||||||
	ALLOC_MODE_REUSE,	/* reuse segments as much as possible */
 | 
						ALLOC_MODE_REUSE,	/* reuse segments as much as possible */
 | 
				
			||||||
| 
						 | 
					@ -3657,8 +3650,6 @@ void f2fs_destroy_segment_manager(struct f2fs_sb_info *sbi);
 | 
				
			||||||
int __init f2fs_create_segment_manager_caches(void);
 | 
					int __init f2fs_create_segment_manager_caches(void);
 | 
				
			||||||
void f2fs_destroy_segment_manager_caches(void);
 | 
					void f2fs_destroy_segment_manager_caches(void);
 | 
				
			||||||
int f2fs_rw_hint_to_seg_type(enum rw_hint hint);
 | 
					int f2fs_rw_hint_to_seg_type(enum rw_hint hint);
 | 
				
			||||||
enum rw_hint f2fs_io_type_to_rw_hint(struct f2fs_sb_info *sbi,
 | 
					 | 
				
			||||||
			enum page_type type, enum temp_type temp);
 | 
					 | 
				
			||||||
unsigned int f2fs_usable_segs_in_sec(struct f2fs_sb_info *sbi,
 | 
					unsigned int f2fs_usable_segs_in_sec(struct f2fs_sb_info *sbi,
 | 
				
			||||||
			unsigned int segno);
 | 
								unsigned int segno);
 | 
				
			||||||
unsigned int f2fs_usable_blks_in_seg(struct f2fs_sb_info *sbi,
 | 
					unsigned int f2fs_usable_blks_in_seg(struct f2fs_sb_info *sbi,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3243,101 +3243,6 @@ int f2fs_rw_hint_to_seg_type(enum rw_hint hint)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* This returns write hints for each segment type. This hints will be
 | 
					 | 
				
			||||||
 * passed down to block layer. There are mapping tables which depend on
 | 
					 | 
				
			||||||
 * the mount option 'whint_mode'.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * 1) whint_mode=off. F2FS only passes down WRITE_LIFE_NOT_SET.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * 2) whint_mode=user-based. F2FS tries to pass down hints given by users.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * User                  F2FS                     Block
 | 
					 | 
				
			||||||
 * ----                  ----                     -----
 | 
					 | 
				
			||||||
 *                       META                     WRITE_LIFE_NOT_SET
 | 
					 | 
				
			||||||
 *                       HOT_NODE                 "
 | 
					 | 
				
			||||||
 *                       WARM_NODE                "
 | 
					 | 
				
			||||||
 *                       COLD_NODE                "
 | 
					 | 
				
			||||||
 * ioctl(COLD)           COLD_DATA                WRITE_LIFE_EXTREME
 | 
					 | 
				
			||||||
 * extension list        "                        "
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * -- buffered io
 | 
					 | 
				
			||||||
 * WRITE_LIFE_EXTREME    COLD_DATA                WRITE_LIFE_EXTREME
 | 
					 | 
				
			||||||
 * WRITE_LIFE_SHORT      HOT_DATA                 WRITE_LIFE_SHORT
 | 
					 | 
				
			||||||
 * WRITE_LIFE_NOT_SET    WARM_DATA                WRITE_LIFE_NOT_SET
 | 
					 | 
				
			||||||
 * WRITE_LIFE_NONE       "                        "
 | 
					 | 
				
			||||||
 * WRITE_LIFE_MEDIUM     "                        "
 | 
					 | 
				
			||||||
 * WRITE_LIFE_LONG       "                        "
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * -- direct io
 | 
					 | 
				
			||||||
 * WRITE_LIFE_EXTREME    COLD_DATA                WRITE_LIFE_EXTREME
 | 
					 | 
				
			||||||
 * WRITE_LIFE_SHORT      HOT_DATA                 WRITE_LIFE_SHORT
 | 
					 | 
				
			||||||
 * WRITE_LIFE_NOT_SET    WARM_DATA                WRITE_LIFE_NOT_SET
 | 
					 | 
				
			||||||
 * WRITE_LIFE_NONE       "                        WRITE_LIFE_NONE
 | 
					 | 
				
			||||||
 * WRITE_LIFE_MEDIUM     "                        WRITE_LIFE_MEDIUM
 | 
					 | 
				
			||||||
 * WRITE_LIFE_LONG       "                        WRITE_LIFE_LONG
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * 3) whint_mode=fs-based. F2FS passes down hints with its policy.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * User                  F2FS                     Block
 | 
					 | 
				
			||||||
 * ----                  ----                     -----
 | 
					 | 
				
			||||||
 *                       META                     WRITE_LIFE_MEDIUM;
 | 
					 | 
				
			||||||
 *                       HOT_NODE                 WRITE_LIFE_NOT_SET
 | 
					 | 
				
			||||||
 *                       WARM_NODE                "
 | 
					 | 
				
			||||||
 *                       COLD_NODE                WRITE_LIFE_NONE
 | 
					 | 
				
			||||||
 * ioctl(COLD)           COLD_DATA                WRITE_LIFE_EXTREME
 | 
					 | 
				
			||||||
 * extension list        "                        "
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * -- buffered io
 | 
					 | 
				
			||||||
 * WRITE_LIFE_EXTREME    COLD_DATA                WRITE_LIFE_EXTREME
 | 
					 | 
				
			||||||
 * WRITE_LIFE_SHORT      HOT_DATA                 WRITE_LIFE_SHORT
 | 
					 | 
				
			||||||
 * WRITE_LIFE_NOT_SET    WARM_DATA                WRITE_LIFE_LONG
 | 
					 | 
				
			||||||
 * WRITE_LIFE_NONE       "                        "
 | 
					 | 
				
			||||||
 * WRITE_LIFE_MEDIUM     "                        "
 | 
					 | 
				
			||||||
 * WRITE_LIFE_LONG       "                        "
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * -- direct io
 | 
					 | 
				
			||||||
 * WRITE_LIFE_EXTREME    COLD_DATA                WRITE_LIFE_EXTREME
 | 
					 | 
				
			||||||
 * WRITE_LIFE_SHORT      HOT_DATA                 WRITE_LIFE_SHORT
 | 
					 | 
				
			||||||
 * WRITE_LIFE_NOT_SET    WARM_DATA                WRITE_LIFE_NOT_SET
 | 
					 | 
				
			||||||
 * WRITE_LIFE_NONE       "                        WRITE_LIFE_NONE
 | 
					 | 
				
			||||||
 * WRITE_LIFE_MEDIUM     "                        WRITE_LIFE_MEDIUM
 | 
					 | 
				
			||||||
 * WRITE_LIFE_LONG       "                        WRITE_LIFE_LONG
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
enum rw_hint f2fs_io_type_to_rw_hint(struct f2fs_sb_info *sbi,
 | 
					 | 
				
			||||||
				enum page_type type, enum temp_type temp)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	if (F2FS_OPTION(sbi).whint_mode == WHINT_MODE_USER) {
 | 
					 | 
				
			||||||
		if (type == DATA) {
 | 
					 | 
				
			||||||
			if (temp == WARM)
 | 
					 | 
				
			||||||
				return WRITE_LIFE_NOT_SET;
 | 
					 | 
				
			||||||
			else if (temp == HOT)
 | 
					 | 
				
			||||||
				return WRITE_LIFE_SHORT;
 | 
					 | 
				
			||||||
			else if (temp == COLD)
 | 
					 | 
				
			||||||
				return WRITE_LIFE_EXTREME;
 | 
					 | 
				
			||||||
		} else {
 | 
					 | 
				
			||||||
			return WRITE_LIFE_NOT_SET;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	} else if (F2FS_OPTION(sbi).whint_mode == WHINT_MODE_FS) {
 | 
					 | 
				
			||||||
		if (type == DATA) {
 | 
					 | 
				
			||||||
			if (temp == WARM)
 | 
					 | 
				
			||||||
				return WRITE_LIFE_LONG;
 | 
					 | 
				
			||||||
			else if (temp == HOT)
 | 
					 | 
				
			||||||
				return WRITE_LIFE_SHORT;
 | 
					 | 
				
			||||||
			else if (temp == COLD)
 | 
					 | 
				
			||||||
				return WRITE_LIFE_EXTREME;
 | 
					 | 
				
			||||||
		} else if (type == NODE) {
 | 
					 | 
				
			||||||
			if (temp == WARM || temp == HOT)
 | 
					 | 
				
			||||||
				return WRITE_LIFE_NOT_SET;
 | 
					 | 
				
			||||||
			else if (temp == COLD)
 | 
					 | 
				
			||||||
				return WRITE_LIFE_NONE;
 | 
					 | 
				
			||||||
		} else if (type == META) {
 | 
					 | 
				
			||||||
			return WRITE_LIFE_MEDIUM;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return WRITE_LIFE_NOT_SET;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int __get_segment_type_2(struct f2fs_io_info *fio)
 | 
					static int __get_segment_type_2(struct f2fs_io_info *fio)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if (fio->type == DATA)
 | 
						if (fio->type == DATA)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -138,7 +138,6 @@ enum {
 | 
				
			||||||
	Opt_jqfmt_vfsold,
 | 
						Opt_jqfmt_vfsold,
 | 
				
			||||||
	Opt_jqfmt_vfsv0,
 | 
						Opt_jqfmt_vfsv0,
 | 
				
			||||||
	Opt_jqfmt_vfsv1,
 | 
						Opt_jqfmt_vfsv1,
 | 
				
			||||||
	Opt_whint,
 | 
					 | 
				
			||||||
	Opt_alloc,
 | 
						Opt_alloc,
 | 
				
			||||||
	Opt_fsync,
 | 
						Opt_fsync,
 | 
				
			||||||
	Opt_test_dummy_encryption,
 | 
						Opt_test_dummy_encryption,
 | 
				
			||||||
| 
						 | 
					@ -214,7 +213,6 @@ static match_table_t f2fs_tokens = {
 | 
				
			||||||
	{Opt_jqfmt_vfsold, "jqfmt=vfsold"},
 | 
						{Opt_jqfmt_vfsold, "jqfmt=vfsold"},
 | 
				
			||||||
	{Opt_jqfmt_vfsv0, "jqfmt=vfsv0"},
 | 
						{Opt_jqfmt_vfsv0, "jqfmt=vfsv0"},
 | 
				
			||||||
	{Opt_jqfmt_vfsv1, "jqfmt=vfsv1"},
 | 
						{Opt_jqfmt_vfsv1, "jqfmt=vfsv1"},
 | 
				
			||||||
	{Opt_whint, "whint_mode=%s"},
 | 
					 | 
				
			||||||
	{Opt_alloc, "alloc_mode=%s"},
 | 
						{Opt_alloc, "alloc_mode=%s"},
 | 
				
			||||||
	{Opt_fsync, "fsync_mode=%s"},
 | 
						{Opt_fsync, "fsync_mode=%s"},
 | 
				
			||||||
	{Opt_test_dummy_encryption, "test_dummy_encryption=%s"},
 | 
						{Opt_test_dummy_encryption, "test_dummy_encryption=%s"},
 | 
				
			||||||
| 
						 | 
					@ -975,22 +973,6 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
 | 
				
			||||||
			f2fs_info(sbi, "quota operations not supported");
 | 
								f2fs_info(sbi, "quota operations not supported");
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
		case Opt_whint:
 | 
					 | 
				
			||||||
			name = match_strdup(&args[0]);
 | 
					 | 
				
			||||||
			if (!name)
 | 
					 | 
				
			||||||
				return -ENOMEM;
 | 
					 | 
				
			||||||
			if (!strcmp(name, "user-based")) {
 | 
					 | 
				
			||||||
				F2FS_OPTION(sbi).whint_mode = WHINT_MODE_USER;
 | 
					 | 
				
			||||||
			} else if (!strcmp(name, "off")) {
 | 
					 | 
				
			||||||
				F2FS_OPTION(sbi).whint_mode = WHINT_MODE_OFF;
 | 
					 | 
				
			||||||
			} else if (!strcmp(name, "fs-based")) {
 | 
					 | 
				
			||||||
				F2FS_OPTION(sbi).whint_mode = WHINT_MODE_FS;
 | 
					 | 
				
			||||||
			} else {
 | 
					 | 
				
			||||||
				kfree(name);
 | 
					 | 
				
			||||||
				return -EINVAL;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			kfree(name);
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		case Opt_alloc:
 | 
							case Opt_alloc:
 | 
				
			||||||
			name = match_strdup(&args[0]);
 | 
								name = match_strdup(&args[0]);
 | 
				
			||||||
			if (!name)
 | 
								if (!name)
 | 
				
			||||||
| 
						 | 
					@ -1328,12 +1310,6 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
 | 
				
			||||||
		return -EINVAL;
 | 
							return -EINVAL;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Not pass down write hints if the number of active logs is lesser
 | 
					 | 
				
			||||||
	 * than NR_CURSEG_PERSIST_TYPE.
 | 
					 | 
				
			||||||
	 */
 | 
					 | 
				
			||||||
	if (F2FS_OPTION(sbi).active_logs != NR_CURSEG_PERSIST_TYPE)
 | 
					 | 
				
			||||||
		F2FS_OPTION(sbi).whint_mode = WHINT_MODE_OFF;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (f2fs_sb_has_readonly(sbi) && !f2fs_readonly(sbi->sb)) {
 | 
						if (f2fs_sb_has_readonly(sbi) && !f2fs_readonly(sbi->sb)) {
 | 
				
			||||||
		f2fs_err(sbi, "Allow to mount readonly mode only");
 | 
							f2fs_err(sbi, "Allow to mount readonly mode only");
 | 
				
			||||||
		return -EROFS;
 | 
							return -EROFS;
 | 
				
			||||||
| 
						 | 
					@ -1978,10 +1954,6 @@ static int f2fs_show_options(struct seq_file *seq, struct dentry *root)
 | 
				
			||||||
		seq_puts(seq, ",prjquota");
 | 
							seq_puts(seq, ",prjquota");
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
	f2fs_show_quota_options(seq, sbi->sb);
 | 
						f2fs_show_quota_options(seq, sbi->sb);
 | 
				
			||||||
	if (F2FS_OPTION(sbi).whint_mode == WHINT_MODE_USER)
 | 
					 | 
				
			||||||
		seq_printf(seq, ",whint_mode=%s", "user-based");
 | 
					 | 
				
			||||||
	else if (F2FS_OPTION(sbi).whint_mode == WHINT_MODE_FS)
 | 
					 | 
				
			||||||
		seq_printf(seq, ",whint_mode=%s", "fs-based");
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	fscrypt_show_test_dummy_encryption(seq, ',', sbi->sb);
 | 
						fscrypt_show_test_dummy_encryption(seq, ',', sbi->sb);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2033,7 +2005,6 @@ static void default_options(struct f2fs_sb_info *sbi)
 | 
				
			||||||
		F2FS_OPTION(sbi).active_logs = NR_CURSEG_PERSIST_TYPE;
 | 
							F2FS_OPTION(sbi).active_logs = NR_CURSEG_PERSIST_TYPE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	F2FS_OPTION(sbi).inline_xattr_size = DEFAULT_INLINE_XATTR_ADDRS;
 | 
						F2FS_OPTION(sbi).inline_xattr_size = DEFAULT_INLINE_XATTR_ADDRS;
 | 
				
			||||||
	F2FS_OPTION(sbi).whint_mode = WHINT_MODE_OFF;
 | 
					 | 
				
			||||||
	F2FS_OPTION(sbi).alloc_mode = ALLOC_MODE_DEFAULT;
 | 
						F2FS_OPTION(sbi).alloc_mode = ALLOC_MODE_DEFAULT;
 | 
				
			||||||
	F2FS_OPTION(sbi).fsync_mode = FSYNC_MODE_POSIX;
 | 
						F2FS_OPTION(sbi).fsync_mode = FSYNC_MODE_POSIX;
 | 
				
			||||||
	F2FS_OPTION(sbi).s_resuid = make_kuid(&init_user_ns, F2FS_DEF_RESUID);
 | 
						F2FS_OPTION(sbi).s_resuid = make_kuid(&init_user_ns, F2FS_DEF_RESUID);
 | 
				
			||||||
| 
						 | 
					@ -2314,8 +2285,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
 | 
				
			||||||
		need_stop_gc = true;
 | 
							need_stop_gc = true;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (*flags & SB_RDONLY ||
 | 
						if (*flags & SB_RDONLY) {
 | 
				
			||||||
		F2FS_OPTION(sbi).whint_mode != org_mount_opt.whint_mode) {
 | 
					 | 
				
			||||||
		sync_inodes_sb(sb);
 | 
							sync_inodes_sb(sb);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		set_sbi_flag(sbi, SBI_IS_DIRTY);
 | 
							set_sbi_flag(sbi, SBI_IS_DIRTY);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue