Cleanups to reduce symbol and header exposure:
- move struct ufid from ulfs_inode.h to lfs.h - lfs.h needs sys/mount.h and sys/pool.h - ulfs_quota2_subr.c needs lfs_inode.h - remove ulfs_inode.h from lfs.h in favor of ulfs_dinode.h - move ULFS_NDADDR, ULFS_NIADDR, ULFS_NXADDR from ulfs_dinode.h to lfs.h - remove ulfs_dinode.h from lfs.h - add lfs.h to ulfs_dinode.h
This commit is contained in:
parent
eac0bd5b42
commit
f5b4660876
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lfs.h,v 1.139 2013/06/06 00:51:25 dholland Exp $ */
|
||||
/* $NetBSD: lfs.h,v 1.140 2013/06/06 00:51:50 dholland Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -66,9 +66,8 @@
|
|||
#include <sys/mutex.h>
|
||||
#include <sys/queue.h>
|
||||
#include <sys/condvar.h>
|
||||
|
||||
/* XXX this should not be exposed */
|
||||
#include <ufs/lfs/ulfs_inode.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/pool.h>
|
||||
|
||||
/*
|
||||
* Compile-time options for LFS.
|
||||
|
@ -96,7 +95,13 @@
|
|||
|
||||
#define LFS_MAXNAMLEN 255 /* maximum name length in a dir */
|
||||
|
||||
/* Adjustable filesystem parameters */
|
||||
#define ULFS_NXADDR 2
|
||||
#define ULFS_NDADDR 12 /* Direct addresses in inode. */
|
||||
#define ULFS_NIADDR 3 /* Indirect addresses in inode. */
|
||||
|
||||
/*
|
||||
* Adjustable filesystem parameters
|
||||
*/
|
||||
#define MIN_FREE_SEGS 20
|
||||
#define MIN_RESV_SEGS 15
|
||||
#ifndef LFS_ATIME_IFILE
|
||||
|
@ -291,6 +296,13 @@ extern struct lfs_log_entry lfs_log[LFS_LOGLENGTH];
|
|||
#endif /* _KERNEL */
|
||||
|
||||
#ifdef _KERNEL
|
||||
/* This overlays the fid structure (see fstypes.h). */
|
||||
struct ufid {
|
||||
u_int16_t ufid_len; /* Length of structure. */
|
||||
u_int16_t ufid_pad; /* Force 32-bit alignment. */
|
||||
u_int32_t ufid_ino; /* File number (ino). */
|
||||
int32_t ufid_gen; /* Generation number. */
|
||||
};
|
||||
/* Filehandle structure for exported LFSes */
|
||||
struct lfid {
|
||||
struct ufid lfid_ufid;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ulfs_dinode.h,v 1.2 2013/06/06 00:48:04 dholland Exp $ */
|
||||
/* $NetBSD: ulfs_dinode.h,v 1.3 2013/06/06 00:51:50 dholland Exp $ */
|
||||
/* from NetBSD: dinode.h,v 1.22 2013/01/22 09:39:18 dholland Exp */
|
||||
|
||||
/*
|
||||
|
@ -53,6 +53,8 @@
|
|||
#ifndef _UFS_LFS_ULFS_DINODE_H_
|
||||
#define _UFS_LFS_ULFS_DINODE_H_
|
||||
|
||||
#include <ufs/lfs/lfs.h>
|
||||
|
||||
/*
|
||||
* The root inode is the root of the file system. Inode 0 can't be used for
|
||||
* normal purposes and historically bad blocks were linked to inode 1, thus
|
||||
|
@ -76,10 +78,6 @@
|
|||
* are defined by types with precise widths.
|
||||
*/
|
||||
|
||||
#define ULFS_NXADDR 2
|
||||
#define ULFS_NDADDR 12 /* Direct addresses in inode. */
|
||||
#define ULFS_NIADDR 3 /* Indirect addresses in inode. */
|
||||
|
||||
struct ulfs1_dinode {
|
||||
u_int16_t di_mode; /* 0: IFMT, permissions; see below. */
|
||||
int16_t di_nlink; /* 2: File link count. */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ulfs_inode.h,v 1.4 2013/06/06 00:51:25 dholland Exp $ */
|
||||
/* $NetBSD: ulfs_inode.h,v 1.5 2013/06/06 00:51:50 dholland Exp $ */
|
||||
/* from NetBSD: inode.h,v 1.64 2012/11/19 00:36:21 jakllsch Exp */
|
||||
|
||||
/*
|
||||
|
@ -243,13 +243,6 @@ struct indir {
|
|||
#define VTOI(vp) ((struct inode *)(vp)->v_data)
|
||||
#define ITOV(ip) ((ip)->i_vnode)
|
||||
|
||||
/* This overlays the fid structure (see fstypes.h). */
|
||||
struct ufid {
|
||||
u_int16_t ufid_len; /* Length of structure. */
|
||||
u_int16_t ufid_pad; /* Force 32-bit alignment. */
|
||||
u_int32_t ufid_ino; /* File number (ino). */
|
||||
int32_t ufid_gen; /* Generation number. */
|
||||
};
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_UFS_LFS_ULFS_INODE_H_ */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ulfs_quota2_subr.c,v 1.5 2013/06/06 00:51:25 dholland Exp $ */
|
||||
/* $NetBSD: ulfs_quota2_subr.c,v 1.6 2013/06/06 00:51:50 dholland Exp $ */
|
||||
/* from NetBSD: quota2_subr.c,v 1.5 2012/02/05 14:19:04 dholland Exp */
|
||||
|
||||
/*-
|
||||
|
@ -28,14 +28,15 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ulfs_quota2_subr.c,v 1.5 2013/06/06 00:51:25 dholland Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ulfs_quota2_subr.c,v 1.6 2013/06/06 00:51:50 dholland Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <ufs/lfs/ulfs_dinode.h>
|
||||
#include <ufs/lfs/lfs.h>
|
||||
#include <ufs/lfs/lfs_extern.h>
|
||||
#include <ufs/lfs/ulfs_inode.h>
|
||||
#include <ufs/lfs/ulfs_dinode.h>
|
||||
#include <ufs/lfs/ulfs_bswap.h>
|
||||
#include <ufs/lfs/ulfs_quota2.h>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ulfs_vfsops.c,v 1.5 2013/06/06 00:49:28 dholland Exp $ */
|
||||
/* $NetBSD: ulfs_vfsops.c,v 1.6 2013/06/06 00:51:50 dholland Exp $ */
|
||||
/* from NetBSD: ufs_vfsops.c,v 1.52 2013/01/22 09:39:18 dholland Exp */
|
||||
|
||||
/*
|
||||
|
@ -38,7 +38,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ulfs_vfsops.c,v 1.5 2013/06/06 00:49:28 dholland Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ulfs_vfsops.c,v 1.6 2013/06/06 00:51:50 dholland Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_lfs.h"
|
||||
|
@ -53,10 +53,11 @@ __KERNEL_RCSID(0, "$NetBSD: ulfs_vfsops.c,v 1.5 2013/06/06 00:49:28 dholland Exp
|
|||
#include <sys/vnode.h>
|
||||
#include <sys/kmem.h>
|
||||
#include <sys/kauth.h>
|
||||
#include <sys/quotactl.h>
|
||||
|
||||
#include <miscfs/specfs/specdev.h>
|
||||
|
||||
#include <sys/quotactl.h>
|
||||
#include <ufs/lfs/lfs.h>
|
||||
#include <ufs/lfs/ulfs_quotacommon.h>
|
||||
#include <ufs/lfs/ulfs_inode.h>
|
||||
#include <ufs/lfs/ulfsmount.h>
|
||||
|
|
Loading…
Reference in New Issue