No description
Find a file
Mikulas Patocka a999296636 dm writecache: fix incorrect flush sequence when doing SSD mode commit
commit aa9509209c upstream.

When committing state, the function writecache_flush does the following:
1. write metadata (writecache_commit_flushed)
2. flush disk cache (writecache_commit_flushed)
3. wait for data writes to complete (writecache_wait_for_ios)
4. increase superblock seq_count
5. write the superblock
6. flush disk cache

It may happen that at step 3, when we wait for some write to finish, the
disk may report the write as finished, but the write only hit the disk
cache and it is not yet stored in persistent storage. At step 5 we write
the superblock - it may happen that the superblock is written before the
write that we waited for in step 3. If the machine crashes, it may result
in incorrect data being returned after reboot.

In order to fix the bug, we must swap steps 2 and 3 in the above sequence,
so that we first wait for writes to complete and then flush the disk
cache.

Fixes: 48debafe4f ("dm: add writecache target")
Cc: stable@vger.kernel.org # 4.18+
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-11 04:34:04 -08:00
arch of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc 2020-02-11 04:34:03 -08:00
block block: fix 32 bit overflow in __blkdev_issue_discard() 2020-02-01 09:37:12 +00:00
certs export.h: remove VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR() 2018-08-22 23:21:44 +09:00
crypto crypto: api - Check spawn->alg under lock in crypto_drop_spawn 2020-02-11 04:34:01 -08:00
Documentation PM / devfreq: Add new name attribute for sysfs 2020-02-05 14:43:34 +00:00
drivers dm writecache: fix incorrect flush sequence when doing SSD mode commit 2020-02-11 04:34:04 -08:00
firmware Fix built-in early-load Intel microcode alignment 2020-01-23 08:21:29 +01:00
fs f2fs: code cleanup for f2fs_statfs_project() 2020-02-11 04:34:03 -08:00
include media: v4l2-rect.h: fix v4l2_rect_map_inside() top/left adjustments 2020-02-11 04:33:57 -08:00
init fork: fix some -Wmissing-prototypes warnings 2019-12-05 09:21:04 +01:00
ipc ipc/msg.c: consolidate all xxxctl_down() functions 2020-02-11 04:33:55 -08:00
kernel alarmtimer: Unregister wakeup source when module get fails 2020-02-11 04:33:59 -08:00
lib lib/test_kasan.c: fix memory leak in kmalloc_oob_krealloc_more() 2020-02-11 04:33:57 -08:00
LICENSES LICENSES: Remove CC-BY-SA-4.0 license text 2018-10-18 11:28:50 +02:00
mm mm: move_pages: report the number of non-attempted pages 2020-02-11 04:33:56 -08:00
net rxrpc: Fix NULL pointer deref due to call->conn being cleared on disconnect 2020-02-11 04:33:54 -08:00
samples samples/bpf: Fix broken xdp_rxq_info due to map order assumptions 2020-01-27 14:51:22 +01:00
scripts scripts/find-unused-docs: Fix massive false positives 2020-02-11 04:34:01 -08:00
security tomoyo: Use atomic_t for statistics counter 2020-02-05 14:43:38 +00:00
sound ALSA: hda: Add Clevo W65_67SB the power_save blacklist 2020-02-11 04:33:57 -08:00
tools perf report: Fix no libunwind compiled warning break s390 issue 2020-02-05 14:43:54 +00:00
usr kbuild: clean compressed initramfs image 2019-10-07 18:57:16 +02:00
virt KVM: arm64: Only sign-extend MMIO up to register width 2020-02-11 04:33:58 -08:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap libnvdimm-for-4.19_misc 2018-08-25 18:13:10 -07:00
COPYING
CREDITS 9p: remove Ron Minnich from MAINTAINERS 2018-08-17 16:20:26 -07:00
Kbuild
Kconfig kconfig: move the "Executable file formats" menu to fs/Kconfig.binfmt 2018-08-02 08:06:55 +09:00
MAINTAINERS USB: rio500: Remove Rio 500 kernel driver 2019-10-17 13:44:47 -07:00
Makefile Linux 4.19.102 2020-02-05 14:43:55 +00:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.