static int diLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,	  struct tlock * tlck, struct commit * cd){	int rc = 0;	struct metapage *mp;	pxd_t *pxd;	struct pxd_lock *pxdlock;	mp = tlck->mp;	/* initialize as REDOPAGE record format */	lrd->log.redopage.type = cpu_to_le16(LOG_INODE);	lrd->log.redopage.l2linesize = cpu_to_le16(L2INODESLOTSIZE);	pxd = &lrd->log.redopage.pxd;	/*	 *      inode after image	 */	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);		lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck));		/* mark page as homeward bound */		tlck->flag |= tlckWRITEPAGE;	} else if (tlck->type & tlckFREE) {		/*		 *      free inode extent		 *		 * (pages of the freed inode extent have been invalidated and		 * a maplock for free of the extent has been formatted at		 * txLock() time);		 *		 * the tlock had been acquired on the inode allocation map page		 * (iag) that specifies the freed extent, even though the map		 * page is not itself logged, to prevent pageout of the map		 * page before the log;		 */		/* log LOG_NOREDOINOEXT of the freed inode extent for		 * logredo() to start NoRedoPage filters, and to update		 * imap and bmap for free of the extent;		 */		lrd->type = cpu_to_le16(LOG_NOREDOINOEXT);		/*		 * For the LOG_NOREDOINOEXT record, we need		 * to pass the IAG number and inode extent		 * index (within that IAG) from which the		 * the extent being released.  These have been		 * passed to us in the iplist[1] and iplist[2].		 */		lrd->log.noredoinoext.iagnum =		    cpu_to_le32((u32) (size_t) cd->iplist[1]);		lrd->log.noredoinoext.inoext_idx =		    cpu_to_le32((u32) (size_t) cd->iplist[2]);		pxdlock = (struct pxd_lock *) & tlck->lock;		*pxd = pxdlock->pxd;		lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL));		/* update bmap */		tlck->flag |= tlckUPDATEMAP;		/* mark page as homeward bound */		tlck->flag |= tlckWRITEPAGE;	} else		jfs_err("diLog: UFO type tlck:0x%p", tlck);#ifdef  _JFS_WIP	/*	 *      alloc/free external EA extent	 *	 * a maplock for txUpdateMap() to update bPWMAP for alloc/free	 * of the extent has been formatted at txLock() time;	 */	else {		assert(tlck->type & tlckEA);		/* log LOG_UPDATEMAP for logredo() to update bmap for		 * alloc of new (and free of old) external EA extent;		 */		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));		}		/* update bmap */		tlck->flag |= tlckUPDATEMAP;	}#endif				/* _JFS_WIP */	return rc;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/1868f4aa5a4a72bbe0b7db6c1d4ee666824c3895/jfs_txnmgr.c/clean/fs/jfs/jfs_txnmgr.c