[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
kernel/1548: Cannot set arbitrary atime/mtime on ext2fs volume (fwd)
- To: gnats@openbsd.org
- Subject: kernel/1548: Cannot set arbitrary atime/mtime on ext2fs volume (fwd)
- From: Gene Hsu <genehsu@speakeasy.org>
- Date: Fri, 8 Dec 2000 00:17:33 -0800 (PST)
- Resent-Date: Fri, 8 Dec 2000 01:20:01 -0700 (MST)
- Resent-From: gnats@cvs.openbsd.org (GNATS Management)
- Resent-Message-Id: <200012080820.eB88K1c15504@cvs.openbsd.org>
- Resent-Reply-To: gnats@cvs.openbsd.org,Received: "from openbsd.cs.colorado.edu (openbsd.cs.colorado.edu [128.138.192.83]) by cvs.openbsd.org (8.10.1/8.10.1) with ESMTP id eB88Ggb07284 for" <gnats@cvs.openbsd.org>;,Fri@naughty.monkey.org, 8@naughty.monkey.org, Dec@naughty.monkey.org,2000@naughty.monkey.org, 01:16:43.-0700@cvs.openbsd.org (MST)
- Resent-Sender: owner-bugs@openbsd.org
- Resent-To: bugs@cvs.openbsd.org
>Number: 1548
>Category: kernel
>Synopsis: Cannot set arbitrary atime/mtime on ext2fs volume
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bugs
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Fri Dec 8 01:20:01 MST 2000
>Last-Modified:
>Originator: Gene Hsu
>Organization:
Dis
net
>Release: OPENBSD_2_8
>Environment:
System : OpenBSD 2.8
Architecture: OpenBSD.i386
Machine : i386
>Description:
When trying to set atime/mtime on inodes on a ext2fs volume,
the time that gets set is the current time. This does not happen on
a ffs volume.
>How-To-Repeat:
rsync -avP <somedir> <dir on ext2fs>
The sync'ed dir will all have the current time the file was
transferred instead of the time that was specified in the
original file. (time updates work on ffs volume)
touch -r <somefile> <file on ext2fs>
The touched file will now have the current time as atime/mtime.
Works as advertised if the file is on a ffs volume.
perl -e 'utime time-100000,time-100000,<file on ext2fs>'
The touched file will now have the current time as atime/mtime.
Works as advertised if the file is on a ffs volume.
>Fix:
I suspect the problem can be found in the ext2fs_update
function of sys/ufs/ext2fs/ext2fs_inode.c . My eyes wander to line
144: (ext2fs_inode.c v1.9)
141: if (ap->a_vp->v_mount->mnt_flag & MNT_RDONLY)
142: return (0);
143: ip = VTOI(ap->a_vp);
144: EXT2FS_ITIMES(ip, &time, &time);
145: if ((ip->i_flag & IN_MODIFIED) == 0)
146: return (0);
147: ip->i_flag &= ~IN_MODIFIED;
148: fs = ip->i_e2fs;
probably change (ip, &time, &time)
to something like (ip, ap->a_access, ap->a_modify)
is my guess.
Or I could be totally off-base, and it could be something completely
different and may not be reproducible on anyone else's machine.
-- Gene
>Audit-Trail:
>Unformatted:
---------- Forwarded message ----------
Date: Fri, 8 Dec 2000 00:04:13 -0800 (PST)
From: "genehsu@speakeasy.org" <genehsu@speakeasy.org>
To: "gnats@openbsd.org" <gnats@openbsd.org>
Cc: "genehsu@speakeasy.org" <genehsu@speakeasy.org>
Subject: Cannot set arbitrary atime/mtime on ext2fs volume