linux-sg2042/drivers
Song Liu 70d466f760 md/r5cache: gracefully handle journal device errors for writeback mode
For the raid456 with writeback cache, when journal device failed during
normal operation, it is still possible to persist all data, as all
pending data is still in stripe cache. However, it is necessary to handle
journal failure gracefully.

During journal failures, the following logic handles the graceful shutdown
of journal:
1. raid5_error() marks the device as Faulty and schedules async work
   log->disable_writeback_work;
2. In disable_writeback_work (r5c_disable_writeback_async), the mddev is
   suspended, set to write through, and then resumed. mddev_suspend()
   flushes all cached stripes;
3. All cached stripes need to be flushed carefully to the RAID array.

This patch fixes issues within the process above:
1. In r5c_update_on_rdev_error() schedule disable_writeback_work for
   journal failures;
2. In r5c_disable_writeback_async(), wait for MD_SB_CHANGE_PENDING,
   since raid5_error() updates superblock.
3. In handle_stripe(), allow stripes with data in journal (s.injournal > 0)
   to make progress during log_failed;
4. In delay_towrite(), if log failed only process data in the cache (skip
   new writes in dev->towrite);
5. In __get_priority_stripe(), process loprio_list during journal device
   failures.
6. In raid5_remove_disk(), wait for all cached stripes are flushed before
   calling log_exit().

Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Shaohua Li <shli@fb.com>
2017-05-11 22:11:11 -07:00
..
accessibility
acpi spi: Updates for v4.12 2017-05-03 12:31:39 -07:00
amba
android
ata Merge branch 'for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata 2017-05-01 13:34:49 -07:00
atm
auxdisplay
base Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 15:46:13 -07:00
bcma
block zram: reduce load operation in page_same_filled 2017-05-03 15:52:11 -07:00
bluetooth Bluetooth: hci_ldisc: Add protocol check to hci_uart_tx_wakeup() 2017-04-30 12:22:14 +02:00
bus
cdrom scsi: introduce a result field in struct scsi_request 2017-04-20 12:16:10 -06:00
char main drm pull request for 4.12 kernel 2017-05-03 11:44:24 -07:00
clk MMC core: 2017-05-02 17:34:32 -07:00
clocksource Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 16:15:18 -07:00
connector
cpufreq Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 19:12:53 -07:00
cpuidle Merge branches 'pm-cpuidle', 'pm-core', 'pm-domains', 'pm-avs' and 'pm-devfreq' 2017-04-28 23:15:34 +02:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2017-05-02 15:53:46 -07:00
dax Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 23:54:56 -07:00
dca
devfreq PM / devfreq: Move struct devfreq_governor to devfreq directory 2017-04-12 12:42:14 +09:00
dio
dma
dma-buf dma-buf: Rename dma-ops to prevent conflict with kunmap_atomic macro 2017-04-20 13:47:46 +05:30
edac EDAC, ghes: Do not enable it by default 2017-04-27 14:15:38 +02:00
eisa
extcon extcon: Add new extcon_register_notifier_all() to monitor all external connectors 2017-04-04 11:22:42 +09:00
firewire
firmware - constify compression structures; Bhumika Goyal 2017-05-02 10:35:45 -07:00
fmc
fpga
fsi
gpio This is the bulk of GPIO changes for the v4.12 kernel cycle: 2017-05-04 12:05:32 -07:00
gpu main drm pull request for 4.12 kernel 2017-05-03 11:44:24 -07:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-05-02 19:09:35 -07:00
hsi HSI: ssi_protocol: double free in ssip_pn_xmit() 2017-04-21 17:58:45 +02:00
hv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-05-02 16:40:27 -07:00
hwmon hwmon: (twl4030-madc) drop driver 2017-04-30 11:45:31 -07:00
hwspinlock
hwtracing Merge branch 'linus' into perf/core, to pick up fixes 2017-03-30 09:48:58 +02:00
i2c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2017-05-03 12:38:20 -07:00
ide ide-pm: always pass 0 error to ide_complete_rq in ide_do_devset 2017-04-26 07:53:35 -06:00
idle
iio - New Drivers 2017-05-03 12:16:25 -07:00
infiniband infiniband: avoid dereferencing uninitialized dst on error path 2017-05-02 10:45:45 -04:00
input This is the bulk of GPIO changes for the v4.12 kernel cycle: 2017-05-04 12:05:32 -07:00
iommu Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-05-02 09:50:09 -07:00
ipack
irqchip irqchip/mbigen: Fix return value check in mbigen_device_probe() 2017-04-30 11:21:16 +02:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-06 08:24:51 -07:00
leds leds: pca9532: Extend pca9532 device tree support 2017-04-19 20:27:50 +02:00
lguest
lightnvm lightnvm: fix possible memory leak in pblk_bb_discovery() 2017-04-25 10:44:29 -06:00
macintosh drivers: Clean up duplicated email address 2017-03-24 15:49:56 +01:00
mailbox mailbox: handle empty message in tx_tick 2017-04-27 16:20:04 +05:30
mcb
md md/r5cache: gracefully handle journal device errors for writeback mode 2017-05-11 22:11:11 -07:00
media Merge branch 'i2c/for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2017-05-03 12:18:47 -07:00
memory - New Drivers 2017-05-03 12:16:25 -07:00
memstick
message scsi: mpt: Move scsi_remove_host() out of mptscsih_remove_host() 2017-04-24 18:21:17 -04:00
mfd mfd: axp20x: Support AXP803 variant 2017-04-27 11:54:49 +01:00
misc SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
mmc MMC core: 2017-05-02 17:34:32 -07:00
mtd Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-05-02 19:09:35 -07:00
net qede: Fix possible misconfiguration of advertised autoneg value. 2017-05-04 12:31:03 -04:00
nfc nfc: fix get_unaligned_...() misuses 2017-04-17 00:42:22 +02:00
ntb
nubus nubus: Clean up whitespace 2017-04-20 09:54:24 +02:00
nvdimm Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 23:54:56 -07:00
nvme Merge branch 'for-4.12/block' of git://git.kernel.dk/linux-block 2017-05-01 10:39:57 -07:00
nvmem
of main drm pull request for 4.12 kernel 2017-05-03 11:44:24 -07:00
oprofile
parisc
parport
pci main drm pull request for 4.12 kernel 2017-05-03 11:44:24 -07:00
pcmcia
perf
phy
pinctrl Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-05-02 19:09:35 -07:00
platform This is the bulk of GPIO changes for the v4.12 kernel cycle: 2017-05-04 12:05:32 -07:00
pnp
power ACPI updates for v4.12-rc1 2017-05-01 14:13:28 -07:00
powercap
pps
ps3
ptp Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-01 16:15:18 -07:00
pwm pwm: rockchip: State of PWM clock should synchronize with PWM enabled state 2017-04-06 15:08:52 +02:00
rapidio drivers/rapidio/devices/tsi721.c: make module parameter variable name unique 2017-03-31 17:13:30 -07:00
ras RAS: Add a Corrected Errors Collector 2017-03-28 08:54:48 +02:00
regulator Merge remote-tracking branch 'regulator/topic/vctrl' into regulator-next 2017-04-30 22:17:44 +09:00
remoteproc soc: qcom: smd: Remove standalone driver 2017-03-28 17:58:07 -07:00
reset reset: add exported __reset_control_get, return NULL if optional 2017-04-04 17:36:10 +02:00
rpmsg soc: qcom: smd: Remove standalone driver 2017-03-28 17:58:07 -07:00
rtc
s390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-05-02 16:40:27 -07:00
sbus jsflash: stop sharing request queue across multiple gendisks 2017-03-28 15:06:58 -06:00
scsi SCSI misc on 20170503 2017-05-04 12:19:44 -07:00
sfi
sh
sn
soc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-05-02 16:40:27 -07:00
spi Merge remote-tracking branches 'spi/topic/ti-qspi' and 'spi/topic/xlp' into spi-next 2017-04-26 15:58:22 +01:00
spmi
ssb
staging main drm pull request for 4.12 kernel 2017-05-03 11:44:24 -07:00
target Merge branch 'for-4.12/block' of git://git.kernel.dk/linux-block 2017-05-01 10:39:57 -07:00
tc
thermal - New Drivers 2017-05-03 12:16:25 -07:00
thunderbolt
tty oom: improve oom disable handling 2017-05-03 15:52:10 -07:00
uio
usb This is the bulk of GPIO changes for the v4.12 kernel cycle: 2017-05-04 12:05:32 -07:00
uwb
vfio vfio/type1: Reduce repetitive calls in vfio_pin_pages_remote() 2017-04-18 15:01:15 -06:00
vhost VSOCK: Add virtio vsock vsockmon hooks 2017-04-24 12:35:56 -04:00
video - New Drivers 2017-05-03 12:11:44 -07:00
virt
virtio virtio-pci: Remove affinity hint before freeing the interrupt 2017-04-11 00:30:20 +03:00
vlynq
vme
w1
watchdog watchdog: iTCO_wdt: Add PMC specific noreboot update api 2017-04-28 21:51:28 +03:00
xen xen: Implement EFI reset_system callback 2017-05-02 12:06:50 +02:00
zorro
Kconfig
Makefile