* hold on to mp+lock thru update of maps
*/
-
#include <linux/fs.h>
#include <linux/vmalloc.h>
#include <linux/smp_lock.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include "jfs_incore.h"
+#include "jfs_inode.h"
#include "jfs_filsys.h"
#include "jfs_metapage.h"
#include "jfs_dinode.h"
static int TxLockVHWM; /* Very High water mark */
struct tlock *TxLock; /* transaction lock table */
-
/*
* transaction management lock
*/
#define TXN_WAKEUP(event) wake_up_all(event)
-
/*
* statistics
*/
int waitlock; /* 4: # of tlock wait */
} stattx;
-
-/*
- * external references
- */
-extern int lmGroupCommit(struct jfs_log *, struct tblock *);
-extern int jfs_commit_inode(struct inode *, int);
-extern int jfs_stop_threads;
-
-extern struct completion jfsIOwait;
-
/*
* forward references
*/
TxBlock = NULL;
}
-
/*
* NAME: txBegin()
*
return t;
}
-
/*
* NAME: txBeginAnon()
*
TXN_UNLOCK();
}
-
/*
* txEnd()
*
TXN_WAKEUP(&TxAnchor.freewait);
}
-
/*
* txLock()
*
return NULL;
}
-
/*
* NAME: txRelease()
*
TXN_UNLOCK();
}
-
/*
* NAME: txUnlock()
*
}
}
-
/*
* txMaplock()
*
return tlck;
}
-
/*
* txLinelock()
*
return linelock;
}
-
-
/*
* transaction commit management
* -----------------------------
return rc;
}
-
/*
* NAME: txLog()
*
return rc;
}
-
/*
* diLog()
*
if (tlck->type & tlckENTRY) {
/* log after-image for logredo(): */
lrd->type = cpu_to_le16(LOG_REDOPAGE);
-// *pxd = mp->cm_pxd;
PXDaddress(pxd, mp->index);
PXDlength(pxd,
mp->logical_size >> tblk->sb->s_blocksize_bits);
return rc;
}
-
/*
* dataLog()
*
return 0;
}
-
/*
* dtLog()
*
lrd->log.redopage.type |= cpu_to_le16(LOG_EXTEND);
else
lrd->log.redopage.type |= cpu_to_le16(LOG_NEW);
-// *pxd = mp->cm_pxd;
PXDaddress(pxd, mp->index);
PXDlength(pxd,
mp->logical_size >> tblk->sb->s_blocksize_bits);
return;
}
-
/*
* xtLog()
*
* applying the after-image to the meta-data page.
*/
lrd->type = cpu_to_le16(LOG_REDOPAGE);
-// *page_pxd = mp->cm_pxd;
PXDaddress(page_pxd, mp->index);
PXDlength(page_pxd,
mp->logical_size >> tblk->sb->s_blocksize_bits);
return;
}
-
/*
* mapLog()
*
}
}
-
/*
* txEA()
*
}
}
-
/*
* txForce()
*
}
}
-
/*
* txUpdateMap()
*
}
}
-
/*
* txAllocPMap()
*
}
}
-
/*
* txFreeMap()
*
}
}
-
/*
* txFreelock()
*
TXN_UNLOCK();
}
-
/*
* txAbort()
*
/* In case a wakeup came while all threads were active */
jfs_commit_thread_waking = 0;
- if (current->flags & PF_FREEZE) {
+ if (freezing(current)) {
LAZY_UNLOCK(flags);
- refrigerator(PF_FREEZE);
+ refrigerator();
} else {
DECLARE_WAITQUEUE(wq, current);
/* Add anon_list2 back to anon_list */
list_splice_init(&TxAnchor.anon_list2, &TxAnchor.anon_list);
- if (current->flags & PF_FREEZE) {
+ if (freezing(current)) {
TXN_UNLOCK();
- refrigerator(PF_FREEZE);
+ refrigerator();
} else {
DECLARE_WAITQUEUE(wq, current);