projects
/
lwext4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8f8f6a2
)
Change assert in ext4_balloc to debug warning message
author
gkostka
<kostka.grzegorz@gmail.com>
Tue, 17 Nov 2015 23:46:25 +0000
(
00:46
+0100)
committer
gkostka
<kostka.grzegorz@gmail.com>
Tue, 17 Nov 2015 23:46:25 +0000
(
00:46
+0100)
lwext4/ext4_balloc.c
patch
|
blob
|
history
diff --git
a/lwext4/ext4_balloc.c
b/lwext4/ext4_balloc.c
index 2e8ad1ad1369c8dfc61c261f4ab6fbff03460abe..48412cc8961a2b6aabf03cc13545e85f07d2e4a4 100644
(file)
--- a/
lwext4/ext4_balloc.c
+++ b/
lwext4/ext4_balloc.c
@@
-227,19
+227,21
@@
int ext4_balloc_free_blocks(struct ext4_inode_ref *inode_ref, ext4_fsblk_t first
uint32_t bg_first = ext4_balloc_get_bgid_of_block(sb, first);
/* Compute indexes */
uint32_t bg_first = ext4_balloc_get_bgid_of_block(sb, first);
/* Compute indexes */
- uint32_t block_group_last =
- ext4_balloc_get_bgid_of_block(sb, first + count - 1);
+ uint32_t bg_last = ext4_balloc_get_bgid_of_block(sb, first + count - 1);
if (!ext4_sb_feature_incom(sb, EXT4_FINCOM_FLEX_BG)) {
/*It is not possible without flex_bg that blocks are continuous
* and and last block belongs to other bg.*/
if (!ext4_sb_feature_incom(sb, EXT4_FINCOM_FLEX_BG)) {
/*It is not possible without flex_bg that blocks are continuous
* and and last block belongs to other bg.*/
- ext4_assert(ext4_balloc_get_bgid_of_block(sb, first + count - 1)
- == bg_first);
+ if (bg_last != bg_first) {
+ ext4_dbg(DEBUG_BALLOC, DBG_WARN "FLEX_BG: disabled & "
+ "bg_last: %"PRIu32" bg_first: %"PRIu32"\n",
+ bg_last, bg_first);
+ }
}
/* Load block group reference */
struct ext4_block_group_ref bg_ref;
}
/* Load block group reference */
struct ext4_block_group_ref bg_ref;
- while (bg_first <= b
lock_group
_last) {
+ while (bg_first <= b
g
_last) {
rc = ext4_fs_get_block_group_ref(fs, bg_first, &bg_ref);
if (rc != EOK)
rc = ext4_fs_get_block_group_ref(fs, bg_first, &bg_ref);
if (rc != EOK)