Changeset ff381a7 in mainline for uspace/lib/ext4/libext4_superblock.c


Ignore:
Timestamp:
2015-11-02T20:54:19Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d8513177
Parents:
3feeab2 (diff), 5265eea4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext4/libext4_superblock.c

    r3feeab2 rff381a7  
    12981298}
    12991299
     1300/** Get the backup groups used with SPARSE_SUPER2
     1301 *
     1302 * @param sb    Pointer to the superblock
     1303 * @param g1    Output pointer to the first backup group
     1304 * @param g2    Output pointer to the second backup group
     1305 */
     1306void ext4_superblock_get_backup_groups_sparse2(ext4_superblock_t *sb,
     1307    uint32_t *g1, uint32_t *g2)
     1308{
     1309        *g1 = uint32_t_le2host(sb->backup_bgs[0]);
     1310        *g2 = uint32_t_le2host(sb->backup_bgs[1]);
     1311}
     1312
     1313/** Set the backup groups (SPARSE SUPER2)
     1314 *
     1315 * @param sb    Pointer to the superblock
     1316 * @param g1    Index of the first group
     1317 * @param g2    Index of the second group
     1318 */
     1319void ext4_superblock_set_backup_groups_sparse2(ext4_superblock_t *sb,
     1320    uint32_t g1, uint32_t g2)
     1321{
     1322        sb->backup_bgs[0] = host2uint32_t_le(g1);
     1323        sb->backup_bgs[1] = host2uint32_t_le(g2);
     1324}
     1325
     1326/** Get the number of blocks (per group) reserved to GDT expansion
     1327 *
     1328 * @param sb    Pointer to the superblock
     1329 *
     1330 * @return      Number of blocks
     1331 */
     1332uint32_t ext4_superblock_get_reserved_gdt_blocks(ext4_superblock_t *sb)
     1333{
     1334        return uint32_t_le2host(sb->reserved_gdt_blocks);
     1335}
     1336
     1337/** Set the number of blocks (per group) reserved to GDT expansion
     1338 *
     1339 * @param sb    Pointer to the superblock
     1340 * @param n     Number of reserved blocks
     1341 */
     1342void ext4_superblock_set_reserved_gdt_blocks(ext4_superblock_t *sb,
     1343    uint32_t n)
     1344{
     1345        sb->reserved_gdt_blocks = host2uint32_t_le(n);
     1346}
     1347
    13001348/**
    13011349 * @}
Note: See TracChangeset for help on using the changeset viewer.