Deleted Added
full compact
fs.h (251809) fs.h (252103)
1/*-
2 * modified for EXT2FS support in Lites 1.1
3 *
4 * Aug 1995, Godmar Back (gback@cs.utah.edu)
5 * University of Utah, Department of Computer Science
6 */
7/*-
8 * Copyright (c) 1982, 1986, 1993

--- 19 unchanged lines hidden (view full) ---

28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * @(#)fs.h 8.7 (Berkeley) 4/19/94
1/*-
2 * modified for EXT2FS support in Lites 1.1
3 *
4 * Aug 1995, Godmar Back (gback@cs.utah.edu)
5 * University of Utah, Department of Computer Science
6 */
7/*-
8 * Copyright (c) 1982, 1986, 1993

--- 19 unchanged lines hidden (view full) ---

28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * @(#)fs.h 8.7 (Berkeley) 4/19/94
36 * $FreeBSD: head/sys/fs/ext2fs/fs.h 251809 2013-06-16 16:10:45Z pfg $
36 * $FreeBSD: head/sys/fs/ext2fs/fs.h 252103 2013-06-23 02:44:42Z pfg $
37 */
38
39#ifndef _FS_EXT2FS_FS_H_
40#define _FS_EXT2FS_FS_H_
41
42/*
43 * Each disk drive contains some number of file systems.
44 * A file system consists of a number of cylinder groups.

--- 48 unchanged lines hidden (view full) ---

93/*
94 * Macros for access to superblock array structures
95 */
96
97/*
98 * Turn file system block numbers into disk block addresses.
99 * This maps file system blocks to device size blocks.
100 */
37 */
38
39#ifndef _FS_EXT2FS_FS_H_
40#define _FS_EXT2FS_FS_H_
41
42/*
43 * Each disk drive contains some number of file systems.
44 * A file system consists of a number of cylinder groups.

--- 48 unchanged lines hidden (view full) ---

93/*
94 * Macros for access to superblock array structures
95 */
96
97/*
98 * Turn file system block numbers into disk block addresses.
99 * This maps file system blocks to device size blocks.
100 */
101#define fsbtodb(fs, b) ((b) << ((fs)->e2fs_fsbtodb))
102#define dbtofsb(fs, b) ((b) >> ((fs)->e2fs_fsbtodb))
101#define fsbtodb(fs, b) ((daddr_t)(b) << (fs)->e2fs_fsbtodb)
102#define dbtofsb(fs, b) ((b) >> (fs)->e2fs_fsbtodb)
103
104/* get group containing inode */
105#define ino_to_cg(fs, x) (((x) - 1) / (fs->e2fs_ipg))
106
107/* get block containing inode from its number x */
108#define ino_to_fsba(fs, x) \
109 ((fs)->e2fs_gd[ino_to_cg((fs), (x))].ext2bgd_i_tables + \
110 (((x) - 1) % (fs)->e2fs->e2fs_ipg) / (fs)->e2fs_ipb)

--- 52 unchanged lines hidden ---
103
104/* get group containing inode */
105#define ino_to_cg(fs, x) (((x) - 1) / (fs->e2fs_ipg))
106
107/* get block containing inode from its number x */
108#define ino_to_fsba(fs, x) \
109 ((fs)->e2fs_gd[ino_to_cg((fs), (x))].ext2bgd_i_tables + \
110 (((x) - 1) % (fs)->e2fs->e2fs_ipg) / (fs)->e2fs_ipb)

--- 52 unchanged lines hidden ---