source: mainline/uspace/lib/ext4/libext4_block_group.h@ 6c501f8

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 6c501f8 was 6c501f8, checked in by Frantisek Princ <frantisek.princ@…>, 14 years ago

_mounted and _unmounted operations skeletons (copied from ext2fs)

  • Property mode set to 100644
File size: 2.7 KB
Line 
1/*
2 * Copyright (c) 2011 Frantisek Princ
3 * 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 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/** @addtogroup libext4
30 * @{
31 */
32
33#ifndef LIBEXT4_LIBEXT4_BLOCK_GROUP_H_
34#define LIBEXT4_LIBEXT4_BLOCK_GROUP_H_
35
36#include <sys/types.h>
37
38/*
39 * Structure of a blocks group descriptor
40 */
41typedef struct ext4_block_group {
42 uint32_t bg_block_bitmap_lo; // Blocks bitmap block
43 uint32_t bg_inode_bitmap_lo; // Inodes bitmap block
44 uint32_t bg_inode_table_lo; // Inodes table block
45 uint16_t bg_free_blocks_count_lo; // Free blocks count
46 uint16_t bg_free_inodes_count_lo; // Free inodes count
47 uint16_t bg_used_dirs_count_lo; // Directories count
48 uint16_t bg_flags; // EXT4_BG_flags (INODE_UNINIT, etc)
49 uint32_t bg_reserved[2]; // Likely block/inode bitmap checksum
50 uint16_t bg_itable_unused_lo; // Unused inodes count
51 uint16_t bg_checksum; // crc16(sb_uuid+group+desc)
52 uint32_t bg_block_bitmap_hi; // Blocks bitmap block MSB
53 uint32_t bg_inode_bitmap_hi; // Inodes bitmap block MSB
54 uint32_t bg_inode_table_hi; // Inodes table block MSB
55 uint16_t bg_free_blocks_count_hi; // Free blocks count MSB
56 uint16_t bg_free_inodes_count_hi; // Free inodes count MSB
57 uint16_t bg_used_dirs_count_hi; // Directories count MSB
58 uint16_t bg_itable_unused_hi; // Unused inodes count MSB
59 uint32_t bg_reserved2[3]; // Padding
60} ext4_group_desc_t;
61
62#endif
63
64/**
65 * @}
66 */
Note: See TracBrowser for help on using the repository browser.