Explorar o código

Btrfs: Add 1MB to the min_free in alloc_chunk

This properly reflects the first 1MB we skip at the start of the device

Signed-off-by: Chris Mason <chris.mason@oracle.com>
Chris Mason %!s(int64=17) %!d(string=hai) anos
pai
achega
ad5bd91ece
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      fs/btrfs/volumes.c

+ 3 - 0
fs/btrfs/volumes.c

@@ -746,6 +746,9 @@ again:
 	else
 		min_free = calc_size;
 
+	/* we add 1MB because we never use the first 1MB of the device */
+	min_free += 1024 * 1024;
+
 	/* build a private list of devices we will allocate from */
 	while(index < num_stripes) {
 		device = list_entry(cur, struct btrfs_device, dev_list);