View | Details | Raw Unified | Return to bug 203973 | Differences between
and this patch

Collapse All | Expand All

(-)linux-4.19/fs/fat/inode.c~fat-nobarrier (-2 / +14 lines)
Lines 1016-1021 static int fat_show_options(struct seq_f Link Here
1016
		seq_puts(m, ",nfs=stale_rw");
1016
		seq_puts(m, ",nfs=stale_rw");
1017
	if (opts->discard)
1017
	if (opts->discard)
1018
		seq_puts(m, ",discard");
1018
		seq_puts(m, ",discard");
1019
	if (!opts->barrier)
1020
		seq_puts(m, ",nobarrier");
1019
	if (opts->dos1xfloppy)
1021
	if (opts->dos1xfloppy)
1020
		seq_puts(m, ",dos1xfloppy");
1022
		seq_puts(m, ",dos1xfloppy");
1021
1023
Lines 1031-1038 enum { Link Here
1031
	Opt_shortname_winnt, Opt_shortname_mixed, Opt_utf8_no, Opt_utf8_yes,
1033
	Opt_shortname_winnt, Opt_shortname_mixed, Opt_utf8_no, Opt_utf8_yes,
1032
	Opt_uni_xl_no, Opt_uni_xl_yes, Opt_nonumtail_no, Opt_nonumtail_yes,
1034
	Opt_uni_xl_no, Opt_uni_xl_yes, Opt_nonumtail_no, Opt_nonumtail_yes,
1033
	Opt_obsolete, Opt_flush, Opt_tz_utc, Opt_rodir, Opt_err_cont,
1035
	Opt_obsolete, Opt_flush, Opt_tz_utc, Opt_rodir, Opt_err_cont,
1034
	Opt_err_panic, Opt_err_ro, Opt_discard, Opt_nfs, Opt_time_offset,
1036
	Opt_err_panic, Opt_err_ro, Opt_discard, Opt_barrier, Opt_nobarrier,
1035
	Opt_nfs_stale_rw, Opt_nfs_nostale_ro, Opt_err, Opt_dos1xfloppy,
1037
	Opt_nfs, Opt_time_offset, Opt_nfs_stale_rw, Opt_nfs_nostale_ro,
1038
	Opt_err, Opt_dos1xfloppy,
1036
};
1039
};
1037
1040
1038
static const match_table_t fat_tokens = {
1041
static const match_table_t fat_tokens = {
Lines 1062-1067 static const match_table_t fat_tokens = Link Here
1062
	{Opt_err_panic, "errors=panic"},
1065
	{Opt_err_panic, "errors=panic"},
1063
	{Opt_err_ro, "errors=remount-ro"},
1066
	{Opt_err_ro, "errors=remount-ro"},
1064
	{Opt_discard, "discard"},
1067
	{Opt_discard, "discard"},
1068
	{Opt_barrier, "barrier"},
1069
	{Opt_nobarrier, "nobarrier"},
1065
	{Opt_nfs_stale_rw, "nfs"},
1070
	{Opt_nfs_stale_rw, "nfs"},
1066
	{Opt_nfs_stale_rw, "nfs=stale_rw"},
1071
	{Opt_nfs_stale_rw, "nfs=stale_rw"},
1067
	{Opt_nfs_nostale_ro, "nfs=nostale_ro"},
1072
	{Opt_nfs_nostale_ro, "nfs=nostale_ro"},
Lines 1146-1151 static int parse_options(struct super_bl Link Here
1146
	opts->numtail = 1;
1151
	opts->numtail = 1;
1147
	opts->usefree = opts->nocase = 0;
1152
	opts->usefree = opts->nocase = 0;
1148
	opts->tz_set = 0;
1153
	opts->tz_set = 0;
1154
	opts->barrier = 1;
1149
	opts->nfs = 0;
1155
	opts->nfs = 0;
1150
	opts->errors = FAT_ERRORS_RO;
1156
	opts->errors = FAT_ERRORS_RO;
1151
	*debug = 0;
1157
	*debug = 0;
Lines 1335-1340 static int parse_options(struct super_bl Link Here
1335
		case Opt_discard:
1341
		case Opt_discard:
1336
			opts->discard = 1;
1342
			opts->discard = 1;
1337
			break;
1343
			break;
1344
		case Opt_barrier:
1345
			opts->barrier = 1;
1346
			break;
1347
		case Opt_nobarrier:
1348
			opts->barrier = 0;
1349
			break;
1338
1350
1339
		/* obsolete mount options */
1351
		/* obsolete mount options */
1340
		case Opt_obsolete:
1352
		case Opt_obsolete:
(-)linux-4.19/fs/fat/file.c~fat-nobarrier (-3 / +6 lines)
Lines 193-198 static int fat_file_release(struct inode Link Here
193
int fat_file_fsync(struct file *filp, loff_t start, loff_t end, int datasync)
193
int fat_file_fsync(struct file *filp, loff_t start, loff_t end, int datasync)
194
{
194
{
195
	struct inode *inode = filp->f_mapping->host;
195
	struct inode *inode = filp->f_mapping->host;
196
	struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb);
196
	char pathname[80], *path;
197
	char pathname[80], *path;
197
	int err;
198
	int err;
198
199
Lines 208-220 int fat_file_fsync(struct file *filp, lo Link Here
208
	if (err)
209
	if (err)
209
		return err;
210
		return err;
210
211
211
	err = sync_mapping_buffers(MSDOS_SB(inode->i_sb)->fat_inode->i_mapping);
212
	err = sync_mapping_buffers(sbi->fat_inode->i_mapping);
212
	printk("%s:%d: err %d\n", __func__, __LINE__, err);
213
	printk("%s:%d: err %d\n", __func__, __LINE__, err);
213
	if (err)
214
	if (err)
214
		return err;
215
		return err;
215
216
216
	err = blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
217
	if (sbi->options.barrier) {
217
	printk("%s:%d: err %d\n", __func__, __LINE__, err);
218
		err = blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
219
		printk("%s:%d: err %d\n", __func__, __LINE__, err);
220
	}
218
221
219
	return err;
222
	return err;
220
}
223
}
(-)linux-4.19/fs/fat/fat.h~fat-nobarrier (+1 lines)
Lines 51-56 struct fat_mount_options { Link Here
51
		 tz_set:1,	   /* Filesystem timestamps' offset set */
51
		 tz_set:1,	   /* Filesystem timestamps' offset set */
52
		 rodir:1,	   /* allow ATTR_RO for directory */
52
		 rodir:1,	   /* allow ATTR_RO for directory */
53
		 discard:1,	   /* Issue discard requests on deletions */
53
		 discard:1,	   /* Issue discard requests on deletions */
54
		 barrier:1,	   /* Issue FLUSH command */
54
		 dos1xfloppy:1;	   /* Assume default BPB for DOS 1.x floppies */
55
		 dos1xfloppy:1;	   /* Assume default BPB for DOS 1.x floppies */
55
};
56
};
56
57

Return to bug 203973