@@ -55,7 +55,7 @@ affs_put_super(struct super_block *sb)
}
static int
-affs_sync_fs(struct super_block *sb, int wait)
+affs_sync_fs(struct super_block *sb, int wait, errseq_t *since)
{
affs_commit_super(sb, wait);
return __sync_blockdev(sb->s_bdev, wait);
@@ -3316,7 +3316,7 @@ void btrfs_sysfs_remove_mounted(struct btrfs_fs_info *fs_info);
/* super.c */
int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
unsigned long new_flags);
-int btrfs_sync_fs(struct super_block *sb, int wait);
+int btrfs_sync_fs(struct super_block *sb, int wait, errseq_t *since);
static inline __printf(2, 3) __cold
void btrfs_no_printk(const struct btrfs_fs_info *fs_info, const char *fmt, ...)
@@ -5500,7 +5500,7 @@ long btrfs_ioctl(struct file *file, unsigned int
ret = btrfs_start_delalloc_roots(fs_info, 0, -1);
if (ret)
return ret;
- ret = btrfs_sync_fs(inode->i_sb, 1);
+ ret = btrfs_sync_fs(inode->i_sb, 1, NULL);
/*
* The transaction thread may want to do more work,
* namely it pokes the cleaner kthread that will start
@@ -1226,7 +1226,7 @@ static int btrfs_fill_super(struct super_block *sb,
return err;
}
-int btrfs_sync_fs(struct super_block *sb, int wait)
+int btrfs_sync_fs(struct super_block *sb, int wait, errseq_t *since)
{
struct btrfs_trans_handle *trans;
struct btrfs_fs_info *fs_info = btrfs_sb(sb);
@@ -103,7 +103,7 @@ static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf)
}
-static int ceph_sync_fs(struct super_block *sb, int wait)
+static int ceph_sync_fs(struct super_block *sb, int wait, errseq_t *since)
{
struct ceph_fs_client *fsc = ceph_sb_to_client(sb);
@@ -364,7 +364,7 @@ static const struct export_operations exofs_export_ops;
/*
* Write the superblock to the OSD
*/
-static int exofs_sync_fs(struct super_block *sb, int wait)
+static int exofs_sync_fs(struct super_block *sb, int wait, errseq_t *since)
{
struct exofs_sb_info *sbi;
struct exofs_fscb *fscb;
@@ -41,7 +41,7 @@
static void ext2_write_super(struct super_block *sb);
static int ext2_remount (struct super_block * sb, int * flags, char * data);
static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf);
-static int ext2_sync_fs(struct super_block *sb, int wait);
+static int ext2_sync_fs(struct super_block *sb, int wait, errseq_t *since);
static int ext2_freeze(struct super_block *sb);
static int ext2_unfreeze(struct super_block *sb);
@@ -1262,7 +1262,7 @@ void ext2_sync_super(struct super_block *sb, struct ext2_super_block *es,
* may have been checked while mounted and e2fsck may have
* set s_state to EXT2_VALID_FS after some corrections.
*/
-static int ext2_sync_fs(struct super_block *sb, int wait)
+static int ext2_sync_fs(struct super_block *sb, int wait, errseq_t *since)
{
struct ext2_sb_info *sbi = EXT2_SB(sb);
struct ext2_super_block *es = EXT2_SB(sb)->s_es;
@@ -1293,7 +1293,7 @@ static int ext2_freeze(struct super_block *sb)
* consistent.
*/
if (atomic_long_read(&sb->s_remove_count)) {
- ext2_sync_fs(sb, 1);
+ ext2_sync_fs(sb, 1, NULL);
return 0;
}
/* Set EXT2_FS_VALID flag */
@@ -1316,7 +1316,7 @@ static int ext2_unfreeze(struct super_block *sb)
static void ext2_write_super(struct super_block *sb)
{
if (!sb_rdonly(sb))
- ext2_sync_fs(sb, 1);
+ ext2_sync_fs(sb, 1, NULL);
}
static int ext2_remount (struct super_block * sb, int * flags, char * data)
@@ -69,7 +69,7 @@ static void ext4_mark_recovery_complete(struct super_block *sb,
struct ext4_super_block *es);
static void ext4_clear_journal_err(struct super_block *sb,
struct ext4_super_block *es);
-static int ext4_sync_fs(struct super_block *sb, int wait);
+static int ext4_sync_fs(struct super_block *sb, int wait, errseq_t *since);
static int ext4_remount(struct super_block *sb, int *flags, char *data);
static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf);
static int ext4_unfreeze(struct super_block *sb);
@@ -4855,7 +4855,7 @@ int ext4_force_commit(struct super_block *sb)
return ext4_journal_force_commit(journal);
}
-static int ext4_sync_fs(struct super_block *sb, int wait)
+static int ext4_sync_fs(struct super_block *sb, int wait, errseq_t *since)
{
int ret = 0, ret2;
tid_t target;
@@ -2703,7 +2703,7 @@ void f2fs_inode_synced(struct inode *inode);
int f2fs_enable_quota_files(struct f2fs_sb_info *sbi, bool rdonly);
void f2fs_quota_off_umount(struct super_block *sb);
int f2fs_commit_super(struct f2fs_sb_info *sbi, bool recover);
-int f2fs_sync_fs(struct super_block *sb, int sync);
+int f2fs_sync_fs(struct super_block *sb, int sync, errseq_t *since);
extern __printf(3, 4)
void f2fs_msg(struct super_block *sb, const char *level, const char *fmt, ...);
int sanity_check_ckpt(struct f2fs_sb_info *sbi);
@@ -260,7 +260,7 @@ static int f2fs_do_sync_file(struct file *file, loff_t start, loff_t end,
if (cp_reason) {
/* all the dirty node pages should be flushed for POR */
- ret = f2fs_sync_fs(inode->i_sb, 1);
+ ret = f2fs_sync_fs(inode->i_sb, 1, NULL);
/*
* We've secured consistency through sync_fs. Following pino
@@ -1869,7 +1869,7 @@ static int f2fs_ioc_shutdown(struct file *filp, unsigned long arg)
break;
case F2FS_GOING_DOWN_METASYNC:
/* do checkpoint only */
- ret = f2fs_sync_fs(sb, 1);
+ ret = f2fs_sync_fs(sb, 1, NULL);
if (ret)
goto out;
f2fs_stop_checkpoint(sbi, false);
@@ -2097,7 +2097,7 @@ static int f2fs_ioc_write_checkpoint(struct file *filp, unsigned long arg)
if (ret)
return ret;
- ret = f2fs_sync_fs(sbi->sb, 1);
+ ret = f2fs_sync_fs(sbi->sb, 1, NULL);
mnt_drop_write_file(filp);
return ret;
@@ -298,7 +298,7 @@ static int f2fs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
unlock_new_inode(inode);
if (IS_DIRSYNC(dir))
- f2fs_sync_fs(sbi->sb, 1);
+ f2fs_sync_fs(sbi->sb, 1, NULL);
f2fs_balance_fs(sbi, true);
return 0;
@@ -345,7 +345,7 @@ static int f2fs_link(struct dentry *old_dentry, struct inode *dir,
d_instantiate(dentry, inode);
if (IS_DIRSYNC(dir))
- f2fs_sync_fs(sbi->sb, 1);
+ f2fs_sync_fs(sbi->sb, 1, NULL);
return 0;
out:
clear_inode_flag(inode, FI_INC_LINK);
@@ -531,7 +531,7 @@ static int f2fs_unlink(struct inode *dir, struct dentry *dentry)
f2fs_unlock_op(sbi);
if (IS_DIRSYNC(dir))
- f2fs_sync_fs(sbi->sb, 1);
+ f2fs_sync_fs(sbi->sb, 1, NULL);
fail:
trace_f2fs_unlink_exit(inode, err);
return err;
@@ -614,7 +614,7 @@ static int f2fs_symlink(struct inode *dir, struct dentry *dentry,
disk_link.len - 1);
if (IS_DIRSYNC(dir))
- f2fs_sync_fs(sbi->sb, 1);
+ f2fs_sync_fs(sbi->sb, 1, NULL);
} else {
f2fs_unlink(dir, dentry);
}
@@ -665,7 +665,7 @@ static int f2fs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
unlock_new_inode(inode);
if (IS_DIRSYNC(dir))
- f2fs_sync_fs(sbi->sb, 1);
+ f2fs_sync_fs(sbi->sb, 1, NULL);
f2fs_balance_fs(sbi, true);
return 0;
@@ -717,7 +717,7 @@ static int f2fs_mknod(struct inode *dir, struct dentry *dentry,
unlock_new_inode(inode);
if (IS_DIRSYNC(dir))
- f2fs_sync_fs(sbi->sb, 1);
+ f2fs_sync_fs(sbi->sb, 1, NULL);
f2fs_balance_fs(sbi, true);
return 0;
@@ -979,7 +979,7 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
f2fs_unlock_op(sbi);
if (IS_DIRSYNC(old_dir) || IS_DIRSYNC(new_dir))
- f2fs_sync_fs(sbi->sb, 1);
+ f2fs_sync_fs(sbi->sb, 1, NULL);
return 0;
put_out_dir:
@@ -1132,7 +1132,7 @@ static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry,
f2fs_unlock_op(sbi);
if (IS_DIRSYNC(old_dir) || IS_DIRSYNC(new_dir))
- f2fs_sync_fs(sbi->sb, 1);
+ f2fs_sync_fs(sbi->sb, 1, NULL);
return 0;
out_new_dir:
if (new_dir_entry) {
@@ -507,7 +507,7 @@ void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi)
sync_dirty_inodes(sbi, FILE_INODE);
blk_finish_plug(&plug);
}
- f2fs_sync_fs(sbi->sb, true);
+ f2fs_sync_fs(sbi->sb, 1, NULL);
stat_inc_bg_cp_count(sbi->stat_info);
}
}
@@ -1055,7 +1055,7 @@ static void f2fs_put_super(struct super_block *sb)
kfree(sbi);
}
-int f2fs_sync_fs(struct super_block *sb, int sync)
+int f2fs_sync_fs(struct super_block *sb, int sync, errseq_t *since)
{
struct f2fs_sb_info *sbi = F2FS_SB(sb);
int err = 0, err2;
@@ -1497,7 +1497,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
set_sbi_flag(sbi, SBI_IS_DIRTY);
set_sbi_flag(sbi, SBI_IS_CLOSE);
- f2fs_sync_fs(sb, 1);
+ f2fs_sync_fs(sb, 1, NULL);
clear_sbi_flag(sbi, SBI_IS_CLOSE);
}
@@ -949,7 +949,7 @@ static void gfs2_put_super(struct super_block *sb)
* Flushes the log to disk.
*/
-static int gfs2_sync_fs(struct super_block *sb, int wait)
+static int gfs2_sync_fs(struct super_block *sb, int wait, errseq_t *since)
{
int bderr;
struct gfs2_sbd *sdp = sb->s_fs_info;
@@ -30,7 +30,7 @@ static struct kmem_cache *hfs_inode_cachep;
MODULE_LICENSE("GPL");
-static int hfs_sync_fs(struct super_block *sb, int wait)
+static int hfs_sync_fs(struct super_block *sb, int wait, errseq_t *since)
{
hfs_mdb_commit(sb);
return __sync_blockdev(sb->s_bdev, wait);
@@ -172,7 +172,7 @@ static void hfsplus_evict_inode(struct inode *inode)
}
}
-static int hfsplus_sync_fs(struct super_block *sb, int wait)
+static int hfsplus_sync_fs(struct super_block *sb, int wait, errseq_t *since)
{
struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb);
struct hfsplus_vh *vhdr = sbi->s_vhdr;
@@ -254,7 +254,7 @@ static void delayed_sync_fs(struct work_struct *work)
sbi->work_queued = 0;
spin_unlock(&sbi->work_lock);
- err = hfsplus_sync_fs(sbi->alloc_file->i_sb, 1);
+ err = hfsplus_sync_fs(sbi->alloc_file->i_sb, 1, NULL);
if (err)
pr_err("delayed sync fs err %d\n", err);
}
@@ -291,7 +291,7 @@ static void hfsplus_put_super(struct super_block *sb)
vhdr->attributes |= cpu_to_be32(HFSPLUS_VOL_UNMNT);
vhdr->attributes &= cpu_to_be32(~HFSPLUS_VOL_INCNSTNT);
- hfsplus_sync_fs(sb, 1);
+ hfsplus_sync_fs(sb, 1, NULL);
}
hfs_btree_close(sbi->attr_tree);
@@ -545,7 +545,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
be32_add_cpu(&vhdr->write_count, 1);
vhdr->attributes &= cpu_to_be32(~HFSPLUS_VOL_UNMNT);
vhdr->attributes |= cpu_to_be32(HFSPLUS_VOL_INCNSTNT);
- hfsplus_sync_fs(sb, 1);
+ hfsplus_sync_fs(sb, 1, NULL);
if (!sbi->hidden_dir) {
mutex_lock(&sbi->vh_mutex);
@@ -96,7 +96,7 @@ static int jffs2_show_options(struct seq_file *s, struct dentry *root)
return 0;
}
-static int jffs2_sync_fs(struct super_block *sb, int wait)
+static int jffs2_sync_fs(struct super_block *sb, int wait, errseq_t *since)
{
struct jffs2_sb_info *c = JFFS2_SB_INFO(sb);
@@ -703,7 +703,7 @@ static struct dentry *jfs_do_mount(struct file_system_type *fs_type,
return mount_bdev(fs_type, flags, dev_name, data, jfs_fill_super);
}
-static int jfs_sync_fs(struct super_block *sb, int wait)
+static int jfs_sync_fs(struct super_block *sb, int wait, errseq_t *since)
{
struct jfs_log *log = JFS_SBI(sb)->log;
@@ -491,7 +491,7 @@ static void nilfs_put_super(struct super_block *sb)
sb->s_fs_info = NULL;
}
-static int nilfs_sync_fs(struct super_block *sb, int wait)
+static int nilfs_sync_fs(struct super_block *sb, int wait, errseq_t *since)
{
struct the_nilfs *nilfs = sb->s_fs_info;
struct nilfs_super_block **sbp;
@@ -115,7 +115,7 @@ static void ocfs2_delete_osb(struct ocfs2_super *osb);
static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf);
-static int ocfs2_sync_fs(struct super_block *sb, int wait);
+static int ocfs2_sync_fs(struct super_block *sb, int wait, errseq_t *since);
static int ocfs2_init_global_system_inodes(struct ocfs2_super *osb);
static int ocfs2_init_local_system_inodes(struct ocfs2_super *osb);
@@ -406,7 +406,7 @@ static const struct file_operations ocfs2_osb_debug_fops = {
.llseek = generic_file_llseek,
};
-static int ocfs2_sync_fs(struct super_block *sb, int wait)
+static int ocfs2_sync_fs(struct super_block *sb, int wait, errseq_t *since)
{
int status;
tid_t target;
@@ -266,7 +266,7 @@ static void ovl_put_super(struct super_block *sb)
}
/* Sync real dirty inodes in upper filesystem (if it exists) */
-static int ovl_sync_fs(struct super_block *sb, int wait)
+static int ovl_sync_fs(struct super_block *sb, int wait, errseq_t *since)
{
struct ovl_fs *ofs = sb->s_fs_info;
struct super_block *upper_sb;
@@ -686,7 +686,7 @@ int dquot_quota_sync(struct super_block *sb, int type)
/* This is not very clever (and fast) but currently I don't know about
* any other simple way of getting quota data to disk and we must get
* them there for userspace to be visible... */
- call_sync_fs(sb, 1);
+ call_sync_fs(sb, 1, NULL);
/*
* Now when everything is written we can discard the pagecache so
@@ -2243,7 +2243,7 @@ int dquot_disable(struct super_block *sb, int type, unsigned int flags)
/* Sync the superblock so that buffers with quota data are written to
* disk (and so userspace sees correct data afterwards). */
- call_sync_fs(sb, 1);
+ call_sync_fs(sb, 1, NULL);
/* Now the quota files are just ordinary files and we can set the
* inode flags back. Moreover we discard the pagecache so that
@@ -64,7 +64,7 @@ static int is_any_reiserfs_magic_string(struct reiserfs_super_block *rs)
static int reiserfs_remount(struct super_block *s, int *flags, char *data);
static int reiserfs_statfs(struct dentry *dentry, struct kstatfs *buf);
-static int reiserfs_sync_fs(struct super_block *s, int wait)
+static int reiserfs_sync_fs(struct super_block *s, int wait, errseq_t *since)
{
struct reiserfs_transaction_handle th;
@@ -108,7 +108,7 @@ static void flush_old_commits(struct work_struct *work)
sbi->work_queued = 0;
spin_unlock(&sbi->old_work_lock);
- reiserfs_sync_fs(s, 1);
+ reiserfs_sync_fs(s, 1, NULL);
up_read(&s->s_umount);
}
@@ -35,7 +35,7 @@ static int __sync_filesystem(struct super_block *sb, int wait)
else
writeback_inodes_sb(sb, WB_REASON_SYNC);
- return call_sync_fs(sb, wait);
+ return call_sync_fs(sb, wait, NULL);
}
/*
@@ -78,7 +78,7 @@ static void sync_fs_one_sb(struct super_block *sb, void *arg)
if (sb_rdonly(sb))
return;
- call_sync_fs(sb, wait);
+ call_sync_fs(sb, wait, NULL);
}
static void fdatawrite_one_bdev(struct block_device *bdev, void *arg)
@@ -32,7 +32,7 @@
#include <asm/byteorder.h>
#include "sysv.h"
-static int sysv_sync_fs(struct super_block *sb, int wait)
+static int sysv_sync_fs(struct super_block *sb, int wait, errseq_t *since)
{
struct sysv_sb_info *sbi = SYSV_SB(sb);
unsigned long time = get_seconds(), old_time;
@@ -449,7 +449,7 @@ static int ubifs_show_options(struct seq_file *s, struct dentry *root)
return 0;
}
-static int ubifs_sync_fs(struct super_block *sb, int wait)
+static int ubifs_sync_fs(struct super_block *sb, int wait, errseq_t *since)
{
int i, err;
struct ubifs_info *c = sb->s_fs_info;
@@ -89,7 +89,7 @@ enum { UDF_MAX_LINKS = 0xffff };
/* These are the "meat" - everything else is stuffing */
static int udf_fill_super(struct super_block *, void *, int);
static void udf_put_super(struct super_block *);
-static int udf_sync_fs(struct super_block *, int);
+static int udf_sync_fs(struct super_block *, int, errseq_t *);
static int udf_remount_fs(struct super_block *, int *, char *);
static void udf_load_logicalvolint(struct super_block *, struct kernel_extent_ad);
static int udf_find_fileset(struct super_block *, struct kernel_lb_addr *,
@@ -2345,7 +2345,7 @@ static void udf_put_super(struct super_block *sb)
sb->s_fs_info = NULL;
}
-static int udf_sync_fs(struct super_block *sb, int wait)
+static int udf_sync_fs(struct super_block *sb, int wait, errseq_t *since)
{
struct udf_sb_info *sbi = UDF_SB(sb);
@@ -680,7 +680,7 @@ static void ufs_put_super_internal(struct super_block *sb)
UFSD("EXIT\n");
}
-static int ufs_sync_fs(struct super_block *sb, int wait)
+static int ufs_sync_fs(struct super_block *sb, int wait, errseq_t *since)
{
struct ufs_sb_private_info * uspi;
struct ufs_super_block_first * usb1;
@@ -720,7 +720,7 @@ static void delayed_sync_fs(struct work_struct *work)
sbi->work_queued = 0;
spin_unlock(&sbi->work_lock);
- ufs_sync_fs(sbi->sb, 1);
+ ufs_sync_fs(sbi->sb, 1, NULL);
}
void ufs_mark_sb_dirty(struct super_block *sb)
@@ -1089,7 +1089,8 @@ xfs_free_fsname(
STATIC int
xfs_fs_sync_fs(
struct super_block *sb,
- int wait)
+ int wait,
+ errseq_t *since)
{
struct xfs_mount *mp = XFS_M(sb);
@@ -1821,7 +1821,7 @@ struct super_operations {
int (*drop_inode) (struct inode *);
void (*evict_inode) (struct inode *);
void (*put_super) (struct super_block *);
- int (*sync_fs)(struct super_block *sb, int wait);
+ int (*sync_fs)(struct super_block *sb, int wait, errseq_t *since);
int (*freeze_super) (struct super_block *);
int (*freeze_fs) (struct super_block *);
int (*thaw_super) (struct super_block *);
@@ -2499,10 +2499,11 @@ extern const struct file_operations def_chr_fops;
* Many legacy filesystems don't have a sync_fs op. For them, we just flush
* the block device (if there is one).
*/
-static inline int call_sync_fs(struct super_block *sb, int wait)
+static inline int call_sync_fs(struct super_block *sb, int wait,
+ errseq_t *since)
{
if (sb->s_op->sync_fs)
- return sb->s_op->sync_fs(sb, wait);
+ return sb->s_op->sync_fs(sb, wait, since);
return __sync_blockdev(sb->s_bdev, wait);
}