mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	initramfs: Fix legacy mountpoint rootfs
Legacy mountpoint datasets should not pass `-o zfsutil` to `mount.zfs`.
Fix the logic in `mount_fs()` to not forget we have a legacy mountpoint
when checking for an `org.zol:mountpoint` userprop.
Reviewed-by: Richard Yao <ryao@gentoo.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #14274
(cherry picked from commit 786ff6a6cb)
			
			
This commit is contained in:
		
							parent
							
								
									4767037bcf
								
							
						
					
					
						commit
						f28c7302cb
					
				| @ -331,25 +331,21 @@ mount_fs() | |||||||
| 		# Can't use the mountpoint property. Might be one of our | 		# Can't use the mountpoint property. Might be one of our | ||||||
| 		# clones. Check the 'org.zol:mountpoint' property set in | 		# clones. Check the 'org.zol:mountpoint' property set in | ||||||
| 		# clone_snap() if that's usable. | 		# clone_snap() if that's usable. | ||||||
| 		mountpoint=$(get_fs_value "$fs" org.zol:mountpoint) | 		mountpoint1=$(get_fs_value "$fs" org.zol:mountpoint) | ||||||
| 		if [ "$mountpoint" = "legacy" ] || | 		if [ "$mountpoint1" = "legacy" ] || | ||||||
| 		   [ "$mountpoint" = "none" ] || | 		   [ "$mountpoint1" = "none" ] || | ||||||
| 		   [ "$mountpoint" = "-" ] | 		   [ "$mountpoint1" = "-" ] | ||||||
| 		then | 		then | ||||||
| 			if [ "$fs" != "${ZFS_BOOTFS}" ]; then | 			if [ "$fs" != "${ZFS_BOOTFS}" ]; then | ||||||
| 				# We don't have a proper mountpoint and this | 				# We don't have a proper mountpoint and this | ||||||
| 				# isn't the root fs. | 				# isn't the root fs. | ||||||
| 				return 0 | 				return 0 | ||||||
| 			else | 			fi | ||||||
|  | 			ZFS_CMD="mount.zfs" | ||||||
| 			# Last hail-mary: Hope 'rootmnt' is set! | 			# Last hail-mary: Hope 'rootmnt' is set! | ||||||
| 			mountpoint="" | 			mountpoint="" | ||||||
| 			fi | 		else | ||||||
| 		fi | 			mountpoint="$mountpoint1" | ||||||
| 
 |  | ||||||
| 		# If it's not a legacy filesystem, it can only be a |  | ||||||
| 		# native one... |  | ||||||
| 		if [ "$mountpoint" = "legacy" ]; then |  | ||||||
| 			ZFS_CMD="mount.zfs" |  | ||||||
| 		fi | 		fi | ||||||
| 	fi | 	fi | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Ryan Moeller
						Ryan Moeller