File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ extern const struct inode_operations zpl_special_inode_operations;
49
49
extern const struct address_space_operations zpl_address_space_operations ;
50
50
extern const struct file_operations zpl_file_operations ;
51
51
extern const struct file_operations zpl_dir_file_operations ;
52
+ extern int zpl_writepages (struct address_space * mapping ,
53
+ struct writeback_control * wbc );
52
54
53
55
/* zpl_super.c */
54
56
extern void zpl_prune_sb (uint64_t nr_to_scan , void * arg );
Original file line number Diff line number Diff line change @@ -546,7 +546,7 @@ zpl_write_cache_pages(struct address_space *mapping,
546
546
return (result );
547
547
}
548
548
549
- static int
549
+ int
550
550
zpl_writepages (struct address_space * mapping , struct writeback_control * wbc )
551
551
{
552
552
znode_t * zp = ITOZ (mapping -> host );
Original file line number Diff line number Diff line change @@ -111,6 +111,12 @@ zpl_sync_fs(struct super_block *sb, int wait)
111
111
cred_t * cr = CRED ();
112
112
znode_t * zp ;
113
113
zfsvfs_t * zfsvfs = sb -> s_fs_info ;
114
+ struct writeback_control wbc = {
115
+ .sync_mode = wait ? WB_SYNC_ALL : WB_SYNC_NONE ,
116
+ .nr_to_write = LONG_MAX ,
117
+ .range_start = 0 ,
118
+ .range_end = LLONG_MAX ,
119
+ };
114
120
int error ;
115
121
116
122
crhold (cr );
@@ -119,7 +125,7 @@ zpl_sync_fs(struct super_block *sb, int wait)
119
125
for (zp = list_head (& zfsvfs -> z_all_znodes ); zp ;
120
126
zp = list_next (& zfsvfs -> z_all_znodes , zp )) {
121
127
if (zp -> z_sa_hdl )
122
- error = filemap_write_and_wait (ZTOI (zp )-> i_mapping );
128
+ error = zpl_writepages (ZTOI (zp )-> i_mapping , & wbc );
123
129
if (error != 0 )
124
130
break ;
125
131
}
You can’t perform that action at this time.
0 commit comments