void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, struct tlock * tlck) 
static void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, struct tlock * tlck) 
void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,	    struct tlock * tlck){	struct pxd_lock *pxdlock;	int i, nlock;	pxd_t *pxd;	/*	 *      page relocation: free the source page extent	 *	 * a maplock for txUpdateMap() for free of the page	 * has been formatted at txLock() time saving the src	 * relocated page address;	 */	if (tlck->type & tlckRELOCATE) {		/* log LOG_NOREDOPAGE of the old relocated page		 * for logredo() to start NoRedoPage filter;		 */		lrd->type = cpu_to_le16(LOG_NOREDOPAGE);		pxdlock = (struct pxd_lock *) & tlck->lock;		pxd = &lrd->log.redopage.pxd;		*pxd = pxdlock->pxd;		lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL));		/* (N.B. currently, logredo() does NOT update bmap		 * for free of the page itself for (LOG_XTREE|LOG_NOREDOPAGE);		 * if page free from relocation, LOG_UPDATEMAP log is		 * specifically generated now for logredo()		 * to update bmap for free of src relocated page;		 * (new flag LOG_RELOCATE may be introduced which will		 * inform logredo() to start NORedoPage filter and also		 * update block allocation map at the same time, thus		 * avoiding an extra log write);		 */		lrd->type = cpu_to_le16(LOG_UPDATEMAP);		lrd->log.updatemap.type = cpu_to_le16(LOG_FREEPXD);		lrd->log.updatemap.nxd = cpu_to_le16(1);		lrd->log.updatemap.pxd = pxdlock->pxd;		lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL));		/* a maplock for txUpdateMap() for free of the page		 * has been formatted at txLock() time;		 */		tlck->flag |= tlckUPDATEMAP;		return;	}	/*	 * Otherwise it's not a relocate request	 *	 */	else {		/* log LOG_UPDATEMAP for logredo() to update bmap for		 * free of truncated/relocated delta extent of the data;		 * e.g.: external EA extent, relocated/truncated extent		 * from xtTailgate();		 */		lrd->type = cpu_to_le16(LOG_UPDATEMAP);		pxdlock = (struct pxd_lock *) & tlck->lock;		nlock = pxdlock->index;		for (i = 0; i < nlock; i++, pxdlock++) {			if (pxdlock->flag & mlckALLOCPXD)				lrd->log.updatemap.type =				    cpu_to_le16(LOG_ALLOCPXD);			else				lrd->log.updatemap.type =				    cpu_to_le16(LOG_FREEPXD);			lrd->log.updatemap.nxd = cpu_to_le16(1);			lrd->log.updatemap.pxd = pxdlock->pxd;			lrd->backchain =			    cpu_to_le32(lmLog(log, tblk, lrd, NULL));			jfs_info("mapLog: xaddr:0x%lx xlen:0x%x",				 (ulong) addressPXD(&pxdlock->pxd),				 lengthPXD(&pxdlock->pxd));		}		/* update bmap */		tlck->flag |= tlckUPDATEMAP;	}}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/6cb1269b9607649b5edf1c4e7818e0cf34a9db71/jfs_txnmgr.c/clean/fs/jfs/jfs_txnmgr.c