Commit 7703f46f authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull gfs2 updates from Andreas Gruenbacher:

 - Don't wait for unfreeze of the wrong filesystems

 - Remove an obsolete delete_work_func hack and an incorrect
   sb_start_write

 - Minor documentation updates and cosmetic care

* tag 'gfs2-for-5.11' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
  gfs2: in signal_our_withdraw wait for unfreeze of _this_ fs only
  gfs2: Remove sb_start_write from gfs2_statfs_sync
  gfs2: remove trailing semicolons from macro definitions
  Revert "GFS2: Prevent delete work from occurring on glocks used for create"
  gfs2: Make inode operations static
  MAINTAINERS: Add gfs2 bug tracker link
  Documentation: Update filesystems/gfs2.rst
parents 450f68e2 6e5c4ea3
Loading
Loading
Loading
Loading
+18 −19
Original line number Diff line number Diff line
.. SPDX-License-Identifier: GPL-2.0

==================
Global File System
==================
====================
Global File System 2
====================

https://fedorahosted.org/cluster/wiki/HomePage

GFS is a cluster file system. It allows a cluster of computers to
GFS2 is a cluster file system. It allows a cluster of computers to
simultaneously use a block device that is shared between them (with FC,
iSCSI, NBD, etc).  GFS reads and writes to the block device like a local
iSCSI, NBD, etc).  GFS2 reads and writes to the block device like a local
file system, but also uses a lock module to allow the computers coordinate
their I/O so file system consistency is maintained.  One of the nifty
features of GFS is perfect consistency -- changes made to the file system
features of GFS2 is perfect consistency -- changes made to the file system
on one machine show up immediately on all other machines in the cluster.

GFS uses interchangeable inter-node locking mechanisms, the currently
GFS2 uses interchangeable inter-node locking mechanisms, the currently
supported mechanisms are:

  lock_nolock
    - allows gfs to be used as a local file system
    - allows GFS2 to be used as a local file system

  lock_dlm
    - uses a distributed lock manager (dlm) for inter-node locking.
    - uses the distributed lock manager (dlm) for inter-node locking.
      The dlm is found at linux/fs/dlm/

Lock_dlm depends on user space cluster management systems found
lock_dlm depends on user space cluster management systems found
at the URL above.

To use gfs as a local file system, no external clustering systems are
To use GFS2 as a local file system, no external clustering systems are
needed, simply::

  $ mkfs -t gfs2 -p lock_nolock -j 1 /dev/block_device
  $ mount -t gfs2 /dev/block_device /dir

If you are using Fedora, you need to install the gfs2-utils package
and, for lock_dlm, you will also need to install the cman package
and write a cluster.conf as per the documentation. For F17 and above
cman has been replaced by the dlm package.
The gfs2-utils package is required on all cluster nodes and, for lock_dlm, you
will also need the dlm and corosync user space utilities configured as per the
documentation.

gfs2-utils can be found at https://pagure.io/gfs2-utils

GFS2 is not on-disk compatible with previous versions of GFS, but it
is pretty close.

The following man pages can be found at the URL above:
The following man pages are available from gfs2-utils:

  ============		=============================================
  fsck.gfs2		to repair a filesystem
  gfs2_grow		to expand a filesystem online
  gfs2_jadd		to add journals to a filesystem online
  tunegfs2		to manipulate, examine and tune a filesystem
  gfs2_convert		to convert a gfs filesystem to gfs2 in-place
  gfs2_convert		to convert a gfs filesystem to GFS2 in-place
  mkfs.gfs2		to make a filesystem
  ============		=============================================
