diff options
author | jb <jb@FreeBSD.org> | 2007-11-28 22:16:00 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 2007-11-28 22:16:00 +0000 |
commit | 22ebcc078a4fb976178e2d0eea4c0d1387d8ccf6 (patch) | |
tree | 73612d86f736695a0dc3ddd3a907d8421ebea87e /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c | |
parent | 22720aa033d3ec0fd7c4f18b36b27fad2b50c056 (diff) | |
download | FreeBSD-src-22ebcc078a4fb976178e2d0eea4c0d1387d8ccf6.zip FreeBSD-src-22ebcc078a4fb976178e2d0eea4c0d1387d8ccf6.tar.gz |
* Check endianness the FreeBSD way.
* Use LBOLT rather than lbolt to avoid a clash with a FreeBSD global
variable.
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c index b4fb960..4e419b6 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c @@ -128,7 +128,7 @@ vdev_cache_evict(vdev_cache_t *vc, vdev_cache_entry_t *ve) ASSERT(ve->ve_data != NULL); dprintf("evicting %p, off %llx, LRU %llu, age %lu, hits %u, stale %u\n", - vc, ve->ve_offset, ve->ve_lastused, lbolt - ve->ve_lastused, + vc, ve->ve_offset, ve->ve_lastused, LBOLT - ve->ve_lastused, ve->ve_hits, ve->ve_missed_update); avl_remove(&vc->vc_lastused_tree, ve); @@ -171,7 +171,7 @@ vdev_cache_allocate(zio_t *zio) ve = kmem_zalloc(sizeof (vdev_cache_entry_t), KM_SLEEP); ve->ve_offset = offset; - ve->ve_lastused = lbolt; + ve->ve_lastused = LBOLT; ve->ve_data = zio_buf_alloc(VCBS); avl_add(&vc->vc_offset_tree, ve); @@ -188,9 +188,9 @@ vdev_cache_hit(vdev_cache_t *vc, vdev_cache_entry_t *ve, zio_t *zio) ASSERT(MUTEX_HELD(&vc->vc_lock)); ASSERT(ve->ve_fill_io == NULL); - if (ve->ve_lastused != lbolt) { + if (ve->ve_lastused != LBOLT) { avl_remove(&vc->vc_lastused_tree, ve); - ve->ve_lastused = lbolt; + ve->ve_lastused = LBOLT; avl_add(&vc->vc_lastused_tree, ve); } |