diff options
-rw-r--r-- | GFS2-Make-rename-not-save-dirent-location.patch | 90 | ||||
-rw-r--r-- | kernel.spec | 9 | ||||
-rw-r--r-- | ppc64-fixtools.patch | 12 |
3 files changed, 107 insertions, 4 deletions
diff --git a/GFS2-Make-rename-not-save-dirent-location.patch b/GFS2-Make-rename-not-save-dirent-location.patch new file mode 100644 index 000000000..adb4e6d73 --- /dev/null +++ b/GFS2-Make-rename-not-save-dirent-location.patch @@ -0,0 +1,90 @@ +From: Bob Peterson <rpeterso@redhat.com> +Date: Mon, 29 Sep 2014 08:52:04 -0400 +Subject: [PATCH] GFS2: Make rename not save dirent location + +This patch fixes a regression in the patch "GFS2: Remember directory +insert point", commit 2b47dad866d04f14c328f888ba5406057b8c7d33. +The problem had to do with the rename function: The function found +space for the new dirent, and remembered that location. But then the +old dirent was removed, which often moved the eligible location for +the renamed dirent. Putting the new dirent at the saved location +caused file system corruption. + +This patch adds a new "save_loc" variable to struct gfs2_diradd. +If 1, the dirent location is saved. If 0, the dirent location is not +saved and the buffer_head is released as per previous behavior. + +Signed-off-by: Bob Peterson <rpeterso@redhat.com> +Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> +--- + fs/gfs2/dir.c | 9 +++++++-- + fs/gfs2/dir.h | 1 + + fs/gfs2/inode.c | 6 +++--- + 3 files changed, 11 insertions(+), 5 deletions(-) + +diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c +index 1a349f9a9685..5d4261ff5d23 100644 +--- a/fs/gfs2/dir.c ++++ b/fs/gfs2/dir.c +@@ -2100,8 +2100,13 @@ int gfs2_diradd_alloc_required(struct inode *inode, const struct qstr *name, + } + if (IS_ERR(dent)) + return PTR_ERR(dent); +- da->bh = bh; +- da->dent = dent; ++ ++ if (da->save_loc) { ++ da->bh = bh; ++ da->dent = dent; ++ } else { ++ brelse(bh); ++ } + return 0; + } + +diff --git a/fs/gfs2/dir.h b/fs/gfs2/dir.h +index 126c65dda028..e1b309c24dab 100644 +--- a/fs/gfs2/dir.h ++++ b/fs/gfs2/dir.h +@@ -23,6 +23,7 @@ struct gfs2_diradd { + unsigned nr_blocks; + struct gfs2_dirent *dent; + struct buffer_head *bh; ++ int save_loc; + }; + + extern struct inode *gfs2_dir_search(struct inode *dir, +diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c +index fc8ac2ee0667..7d2723ce067e 100644 +--- a/fs/gfs2/inode.c ++++ b/fs/gfs2/inode.c +@@ -600,7 +600,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry, + int error, free_vfs_inode = 0; + u32 aflags = 0; + unsigned blocks = 1; +- struct gfs2_diradd da = { .bh = NULL, }; ++ struct gfs2_diradd da = { .bh = NULL, .save_loc = 1, }; + + if (!name->len || name->len > GFS2_FNAMESIZE) + return -ENAMETOOLONG; +@@ -899,7 +899,7 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir, + struct gfs2_inode *ip = GFS2_I(inode); + struct gfs2_holder ghs[2]; + struct buffer_head *dibh; +- struct gfs2_diradd da = { .bh = NULL, }; ++ struct gfs2_diradd da = { .bh = NULL, .save_loc = 1, }; + int error; + + if (S_ISDIR(inode->i_mode)) +@@ -1337,7 +1337,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry, + struct gfs2_rgrpd *nrgd; + unsigned int num_gh; + int dir_rename = 0; +- struct gfs2_diradd da = { .nr_blocks = 0, }; ++ struct gfs2_diradd da = { .nr_blocks = 0, .save_loc = 0, }; + unsigned int x; + int error; + +-- +1.9.3 + diff --git a/kernel.spec b/kernel.spec index 194396c1d..1955ea0b1 100644 --- a/kernel.spec +++ b/kernel.spec @@ -42,7 +42,7 @@ Summary: The Linux kernel # For non-released -rc kernels, this will be appended after the rcX and # gitX tags, so a 3 here would become part of release "0.rcX.gitX.3" # -%global baserelease 1 +%global baserelease 2 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching @@ -625,6 +625,8 @@ Patch26028: HID-rmi-check-sanity-of-incoming-report.patch #rhbz 1145318 Patch26029: KEYS-Reinstate-EPERM-for-a-key-type-name-beginning-w.patch +Patch26030: GFS2-Make-rename-not-save-dirent-location.patch + # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel Patch30000: kernel-arm64.patch @@ -1362,6 +1364,8 @@ ApplyPatch HID-rmi-check-sanity-of-incoming-report.patch #rhbz 1145318 ApplyPatch KEYS-Reinstate-EPERM-for-a-key-type-name-beginning-w.patch +ApplyPatch GFS2-Make-rename-not-save-dirent-location.patch + %if 0%{?aarch64patches} ApplyPatch kernel-arm64.patch %ifnarch aarch64 # this is stupid, but i want to notice before secondary koji does. @@ -2230,6 +2234,9 @@ fi # ||----w | # || || %changelog +* Tue Oct 07 2014 Josh Boyer <jwboyer@fedoraproject.org> +- Add patch to fix GFS2 regression (from Bob Peterson) + * Mon Oct 06 2014 Kyle McMartin <kyle@fedoraproject.org> - enable 64K pages on arm64... (presently) needed to boot on amd seattle platforms due to physical memory being unreachable. diff --git a/ppc64-fixtools.patch b/ppc64-fixtools.patch index 7bebf788a..f8c934ba2 100644 --- a/ppc64-fixtools.patch +++ b/ppc64-fixtools.patch @@ -1,11 +1,14 @@ From: Peter Robinson <pbrobinson@gmail.com> -Date: Mon Oct 06 15:15:15 2014 +0100 -Subject: [Patch] ppc64-fixtools +Date: Mon, 6 Oct 2014 15:15:15 +0100 +Subject: [PATCH] ppc64-fixtools Build tools on ppc64le (rhbz 1138884), Some minor ppc64 cleanups +--- + tools/perf/arch/powerpc/util/skip-callchain-idx.c | 1 + + 1 file changed, 1 insertion(+) diff --git a/tools/perf/arch/powerpc/util/skip-callchain-idx.c b/tools/perf/arch/powerpc/util/skip-callchain-idx.c -index a7c23a4..d73ef8b 100644 +index a7c23a4b3778..d73ef8bb08c7 100644 --- a/tools/perf/arch/powerpc/util/skip-callchain-idx.c +++ b/tools/perf/arch/powerpc/util/skip-callchain-idx.c @@ -15,6 +15,7 @@ @@ -16,3 +19,6 @@ index a7c23a4..d73ef8b 100644 /* * When saving the callchain on Power, the kernel conservatively saves +-- +1.9.3 + |