Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4667a0ec authored by Steven Whitehouse's avatar Steven Whitehouse
Browse files

GFS2: Make writeback more responsive to system conditions



This patch adds writeback_control to writing back the AIL
list. This means that we can then take advantage of the
information we get in ->write_inode() in order to set off
some pre-emptive writeback.

In addition, the AIL code is cleaned up a bit to make it
a bit simpler to understand.

There is still more which can usefully be done in this area,
but this is a good start at least.

Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent f42ab085
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ static struct dentry *gfs2_get_dentry(struct super_block *sb,
	struct gfs2_sbd *sdp = sb->s_fs_info;
	struct inode *inode;

	inode = gfs2_ilookup(sb, inum->no_addr);
	inode = gfs2_ilookup(sb, inum->no_addr, 0);
	if (inode) {
		if (GFS2_I(inode)->i_no_formal_ino != inum->no_formal_ino) {
			iput(inode);
+1 −1
Original line number Diff line number Diff line
@@ -649,7 +649,7 @@ static void delete_work_func(struct work_struct *work)
	/* Note: Unsafe to dereference ip as we don't hold right refs/locks */

	if (ip)
		inode = gfs2_ilookup(sdp->sd_vfs, no_addr);
		inode = gfs2_ilookup(sdp->sd_vfs, no_addr, 1);
	else
		inode = gfs2_lookup_by_inum(sdp, no_addr, NULL, GFS2_BLKST_UNLINKED);
	if (inode && !IS_ERR(inode)) {
+0 −4
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@

#define DIO_WAIT	0x00000010
#define DIO_METADATA	0x00000020
#define DIO_ALL		0x00000100

struct gfs2_log_operations;
struct gfs2_log_element;
@@ -377,8 +376,6 @@ struct gfs2_ail {
	unsigned int ai_first;
	struct list_head ai_ail1_list;
	struct list_head ai_ail2_list;

	u64 ai_sync_gen;
};

struct gfs2_journal_extent {
@@ -657,7 +654,6 @@ struct gfs2_sbd {
	spinlock_t sd_ail_lock;
	struct list_head sd_ail1_list;
	struct list_head sd_ail2_list;
	u64 sd_ail_sync_gen;

	/* Replay stuff */

+2 −2
Original line number Diff line number Diff line
@@ -74,14 +74,14 @@ static int iget_set(struct inode *inode, void *opaque)
	return 0;
}

struct inode *gfs2_ilookup(struct super_block *sb, u64 no_addr)
struct inode *gfs2_ilookup(struct super_block *sb, u64 no_addr, int non_block)
{
	unsigned long hash = (unsigned long)no_addr;
	struct gfs2_skip_data data;

	data.no_addr = no_addr;
	data.skipped = 0;
	data.non_block = 0;
	data.non_block = non_block;
	return ilookup5(sb, hash, iget_test, &data);
}

+1 −1
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ extern struct inode *gfs2_inode_lookup(struct super_block *sb, unsigned type,
extern struct inode *gfs2_lookup_by_inum(struct gfs2_sbd *sdp, u64 no_addr,
					 u64 *no_formal_ino,
					 unsigned int blktype);
extern struct inode *gfs2_ilookup(struct super_block *sb, u64 no_addr);
extern struct inode *gfs2_ilookup(struct super_block *sb, u64 no_addr, int nonblock);

extern int gfs2_inode_refresh(struct gfs2_inode *ip);

Loading