remarkable-linux/include
Omar Sandoval 6675df311d Btrfs: catch invalid free space trees
There are two separate issues that can lead to corrupted free space
trees.

1. The free space tree bitmaps had an endianness issue on big-endian
   systems which is fixed by an earlier patch in this series.
2. btrfs-progs before v4.7.3 modified filesystems without updating the
   free space tree.

To catch both of these issues at once, we need to force the free space
tree to be rebuilt. To do so, add a FREE_SPACE_TREE_VALID compat_ro bit.
If the bit isn't set, we know that it was either produced by a broken
big-endian kernel or may have been corrupted by btrfs-progs.

This also provides us with a way to add rudimentary read-write support
for the free space tree to btrfs-progs: it can just clear this bit and
have the kernel rebuild the free space tree.

Cc: stable@vger.kernel.org # 4.5+
Tested-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Tested-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 18:52:14 +02:00
..
acpi
asm-generic Merge branch 'uaccess-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-09-14 09:35:05 -07:00
clocksource
crypto
drm Merge branch 'drm-next-4.8' of git://people.freedesktop.org/~agd5f/linux into drm-next 2016-08-08 16:45:33 +10:00
dt-bindings
keys
kvm KVM/ARM Changes for v4.8 - Take 2 2016-08-04 13:59:56 +02:00
linux fault_in_multipages_readable() throws set-but-unused error 2016-09-25 18:16:44 -07:00
math-emu
media [media] cec: rename cec_devnode fhs_lock to just lock 2016-08-22 13:09:06 -03:00
memory
misc
net Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec 2016-09-22 02:56:23 -04:00
pcmcia
ras
rdma IB/core: Use memdup_user() rather than duplicating its implementation 2016-08-23 12:40:13 -04:00
rxrpc
scsi Merge remote-tracking branch 'mkp-scsi/4.8/scsi-fixes' into fixes 2016-08-19 07:41:12 -07:00
soc
sound
target
trace Luiz Capitulino noticed that the tick_stop tracepoint wasn't being parsed 2016-08-09 10:34:09 -07:00
uapi Btrfs: catch invalid free space trees 2016-10-03 18:52:14 +02:00
video
xen xen: change the type of xen_vcpu_id to uint32_t 2016-08-24 18:17:27 +01:00
Kbuild