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

Commit f720e3ba authored by Dave Kleikamp's avatar Dave Kleikamp
Browse files

JFS: Whitespace cleanup and remove some dead code

parent 5ecd3100
Loading
Loading
Loading
Loading
+206 −213
Original line number Original line Diff line number Diff line
@@ -706,12 +706,6 @@ int dbAlloc(struct inode *ip, s64 hint, s64 nblocks, s64 * results)
	/* assert that nblocks is valid */
	/* assert that nblocks is valid */
	assert(nblocks > 0);
	assert(nblocks > 0);


#ifdef _STILL_TO_PORT
	/* DASD limit check                                     F226941 */
	if (OVER_LIMIT(ip, nblocks))
		return -ENOSPC;
#endif				/* _STILL_TO_PORT */

	/* get the log2 number of blocks to be allocated.
	/* get the log2 number of blocks to be allocated.
	 * if the number of blocks is not a log2 multiple,
	 * if the number of blocks is not a log2 multiple,
	 * it will be rounded up to the next log2 multiple.
	 * it will be rounded up to the next log2 multiple.
@@ -720,7 +714,6 @@ int dbAlloc(struct inode *ip, s64 hint, s64 nblocks, s64 * results)


	bmp = JFS_SBI(ip->i_sb)->bmap;
	bmp = JFS_SBI(ip->i_sb)->bmap;


//retry:        /* serialize w.r.t.extendfs() */
	mapSize = bmp->db_mapsize;
	mapSize = bmp->db_mapsize;


	/* the hint should be within the map */
	/* the hint should be within the map */
@@ -3953,8 +3946,8 @@ static int dbGetL2AGSize(s64 nblocks)
 * convert number of map pages to the zero origin top dmapctl level
 * convert number of map pages to the zero origin top dmapctl level
 */
 */
#define BMAPPGTOLEV(npages)	\
#define BMAPPGTOLEV(npages)	\
	(((npages) <= 3 + MAXL0PAGES) ? 0 \
	(((npages) <= 3 + MAXL0PAGES) ? 0 : \
       : ((npages) <= 2 + MAXL1PAGES) ? 1 : 2)
	 ((npages) <= 2 + MAXL1PAGES) ? 1 : 2)


