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

Commit 71d441dd authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
  JFS: Update print_hex_dump() syntax
  JFS: use print_hex_dump() rather than private dump_mem() function
  JFS: Whitespace cleanup and remove some dead code
parents c31f2e8a 288e4d83
Loading
Loading
Loading
Loading
+0 −28
Original line number Diff line number Diff line
@@ -26,34 +26,6 @@
#include "jfs_filsys.h"
#include "jfs_debug.h"

#ifdef CONFIG_JFS_DEBUG
void dump_mem(char *label, void *data, int length)
{
	int i, j;
	int *intptr = data;
	char *charptr = data;
	char buf[10], line[80];

	printk("%s: dump of %d bytes of data at 0x%p\n\n", label, length,
	       data);
	for (i = 0; i < length; i += 16) {
		line[0] = 0;
		for (j = 0; (j < 4) && (i + j * 4 < length); j++) {
			sprintf(buf, " %08x", intptr[i / 4 + j]);
			strcat(line, buf);
		}
		buf[0] = ' ';
		buf[2] = 0;
		for (j = 0; (j < 16) && (i + j < length); j++) {
			buf[1] =
			    isprint(charptr[i + j]) ? charptr[i + j] : '.';
			strcat(line, buf);
		}
		printk("%s\n", line);
	}
}
#endif

#ifdef PROC_FS_JFS /* see jfs_debug.h */

static struct proc_dir_entry *base;
+0 −2
Original line number Diff line number Diff line
@@ -62,7 +62,6 @@ extern void jfs_proc_clean(void);

extern int jfsloglevel;

extern void dump_mem(char *label, void *data, int length);
extern int jfs_txanchor_read(char *, char **, off_t, int, int *, void *);

/* information message: e.g., configuration, major event */
@@ -94,7 +93,6 @@ extern int jfs_txanchor_read(char *, char **, off_t, int, int *, void *);
 *	---------
 */
#else				/* CONFIG_JFS_DEBUG */
#define dump_mem(label,data,length) do {} while (0)
#define ASSERT(p) do {} while (0)
#define jfs_info(fmt, arg...) do {} while (0)
#define jfs_debug(fmt, arg...) do {} while (0)
+206 −213
Original line number 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(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.
	 * if the number of blocks is not a 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;

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

	/* 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
 */
#define BMAPPGTOLEV(npages)	\
	(((npages) <= 3 + MAXL0PAGES) ? 0 \
       : ((npages) <= 2 + MAXL1PAGES) ? 1 : 2)
	(((npages) <= 3 + MAXL0PAGES) ? 0 : \
	 ((npages) <= 2 + MAXL1PAGES) ? 1 : 2)

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

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

	/* unpin the relocated page */
	DT_PUTPAGE(mp);
	jfs_info("dtRelocate: target dtpage relocated.");
+51 −51
Original line number 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)))
		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.
	 */
	if (xadl.nxad == 0) {
Loading