]> git.baikalelectronics.ru Git - kernel.git/commit
iomap: fsync swap files before iterating mappings
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 5 Jun 2018 16:53:05 +0000 (09:53 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 5 Jun 2018 16:53:05 +0000 (09:53 -0700)
commite1b4596efb70cec6d4e7fde264d0ffdcfe391865
tree26c771f802f986c63749c3f94d26828b00efe259
parent290775404e46e03e4794d0d8a746228b4e87cf4b
iomap: fsync swap files before iterating mappings

Swap files require that all the file mapping metadata be stable on disk.
It is insufficient to flush dirty pages in the page cache because that
won't necessarily result in filesystems pushing all their metadata out
to disk.  Therefore, call fsync from iomap_swapfile_activate.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
fs/iomap.c