ffs_extern.h revision 1.3
11.3Sfvdl/* $NetBSD: ffs_extern.h,v 1.3 2003/01/24 21:55:32 fvdl 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/* 421.1Slukem * Structure used to pass around logical block paths generated by 431.1Slukem * ufs_getlbns and used by truncate and bmap code. 441.1Slukem */ 451.1Slukemstruct indir { 461.3Sfvdl daddr_t in_lbn; /* Logical block number. */ 471.1Slukem int in_off; /* Offset in buffer. */ 481.1Slukem int in_exists; /* Flag if the block exists. */ 491.1Slukem}; 501.1Slukem 511.1Slukem /* ffs.c */ 521.1Slukemvoid panic(const char *, ...) 531.1Slukem __attribute__((__noreturn__,__format__(__printf__,1,2))); 541.1Slukem 551.1Slukem /* ffs_alloc.c */ 561.3Sfvdlint ffs_alloc(struct inode *, daddr_t, daddr_t, int, daddr_t *); 571.3Sfvdl/* XXX ondisk32 */ 581.3Sfvdldaddr_t ffs_blkpref(struct inode *, daddr_t, int, int32_t *); 591.3Sfvdlvoid ffs_blkfree(struct inode *, daddr_t, long); 601.3Sfvdlvoid ffs_clusteracct(struct fs *, struct cg *, daddr_t, int); 611.1Slukem 621.1Slukem /* ffs_balloc.c */ 631.1Slukemint ffs_balloc(struct inode *, off_t, int, struct buf **); 641.1Slukem 651.1Slukem /* ffs_bswap.c */ 661.1Slukemvoid ffs_sb_swap(struct fs*, struct fs *); 671.1Slukemvoid ffs_dinode_swap(struct dinode *, struct dinode *); 681.1Slukemvoid ffs_csum_swap(struct csum *, struct csum *, int); 691.1Slukem 701.1Slukem /* ffs_subr.c */ 711.1Slukemvoid ffs_fragacct(struct fs *, int, int32_t[], int, int); 721.3Sfvdlint ffs_isblock(struct fs *, u_char *, daddr_t); 731.3Sfvdlint ffs_isfreeblock(struct fs *, u_char *, daddr_t); 741.3Sfvdlvoid ffs_clrblock(struct fs *, u_char *, daddr_t); 751.3Sfvdlvoid ffs_setblock(struct fs *, u_char *, daddr_t); 761.1Slukem 771.1Slukem /* ufs_bmap.c */ 781.3Sfvdlint ufs_getlbns(struct inode *, daddr_t, struct indir *, int *); 79