-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When mountall is iterating in try_mounts() on new mount point, change is_parent() to return false when a record is tested against itself because a mount point cannot be a root of itself. Mountall does not preserve the behavior of `mount -a` if more than one device shares a mountpoint in the /etc/fstab file. Suppose: /var/tmp/alfa /mnt/charlie ext2 loop 0 0 /var/tmp/bravo /mnt/charlie ext2 loop 0 0 Both filesystems are mounted on /mnt/charlie by `mount -a`, but bravo is ignored by `mountall`. This seems to be an artifact of the fix for LP #443035 in eca315d. Furthermore, mountall hangs if such mounts are ZFS datasets or other virtual filesystems that are not backed by a real device node. Supercedes: solves-dependencies-problem-endless-loop.patch Closes: #5 for Quantal
- Loading branch information
Showing
5 changed files
with
57 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 0 additions & 36 deletions
36
debian/patches/0003-solves-dependencies-problem-endless-loop.patch
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
From: Darik Horn <[email protected]> | ||
Date: Fri, 27 Mar 2013 22:29:47 -0600 | ||
Subject: Handle duplicate mountpoints. | ||
|
||
When mountall is iterating in try_mounts() on new mount point, change | ||
is_parent() to return false when a record is tested against itself | ||
because a mount point cannot be a root of itself. | ||
|
||
Mountall does not preserve the behavior of `mount -a` if more than | ||
one device shares a mountpoint in the /etc/fstab file. Suppose: | ||
|
||
/var/tmp/alfa /mnt/charlie ext2 loop 0 0 | ||
/var/tmp/bravo /mnt/charlie ext2 loop 0 0 | ||
|
||
Both filesystems are mounted on /mnt/charlie by `mount -a`, but | ||
bravo is ignored by `mountall`. This seems to be an artifact of the fix for | ||
LP ##443035 in zfsonlinux/mountall@eca315d06ae4a2913f9b2ec994c68c45fead912f. | ||
|
||
Furthermore, mountall hangs if such mounts are ZFS datasets or other | ||
virtual filesystems that are not backed by a real device node. | ||
|
||
Closes: zfsonlinux/mountall#5 | ||
--- | ||
|
||
Index: b/src/mountall.c | ||
=================================================================== | ||
--- a/src/mountall.c | ||
+++ b/src/mountall.c | ||
@@ -146,6 +146,7 @@ | ||
}; | ||
|
||
#define MOUNT_NAME(_mnt) (strcmp ((_mnt)->type, "swap") \ | ||
+ && strcmp ((_mnt)->type, "zfs") \ | ||
&& strcmp ((_mnt)->mountpoint, "none") \ | ||
? (_mnt)->mountpoint : (_mnt)->device) | ||
|
||
@@ -1133,9 +1134,7 @@ | ||
|
||
len = strlen (root); | ||
if ((! strncmp (path, root, len)) | ||
- && ((path[len] == '\0') | ||
- || (path[len] == '/') | ||
- || (len && path[len-1] == '/'))) | ||
+ && ((path[len] == '/') || (len && path[len-1] == '/'))) | ||
return TRUE; | ||
|
||
return FALSE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
0001-Add-ZFS-support.patch | ||
0002-Disregard-the-mounted-dataset-property.patch | ||
0003-solves-dependencies-problem-endless-loop.patch | ||
0004-readonly-and-atime-options-reflected-during-mount.patch | ||
0005-no-filesystem-should-depend-on-mounting-swap-first.patch | ||
0003-readonly-and-atime-options-reflected-during-mount.patch | ||
0004-no-filesystem-should-depend-on-mounting-swap-first.patch | ||
0005-Handle-duplicate-mountpoints.patch |