+1 −1
Original line number Diff line number Diff line
@@ -7502,7 +7502,7 @@ M: Bob Peterson <rpeterso@redhat.com>
M:	Andreas Gruenbacher <agruenba@redhat.com>
L:	cluster-devel@redhat.com
S:	Supported
W:	http://sources.redhat.com/cluster/
B:	https://bugzilla.kernel.org/enter_bug.cgi?product=File%20System&component=gfs2
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git
F:	Documentation/filesystems/gfs2*
F:	fs/gfs2/
+0 −8
Original line number Diff line number Diff line
@@ -857,12 +857,6 @@ static void delete_work_func(struct work_struct *work)
	clear_bit(GLF_PENDING_DELETE, &gl->gl_flags);
	spin_unlock(&gl->gl_lockref.lock);

	/* If someone's using this glock to create a new dinode, the block must
	   have been freed by another node, then re-used, in which case our
	   iopen callback is too late after the fact. Ignore it. */
	if (test_bit(GLF_INODE_CREATING, &gl->gl_flags))
		goto out;

	if (test_bit(GLF_DEMOTE, &gl->gl_flags)) {
		/*
		 * If we can evict the inode, give the remote node trying to
@@ -2112,8 +2106,6 @@ static const char *gflags2str(char *buf, const struct gfs2_glock *gl)
		*p++ = 'o';
	if (test_bit(GLF_BLOCKING, gflags))
		*p++ = 'b';
	if (test_bit(GLF_INODE_CREATING, gflags))
		*p++ = 'c';
	if (test_bit(GLF_PENDING_DELETE, gflags))
		*p++ = 'P';
	if (test_bit(GLF_FREEING, gflags))
+0 −1
Original line number Diff line number Diff line
@@ -348,7 +348,6 @@ enum {
	GLF_LRU				= 13,
	GLF_OBJECT			= 14, /* Used only for tracing */
	GLF_BLOCKING			= 15,
	GLF_INODE_CREATING		= 16, /* Inode creation occurring */
	GLF_PENDING_DELETE		= 17,
	GLF_FREEING			= 18, /* Wait for glock to be freed */
};
+8 −8
Original line number Diff line number Diff line
@@ -36,6 +36,10 @@
#include "super.h"
#include "glops.h"

static const struct inode_operations gfs2_file_iops;
static const struct inode_operations gfs2_dir_iops;
static const struct inode_operations gfs2_symlink_iops;

static int iget_test(struct inode *inode, void *opaque)
{
	u64 no_addr = *(u64 *)opaque;
@@ -605,7 +609,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
	struct inode *inode = NULL;
	struct gfs2_inode *dip = GFS2_I(dir), *ip;
	struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode);
	struct gfs2_glock *io_gl = NULL;
	struct gfs2_glock *io_gl;
	int error, free_vfs_inode = 1;
	u32 aflags = 0;
	unsigned blocks = 1;
@@ -746,8 +750,6 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
	init_dinode(dip, ip, symname);
	gfs2_trans_end(sdp);

	BUG_ON(test_and_set_bit(GLF_INODE_CREATING, &io_gl->gl_flags));

	error = gfs2_glock_nq_init(io_gl, LM_ST_SHARED, GL_EXACT, &ip->i_iopen_gh);
	if (error)
		goto fail_gunlock2;
@@ -793,7 +795,6 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
	gfs2_glock_dq_uninit(ghs);
	gfs2_qa_put(ip);
	gfs2_glock_dq_uninit(ghs + 1);
	clear_bit(GLF_INODE_CREATING, &io_gl->gl_flags);
	gfs2_glock_put(io_gl);
	gfs2_qa_put(dip);
	return error;
@@ -802,7 +803,6 @@ fail_gunlock3:
	glock_clear_object(io_gl, ip);
	gfs2_glock_dq_uninit(&ip->i_iopen_gh);
fail_gunlock2:
	clear_bit(GLF_INODE_CREATING, &io_gl->gl_flags);
	glock_clear_object(io_gl, ip);
	gfs2_glock_put(io_gl);
fail_free_inode:
@@ -2136,7 +2136,7 @@ static int gfs2_update_time(struct inode *inode, struct timespec64 *time,
	return generic_update_time(inode, time, flags);
}

const struct inode_operations gfs2_file_iops = {
static const struct inode_operations gfs2_file_iops = {
	.permission = gfs2_permission,
	.setattr = gfs2_setattr,
	.getattr = gfs2_getattr,
@@ -2147,7 +2147,7 @@ const struct inode_operations gfs2_file_iops = {
	.update_time = gfs2_update_time,
};

const struct inode_operations gfs2_dir_iops = {
static const struct inode_operations gfs2_dir_iops = {
	.create = gfs2_create,
	.lookup = gfs2_lookup,
	.link = gfs2_link,
@@ -2168,7 +2168,7 @@ const struct inode_operations gfs2_dir_iops = {
	.atomic_open = gfs2_atomic_open,
};

const struct inode_operations gfs2_symlink_iops = {
static const struct inode_operations gfs2_symlink_iops = {
	.get_link = gfs2_get_link,
	.permission = gfs2_permission,
	.setattr = gfs2_setattr,
Loading