Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/ext2fs/inode.h
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | |||||
#define EXT2_NIADDR 3 /* Indirect addresses in inode. */ | #define EXT2_NIADDR 3 /* Indirect addresses in inode. */ | ||||
/* | /* | ||||
* The size of physical and logical block numbers in EXT2FS. | * The size of physical and logical block numbers in EXT2FS. | ||||
*/ | */ | ||||
typedef uint32_t e2fs_daddr_t; | typedef uint32_t e2fs_daddr_t; | ||||
typedef int64_t e2fs_lbn_t; | typedef int64_t e2fs_lbn_t; | ||||
typedef int64_t e4fs_daddr_t; | typedef int64_t e4fs_daddr_t; | ||||
typedef int64_t ext_time_t; | |||||
/* | /* | ||||
* The inode is used to describe each active (or recently active) file in the | * The inode is used to describe each active (or recently active) file in the | ||||
* EXT2FS filesystem. It is composed of two types of information. The first | * EXT2FS filesystem. It is composed of two types of information. The first | ||||
* part is the information that is needed only while the file is active (such | * part is the information that is needed only while the file is active (such | ||||
* as the identity of the file and linkage to speed its lookup). The second | * as the identity of the file and linkage to speed its lookup). The second | ||||
* part is the permanent meta-data associated with the file which is read in | * part is the permanent meta-data associated with the file which is read in | ||||
* from the permanent dinode from long term storage when the file becomes | * from the permanent dinode from long term storage when the file becomes | ||||
Show All 21 Lines | struct inode { | ||||
/* Fields from struct dinode in UFS. */ | /* Fields from struct dinode in UFS. */ | ||||
uint16_t i_mode; /* IFMT, permissions; see below. */ | uint16_t i_mode; /* IFMT, permissions; see below. */ | ||||
int32_t i_nlink; /* File link count. */ | int32_t i_nlink; /* File link count. */ | ||||
uint32_t i_uid; /* File owner. */ | uint32_t i_uid; /* File owner. */ | ||||
uint32_t i_gid; /* File group. */ | uint32_t i_gid; /* File group. */ | ||||
uint64_t i_size; /* File byte count. */ | uint64_t i_size; /* File byte count. */ | ||||
uint64_t i_blocks; /* Blocks actually held. */ | uint64_t i_blocks; /* Blocks actually held. */ | ||||
int32_t i_atime; /* Last access time. */ | ext_time_t i_atime; /* Last access time. */ | ||||
int32_t i_mtime; /* Last modified time. */ | ext_time_t i_mtime; /* Last modified time. */ | ||||
int32_t i_ctime; /* Last inode change time. */ | ext_time_t i_ctime; /* Last inode change time. */ | ||||
int32_t i_birthtime; /* Inode creation time. */ | ext_time_t i_birthtime; /* Inode creation time. */ | ||||
pfg: These changes are wrong. Long discussion with bde@ showed we should not diverge from UFS here… | |||||
Done Inline ActionsI think we not diverge from ufs so mach, you can check struct ufs2_dinode and ufs_time_t typedef, where ufs_time_t is int64_t. fsu: I think we not diverge from ufs so mach, you can check struct ufs2_dinode and ufs_time_t… | |||||
Not Done Inline ActionsI see: I was looking at ufs1_dinode while you are using ufs2_dinode. pfg: I see: I was looking at ufs1_dinode while you are using ufs2_dinode.
last time I looked at… | |||||
int32_t i_mtimensec; /* Last modified time. */ | int32_t i_mtimensec; /* Last modified time. */ | ||||
int32_t i_atimensec; /* Last access time. */ | int32_t i_atimensec; /* Last access time. */ | ||||
int32_t i_ctimensec; /* Last inode change time. */ | int32_t i_ctimensec; /* Last inode change time. */ | ||||
int32_t i_birthnsec; /* Inode creation time. */ | int32_t i_birthnsec; /* Inode creation time. */ | ||||
uint32_t i_gen; /* Generation number. */ | uint32_t i_gen; /* Generation number. */ | ||||
uint64_t i_facl; /* EA block number. */ | uint64_t i_facl; /* EA block number. */ | ||||
uint32_t i_flags; /* Status flags (chflags). */ | uint32_t i_flags; /* Status flags (chflags). */ | ||||
dev_t i_rdev; /* Major/minor inode values. */ | dev_t i_rdev; /* Major/minor inode values. */ | ||||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |
These changes are wrong. Long discussion with bde@ showed we should not diverge from UFS here and the kernel won't handle anything different different than int32_t.