소스 검색

Btrfs: advance window_start if we're using a bitmap

If we span a long area in a bitmap we could end up taking a lot of time
searching to the next free area if we're searching from the original
window_start, so advance window_start in order to make sure we don't do any
superficial searching.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Josef Bacik 13 년 전
부모
커밋
9b23062840
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      fs/btrfs/free-space-cache.c

+ 1 - 0
fs/btrfs/free-space-cache.c

@@ -2251,6 +2251,7 @@ u64 btrfs_alloc_from_cluster(struct btrfs_block_group_cache *block_group,
 						 offset_index);
 						 offset_index);
 				continue;
 				continue;
 			}
 			}
+			cluster->window_start += bytes;
 		} else {
 		} else {
 			ret = entry->offset;
 			ret = entry->offset;