Why do some ufs i-node fields have 2 copies?

Rick Macklem rmacklem at uoguelph.ca
Sun Apr 26 20:49:07 UTC 2009


Hi,

I was just wondering if anyone conversant with ufs/ffs could tell me why
the following fields of the i-node have off-disk and on-disk copies?
(One thought I had was that these fields are sometimes set to values
  that shouldn't get saved on-disk, but it was just a hunch.)
 	/*
 	 * Copies from the on-disk dinode itself.
 	 */
 	u_int16_t i_mode;	/* IFMT, permissions; see below. */
 	int16_t	  i_nlink;	/* File link count. */
 	u_int64_t i_size;	/* File byte count. */
 	u_int32_t i_flags;	/* Status flags (chflags). */
 	int64_t	  i_gen;	/* Generation number. */
 	u_int32_t i_uid;	/* File owner. */
 	u_int32_t i_gid;	/* File group. */
 	/*
 	 * The real copy of the on-disk inode.

Thanks in advance for any info, rick


More information about the freebsd-fs mailing list