* [OT] util-linux 2.12p and a new maintainer
@ 2004-12-23 3:02 Andries.Brouwer
2004-12-23 17:02 ` [PATCH] Fix /etc/mtab updating with mount --move (was Re: [OT] util-linux 2.12p and a new maintainer) Bill Rugolsky Jr.
0 siblings, 1 reply; 2+ messages in thread
From: Andries.Brouwer @ 2004-12-23 3:02 UTC (permalink / raw)
To: linux-kernel
Just released util-linux 2.12p.
Find it the usual places, such as
ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux
I am happy to announce that Adrian Bunk is willing to
take over maintenance of util-linux.
Andries
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] Fix /etc/mtab updating with mount --move (was Re: [OT] util-linux 2.12p and a new maintainer)
2004-12-23 3:02 [OT] util-linux 2.12p and a new maintainer Andries.Brouwer
@ 2004-12-23 17:02 ` Bill Rugolsky Jr.
0 siblings, 0 replies; 2+ messages in thread
From: Bill Rugolsky Jr. @ 2004-12-23 17:02 UTC (permalink / raw)
To: Andries.Brouwer; +Cc: Adrian Bunk, linux-kernel
On Thu, Dec 23, 2004 at 04:02:40AM +0100, Andries.Brouwer@cwi.nl wrote:
> Just released util-linux 2.12p.
> Find it the usual places, such as
> ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux
>
> I am happy to announce that Adrian Bunk is willing to
> take over maintenance of util-linux.
Andries & Adrian,
Back in February I had sent the patch at the following URL against
util-linux-2.12pre to util-linux@math.uoi.no, but it was never applied.
[Perhaps it was never received.]
http://groups-beta.google.com/group/linux.kernel/browse_frm/thread/2ab78ad70d79508c/de0cfbb377bc6a94?q=insubject:Fix+insubject:%2Fetc%2Fmtab+insubject:updating+insubject:with+insubject:mount
The executive summary is that the sequence
mkdir /tmp/a /tmp/b
mount -t ramfs none /tmp/a
mount --move /tmp/a /tmp/b
has the intended effect (according to /proc/mounts),
but corrupts /etc/mtab, which looks like:
none /tmp/a ramfs rw 0 0
/tmp/a /tmp/b none rw 0 0
i.e., as if we'd done --bind instead of --move.
The correct entry should be:
none /tmp/b ramfs rw 0 0
The bug is still in 2.12p; a rediffed patch is appended.
Sorry for not following up earlier.
Regards,
Bill Rugolsky
--- util-linux-2.12p/mount/fstab.c.mountmove 2004-12-21 14:09:24.000000000 -0500
+++ util-linux-2.12p/mount/fstab.c 2004-12-23 11:20:52.726564776 -0500
@@ -604,8 +604,12 @@
free(mc);
}
} else {
- /* A remount */
+ /* A remount or move */
mc->m.mnt_opts = instead->mnt_opts;
+ if (!streq(mc->m.mnt_dir, instead->mnt_dir)) {
+ free(mc->m.mnt_dir);
+ mc->m.mnt_dir = xstrdup(instead->mnt_dir);
+ }
}
} else if (instead) {
/* not found, add a new entry */
--- util-linux-2.12p/mount/mount.c.mountmove 2004-12-21 17:00:36.000000000 -0500
+++ util-linux-2.12p/mount/mount.c 2004-12-23 11:20:52.729564320 -0500
@@ -660,7 +660,9 @@
print_one (&mnt);
if (!nomtab && mtab_is_writable()) {
- if (flags & MS_REMOUNT)
+ if (flags & MS_MOVE)
+ update_mtab (mnt.mnt_fsname, &mnt);
+ else if (flags & MS_REMOUNT)
update_mtab (mnt.mnt_dir, &mnt);
else {
mntFILE *mfp;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-12-23 17:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-23 3:02 [OT] util-linux 2.12p and a new maintainer Andries.Brouwer
2004-12-23 17:02 ` [PATCH] Fix /etc/mtab updating with mount --move (was Re: [OT] util-linux 2.12p and a new maintainer) Bill Rugolsky Jr.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).