android_kernel_msm-6.1_noth.../drivers
Paul Lawrence f7bdfc05d1 ANDROID: dm-bow: Add dm-bow feature
Based on https://www.redhat.com/archives/dm-devel/2019-March/msg00025.html

Third version of dm-bow. Key changes:

Free list added
Support for block sizes other than 4k
Handles writes during trim phase, and overlapping trims
Integer overflow error
Support trims even if underlying device doesn't
Numerous small bug-fixes

bow == backup on write

USE CASE:

dm-bow takes a snapshot of an existing file system before mounting.
The user may, before removing the device, commit the snapshot.
Alternatively the user may remove the device and then run a command
line utility to restore the device to its original state.

dm-bow does not require an external device

dm-bow efficiently uses all the available free space on the file system.

IMPLEMENTATION:

dm-bow can be in one of three states.

In state one, the free blocks on the device are identified by issuing
an FSTRIM to the filesystem.

In state two, any writes cause the overwritten data to be backup up
to the available free space. While in this state, the device can be
restored by unmounting the filesystem, removing the dm-bow device
and running a usermode tool over the underlying device.

In state three, the changes are committed, dm-bow is in pass-through
mode and the drive can no longer be restored.

It is planned to use this driver to enable restoration of a failed
update attempt on Android devices using ext4.

Test: Can boot Android with userdata mounted on this device. Can commit
userdata after SUW has run. Can then reboot, make changes and roll back.

Known issues:

Mutex is held around entire flush operation, including lengthy I/O. Plan
is to convert to state machine with pending queues.

Interaction with block encryption is unknown, especially with respect
to sector 0.

Test: Dogfooded on Wahoo.
      Ran under Cuttlefish, running VtsKernelBowTest &
      VtsKernelCheckpointTest tests against 4.19, 4.14 & 4.9 kernels
Signed-off-by: Paul Lawrence <paullawrence@google.com>

Git-commit: 0ce3eb37e9
Git-repo: https://android.googlesource.com/kernel/common.

This snapshot is taken as of msm-5.15 branch commit 63a1e5f1d07a2
("ANDROID: dm-bow: Add dm-bow feature").

