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

 - Fix some corner cases on filesystems with a block size < page size.

 - Fix a corner case that could expose incorrect access times over nfs.

 - Revert an otherwise sensible revoke accounting cleanup that causes
   assertion failures. The revoke accounting is whacky and needs to be
   fixed properly before we can add back this cleanup.

 - Various other minor cleanups.

In addition, please expect to see another pull request from Bob Peterson
about his gfs2 recovery patch queue shortly.

* tag 'gfs2-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
  Revert "gfs2: eliminate tr_num_revoke_rm"
  gfs2: remove unused LBIT macros
  fs/gfs2: remove unused IS_DINODE and IS_LEAF macros
  gfs2: Remove GFS2_MIN_LVB_SIZE define
  gfs2: Fix incorrect variable name
  gfs2: Avoid access time thrashing in gfs2_inode_lookup
  gfs2: minor cleanup: remove unneeded variable ret in gfs2_jdata_writepage
  gfs2: eliminate ssize parameter from gfs2_struct2blk
  gfs2: Another gfs2_find_jhead fix
parents 677b60dc a31b4ec5
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -183,14 +183,12 @@ static int gfs2_jdata_writepage(struct page *page, struct writeback_control *wbc
	struct inode *inode = page->mapping->host;
	struct inode *inode = page->mapping->host;
	struct gfs2_inode *ip = GFS2_I(inode);
	struct gfs2_inode *ip = GFS2_I(inode);
	struct gfs2_sbd *sdp = GFS2_SB(inode);
	struct gfs2_sbd *sdp = GFS2_SB(inode);
	int ret;


	if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(ip->i_gl)))
	if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(ip->i_gl)))
		goto out;
		goto out;
	if (PageChecked(page) || current->journal_info)
	if (PageChecked(page) || current->journal_info)
		goto out_ignore;
		goto out_ignore;
	ret = __gfs2_jdata_writepage(page, wbc);
	return __gfs2_jdata_writepage(page, wbc);
	return ret;


out_ignore:
out_ignore:
	redirty_page_for_writepage(wbc, page);
	redirty_page_for_writepage(wbc, page);
+0 −3
Original line number Original line Diff line number Diff line
@@ -73,9 +73,6 @@
#include "bmap.h"
#include "bmap.h"
#include "util.h"
#include "util.h"


#define IS_LEAF     1 /* Hashed (leaf) directory */
#define IS_DINODE   2 /* Linear (stuffed dinode block) directory */

#define MAX_RA_BLOCKS 32 /* max read-ahead blocks */
#define MAX_RA_BLOCKS 32 /* max read-ahead blocks */


#define gfs2_disk_hash2offset(h) (((u64)(h)) >> 1)
#define gfs2_disk_hash2offset(h) (((u64)(h)) >> 1)
+1 −1
Original line number Original line Diff line number Diff line
@@ -826,7 +826,7 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number,
	memset(&gl->gl_lksb, 0, sizeof(struct dlm_lksb));
	memset(&gl->gl_lksb, 0, sizeof(struct dlm_lksb));


	if (glops->go_flags & GLOF_LVB) {
	if (glops->go_flags & GLOF_LVB) {
		gl->gl_lksb.sb_lvbptr = kzalloc(GFS2_MIN_LVB_SIZE, GFP_NOFS);
		gl->gl_lksb.sb_lvbptr = kzalloc(GDLM_LVB_SIZE, GFP_NOFS);
		if (!gl->gl_lksb.sb_lvbptr) {
		if (!gl->gl_lksb.sb_lvbptr) {
			kmem_cache_free(cachep, gl);
			kmem_cache_free(cachep, gl);
			return -ENOMEM;
			return -ENOMEM;
+1 −1
Original line number Original line Diff line number Diff line
@@ -95,7 +95,7 @@ static void gfs2_ail_empty_gl(struct gfs2_glock *gl)
	/* A shortened, inline version of gfs2_trans_begin()
	/* A shortened, inline version of gfs2_trans_begin()
         * tr->alloced is not set since the transaction structure is
         * tr->alloced is not set since the transaction structure is
         * on the stack */
         * on the stack */
	tr.tr_reserved = 1 + gfs2_struct2blk(sdp, tr.tr_revokes, sizeof(u64));
	tr.tr_reserved = 1 + gfs2_struct2blk(sdp, tr.tr_revokes);
	tr.tr_ip = _RET_IP_;
	tr.tr_ip = _RET_IP_;
	if (gfs2_log_reserve(sdp, tr.tr_reserved) < 0)
	if (gfs2_log_reserve(sdp, tr.tr_reserved) < 0)
		return;
		return;
+3 −3
Original line number Original line Diff line number Diff line
@@ -387,8 +387,6 @@ struct gfs2_glock {
	struct rhash_head gl_node;
	struct rhash_head gl_node;
};
};


#define GFS2_MIN_LVB_SIZE 32	/* Min size of LVB that gfs2 supports */

enum {
enum {
	GIF_INVALID		= 0,
	GIF_INVALID		= 0,
	GIF_QD_LOCKED		= 1,
	GIF_QD_LOCKED		= 1,
@@ -505,6 +503,7 @@ struct gfs2_trans {
	unsigned int tr_num_buf_rm;
	unsigned int tr_num_buf_rm;
	unsigned int tr_num_databuf_rm;
	unsigned int tr_num_databuf_rm;
	unsigned int tr_num_revoke;
	unsigned int tr_num_revoke;
	unsigned int tr_num_revoke_rm;


	struct list_head tr_list;
	struct list_head tr_list;
	struct list_head tr_databuf;
	struct list_head tr_databuf;
@@ -703,6 +702,7 @@ struct gfs2_sbd {
	u32 sd_fsb2bb_shift;
	u32 sd_fsb2bb_shift;
	u32 sd_diptrs;	/* Number of pointers in a dinode */
	u32 sd_diptrs;	/* Number of pointers in a dinode */
	u32 sd_inptrs;	/* Number of pointers in a indirect block */
	u32 sd_inptrs;	/* Number of pointers in a indirect block */
	u32 sd_ldptrs;  /* Number of pointers in a log descriptor block */
	u32 sd_jbsize;	/* Size of a journaled data block */
	u32 sd_jbsize;	/* Size of a journaled data block */
	u32 sd_hash_bsize;	/* sizeof(exhash block) */
	u32 sd_hash_bsize;	/* sizeof(exhash block) */
	u32 sd_hash_bsize_shift;
	u32 sd_hash_bsize_shift;
@@ -803,7 +803,7 @@ struct gfs2_sbd {


	struct gfs2_trans *sd_log_tr;
	struct gfs2_trans *sd_log_tr;
	unsigned int sd_log_blks_reserved;
	unsigned int sd_log_blks_reserved;
	int sd_log_commited_revoke;
	int sd_log_committed_revoke;


	atomic_t sd_log_pinned;
	atomic_t sd_log_pinned;
	unsigned int sd_log_num_revoke;
	unsigned int sd_log_num_revoke;
Loading