Subject: fixed sized disk structures
To: None <tech-kern@netbsd.org>
From: None <eeh@netbsd.org>
List: tech-kern
Date: 02/22/2001 22:27:24
I think we should apply the following changes
so our definitions of on-disk structures do not
depend on sizeof(time_t):
Index: ufs/ffs/fs.h
===================================================================
RCS file: /cvsroot/syssrc/sys/ufs/ffs/fs.h,v
retrieving revision 1.12
diff -u -r1.12 fs.h
--- ufs/ffs/fs.h 1999/11/15 18:49:14 1.12
+++ ufs/ffs/fs.h 2001/02/22 22:10:13
@@ -164,7 +164,7 @@
ufs_daddr_t fs_dblkno; /* offset of first data after cg */
int32_t fs_cgoffset; /* cylinder group offset in cylinder */
int32_t fs_cgmask; /* used to calc mod fs_ntrak */
- time_t fs_time; /* last time written */
+ int32_t fs_time; /* last time written */
int32_t fs_size; /* number of blocks in fs */
int32_t fs_dsize; /* number of data blocks in fs */
int32_t fs_ncg; /* number of cylinder groups */
@@ -229,7 +229,7 @@
int32_t fs_cpc; /* cyl per cycle in postbl */
int16_t fs_opostbl[16][8]; /* old rotation block list head */
int32_t fs_sparecon[49]; /* reserved for future constants */
- time_t fs_fscktime; /* last time fsck(8)ed */
+ int32_t fs_fscktime; /* last time fsck(8)ed */
int32_t fs_contigsumsize; /* size of cluster summary array */
int32_t fs_maxsymlinklen; /* max length of an internal symlink */
int32_t fs_inodefmt; /* format of on-disk inodes */
@@ -327,7 +327,7 @@
struct cg {
int32_t cg_firstfield; /* historic cyl groups linked list */
int32_t cg_magic; /* magic number */
- time_t cg_time; /* time last written */
+ int32_t cg_time; /* time last written */
int32_t cg_cgx; /* we are the cgx'th cylinder group */
int16_t cg_ncyl; /* number of cyl's this cg */
int16_t cg_niblk; /* number of inode blocks this cg */
@@ -392,7 +392,7 @@
struct ocg {
int32_t cg_firstfield; /* historic linked list of cyl groups */
int32_t cg_unused_1; /* used for incore cyl groups */
- time_t cg_time; /* time last written */
+ int32_t cg_time; /* time last written */
int32_t cg_cgx; /* we are the cgx'th cylinder group */
int16_t cg_ncyl; /* number of cyl's this cg */
int16_t cg_niblk; /* number of inode blocks this cg */
Index: ufs/ufs/quota.h
===================================================================
RCS file: /cvsroot/syssrc/sys/ufs/ufs/quota.h,v
retrieving revision 1.8
diff -u -r1.8 quota.h
--- ufs/ufs/quota.h 2000/03/16 18:26:49 1.8
+++ ufs/ufs/quota.h 2001/02/22 22:10:14
@@ -105,8 +105,8 @@
u_int32_t dqb_ihardlimit; /* maximum # allocated inodes + 1 */
u_int32_t dqb_isoftlimit; /* preferred inode limit */
u_int32_t dqb_curinodes; /* current # allocated inodes */
- time_t dqb_btime; /* time limit for excessive disk use */
- time_t dqb_itime; /* time limit for excessive files */
+ int32_t dqb_btime; /* time limit for excessive disk use */
+ int32_t dqb_itime; /* time limit for excessive files */
};
#ifdef _KERNEL
Eduardo