OpenCloudOS-Kernel/include
Nikolay Borisov 7239ff4b2b btrfs: Introduce support for FSID change without metadata rewrite
This field is going to be used when the user wants to change the UUID
of the filesystem without having to rewrite all metadata blocks. This
field adds another level of indirection such that when the FSID is
changed what really happens is the current UUID (the one with which the
fs was created) is copied to the 'metadata_uuid' field in the superblock
as well as a new incompat flag is set METADATA_UUID. When the kernel
detects this flag is set it knows that the superblock in fact has 2
UUIDs:

1. Is the UUID which is user-visible, currently known as FSID.
2. Metadata UUID - this is the UUID which is stamped into all on-disk
   datastructures belonging to this file system.

When the new incompat flag is present device scanning checks whether
both fsid/metadata_uuid of the scanned device match any of the
registered filesystems. When the flag is not set then both UUIDs are
equal and only the FSID is retained on disk, metadata_uuid is set only
in-memory during mount.

Additionally a new metadata_uuid field is also added to the fs_info
struct. It's initialised either with the FSID in case METADATA_UUID
incompat flag is not set or with the metdata_uuid of the superblock
otherwise.

This commit introduces the new fields as well as the new incompat flag
and switches all users of the fsid to the new logic.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ minor updates in comments ]
Signed-off-by: David Sterba <dsterba@suse.com>
2018-12-17 14:51:37 +01:00
..
acpi pci-v4.20-changes 2018-10-25 06:50:48 -07:00
asm-generic mm: introduce common STRUCT_PAGE_MAX_SHIFT define 2018-12-14 15:05:45 -08:00
clocksource
crypto KEYS: asym_tpm: extract key size & public key [ver #2] 2018-10-26 09:30:46 +01:00
drm drm, i915, amdgpu, bridge + core quirk 2018-11-02 10:58:20 -07:00
dt-bindings This time it looks like a quieter release cycle in the clk tree. I guess that's 2018-10-31 11:08:30 -07:00
keys KEYS: Move trusted.h to include/keys [ver #2] 2018-10-26 09:30:47 +01:00
kvm
linux mm/sparse: add common helper to mark all memblocks present 2018-12-14 15:05:45 -08:00
math-emu
media media: mpeg2-ctrls.h: move MPEG2 state controls to non-public header 2018-12-05 13:06:31 -05:00
memory
misc
net neighbour: Avoid writing before skb->head in neigh_hh_output() 2018-12-07 16:24:40 -08:00
pcmcia
ras
rdma First merge window pull request 2018-10-26 07:38:19 -07:00
scsi
soc ARM: SoC driver updates for 4.17 2018-10-29 15:16:01 -07:00
sound ALSA: pcm: Fix interval evaluation with openmin/max 2018-11-29 12:05:19 +01:00
target scsi: target/core: Remove the SCF_COMPARE_AND_WRITE_POST flag 2018-10-16 01:13:35 -04:00
trace While rewriting the function graph tracer, I discovered a design flaw that 2018-11-30 09:32:34 -08:00
uapi btrfs: Introduce support for FSID change without metadata rewrite 2018-12-17 14:51:37 +01:00
video
xen Revert "xen/balloon: Mark unallocated host memory as UNUSABLE" 2018-11-29 17:53:31 +01:00