ffs_extern.h revision 1.1
11.1Slukem/* $NetBSD: ffs_extern.h,v 1.1 2001/10/26 06:21:48 lukem Exp $ */ 21.1Slukem/* From: NetBSD: ffs_extern.h,v 1.19 2001/08/17 02:18:48 lukem Exp */ 31.1Slukem 41.1Slukem/*- 51.1Slukem * Copyright (c) 1991, 1993, 1994 61.1Slukem * The Regents of the University of California. All rights reserved. 71.1Slukem * 81.1Slukem * Redistribution and use in source and binary forms, with or without 91.1Slukem * modification, are permitted provided that the following conditions 101.1Slukem * are met: 111.1Slukem * 1. Redistributions of source code must retain the above copyright 121.1Slukem * notice, this list of conditions and the following disclaimer. 131.1Slukem * 2. Redistributions in binary form must reproduce the above copyright 141.1Slukem * notice, this list of conditions and the following disclaimer in the 151.1Slukem * documentation and/or other materials provided with the distribution. 161.1Slukem * 3. All advertising materials mentioning features or use of this software 171.1Slukem * must display the following acknowledgement: 181.1Slukem * This product includes software developed by the University of 191.1Slukem * California, Berkeley and its contributors. 201.1Slukem * 4. Neither the name of the University nor the names of its contributors 211.1Slukem * may be used to endorse or promote products derived from this software 221.1Slukem * without specific prior written permission. 231.1Slukem * 241.1Slukem * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 251.1Slukem * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 261.1Slukem * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 271.1Slukem * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 281.1Slukem * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 291.1Slukem * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 301.1Slukem * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 311.1Slukem * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 321.1Slukem * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 331.1Slukem * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 341.1Slukem * SUCH DAMAGE. 351.1Slukem * 361.1Slukem * @(#)ffs_extern.h 8.6 (Berkeley) 3/30/95 371.1Slukem */ 381.1Slukem 391.1Slukem#include "ffs/buf.h" 401.1Slukem 411.1Slukem#define i_fd i_modrev /* XXX: stuff this somewhere */ 421.1Slukem 431.1Slukem/* 441.1Slukem * Structure used to pass around logical block paths generated by 451.1Slukem * ufs_getlbns and used by truncate and bmap code. 461.1Slukem */ 471.1Slukemstruct indir { 481.1Slukem ufs_daddr_t in_lbn; /* Logical block number. */ 491.1Slukem int in_off; /* Offset in buffer. */ 501.1Slukem int in_exists; /* Flag if the block exists. */ 511.1Slukem}; 521.1Slukem 531.1Slukem /* ffs.c */ 541.1Slukemvoid panic(const char *, ...) 551.1Slukem __attribute__((__noreturn__,__format__(__printf__,1,2))); 561.1Slukem 571.1Slukem /* ffs_alloc.c */ 581.1Slukemint ffs_alloc(struct inode *, ufs_daddr_t, ufs_daddr_t, int, ufs_daddr_t *); 591.1Slukemufs_daddr_t ffs_blkpref(struct inode *, ufs_daddr_t, int, ufs_daddr_t *); 601.1Slukemvoid ffs_blkfree(struct inode *, ufs_daddr_t, long); 611.1Slukemvoid ffs_clusteracct(struct fs *, struct cg *, ufs_daddr_t, int); 621.1Slukem 631.1Slukem /* ffs_balloc.c */ 641.1Slukemint ffs_balloc(struct inode *, off_t, int, struct buf **); 651.1Slukem 661.1Slukem /* ffs_bswap.c */ 671.1Slukemvoid ffs_sb_swap(struct fs*, struct fs *); 681.1Slukemvoid ffs_dinode_swap(struct dinode *, struct dinode *); 691.1Slukemvoid ffs_csum_swap(struct csum *, struct csum *, int); 701.1Slukem 711.1Slukem /* ffs_subr.c */ 721.1Slukemvoid ffs_fragacct(struct fs *, int, int32_t[], int, int); 731.1Slukemint ffs_isblock(struct fs *, u_char *, ufs_daddr_t); 741.1Slukemint ffs_isfreeblock(struct fs *, u_char *, ufs_daddr_t); 751.1Slukemvoid ffs_clrblock(struct fs *, u_char *, ufs_daddr_t); 761.1Slukemvoid ffs_setblock(struct fs *, u_char *, ufs_daddr_t); 771.1Slukem 781.1Slukem /* ufs_bmap.c */ 791.1Slukemint ufs_getlbns(struct inode *, ufs_daddr_t, struct indir *, int *); 80