[eb91db7] | 1 | /*
|
---|
[d1538a1] | 2 | * Copyright (c) 2011 Martin Sucha
|
---|
[f22d5ef0] | 3 | * Copyright (c) 2012 Frantisek Princ
|
---|
[eb91db7] | 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 | * @{
|
---|
[38542dc] | 32 | */
|
---|
[eb91db7] | 33 |
|
---|
| 34 | #ifndef LIBEXT4_LIBEXT4_BLOCK_GROUP_H_
|
---|
| 35 | #define LIBEXT4_LIBEXT4_BLOCK_GROUP_H_
|
---|
| 36 |
|
---|
[f73b291] | 37 | #include <block.h>
|
---|
[6c501f8] | 38 | #include <sys/types.h>
|
---|
[b53a733] | 39 | #include "libext4_types.h"
|
---|
[3711e7e] | 40 |
|
---|
[fe27eb4] | 41 | extern uint64_t ext4_block_group_get_block_bitmap(ext4_block_group_t *,
|
---|
[38542dc] | 42 | ext4_superblock_t *);
|
---|
[fe27eb4] | 43 | extern void ext4_block_group_set_block_bitmap(ext4_block_group_t *,
|
---|
[38542dc] | 44 | ext4_superblock_t *, uint64_t);
|
---|
[fe27eb4] | 45 | extern uint64_t ext4_block_group_get_inode_bitmap(ext4_block_group_t *,
|
---|
[38542dc] | 46 | ext4_superblock_t *);
|
---|
[fe27eb4] | 47 | extern void ext4_block_group_set_inode_bitmap(ext4_block_group_t *,
|
---|
[38542dc] | 48 | ext4_superblock_t *, uint64_t);
|
---|
[fe27eb4] | 49 | extern uint64_t ext4_block_group_get_inode_table_first_block(
|
---|
[38542dc] | 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);
|
---|
[fe27eb4] | 53 | extern uint32_t ext4_block_group_get_free_blocks_count(ext4_block_group_t *,
|
---|
[38542dc] | 54 | ext4_superblock_t *);
|
---|
[fe27eb4] | 55 | extern void ext4_block_group_set_free_blocks_count(ext4_block_group_t *,
|
---|
[38542dc] | 56 | ext4_superblock_t *, uint32_t);
|
---|
[fe27eb4] | 57 | extern uint32_t ext4_block_group_get_free_inodes_count(ext4_block_group_t *,
|
---|
[38542dc] | 58 | ext4_superblock_t *);
|
---|
[fe27eb4] | 59 | extern void ext4_block_group_set_free_inodes_count(ext4_block_group_t *,
|
---|
[38542dc] | 60 | ext4_superblock_t *, uint32_t);
|
---|
[fe27eb4] | 61 | extern void ext4_block_group_set_free_inodes_count(ext4_block_group_t *,
|
---|
[38542dc] | 62 | ext4_superblock_t *, uint32_t);
|
---|
[fe27eb4] | 63 | extern uint32_t ext4_block_group_get_used_dirs_count(ext4_block_group_t *,
|
---|
[38542dc] | 64 | ext4_superblock_t *);
|
---|
[fe27eb4] | 65 | extern void ext4_block_group_set_used_dirs_count(ext4_block_group_t *,
|
---|
[38542dc] | 66 | ext4_superblock_t *, uint32_t);
|
---|
[3712434] | 67 | extern uint16_t ext4_block_group_get_flags(ext4_block_group_t *);
|
---|
[fe27eb4] | 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 *,
|
---|
[38542dc] | 70 | ext4_superblock_t *);
|
---|
[fe27eb4] | 71 | extern void ext4_block_group_set_itable_unused(ext4_block_group_t *,
|
---|
[38542dc] | 72 | ext4_superblock_t *, uint32_t);
|
---|
[3712434] | 73 | extern uint16_t ext4_block_group_get_checksum(ext4_block_group_t *);
|
---|
[fe27eb4] | 74 | extern void ext4_block_group_set_checksum(ext4_block_group_t *, uint16_t);
|
---|
[eb91db7] | 75 |
|
---|
[81092ce] | 76 | extern bool ext4_block_group_has_flag(ext4_block_group_t *, uint32_t);
|
---|
[3d93289a] | 77 | extern void ext4_block_group_set_flag(ext4_block_group_t *, uint32_t);
|
---|
[81ee87cd] | 78 | extern void ext4_block_group_clear_flag(ext4_block_group_t *, uint32_t);
|
---|
| 79 |
|
---|
[eb91db7] | 80 | #endif
|
---|
| 81 |
|
---|
| 82 | /**
|
---|
| 83 | * @}
|
---|
| 84 | */
|
---|