Support mounting same mount points with different fstab config
This commits allows multiple lines in a fstab have the same mount point for first-stage mount, where the first successful mount will be used. This allows us to specify a common/shared fstab, with different settings (e.g., ext4, squashfs) per line, to mount different types of images on the same mount point. e.g., allows the device to mount GSI (ext4) while support mounting the original squashfs system.img. Sample fstab: fstab in dt: android { fstab { odm_ext4 { dev = "/dev/block/by-name/odm"; mnt_point = "/odm"; type = ext4; mnt_flags = "ro"; fs_mgr_flags = "slotselect"; }; odm_f2fs { dev = "/dev/block/by-name/odm"; mnt_point = "/odm"; type = f2fs; mnt_flags = "ro"; fs_mgr_flags = "slotselect"; }; }; } fstab in file: /dev/block/by-name/odm /odm ext4 ro slotselect /dev/block/by-name/odm /odm f2fs ro slotselect Test: make & boot & check /proc/mounts Change-Id: I64892e3007b0cfd7d06dad1cfc664c45305197ee
Loading
Please register or sign in to comment