Commit 143443ff authored by Dave Kleikamp's avatar Dave Kleikamp Committed by Dave Kleikamp

JFS: Remove COMMIT_Holdlock

The logic surrounding COMMIT_Holdlock was well-intentioned to reduce
latency when deleting files, but it can also result in a hang that I don't
have good fix for.  I don't think removing this will hurt our overall
performance very much.
parent d20e9e42
...@@ -116,7 +116,6 @@ enum cflags { ...@@ -116,7 +116,6 @@ enum cflags {
COMMIT_Inlineea, /* commit inode inline EA */ COMMIT_Inlineea, /* commit inode inline EA */
COMMIT_Freewmap, /* free WMAP at iClose() */ COMMIT_Freewmap, /* free WMAP at iClose() */
COMMIT_Dirty, /* Inode is really dirty */ COMMIT_Dirty, /* Inode is really dirty */
COMMIT_Holdlock, /* Hold the IWRITE_LOCK until commit is done */
COMMIT_Dirtable, /* commit changes to di_dirtable */ COMMIT_Dirtable, /* commit changes to di_dirtable */
COMMIT_Stale, /* data extent is no longer valid */ COMMIT_Stale, /* data extent is no longer valid */
COMMIT_Synclist, /* metadata pages on group commit synclist */ COMMIT_Synclist, /* metadata pages on group commit synclist */
......
...@@ -1844,18 +1844,10 @@ void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, ...@@ -1844,18 +1844,10 @@ void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
} else { } else {
/* /*
* xdlist will point to into inode's xtree, ensure * xdlist will point to into inode's xtree, ensure
* that transaction is not committed lazily unless * that transaction is not committed lazily.
* we're deleting the inode (unlink). In that case
* we have special logic for the inode to be
* unlocked by the lazy commit thread.
*/ */
xadlock->xdlist = &p->xad[XTENTRYSTART]; xadlock->xdlist = &p->xad[XTENTRYSTART];
if ((tblk->xflag & COMMIT_LAZY) && tblk->xflag &= ~COMMIT_LAZY;
(tblk->xflag & COMMIT_DELETE) &&
(tblk->ip == ip))
set_cflag(COMMIT_Holdlock, ip);
else
tblk->xflag &= ~COMMIT_LAZY;
} }
jFYI(1, jFYI(1,
("xtLog: free ip:0x%p mp:0x%p count:%d lwm:2\n", ("xtLog: free ip:0x%p mp:0x%p count:%d lwm:2\n",
...@@ -2387,10 +2379,6 @@ static void txUpdateMap(struct tblock * tblk) ...@@ -2387,10 +2379,6 @@ static void txUpdateMap(struct tblock * tblk)
ip = tblk->ip; ip = tblk->ip;
diUpdatePMap(ipimap, ip->i_ino, TRUE, tblk); diUpdatePMap(ipimap, ip->i_ino, TRUE, tblk);
ipimap->i_state |= I_DIRTY; ipimap->i_state |= I_DIRTY;
if (test_and_clear_cflag(COMMIT_Holdlock, ip)) {
if (tblk->flag & tblkGC_LAZY)
IWRITE_UNLOCK(ip);
}
iput(ip); iput(ip);
} }
} }
......
...@@ -544,8 +544,7 @@ int jfs_unlink(struct inode *dip, struct dentry *dentry) ...@@ -544,8 +544,7 @@ int jfs_unlink(struct inode *dip, struct dentry *dentry)
if (ip->i_nlink == 0) if (ip->i_nlink == 0)
set_cflag(COMMIT_Nolink, ip); set_cflag(COMMIT_Nolink, ip);
if (!test_cflag(COMMIT_Holdlock, ip)) IWRITE_UNLOCK(ip);
IWRITE_UNLOCK(ip);
/* /*
* Truncating the directory index table is not guaranteed. It * Truncating the directory index table is not guaranteed. It
...@@ -1256,14 +1255,6 @@ int jfs_rename(struct inode *old_dir, struct dentry *old_dentry, ...@@ -1256,14 +1255,6 @@ int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
rc = txCommit(tid, ipcount, iplist, commit_flag); rc = txCommit(tid, ipcount, iplist, commit_flag);
/*
* Don't unlock new_ip if COMMIT_HOLDLOCK is set
*/
if (new_ip && test_cflag(COMMIT_Holdlock, new_ip)) {
up(&JFS_IP(new_ip)->commit_sem);
new_ip = 0;
}
out4: out4:
txEnd(tid); txEnd(tid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment