start work on 3.13
This commit is contained in:
parent
a8d66e141d
commit
bc17651330
@ -1,63 +0,0 @@
|
|||||||
From 4577b014d1bc3db386da3246f625888fc48083a9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Josef Bacik <jbacik@fusionio.com>
|
|
||||||
Date: Fri, 27 Sep 2013 13:33:09 +0000
|
|
||||||
Subject: Btrfs: relocate csums properly with prealloc extents
|
|
||||||
|
|
||||||
A user reported a problem where they were getting csum errors when running a
|
|
||||||
balance and running systemd's journal. This is because systemd is awesome and
|
|
||||||
fallocate()'s its log space and writes into it. Unfortunately we assume that
|
|
||||||
when we read in all the csums for an extent that they are sequential starting at
|
|
||||||
the bytenr we care about. This obviously isn't the case for prealloc extents,
|
|
||||||
where we could have written to the middle of the prealloc extent only, which
|
|
||||||
means the csum would be for the bytenr in the middle of our range and not the
|
|
||||||
front of our range. Fix this by offsetting the new bytenr we are logging to
|
|
||||||
based on the original bytenr the csum was for. With this patch I no longer see
|
|
||||||
the csum errors I was seeing. Thanks,
|
|
||||||
|
|
||||||
Cc: stable@vger.kernel.org
|
|
||||||
Reported-by: Chris Murphy <lists@colorremedies.com>
|
|
||||||
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
|
|
||||||
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
|
|
||||||
---
|
|
||||||
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
|
|
||||||
index dec4f5a..0359eec 100644
|
|
||||||
--- a/fs/btrfs/relocation.c
|
|
||||||
+++ b/fs/btrfs/relocation.c
|
|
||||||
@@ -4472,6 +4472,7 @@ int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len)
|
|
||||||
struct btrfs_root *root = BTRFS_I(inode)->root;
|
|
||||||
int ret;
|
|
||||||
u64 disk_bytenr;
|
|
||||||
+ u64 new_bytenr;
|
|
||||||
LIST_HEAD(list);
|
|
||||||
|
|
||||||
ordered = btrfs_lookup_ordered_extent(inode, file_pos);
|
|
||||||
@@ -4483,13 +4484,24 @@ int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len)
|
|
||||||
if (ret)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
- disk_bytenr = ordered->start;
|
|
||||||
while (!list_empty(&list)) {
|
|
||||||
sums = list_entry(list.next, struct btrfs_ordered_sum, list);
|
|
||||||
list_del_init(&sums->list);
|
|
||||||
|
|
||||||
- sums->bytenr = disk_bytenr;
|
|
||||||
- disk_bytenr += sums->len;
|
|
||||||
+ /*
|
|
||||||
+ * We need to offset the new_bytenr based on where the csum is.
|
|
||||||
+ * We need to do this because we will read in entire prealloc
|
|
||||||
+ * extents but we may have written to say the middle of the
|
|
||||||
+ * prealloc extent, so we need to make sure the csum goes with
|
|
||||||
+ * the right disk offset.
|
|
||||||
+ *
|
|
||||||
+ * We can do this because the data reloc inode refers strictly
|
|
||||||
+ * to the on disk bytes, so we don't have to worry about
|
|
||||||
+ * disk_len vs real len like with real inodes since it's all
|
|
||||||
+ * disk length.
|
|
||||||
+ */
|
|
||||||
+ new_bytenr = ordered->start + (sums->bytenr - disk_bytenr);
|
|
||||||
+ sums->bytenr = new_bytenr;
|
|
||||||
|
|
||||||
btrfs_add_ordered_sum(inode, ordered, sums);
|
|
||||||
}
|
|
||||||
--
|
|
||||||
cgit v0.9.2
|
|
35
PKGBUILD
35
PKGBUILD
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
pkgbase=linux # Build stock -ARCH kernel
|
pkgbase=linux # Build stock -ARCH kernel
|
||||||
#pkgbase=linux-custom # Build kernel with a different name
|
#pkgbase=linux-custom # Build kernel with a different name
|
||||||
_srcname=linux-3.12
|
_srcname=linux-3.13
|
||||||
pkgver=3.12.8
|
pkgver=3.13
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
url="http://www.kernel.org/"
|
url="http://www.kernel.org/"
|
||||||
@ -12,7 +12,7 @@ license=('GPL2')
|
|||||||
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc')
|
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc')
|
||||||
options=('!strip')
|
options=('!strip')
|
||||||
source=("http://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz"
|
source=("http://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz"
|
||||||
"http://www.kernel.org/pub/linux/kernel/v3.x/patch-${pkgver}.xz"
|
#"http://www.kernel.org/pub/linux/kernel/v3.x/patch-${pkgver}.xz"
|
||||||
# the main kernel config files
|
# the main kernel config files
|
||||||
'config' 'config.x86_64'
|
'config' 'config.x86_64'
|
||||||
# standard config files for mkinitcpio ramdisk
|
# standard config files for mkinitcpio ramdisk
|
||||||
@ -26,33 +26,18 @@ source=("http://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz"
|
|||||||
'sunrpc-add-an-info-file-for-the-dummy-gssd-pipe.patch'
|
'sunrpc-add-an-info-file-for-the-dummy-gssd-pipe.patch'
|
||||||
'rpc_pipe-fix-cleanup-of-dummy-gssd-directory-when-notification-fails.patch'
|
'rpc_pipe-fix-cleanup-of-dummy-gssd-directory-when-notification-fails.patch'
|
||||||
)
|
)
|
||||||
md5sums=('cc6ee608854e0da4b64f6c1ff8b6398c'
|
|
||||||
'03d34842e3a1197d17055610f62627b8'
|
|
||||||
'a9281e90e529795eaf10b45d70ab2868'
|
|
||||||
'6000a9c7bd83081a65611d9dfbdd8eda'
|
|
||||||
'eb14dcfd80c00852ef81ded6e826826a'
|
|
||||||
'98beb36f9b8cf16e58de2483ea9985e3'
|
|
||||||
'd50c1ac47394e9aec637002ef3392bd1'
|
|
||||||
'd4a75f77e6bd5d700dcd534cd5f0dfce'
|
|
||||||
'dc86fdc37615c97f03c1e0c31b7b833a'
|
|
||||||
'88eef9d3b5012ef7e82af1af8cc4e517'
|
|
||||||
'cec0bb8981936eab2943b2009b7a6fff'
|
|
||||||
'88d9cddf9e0050a76ec4674f264fb2a1'
|
|
||||||
'cb9016630212ef07b168892fbcfd4e5d')
|
|
||||||
|
|
||||||
_kernelname=${pkgbase#linux}
|
_kernelname=${pkgbase#linux}
|
||||||
|
|
||||||
# module.symbols md5sums
|
# module.symbols md5sums
|
||||||
# x86_64
|
# x86_64
|
||||||
# 23ef8d9dae0c916c9e1a7a07b77f797d /lib/modules/3.12.6-1-ARCH/modules.symbols
|
|
||||||
# i686
|
# i686
|
||||||
# eadbff034e17f92ccb4a7737302f3dbd /lib/modules/3.12.6-1-ARCH/modules.symbols
|
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd "${srcdir}/${_srcname}"
|
cd "${srcdir}/${_srcname}"
|
||||||
|
|
||||||
# add upstream patch
|
# add upstream patch
|
||||||
patch -p1 -i "${srcdir}/patch-${pkgver}"
|
# patch -p1 -i "${srcdir}/patch-${pkgver}"
|
||||||
|
|
||||||
# add latest fixes from stable queue, if needed
|
# add latest fixes from stable queue, if needed
|
||||||
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
|
# http://git.kernel.org/?p=linux/kernel/git/stable/stable-queue.git
|
||||||
@ -357,3 +342,15 @@ for _p in ${pkgname[@]}; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# vim:set ts=8 sts=2 sw=2 et:
|
# vim:set ts=8 sts=2 sw=2 et:
|
||||||
|
md5sums=('0ecbaf65c00374eb4a826c2f9f37606f'
|
||||||
|
'a9281e90e529795eaf10b45d70ab2868'
|
||||||
|
'6000a9c7bd83081a65611d9dfbdd8eda'
|
||||||
|
'eb14dcfd80c00852ef81ded6e826826a'
|
||||||
|
'98beb36f9b8cf16e58de2483ea9985e3'
|
||||||
|
'd50c1ac47394e9aec637002ef3392bd1'
|
||||||
|
'd4a75f77e6bd5d700dcd534cd5f0dfce'
|
||||||
|
'dc86fdc37615c97f03c1e0c31b7b833a'
|
||||||
|
'88eef9d3b5012ef7e82af1af8cc4e517'
|
||||||
|
'cec0bb8981936eab2943b2009b7a6fff'
|
||||||
|
'88d9cddf9e0050a76ec4674f264fb2a1'
|
||||||
|
'cb9016630212ef07b168892fbcfd4e5d')
|
||||||
|
Loading…
Reference in New Issue
Block a user