Browse Source

Fix a compile issue with big endian config & some small issues fixes

pull/28/merge
branzhu 7 years ago
committed by Grzegorz Kostka
parent
commit
fb46550c54
  1. 4
      include/ext4.h
  2. 2
      src/ext4_extent.c
  3. 2
      src/ext4_fs.c

4
include/ext4.h

@ -227,13 +227,13 @@ int ext4_get_sblock(const char *mount_point, struct ext4_sblock **sb);
* @warning Default model of cache is write trough. It means that when You do: * @warning Default model of cache is write trough. It means that when You do:
* *
* ext4_fopen(...); * ext4_fopen(...);
* ext4_fwrie(...); * ext4_fwrite(...);
* < --- data is flushed to physical drive * < --- data is flushed to physical drive
* *
* When you do: * When you do:
* ext4_cache_write_back(..., 1); * ext4_cache_write_back(..., 1);
* ext4_fopen(...); * ext4_fopen(...);
* ext4_fwrie(...); * ext4_fwrite(...);
* < --- data is NOT flushed to physical drive * < --- data is NOT flushed to physical drive
* ext4_cache_write_back(..., 0); * ext4_cache_write_back(..., 0);
* < --- when write back mode is disabled all * < --- when write back mode is disabled all

2
src/ext4_extent.c

@ -45,7 +45,7 @@
#define EXT4_EXT_GET_LEN(ex) to_le16((ex)->block_count) #define EXT4_EXT_GET_LEN(ex) to_le16((ex)->block_count)
#define EXT4_EXT_GET_LEN_UNWRITTEN(ex) \ #define EXT4_EXT_GET_LEN_UNWRITTEN(ex) \
(EXT4_EXT_GET_LEN(ex) &= ~(EXT4_EXT_UNWRITTEN_MASK)) (EXT4_EXT_GET_LEN(ex) & ~(EXT4_EXT_UNWRITTEN_MASK))
#define EXT4_EXT_SET_LEN(ex, count) \ #define EXT4_EXT_SET_LEN(ex, count) \
((ex)->block_count = to_le16(count)) ((ex)->block_count = to_le16(count))

2
src/ext4_fs.c

@ -456,7 +456,7 @@ static int ext4_fs_init_inode_table(struct ext4_block_group_ref *bg_ref)
memset(b.data, 0, block_size); memset(b.data, 0, block_size);
ext4_trans_set_block_dirty(b.buf); ext4_trans_set_block_dirty(b.buf);
ext4_block_set(bg_ref->fs->bdev, &b); rc = ext4_block_set(bg_ref->fs->bdev, &b);
if (rc != EOK) if (rc != EOK)
return rc; return rc;
} }

Loading…
Cancel
Save