Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37690
b: refs/heads/master
c: 9ea0f94
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Mahoney authored and Linus Torvalds committed Oct 1, 2006
1 parent 733575c commit 8cf0dfe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a2618e6a972f305496daa257a56a09dd3acca29
refs/heads/master: 9ea0f9499d15c49df23e7aac4332d830c40e12d0
23 changes: 1 addition & 22 deletions trunk/fs/reiserfs/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,6 @@ static inline int blocknrs_and_prealloc_arrays_from_search_start
b_blocknr_t finish = SB_BLOCK_COUNT(s) - 1;
int passno = 0;
int nr_allocated = 0;
int bigalloc = 0;

determine_prealloc_size(hint);
if (!hint->formatted_node) {
Expand All @@ -1061,28 +1060,9 @@ static inline int blocknrs_and_prealloc_arrays_from_search_start
hint->preallocate = hint->prealloc_size = 0;
}
/* for unformatted nodes, force large allocations */
bigalloc = amount_needed;
}

do {
/* in bigalloc mode, nr_allocated should stay zero until
* the entire allocation is filled
*/
if (unlikely(bigalloc && nr_allocated)) {
reiserfs_warning(s, "bigalloc is %d, nr_allocated %d\n",
bigalloc, nr_allocated);
/* reset things to a sane value */
bigalloc = amount_needed - nr_allocated;
}
/*
* try pass 0 and pass 1 looking for a nice big
* contiguous allocation. Then reset and look
* for anything you can find.
*/
if (passno == 2 && bigalloc) {
passno = 0;
bigalloc = 0;
}
switch (passno++) {
case 0: /* Search from hint->search_start to end of disk */
start = hint->search_start;
Expand Down Expand Up @@ -1120,8 +1100,7 @@ static inline int blocknrs_and_prealloc_arrays_from_search_start
new_blocknrs +
nr_allocated,
start, finish,
bigalloc ?
bigalloc : 1,
1,
amount_needed -
nr_allocated,
hint->
Expand Down

0 comments on commit 8cf0dfe

Please sign in to comment.