Commit ec6df424 authored by Nathan Scott's avatar Nathan Scott

[XFS] Fix a trivial compiler warning, remove some no-longer-used macros.

SGI Modid: xfs-linux:xfs-kern:165155a
parent 7d4ce133
......@@ -34,8 +34,8 @@
#include <linux/slab.h>
#include <xfs_types.h>
#include <kmem.h>
#include <spin.h>
#include "kmem.h"
#include "spin.h"
#include "debug.h"
#include "ktrace.h"
......
......@@ -230,39 +230,6 @@ typedef struct xfs_perag
xfs_perag_busy_t *pagb_list; /* unstable blocks */
} xfs_perag_t;
#define XFS_AG_MIN_BYTES (1LL << 24) /* 16 MB */
#define XFS_AG_BEST_BYTES (1LL << 30) /* 1 GB */
#define XFS_AG_MAX_BYTES (1LL << 32) /* 4 GB */
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AG_MIN_BLOCKS)
xfs_extlen_t xfs_ag_min_blocks(int bl);
#define XFS_AG_MIN_BLOCKS(bl) xfs_ag_min_blocks(bl)
#else
#define XFS_AG_MIN_BLOCKS(bl) ((xfs_extlen_t)(XFS_AG_MIN_BYTES >> bl))
#endif
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AG_BEST_BLOCKS)
xfs_extlen_t xfs_ag_best_blocks(int bl, xfs_drfsbno_t blks);
#define XFS_AG_BEST_BLOCKS(bl,blks) xfs_ag_best_blocks(bl,blks)
#else
/*--#define XFS_AG_BEST_BLOCKS(bl) ((xfs_extlen_t)(XFS_AG_BEST_BYTES >> bl))*/
/*
* Best is XFS_AG_BEST_BLOCKS at and below 64 Gigabyte filesystems, and
* XFS_AG_MAX_BLOCKS above 64 Gigabytes.
*/
#define XFS_AG_BEST_BLOCKS(bl,blks) \
((xfs_extlen_t)((1LL << (36 - bl)) >= blks) ? \
((xfs_extlen_t)(XFS_AG_BEST_BYTES >> bl)) : \
XFS_AG_MAX_BLOCKS(bl))
#endif
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AG_MAX_BLOCKS)
xfs_extlen_t xfs_ag_max_blocks(int bl);
#define XFS_AG_MAX_BLOCKS(bl) xfs_ag_max_blocks(bl)
#else
#define XFS_AG_MAX_BLOCKS(bl) ((xfs_extlen_t)(XFS_AG_MAX_BYTES >> bl))
#endif
#define XFS_MAX_AGNUMBER ((xfs_agnumber_t)(NULLAGNUMBER - 1))
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AG_MAXLEVELS)
int xfs_ag_maxlevels(struct xfs_mount *mp);
#define XFS_AG_MAXLEVELS(mp) xfs_ag_maxlevels(mp)
......
......@@ -1573,15 +1573,16 @@ xfs_dir2_node_addname_int(
"%llu needed freesp block %lld for\n"
" data block %lld, got %lld\n"
" ifbno %llu lastfbno %d\n",
dp->i_ino,
XFS_DIR2_DB_TO_FDB(mp, dbno),
dbno, fbno,
ifbno, lastfbno);
(unsigned long long)dp->i_ino,
(long long)XFS_DIR2_DB_TO_FDB(mp, dbno),
(long long)dbno, (long long)fbno,
(unsigned long long)ifbno, lastfbno);
if (fblk) {
cmn_err(CE_ALERT,
" fblk 0x%llu blkno %llu "
" fblk 0x%p blkno %llu "
"index %d magic 0x%x\n",
fblk, fblk->blkno,
fblk,
(unsigned long long)fblk->blkno,
fblk->index,
fblk->magic);
} else {
......
......@@ -232,7 +232,7 @@ xfs_iomap(
if (nimaps) {
*niomaps = xfs_imap_to_bmap(io, offset, &imap,
iomapp, nimaps, *niomaps, iomap_flags);
iomapp, nimaps, *niomaps, iomap_flags);
} else if (niomaps) {
*niomaps = 0;
}
......
......@@ -115,22 +115,6 @@ xfs_ag_daddr(xfs_mount_t *mp, xfs_agnumber_t agno, xfs_daddr_t d)
}
#endif
#if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AG_BEST_BLOCKS)
xfs_extlen_t
xfs_ag_best_blocks(int bl, xfs_drfsbno_t blks)
{
return XFS_AG_BEST_BLOCKS(bl, blks);
}
#endif
#if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AG_MAX_BLOCKS)
xfs_extlen_t
xfs_ag_max_blocks(int bl)
{
return XFS_AG_MAX_BLOCKS(bl);
}
#endif
#if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AG_MAXLEVELS)
int
xfs_ag_maxlevels(xfs_mount_t *mp)
......@@ -139,14 +123,6 @@ xfs_ag_maxlevels(xfs_mount_t *mp)
}
#endif
#if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AG_MIN_BLOCKS)
xfs_extlen_t
xfs_ag_min_blocks(int bl)
{
return XFS_AG_MIN_BLOCKS(bl);
}
#endif
#if XFS_WANT_FUNCS_C || (XFS_WANT_SPACE_C && XFSSO_XFS_AGB_TO_DADDR)
xfs_daddr_t
xfs_agb_to_daddr(xfs_mount_t *mp, xfs_agnumber_t agno, xfs_agblock_t agbno)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment