1 | /*
|
---|
2 | * Copyright (c) 2011 Martin Sucha
|
---|
3 | * Copyright (c) 2012 Frantisek Princ
|
---|
4 | * All rights reserved.
|
---|
5 | *
|
---|
6 | * Redistribution and use in source and binary forms, with or without
|
---|
7 | * modification, are permitted provided that the following conditions
|
---|
8 | * are met:
|
---|
9 | *
|
---|
10 | * - Redistributions of source code must retain the above copyright
|
---|
11 | * notice, this list of conditions and the following disclaimer.
|
---|
12 | * - Redistributions in binary form must reproduce the above copyright
|
---|
13 | * notice, this list of conditions and the following disclaimer in the
|
---|
14 | * documentation and/or other materials provided with the distribution.
|
---|
15 | * - The name of the author may not be used to endorse or promote products
|
---|
16 | * derived from this software without specific prior written permission.
|
---|
17 | *
|
---|
18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
---|
19 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
20 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
---|
21 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
22 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
---|
23 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
---|
24 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
---|
25 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
---|
27 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
28 | */
|
---|
29 |
|
---|
30 | /** @addtogroup libext4
|
---|
31 | * @{
|
---|
32 | */
|
---|
33 |
|
---|
34 | #ifndef LIBEXT4_LIBEXT4_BLOCK_GROUP_H_
|
---|
35 | #define LIBEXT4_LIBEXT4_BLOCK_GROUP_H_
|
---|
36 |
|
---|
37 | #include <block.h>
|
---|
38 | #include <sys/types.h>
|
---|
39 | #include "libext4_types.h"
|
---|
40 |
|
---|
41 | extern uint64_t ext4_block_group_get_block_bitmap(ext4_block_group_t *,
|
---|
42 | ext4_superblock_t *);
|
---|
43 | extern void ext4_block_group_set_block_bitmap(ext4_block_group_t *,
|
---|
44 | ext4_superblock_t *, uint64_t);
|
---|
45 | extern uint64_t ext4_block_group_get_inode_bitmap(ext4_block_group_t *,
|
---|
46 | ext4_superblock_t *);
|
---|
47 | extern void ext4_block_group_set_inode_bitmap(ext4_block_group_t *,
|
---|
48 | ext4_superblock_t *, uint64_t);
|
---|
49 | extern uint64_t ext4_block_group_get_inode_table_first_block(
|
---|
50 | ext4_block_group_t *, ext4_superblock_t *);
|
---|
51 | extern void ext4_block_group_set_inode_table_first_block(ext4_block_group_t *,
|
---|
52 | ext4_superblock_t *, uint64_t);
|
---|
53 | extern uint32_t ext4_block_group_get_free_blocks_count(ext4_block_group_t *,
|
---|
54 | ext4_superblock_t *);
|
---|
55 | extern void ext4_block_group_set_free_blocks_count(ext4_block_group_t *,
|
---|
56 | ext4_superblock_t *, uint32_t);
|
---|
57 | extern uint32_t ext4_block_group_get_free_inodes_count(ext4_block_group_t *,
|
---|
58 | ext4_superblock_t *);
|
---|
59 | extern void ext4_block_group_set_free_inodes_count(ext4_block_group_t *,
|
---|
60 | ext4_superblock_t *, uint32_t);
|
---|
61 | extern void ext4_block_group_set_free_inodes_count(ext4_block_group_t *,
|
---|
62 | ext4_superblock_t *, uint32_t);
|
---|
63 | extern uint32_t ext4_block_group_get_used_dirs_count(ext4_block_group_t *,
|
---|
64 | ext4_superblock_t *);
|
---|
65 | extern void ext4_block_group_set_used_dirs_count(ext4_block_group_t *,
|
---|
66 | ext4_superblock_t *, uint32_t);
|
---|
67 | extern uint16_t ext4_block_group_get_flags(ext4_block_group_t *);
|
---|
68 | extern void ext4_block_group_set_flags(ext4_block_group_t *, uint16_t);
|
---|
69 | extern uint32_t ext4_block_group_get_itable_unused(ext4_block_group_t *,
|
---|
70 | ext4_superblock_t *);
|
---|
71 | extern void ext4_block_group_set_itable_unused(ext4_block_group_t *,
|
---|
72 | ext4_superblock_t *, uint32_t);
|
---|
73 | extern uint16_t ext4_block_group_get_checksum(ext4_block_group_t *);
|
---|
74 | extern void ext4_block_group_set_checksum(ext4_block_group_t *, uint16_t);
|
---|
75 |
|
---|
76 | extern bool ext4_block_group_has_flag(ext4_block_group_t *, uint32_t);
|
---|
77 | extern void ext4_block_group_set_flag(ext4_block_group_t *, uint32_t);
|
---|
78 | extern void ext4_block_group_clear_flag(ext4_block_group_t *, uint32_t);
|
---|
79 |
|
---|
80 | #endif
|
---|
81 |
|
---|
82 | /**
|
---|
83 | * @}
|
---|
84 | */
|
---|