GFS2: Pull request (merge window)

From: Bob Peterson
Date: Fri Jul 22 2016 - 13:33:53 EST

Hi Linus,

Please consider pulling the following changes for the GFS2 file system.

Since I'll be on vacation / holiday all next week, I'm doing the merge
window processing for GFS2 early this time, before the merge window has
been officially opened: I'd rather post the patches a little early than
delay it until I return, then be late and have you be unhappy with me
as a maintainer.

Also, I apologize that the last patch, "GFS2: Fix gfs2_replay_incr_blk
for multiple journal sizes" hasn't had much bake time. The patch is
straightforward, reviewed, and well tested with a reliable recreation
scenario. Since the bug prevents users from mounting their GFS2 file
system, I wanted to get it in as soon as possible. I felt that the need
outweighed other concerns.

Since I'll be on vacation next week, Andreas Gruenbacher can make changes
to the linux-gfs2 repo if need be.

Bob Peterson

The following changes since commit 29567292c0b5b2fb484125c280a2175141fe2205:

Merge tag 'for-linus-4.7-rc0-tag' of git:// (2016-05-24 10:22:34 -0700)

are available in the git repository at:

git:// tags/gfs2-4.7.fixes

for you to fetch changes up to e1cb6be9e142e6cc6246f3ab2776b4d7a2b3d9f0:

GFS2: Fix gfs2_replay_incr_blk for multiple journal sizes (2016-07-21 13:02:44 -0500)

We've got ten patches this time, half of which are related to a plethora
of nasty outcomes when inodes are transitioned from the unlinked state
to the free state. Small file systems are particularly vulnerable to these
problems, and it can manifest as mainly hangs, but also file system
corruption. The patches have been tested for literally many weeks, with a
very gruelling test, so I have a high level of confidence.

- Andreas Gruenbacher wrote a series of 5 patches for various lockups
during the transition of inodes from unlinked to free. The main patch
is titled "Fix gfs2_lookup_by_inum lock inversion" and the other 4 are
support and cleanup patches related to that.
- Ben Marzinski contributed 2 patches with regard to a recreatable
problem when gfs2 tries to write a page to a file that is being
truncated, resulting in a BUG() in gfs2_remove_from_journal.
Note that Ben had to export vfs function __block_write_full_page to get
this to work properly. It's been posted a long time and he talked to
various VFS people about it, and nobody seemed to mind.
- I contributed 3 patches. (1) The first one fixes a memory corruptor:
a race in which one process can overwrite the gl_object pointer set by
another process, causing kernel panic and other symptoms. (2) The second
patch fixes another race that resulted in a false-positive BUG_ON. This
occurred when resource group reservations were freed by one process
while another process was trying to grab a new reservation in the same
resource group. (3) The third patch fixes a problem with doing journal
replay when the journals are not all the same size.

Andreas Gruenbacher (5):
gfs2: Initialize iopen glock holder for new inodes
gfs2: Fix gfs2_lookup_by_inum lock inversion
gfs2: Get rid of gfs2_ilookup
gfs2: Large-filesystem fix for 32-bit systems
gfs2: Lock holder cleanup

Benjamin Marzinski (2):
fs: export __block_write_full_page
gfs2: writeout truncated pages

Bob Peterson (3):
GFS2: don't set rgrp gl_object until it's inserted into rgrp tree
GFS2: Check rs_free with rd_rsspin protection
GFS2: Fix gfs2_replay_incr_blk for multiple journal sizes

fs/buffer.c | 3 +-
fs/gfs2/aops.c | 49 +++++++++++------
fs/gfs2/dentry.c | 2 +-
fs/gfs2/dir.c | 3 +-
fs/gfs2/export.c | 11 ----
fs/gfs2/file.c | 2 +-
fs/gfs2/glock.c | 11 +---
fs/gfs2/glock.h | 10 ++++
fs/gfs2/inode.c | 128 +++++++++++++++++++++++++++++---------------
fs/gfs2/inode.h | 4 +-
fs/gfs2/lops.c | 11 ++--
fs/gfs2/main.c | 1 +
fs/gfs2/ops_fstype.c | 3 +-
fs/gfs2/quota.c | 2 +-
fs/gfs2/recovery.c | 6 +--
fs/gfs2/recovery.h | 4 +-
fs/gfs2/rgrp.c | 21 ++++----
fs/gfs2/super.c | 24 +++++----
include/linux/buffer_head.h | 3 ++
19 files changed, 182 insertions(+), 116 deletions(-)