s64 dbMapFileSizeToMapSize(struct inode * ipbmap)
s64 dbMapFileSizeToMapSize(struct inode * ipbmap)
{
{
@@ -3981,8 +3974,8 @@ s64 dbMapFileSizeToMapSize(struct inode * ipbmap)
		factor =
		factor =
		    (i == 2) ? MAXL1PAGES : ((i == 1) ? MAXL0PAGES : 1);
		    (i == 2) ? MAXL1PAGES : ((i == 1) ? MAXL0PAGES : 1);
		complete = (u32) npages / factor;
		complete = (u32) npages / factor;
		ndmaps += complete * ((i == 2) ? LPERCTL * LPERCTL
		ndmaps += complete * ((i == 2) ? LPERCTL * LPERCTL :
				      : ((i == 1) ? LPERCTL : 1));
				      ((i == 1) ? LPERCTL : 1));


		/* pages in last/incomplete child */
		/* pages in last/incomplete child */
		npages = (u32) npages % factor;
		npages = (u32) npages % factor;
+50 −55
Original line number Original line Diff line number Diff line
@@ -1739,9 +1739,6 @@ static int dtExtendPage(tid_t tid,
	/* update buffer extent descriptor of extended page */
	/* update buffer extent descriptor of extended page */
	xlen = lengthPXD(pxd);
	xlen = lengthPXD(pxd);
	xsize = xlen << JFS_SBI(sb)->l2bsize;
	xsize = xlen << JFS_SBI(sb)->l2bsize;
#ifdef _STILL_TO_PORT
	bmSetXD(smp, xaddr, xsize);
#endif				/*  _STILL_TO_PORT */


	/*
	/*
	 * copy old stbl to new stbl at start of extended area
	 * copy old stbl to new stbl at start of extended area
@@ -2581,9 +2578,7 @@ int dtRelocate(tid_t tid, struct inode *ip, s64 lmxaddr, pxd_t * opxd,


	/* update the buffer extent descriptor of the dtpage */
	/* update the buffer extent descriptor of the dtpage */
	xsize = xlen << JFS_SBI(ip->i_sb)->l2bsize;
	xsize = xlen << JFS_SBI(ip->i_sb)->l2bsize;
#ifdef _STILL_TO_PORT

	bmSetXD(mp, nxaddr, xsize);
#endif /* _STILL_TO_PORT */
	/* unpin the relocated page */
	/* unpin the relocated page */
	DT_PUTPAGE(mp);
	DT_PUTPAGE(mp);
	jfs_info("dtRelocate: target dtpage relocated.");
	jfs_info("dtRelocate: target dtpage relocated.");
+51 −51
Original line number Original line Diff line number Diff line
@@ -397,7 +397,7 @@ int extHint(struct inode *ip, s64 offset, xad_t * xp)
	if ((rc = xtLookupList(ip, &lxdl, &xadl, 0)))
	if ((rc = xtLookupList(ip, &lxdl, &xadl, 0)))
		return (rc);
		return (rc);


	/* check if not extent exists for the previous page.
	/* check if no extent exists for the previous page.
	 * this is possible for sparse files.
	 * this is possible for sparse files.
	 */
	 */
	if (xadl.nxad == 0) {
	if (xadl.nxad == 0) {
+6 −7
Original line number Original line Diff line number Diff line
@@ -83,7 +83,6 @@
/*	case-insensitive name/directory support */
/*	case-insensitive name/directory support */


#define JFS_AIX		0x80000000	/* AIX support */
#define JFS_AIX		0x80000000	/* AIX support */
/*	POSIX name/directory  support - Never implemented*/


/*
/*
 *	buffer cache configuration
 *	buffer cache configuration
+139 −154
Original line number Original line Diff line number Diff line
@@ -802,7 +802,6 @@ int diWrite(tid_t tid, struct inode *ip)
	/*
	/*
	 *	lock/copy inode base: 128 byte slot granularity
	 *	lock/copy inode base: 128 byte slot granularity
	 */
	 */
// baseDinode:
	lv = & dilinelock->lv[dilinelock->index];
	lv = & dilinelock->lv[dilinelock->index];
	lv->offset = dioffset >> L2INODESLOTSIZE;
	lv->offset = dioffset >> L2INODESLOTSIZE;
	copy_to_dinode(dp, ip);
	copy_to_dinode(dp, ip);
@@ -813,17 +812,6 @@ int diWrite(tid_t tid, struct inode *ip)
		lv->length = 1;
		lv->length = 1;
	dilinelock->index++;
	dilinelock->index++;


#ifdef _JFS_FASTDASD
	/*
	 * We aren't logging changes to the DASD used in directory inodes,
	 * but we need to write them to disk.  If we don't unmount cleanly,
	 * mount will recalculate the DASD used.
	 */
	if (S_ISDIR(ip->i_mode)
	    && (ip->i_ipmnt->i_mntflag & JFS_DASD_ENABLED))
		memcpy(&dp->di_DASD, &ip->i_DASD, sizeof(struct dasd));
#endif				/*  _JFS_FASTDASD */

	/* release the buffer holding the updated on-disk inode.
	/* release the buffer holding the updated on-disk inode.
	 * the buffer will be later written by commit processing.
	 * the buffer will be later written by commit processing.
	 */
	 */
@@ -2481,9 +2469,6 @@ diNewIAG(struct inomap * imap, int *iagnop, int agno, struct metapage ** mpp)
	s64 xaddr = 0;
	s64 xaddr = 0;
	s64 blkno;
	s64 blkno;
	tid_t tid;
	tid_t tid;
#ifdef _STILL_TO_PORT
	xad_t xad;
#endif				/*  _STILL_TO_PORT */
	struct inode *iplist[1];
	struct inode *iplist[1];


	/* pick up pointers to the inode map and mount inodes */
	/* pick up pointers to the inode map and mount inodes */
Loading