fs.h (134011) | fs.h (136336) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)fs.h 8.13 (Berkeley) 3/21/95 | 1/* 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)fs.h 8.13 (Berkeley) 3/21/95 |
30 * $FreeBSD: head/sys/ufs/ffs/fs.h 134011 2004-08-19 11:09:13Z jhb $ | 30 * $FreeBSD: head/sys/ufs/ffs/fs.h 136336 2004-10-09 20:16:06Z njl $ |
31 */ 32 33#ifndef _UFS_FFS_FS_H_ 34#define _UFS_FFS_FS_H_ 35 36/* 37 * Each disk drive contains some number of filesystems. 38 * A filesystem consists of a number of cylinder groups. --- 442 unchanged lines hidden (view full) --- 481 ((u_int8_t *)((u_int8_t *)(cgp) + (cgp)->cg_clusteroff)) 482#define cg_clustersum(cgp) \ 483 ((int32_t *)((uintptr_t)(cgp) + (cgp)->cg_clustersumoff)) 484 485/* 486 * Turn filesystem block numbers into disk block addresses. 487 * This maps filesystem blocks to device size blocks. 488 */ | 31 */ 32 33#ifndef _UFS_FFS_FS_H_ 34#define _UFS_FFS_FS_H_ 35 36/* 37 * Each disk drive contains some number of filesystems. 38 * A filesystem consists of a number of cylinder groups. --- 442 unchanged lines hidden (view full) --- 481 ((u_int8_t *)((u_int8_t *)(cgp) + (cgp)->cg_clusteroff)) 482#define cg_clustersum(cgp) \ 483 ((int32_t *)((uintptr_t)(cgp) + (cgp)->cg_clustersumoff)) 484 485/* 486 * Turn filesystem block numbers into disk block addresses. 487 * This maps filesystem blocks to device size blocks. 488 */ |
489#define fsbtodb(fs, b) ((b) << (fs)->fs_fsbtodb) | 489#define fsbtodb(fs, b) ((daddr_t)(b) << (fs)->fs_fsbtodb) |
490#define dbtofsb(fs, b) ((b) >> (fs)->fs_fsbtodb) 491 492/* 493 * Cylinder group macros to locate things in cylinder groups. 494 * They calc filesystem addresses of cylinder group data structures. 495 */ 496#define cgbase(fs, c) (((ufs2_daddr_t)(fs)->fs_fpg) * (c)) 497#define cgdmin(fs, c) (cgstart(fs, c) + (fs)->fs_dblkno) /* 1st data */ --- 103 unchanged lines hidden --- | 490#define dbtofsb(fs, b) ((b) >> (fs)->fs_fsbtodb) 491 492/* 493 * Cylinder group macros to locate things in cylinder groups. 494 * They calc filesystem addresses of cylinder group data structures. 495 */ 496#define cgbase(fs, c) (((ufs2_daddr_t)(fs)->fs_fpg) * (c)) 497#define cgdmin(fs, c) (cgstart(fs, c) + (fs)->fs_dblkno) /* 1st data */ --- 103 unchanged lines hidden --- |