cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 0/4] Fix erroneous ETXTBSY problems with GFS2
Date: Wed, 28 Oct 2015 09:20:05 -0500	[thread overview]
Message-ID: <1446042009-30312-1-git-send-email-rpeterso@redhat.com> (raw)

Commit 2b3dcf3 (GFS2: Increase i_writecount during gfs2_setattr_size)
added a bunch of calls to get_write_access() in order to ensure file close
could not delete an inode's multi-block reservation while the function
was running. For example, close was interfering with setattr_size.
The patch worked as expected, but there was an unintended consequence:
If a GFS2 file is open, you can't do these functions (like chown) or
you'll get ETXTBSY (Text file busy). For example, if you're running a
program and try to do chown or chattr while it's running, it will fail.

This problem is easily fixed by reverting that patch and including the
multi-block reservation structure inside the gfs2 inode. The problem is,
the gfs2 inode then grows to a much bigger size.

This patch set takes some measures to reduce the size of the gfs2 inode
and then making the reservations part of the inode.

Before the patch set, GFS2 inodes were 880 bytes in length. Adding just
the reservations structure bumped it up to 1304, which is not good.
With all these patches in place, the size is 1008, which is comparable
to ext4 (1048) and xfs (1088). Further savings are possible (and I've
prototyped a few) but I don't want to get too extreme here.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
Bob Peterson (4):
  GFS2: Reduce size of incore inode
  GFS2: Reduce inode size by using 32-bit i_generation
  GFS2: Extract quota data from reservations structure (revert 5407e24)
  GFS2: Make rgrp reservations part of the gfs2_inode structure

 fs/gfs2/aops.c                   |  2 +-
 fs/gfs2/bmap.c                   | 15 ++-----
 fs/gfs2/file.c                   | 36 +++-------------
 fs/gfs2/glock.c                  | 10 ++---
 fs/gfs2/glock.h                  | 26 ++++++------
 fs/gfs2/glops.c                  |  2 +-
 fs/gfs2/incore.h                 | 28 ++++++++-----
 fs/gfs2/inode.c                  | 43 +++----------------
 fs/gfs2/main.c                   | 16 +++----
 fs/gfs2/quota.c                  | 90 +++++++++++++++++++++++-----------------
 fs/gfs2/rgrp.c                   | 66 +++++++++--------------------
 fs/gfs2/rgrp.h                   |  5 +--
 fs/gfs2/super.c                  |  9 ++--
 fs/gfs2/util.c                   |  2 +-
 fs/gfs2/util.h                   |  2 +-
 include/uapi/linux/gfs2_ondisk.h | 25 +++++++++--
 16 files changed, 161 insertions(+), 216 deletions(-)

-- 
2.4.3



             reply	other threads:[~2015-10-28 14:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28 14:20 Bob Peterson [this message]
2015-10-28 14:20 ` [Cluster-devel] [PATCH 1/4] GFS2: Reduce size of incore inode Bob Peterson
2015-10-30 10:34   ` Steven Whitehouse
2015-10-28 14:20 ` [Cluster-devel] [PATCH 2/4] GFS2: Reduce inode size by using 32-bit i_generation Bob Peterson
2015-10-29 17:21   ` Andrew Price
2015-10-29 18:39     ` Bob Peterson
2015-10-29 18:43       ` [Cluster-devel] [GFS2 PATCH 2/4 v2] " Bob Peterson
2015-10-30 10:42   ` [Cluster-devel] [PATCH 2/4] " Steven Whitehouse
2015-10-28 14:20 ` [Cluster-devel] [PATCH 3/4] GFS2: Extract quota data from reservations structure (revert 5407e24) Bob Peterson
2015-10-28 14:20 ` [Cluster-devel] [PATCH 4/4] GFS2: Make rgrp reservations part of the gfs2_inode structure Bob Peterson
2015-10-29 17:21 ` [Cluster-devel] [PATCH 0/4] Fix erroneous ETXTBSY problems with GFS2 Andrew Price

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1446042009-30312-1-git-send-email-rpeterso@redhat.com \
    --to=rpeterso@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).