Change-Id: I3c963b6e296200f63069a9049b66000c703dac2e
Signed-off-by: Manjunatha N <quic_manjn@quicinc.com>
2023-12-03 21:46:52 -08:00
..
accessibility
acpi UPSTREAM: mm: replace vma->vm_flags direct modifications with modifier calls 2023-06-07 14:24:57 +00:00
amba
android ANDROID: vendor hooks: Enable Vendor hook to register smmu driver to dedicated iommu bus defined by vendor. 2023-10-18 18:47:09 +00:00
ata UPSTREAM: scsi: ata: libata-scsi: Convert to scsi_execute_cmd() 2023-03-15 16:17:14 +00:00
atm atm: idt77252: fix kmemleak when rmmod idt77252 2023-03-30 12:49:09 +02:00
auxdisplay auxdisplay: hd44780: Fix potential memory leak in hd44780_remove() 2023-03-11 13:55:16 +01:00
base Merge keystone/android14-6.1-keystone-qcom-release.6.1.25 (2e792b4) into qcom-6.1 2023-11-06 21:53:32 -08:00
bcma
block soc: qcom: Added support for virtualized FBE 2023-11-02 11:06:19 +05:30
bluetooth bluetooth: btbcm: Fix logic error in forming the board name. 2023-04-20 12:35:06 +02:00
bus mhi: host: Flush pending MHI register writes before MHI suspend 2023-09-26 09:53:05 +05:30
cdrom
char Merge keystone/android14-6.1-keystone-qcom-release.6.1.25 (8823053) into qcom-6.1 2023-07-09 23:53:47 -07:00
clk clk: qcom: dispcc-pitti: Add support for DISPCC on PITTI 2023-11-28 17:13:40 +05:30
clocksource FROMLIST: clocksource/drivers/timer-mediatek: Make timer-mediatek become loadable module 2023-05-09 09:49:00 +00:00
comedi
connector
counter counter: 104-quad-8: Fix Synapse action reported for Index signals 2023-04-13 16:55:31 +02:00
cpufreq cpufreq: qcom: Snapshot of addition of performance lock feature 2023-08-21 20:59:15 -07:00
cpuidle Merge keystone/android14-6.1-keystone-qcom-release.6.1.25 (506939c) into 2023-10-16 20:01:20 -07:00
crypto Merge keystone/android14-6.1-keystone-qcom-release.6.1.25 (8823053) into qcom-6.1 2023-07-09 23:53:47 -07:00
cxl cxl/pci: Handle excessive CDAT length 2023-04-13 16:55:25 +02:00
dax UPSTREAM: mm: replace vma->vm_flags direct modifications with modifier calls 2023-06-07 14:24:57 +00:00
dca
devfreq
dio
dma dmaengine: msm_gpi: add gsi register dump collection 2023-10-28 00:14:45 -07:00
dma-buf Merge keystone/android14-6.1-keystone-qcom-release.6.1.25 (6c948d5) into 2023-09-10 22:44:23 -07:00
edac soc: qcom: edac: Add KRYO EDAC support for monaco_auto 2023-06-21 21:01:47 -07:00
eisa
extcon
firewire
firmware Merge "drivers: scm: Add SCM call interface for SMMU-v3" 2023-11-02 03:27:38 -07:00
fpga UPSTREAM: fpga: bridge: properly initialize bridge device before populating children 2023-05-16 17:26:38 +00:00
fsi
gnss
gpio ANDROID: GKI: add kabi padding for structures for the android14 release 2023-06-07 14:24:51 +00:00
gpu Revert "disp: msm: bridge: Change pm link from anx7625 to drm device" 2023-09-27 12:36:21 +05:30
greybus
hid UPSTREAM: HID: logitech-hidpp: add HIDPP_QUIRK_DELAYED_INIT for the T651. 2023-07-26 09:56:44 +00:00
hsi UPSTREAM: mm: replace vma->vm_flags direct modifications with modifier calls 2023-06-07 14:24:57 +00:00
hte
hv Merge 6.1.24 into android14-6.1 2023-04-22 08:52:25 +00:00
hwmon Merge keystone/android14-6.1-keystone-qcom-release.6.1.25 (98d56a5) into qcom-6.1 2023-05-15 08:16:35 -07:00
hwspinlock
hwtracing Merge "coresight: etr: Use noncontiguous api instead of noncoherent" 2023-11-10 06:03:52 -08:00
i2c Merge "i2c: i2c-msm-geni: check for gi2c->cur null pointer" 2023-11-29 05:59:20 -08:00
i3c Merge "i3c-master-msm-geni: Keep IO driving to Pads" 2023-11-28 11:48:20 -08:00
idle Revert "cpuidle, intel_idle: Fix CPUIDLE_FLAG_IRQ_ENABLE *again*" 2023-04-06 12:10:58 +02:00
iio iio: qcom-spmi-adc5-gen3: update module removal API 2023-11-10 10:58:39 +05:30
infiniband UPSTREAM: mm: replace vma->vm_flags direct modifications with modifier calls 2023-06-07 14:24:57 +00:00
input input: misc: qcom-hv-haptics: Clear the buffer before setting PTRNx_CFG 2023-10-10 14:33:23 +08:00
interconnect Merge "interconnect: qcom: Add interconnect providers for NIOBE" 2023-11-25 03:11:21 -08:00
iommu Merge "drivers: arm-smmu: Power-on SMMU during freeze" 2023-11-15 23:37:37 -08:00
ipack
irqchip irqchip: mpm: Add the mpm to gic mapping for pitti 2023-10-03 16:17:49 +05:30
isdn
leds Merge "arm64: defconfig: cfg/mac 80211 as vendor modules" 2023-06-16 17:19:55 -07:00
macintosh macintosh: windfarm: Use unsigned type for 1-bit bitfields 2023-03-17 08:50:31 +01:00
mailbox mailbox: qmp: Use priority work queue to queue the shim tx 2023-10-06 11:24:34 +05:30
mcb
md ANDROID: dm-bow: Add dm-bow feature 2023-12-03 21:46:52 -08:00
media UPSTREAM: media: usb: siano: Fix warning due to null work_func_t function pointer 2023-08-23 15:04:00 +01:00
memory memory: tegra30-emc: fix interconnect registration race 2023-03-22 13:33:56 +01:00
memstick UPSTREAM: memstick: r592: Fix UAF bug in r592_remove due to race condition 2023-11-01 16:30:43 +00:00
message FROMGIT: scsi: core: Change the return type of .eh_timed_out() 2023-03-15 16:17:14 +00:00
mfd Merge keystone/android14-6.1-keystone-qcom-release.6.1.25 (af4467f) into 2023-08-30 02:32:26 -07:00
misc Merge keystone/android14-6.1-keystone-qcom-release.6.1.25 (2e792b4) into qcom-6.1 2023-11-06 21:53:32 -08:00
mmc mmc: sdhci-msm: Fix slot indexing in driver 2023-10-10 11:39:15 +05:30
most
mtd mtd: spi-nor: fix memory leak when using debugfs_lookup() 2023-04-26 14:28:37 +02:00
mux
net Merge "net: stmmac: Add stmmac_validate and fix DMA reset error" 2023-11-20 00:32:37 -08:00
nfc nfc: st-nci: Fix use after free bug in ndlc_remove due to race condition 2023-03-22 13:33:46 +01:00
ntb
nubus
nvdimm cxl/pmem: Fix nvdimm registration races 2023-03-10 09:34:20 +01:00
nvme Merge 55fba69fbf ("rust: kernel: Mark rust_fmt_argument as extern "C"") into android14-6.1 2023-05-09 03:32:41 +00:00
nvmem nvmem: qfprom: Add keepout regions for Pitti 2023-11-02 20:53:43 +05:30
of UPSTREAM: of: Introduce of_translate_dma_region() 2023-09-19 16:59:57 -07:00
opp OPP: fix error checking in opp_migrate_dentry() 2023-03-10 09:33:01 +01:00
parisc
parport
pci pci: msm: Fix incorrect spinlock usage 2023-10-31 20:50:34 -07:00
pcmcia
peci
perf drivers: perf: qcom_llcc_pmu: Use physical CPU ID to access LLCC PMU 2023-09-12 02:23:30 -07:00
phy phy: qualcomm: Add UFS PHY config for Waipio 2023-10-31 13:09:29 +08:00
pinctrl Merge "pinctrl: qcom: blair: Add egpio support and enable it selectively" 2023-11-23 21:57:14 -08:00
platform platform/x86: asus-nb-wmi: Add quirk_asus_tablet_mode to other ROG Flow X13 models 2023-04-26 14:28:37 +02:00
pnp
power Merge "power: supply: qti_battery_charger: fix charge control logic during reboot" 2023-10-31 09:24:13 -07:00
powercap powercap: fix possible name leak in powercap_register_zone() 2023-03-10 09:32:56 +01:00
pps
ps3
ptp ptp: qcom: snapshot of support for Time Stamp Counter(TSC) driver 2023-09-07 19:17:05 +05:30
pwm Merge keystone/android14-6.1-keystone-qcom-release.6.1.25 (a0290fa) into qcom-6.1 2023-06-08 00:45:30 -07:00
rapidio
ras
regulator regulator: amoled: Add IBB spur mitigation support 2023-10-09 12:43:00 +05:30
remoteproc Merge "drivers: remoteproc: PIL: Add support for hibernation callbacks" 2023-11-07 10:30:54 -08:00
reset
rpmsg Merge "rpmsg: glink: Split glink probe" 2023-11-15 23:37:38 -08:00
rtc drivers: rtc: disable rtc alarm wake capability 2023-09-30 23:43:25 -07:00
s390 s390/vfio-ap: fix memory leak in vfio_ap device driver 2023-04-06 12:10:46 +02:00
sbus UPSTREAM: mm: replace vma->vm_flags direct modifications with modifier calls 2023-06-07 14:24:57 +00:00
scsi UPSTREAM: mm: replace vma->vm_flags direct modifications with modifier calls 2023-06-07 14:24:57 +00:00
sh
siox
slimbus Merge "slimbus: qcom-ngd-ctrl: Clear enabled IRQ's during power off" 2023-09-12 04:25:29 -07:00
soc Merge "soc: qcom: llcc: Update SCT table for Cliffs, Cliffs7" 2023-11-23 10:56:44 -08:00
soundwire soundwire: cadence: Drain the RX FIFO after an IO timeout 2023-03-11 13:55:40 +01:00
spi Merge "spi: spi-msm-geni: Keep IO driving to Pads for SPI" 2023-11-28 11:48:22 -08:00
spmi spmi: viospmi-pmic-arb: update of_node property 2023-06-04 21:17:51 -07:00
ssb
staging UPSTREAM: media: rkvdec: fix use after free bug in rkvdec_remove 2023-07-04 09:10:16 +00:00
target UPSTREAM: mm: replace vma->vm_flags direct modifications with modifier calls 2023-06-07 14:24:57 +00:00
tc
tee tee: amdtee: fix race condition in amdtee_open_session 2023-03-30 12:49:29 +02:00
thermal drivers: thermal: Add snapshot devfreq vdd floor cooling device driver 2023-11-18 04:28:25 +05:30
thunderbolt thunderbolt: Limit USB3 bandwidth of certain Intel USB4 host routers 2023-04-06 12:10:33 +02:00
tty Merge "serial: msm_geni_serial: Free TX/Rx and Event channel in shutdown path" 2023-11-19 18:38:04 -08:00
ufs Merge "ufs: ufs-qcom: Add check to prevent null pointer exception" 2023-11-29 11:30:56 -08:00
uio Merge "uio: msm_sharedmem: Added checks to catch failed kcalloc calls" 2023-08-04 16:49:11 -07:00
usb Merge keystone/android14-6.1-keystone-qcom-release.6.1.25 (7b83c4d) into qcom-6.1 2023-11-19 22:51:25 -08:00
vdpa UPSTREAM: mm: replace vma->vm_flags direct modifications with modifier calls 2023-06-07 14:24:57 +00:00
vfio vfio: platform: ignore missing reset if disabled at module init 2023-10-11 18:34:05 -07:00
vhost UPSTREAM: mm: replace vma->vm_flags direct modifications with modifier calls 2023-06-07 14:24:57 +00:00
video Merge keystone/android14-6.1-keystone-qcom-release.6.1.25 (bd65f1b) into qcom-6.1 2023-09-14 23:00:37 -07:00
virt Merge "Merge keystone/android14-6.1-keystone-qcom-release.6.1.25 (2e792b4) into qcom-6.1" 2023-11-09 19:48:24 -08:00
virtio driver: virtio: mmio: Remove suspend callback function 2023-09-26 19:28:48 +08:00
vlynq
w1
watchdog watchdog: sbsa_wdog: Make sure the timeout programming is within the limits 2023-03-11 13:55:24 +01:00
xen UPSTREAM: mm: replace vma->vm_flags direct modifications with modifier calls 2023-06-07 14:24:57 +00:00
zorro
Kconfig
Makefile