From: Greg Kroah-Hartman Date: Wed, 13 Jun 2012 15:45:41 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.0.35~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=de5127d429fdc5952b533e59ac694b56ad0fbec9;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: btrfs-fall-back-to-non-inline-if-we-don-t-have-enough-space.patch --- diff --git a/queue-3.4/btrfs-fall-back-to-non-inline-if-we-don-t-have-enough-space.patch b/queue-3.4/btrfs-fall-back-to-non-inline-if-we-don-t-have-enough-space.patch new file mode 100644 index 00000000000..981ae7ae249 --- /dev/null +++ b/queue-3.4/btrfs-fall-back-to-non-inline-if-we-don-t-have-enough-space.patch @@ -0,0 +1,40 @@ +From 2adcac1a7331d93a17285804819caa96070b231f Mon Sep 17 00:00:00 2001 +From: Josef Bacik +Date: Wed, 23 May 2012 16:10:14 -0400 +Subject: Btrfs: fall back to non-inline if we don't have enough space + +From: Josef Bacik + +commit 2adcac1a7331d93a17285804819caa96070b231f upstream. + +If cow_file_range_inline fails with ENOSPC we abort the transaction which +isn't very nice. This really shouldn't be happening anyways but there's no +sense in making it a horrible error when we can easily just go allocate +normal data space for this stuff. Thanks, + +Signed-off-by: Josef Bacik +Acked-by: Chris Mason +Cc: Alexandre Oliva +Signed-off-by: Greg Kroah-Hartman + +--- + fs/btrfs/inode.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/fs/btrfs/inode.c ++++ b/fs/btrfs/inode.c +@@ -257,10 +257,13 @@ static noinline int cow_file_range_inlin + ret = insert_inline_extent(trans, root, inode, start, + inline_len, compressed_size, + compress_type, compressed_pages); +- if (ret) { ++ if (ret && ret != -ENOSPC) { + btrfs_abort_transaction(trans, root, ret); + return ret; ++ } else if (ret == -ENOSPC) { ++ return 1; + } ++ + btrfs_delalloc_release_metadata(inode, end + 1 - start); + btrfs_drop_extent_cache(inode, start, aligned_end - 1, 0); + return 0; diff --git a/queue-3.4/series b/queue-3.4/series index 6540bdae67f..be2d72c37ad 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -12,3 +12,4 @@ x86-mce-amd-make-apic-lvt-thresholding-interrupt-optional.patch hwrng-atmel-rng-fix-race-condition-leading-to-repeated-bits.patch crypto-aesni-intel-fix-unaligned-cbc-decrypt-for-x86-32.patch drm-ttm-fix-buffer-object-metadata-accounting-regression-v2.patch +btrfs-fall-back-to-non-inline-if-we-don-t-have-enough-space.patch