From: Chris Mason Date: Sun, 22 May 2011 16:36:34 +0000 (-0400) Subject: Merge branch 'allocator' of git://git.kernel.org/pub/scm/linux/kernel/git/arne/btrfs... X-Git-Tag: v3.0-rc1~38^2~8 X-Git-Url: http://pileus.org/git/?a=commitdiff_plain;h=aa2dfb372a2a647beedac163ce6f8b0fcbefac29;p=~andy%2Flinux Merge branch 'allocator' of git://git.kernel.org/pub/scm/linux/kernel/git/arne/btrfs-unstable-arne into inode_numbers Signed-off-by: Chris Mason --- aa2dfb372a2a647beedac163ce6f8b0fcbefac29 diff --cc fs/btrfs/volumes.c index cd0b31a9ba3,ab55bfc31a0..f777145203d --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@@ -2593,13 -2490,14 +2446,14 @@@ static int __btrfs_alloc_chunk(struct b map->sub_stripes = sub_stripes; *map_ret = map; - *stripe_size = calc_size; - *num_bytes = chunk_bytes_by_type(type, calc_size, - map->num_stripes, sub_stripes); + num_bytes = stripe_size * (num_stripes / ncopies); + + *stripe_size_out = stripe_size; + *num_bytes_out = num_bytes; - trace_btrfs_chunk_alloc(info->chunk_root, map, start, *num_bytes); + trace_btrfs_chunk_alloc(info->chunk_root, map, start, num_bytes); - em = alloc_extent_map(GFP_NOFS); + em = alloc_extent_map(); if (!em) { ret = -ENOMEM; goto error;