Fri Jul 24 06:51:46 2015 UTC ()
ulfs2_dinode, having never actually been used with lfs, doesn't have a
di_inumber field. Fix that. First preliminary step on PR 50000.


(dholland)
diff -r1.162 -r1.163 src/sys/ufs/lfs/lfs.h

cvs diff -r1.162 -r1.163 src/sys/ufs/lfs/lfs.h (expand / switch to unified diff)

--- src/sys/ufs/lfs/lfs.h 2015/05/31 15:44:31 1.162
+++ src/sys/ufs/lfs/lfs.h 2015/07/24 06:51:46 1.163
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: lfs.h,v 1.162 2015/05/31 15:44:31 hannken Exp $ */ 1/* $NetBSD: lfs.h,v 1.163 2015/07/24 06:51:46 dholland Exp $ */
2 2
3/* from NetBSD: dinode.h,v 1.22 2013/01/22 09:39:18 dholland Exp */ 3/* from NetBSD: dinode.h,v 1.22 2013/01/22 09:39:18 dholland Exp */
4/* from NetBSD: dir.h,v 1.21 2009/07/22 04:49:19 dholland Exp */ 4/* from NetBSD: dir.h,v 1.21 2009/07/22 04:49:19 dholland Exp */
5 5
6/*- 6/*-
7 * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc. 7 * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * 9 *
10 * This code is derived from software contributed to The NetBSD Foundation 10 * This code is derived from software contributed to The NetBSD Foundation
11 * by Konrad E. Schroder <perseant@hhhh.org>. 11 * by Konrad E. Schroder <perseant@hhhh.org>.
12 * 12 *
13 * Redistribution and use in source and binary forms, with or without 13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions 14 * modification, are permitted provided that the following conditions
@@ -386,27 +386,28 @@ struct ulfs2_dinode { @@ -386,27 +386,28 @@ struct ulfs2_dinode {
386 int64_t di_birthtime; /* 56: Inode creation time. */ 386 int64_t di_birthtime; /* 56: Inode creation time. */
387 int32_t di_mtimensec; /* 64: Last modified time. */ 387 int32_t di_mtimensec; /* 64: Last modified time. */
388 int32_t di_atimensec; /* 68: Last access time. */ 388 int32_t di_atimensec; /* 68: Last access time. */
389 int32_t di_ctimensec; /* 72: Last inode change time. */ 389 int32_t di_ctimensec; /* 72: Last inode change time. */
390 int32_t di_birthnsec; /* 76: Inode creation time. */ 390 int32_t di_birthnsec; /* 76: Inode creation time. */
391 int32_t di_gen; /* 80: Generation number. */ 391 int32_t di_gen; /* 80: Generation number. */
392 u_int32_t di_kernflags; /* 84: Kernel flags. */ 392 u_int32_t di_kernflags; /* 84: Kernel flags. */
393 u_int32_t di_flags; /* 88: Status flags (chflags). */ 393 u_int32_t di_flags; /* 88: Status flags (chflags). */
394 int32_t di_extsize; /* 92: External attributes block. */ 394 int32_t di_extsize; /* 92: External attributes block. */
395 int64_t di_extb[ULFS_NXADDR];/* 96: External attributes block. */ 395 int64_t di_extb[ULFS_NXADDR];/* 96: External attributes block. */
396 int64_t di_db[ULFS_NDADDR]; /* 112: Direct disk blocks. */ 396 int64_t di_db[ULFS_NDADDR]; /* 112: Direct disk blocks. */
397 int64_t di_ib[ULFS_NIADDR]; /* 208: Indirect disk blocks. */ 397 int64_t di_ib[ULFS_NIADDR]; /* 208: Indirect disk blocks. */
398 u_int64_t di_modrev; /* 232: i_modrev for NFSv4 */ 398 u_int64_t di_modrev; /* 232: i_modrev for NFSv4 */
399 int64_t di_spare[2]; /* 240: Reserved; currently unused */ 399 u_int32_t di_inumber; /* 240: Inode number */
 400 u_int32_t di_spare[3]; /* 244: Reserved; currently unused */
400}; 401};
401 402
402/* 403/*
403 * The di_db fields may be overlaid with other information for 404 * The di_db fields may be overlaid with other information for
404 * file types that do not have associated disk storage. Block 405 * file types that do not have associated disk storage. Block
405 * and character devices overlay the first data block with their 406 * and character devices overlay the first data block with their
406 * dev_t value. Short symbolic links place their path in the 407 * dev_t value. Short symbolic links place their path in the
407 * di_db area. 408 * di_db area.
408 */ 409 */
409#define di_rdev di_db[0] 410#define di_rdev di_db[0]
410 411
411/* Size of the on-disk inode. */ 412/* Size of the on-disk inode. */
412#define LFS_DINODE1_SIZE (sizeof(struct ulfs1_dinode)) /* 128 */ 413#define LFS_DINODE1_SIZE (sizeof(struct ulfs1_dinode)) /* 128 */