summaryrefslogtreecommitdiff
path: root/sys/ufs/ffs
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>2004-06-21 23:50:39 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>2004-06-21 23:50:39 +0000
commitee05a750df8c3f9f5d686affb4df7e316507797a (patch)
tree887af571215b85d480946bb169aafa0605c786db /sys/ufs/ffs
parente84c5b85eb5d0fc9af7eb3cdcc77a22eb07dec74 (diff)
First step towards more sane time handling in the kernel -- this changes
things such that code that only need a second-resolution uptime or wall time, and used to get that from time.tv_secs or mono_time.tv_secs now get this from separate time_t globals time_second and time_uptime. ok art@ niklas@ nordin@
Diffstat (limited to 'sys/ufs/ffs')
-rw-r--r--sys/ufs/ffs/ffs_alloc.c12
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c4
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c
index c41fbb14235..2a43bc7cc07 100644
--- a/sys/ufs/ffs/ffs_alloc.c
+++ b/sys/ufs/ffs/ffs_alloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_alloc.c,v 1.46 2004/01/20 03:44:06 tedu Exp $ */
+/* $OpenBSD: ffs_alloc.c,v 1.47 2004/06/21 23:50:38 tholo Exp $ */
/* $NetBSD: ffs_alloc.c,v 1.11 1996/05/11 18:27:09 mycroft Exp $ */
/*
@@ -941,7 +941,7 @@ ffs_fragextend(ip, cg, bprev, osize, nsize)
brelse(bp);
return (0);
}
- cgp->cg_time = time.tv_sec;
+ cgp->cg_time = time_second;
bno = dtogd(fs, bprev);
for (i = numfrags(fs, osize); i < frags; i++)
if (isclr(cg_blksfree(cgp), bno + i)) {
@@ -1008,7 +1008,7 @@ ffs_alloccg(ip, cg, bpref, size)
brelse(bp);
return (0);
}
- cgp->cg_time = time.tv_sec;
+ cgp->cg_time = time_second;
if (size == fs->fs_bsize) {
bno = ffs_alloccgblk(ip, bp, bpref);
bdwrite(bp);
@@ -1339,7 +1339,7 @@ ffs_nodealloccg(ip, cg, ipref, mode)
brelse(bp);
return (0);
}
- cgp->cg_time = time.tv_sec;
+ cgp->cg_time = time_second;
if (ipref) {
ipref %= fs->fs_ipg;
if (isclr(cg_inosused(cgp), ipref))
@@ -1432,7 +1432,7 @@ ffs_blkfree(ip, bno, size)
brelse(bp);
return;
}
- cgp->cg_time = time.tv_sec;
+ cgp->cg_time = time_second;
bno = dtogd(fs, bno);
if (size == fs->fs_bsize) {
blkno = fragstoblks(fs, bno);
@@ -1538,7 +1538,7 @@ ffs_freefile(struct inode *pip, ino_t ino, int mode)
brelse(bp);
return (0);
}
- cgp->cg_time = time.tv_sec;
+ cgp->cg_time = time_second;
ino %= fs->fs_ipg;
if (isclr(cg_inosused(cgp), ino)) {
printf("dev = 0x%x, ino = %d, fs = %s\n",
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index ead5f75652f..bd80d00dc65 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_vfsops.c,v 1.65 2004/06/04 08:06:05 tedu Exp $ */
+/* $OpenBSD: ffs_vfsops.c,v 1.66 2004/06/21 23:50:38 tholo Exp $ */
/* $NetBSD: ffs_vfsops.c,v 1.19 1996/02/09 22:22:26 christos Exp $ */
/*
@@ -1340,7 +1340,7 @@ ffs_sbupdate(mp, waitfor)
bp = getblk(mp->um_devvp, SBOFF >> (fs->fs_fshift - fs->fs_fsbtodb),
(int)fs->fs_sbsize, 0, 0);
fs->fs_fmod = 0;
- fs->fs_time = time.tv_sec;
+ fs->fs_time = time_second;
bcopy((caddr_t)fs, bp->b_data, (u_int)fs->fs_sbsize);
/* Restore compatibility to old file systems. XXX */
dfs = (struct fs *)bp->b_data; /* XXX */