No description
Find a file
Nikolay Borisov fbc6feaec9 btrfs: Add handling for disk split-brain scenario during fsid change
Even though fsid change without rewrite is a very quick operation it's
still possible to experience a split-brain scenario if power loss occurs
at the most inconvenient time. This patch handles the case where power
failure occurs while the first transaction (the one setting
CHANGING_FSID_V2) flag is being persisted on disk. This can cause the
btrfs_fs_devices of this filesystem to be created by a device which:

 a) has the CHANGING_FSID_V2 flag set but its fsid value is intact

 b) or a device which doesn't have CHANGING_FSID_V2 flag set and its
    fsid value is intact

This situation is trivially handled by the current find_fsid code since
in both cases the devices are going to be treated like ordinary devices.
Since btrfs is always mounted using the superblock of the latest
device (the one with highest generation number), meaning it will have
the CHANGING_FSID_V2 flag set, ensure it's being cleared on mount. On
the first transaction commit following mount all disks will have it
cleared.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-12-17 14:51:38 +01:00
arch arch/sh/include/asm/io.h: provide prototypes for PCI I/O mapping in asm/io.h 2018-12-14 15:05:45 -08:00
block
certs
crypto
Documentation XArray updates for 4.20-rc7 2018-12-13 16:35:58 -08:00
drivers One fix for the qcom QCS404 clk driver that was merged for this release. 2018-12-14 12:14:41 -08:00
firmware
fs btrfs: Add handling for disk split-brain scenario during fsid change 2018-12-17 14:51:38 +01:00
include btrfs: Remove fsid/metadata_fsid fields from btrfs_info 2018-12-17 14:51:37 +01:00
init psi: fix reference to kernel commandline enable 2018-12-14 15:05:45 -08:00
ipc
kernel While running various ftrace tests on new development code, the kmemleak 2018-12-12 18:15:29 -08:00
lib XArray: Fix xa_alloc when id exceeds max 2018-12-13 14:07:33 -05:00
LICENSES
mm hugetlbfs: call VM_BUG_ON_PAGE earlier in free_huge_page() 2018-12-14 15:05:45 -08:00
net
samples
scripts scripts/spdxcheck.py: always open files in binary mode 2018-12-14 15:05:45 -08:00
security
sound
tools XArray updates for 4.20-rc7 2018-12-13 16:35:58 -08:00
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS drm vmwgfx, mediatek, nouveau, amdgpu, rockchip, intel fixes 2018-12-14 09:12:02 -08:00
Makefile Linux 4.20-rc7 2018-12-16 15:46:55 -08: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.

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.