fs/xfs/: possible cleanups
PATCH 1/1 fs/xfs/: possible cleanups
This patch contains the following possible cleanups:
- make needlessly global code static
- remove the obsolete support/qsort.c
- debug.c: remove the read-only global variable doass (replaced by a #define)
- #if 0 the following unused global functions:
- quota/xfs_dquot.c: xfs_qm_dqwarn
- xfs_bmap_btree.c: xfs_bmbt_lookup_le
- xfs_fsops.c: xfs_fs_log_dummy
- xfs_inode.c: xfs_inobp_bwcheck
- xfs_trans.c: xfs_trans_callback
- xfs_trans_inode.c: xfs_trans_ihold_release
Please check which of these changes do make sense.
Signed-off-by Adrian Bunk <[email protected]>
---
fs/xfs/Makefile | 1 fs/xfs/linux-2.6/xfs_linux.h | 1 fs/xfs/quota/xfs_dquot.c | 4 fs/xfs/quota/xfs_dquot.h | 1 fs/xfs/quota/xfs_dquot_item.c | 6 - fs/xfs/quota/xfs_qm.c | 31 ++++-- fs/xfs/quota/xfs_qm.h | 8 - fs/xfs/quota/xfs_qm_bhv.c | 2 fs/xfs/quota/xfs_qm_syscalls.c | 3 fs/xfs/quota/xfs_trans_dquot.c | 4 fs/xfs/support/debug.c | 1 fs/xfs/support/debug.h | 4 fs/xfs/support/qsort.c | 155 --------------------------------- fs/xfs/support/qsort.h | 41 -------- fs/xfs/support/uuid.c | 2 fs/xfs/support/uuid.h | 1 fs/xfs/xfs_alloc.c | 4 fs/xfs/xfs_attr.c | 118 ++++++++++++------------- fs/xfs/xfs_attr.h | 6 - fs/xfs/xfs_attr_leaf.c | 24 +++-- fs/xfs/xfs_attr_leaf.h | 12 -- fs/xfs/xfs_bit.c | 2 fs/xfs/xfs_bmap.c | 6 - fs/xfs/xfs_bmap.h | 13 -- fs/xfs/xfs_bmap_btree.c | 2 fs/xfs/xfs_bmap_btree.h | 23 ---- fs/xfs/xfs_btree.c | 5 - fs/xfs/xfs_btree.h | 10 -- fs/xfs/xfs_buf_item.c | 24 ++--- fs/xfs/xfs_da_btree.c | 8 + fs/xfs/xfs_da_btree.h | 3 fs/xfs/xfs_dir2.c | 7 + fs/xfs/xfs_dir2.h | 6 - fs/xfs/xfs_dir2_data.c | 7 + fs/xfs/xfs_dir2_data.h | 8 - fs/xfs/xfs_dir2_leaf.c | 7 + fs/xfs/xfs_dir2_leaf.h | 7 - fs/xfs/xfs_dir2_node.c | 2 fs/xfs/xfs_dir2_node.h | 4 fs/xfs/xfs_dir_leaf.c | 4 fs/xfs/xfs_dir_leaf.h | 2 fs/xfs/xfs_error.c | 2 fs/xfs/xfs_error.h | 3 fs/xfs/xfs_extfree_item.c | 4 fs/xfs/xfs_fsops.c | 2 fs/xfs/xfs_iget.c | 7 + fs/xfs/xfs_inode.c | 8 + fs/xfs/xfs_inode.h | 4 fs/xfs/xfs_inode_item.c | 2 fs/xfs/xfs_log.c | 6 - fs/xfs/xfs_log_priv.h | 11 -- fs/xfs/xfs_log_recover.c | 18 +-- fs/xfs/xfs_mount.c | 5 - fs/xfs/xfs_mount.h | 3 fs/xfs/xfs_rename.c | 2 fs/xfs/xfs_trans.c | 4 fs/xfs/xfs_trans.h | 3 fs/xfs/xfs_trans_inode.c | 2 fs/xfs/xfs_vfsops.c | 11 +- fs/xfs/xfs_vnodeops.c | 4 60 files changed, 207 insertions(+), 473 deletions(-)
fs/xfs/quota/xfs_dquot.h renamed from fs/xfs/quota/xfs_dquot.h.old +0 -1
@@ -211,7 +211,6 @@ xfs_disk_dquot_t *);extern void xfs_qm_adjust_dqlimits (xfs_mount_t *,xfs_disk_dquot_t *); -extern int xfs_qm_dqwarn (xfs_disk_dquot_t *,uint );extern int xfs_qm_dqget (xfs_mount_t *,xfs_inode_t *,xfs_dqid_t ,uint ,uint ,xfs_dquot_t **);extern void xfs_qm_dqput (xfs_dquot_t *);
fs/xfs/quota/xfs_dquot.c renamed from fs/xfs/quota/xfs_dquot.c.old +3 -1
@@ -101,7 +101,7 @@* is the d_id field. The idea is to fill in the entire q_core * when we read in the on disk dquot. */ -xfs_dquot_t * +STATIC xfs_dquot_t * xfs_qm_dqinit( xfs_mount_t *mp, xfs_dqid_t id,
@@ -373,6 +373,7 @@/* * Increment or reset warnings of a given dquot. */ +#if 0 int xfs_qm_dqwarn( xfs_disk_dquot_t *d,
@@ -430,6 +431,7 @@#endif return (warned); } +#endif /* 0 */ /*
fs/xfs/quota/xfs_dquot_item.c renamed from fs/xfs/quota/xfs_dquot_item.c.old +3 -3
@@ -428,7 +428,7 @@/* * This is the ops vector for dquots */ -struct xfs_item_ops xfs_dquot_item_ops = { +STATIC struct xfs_item_ops xfs_dquot_item_ops = { .iop_size = (uint (*)(xfs_log_item_t *))xfs_qm_dquot_logitem_size, .iop_format = (void (*)(xfs_log_item_t *,xfs_log_iovec_t *)) xfs_qm_dquot_logitem_format,
@@ -646,7 +646,7 @@return ; } -struct xfs_item_ops xfs_qm_qoffend_logitem_ops = { +STATIC struct xfs_item_ops xfs_qm_qoffend_logitem_ops = { .iop_size = (uint (*)(xfs_log_item_t *))xfs_qm_qoff_logitem_size, .iop_format = (void (*)(xfs_log_item_t *,xfs_log_iovec_t *)) xfs_qm_qoff_logitem_format,
@@ -669,7 +669,7 @@/* * This is the ops vector shared by all quotaoff-start log items. */ -struct xfs_item_ops xfs_qm_qoff_logitem_ops = { +STATIC struct xfs_item_ops xfs_qm_qoff_logitem_ops = { .iop_size = (uint (*)(xfs_log_item_t *))xfs_qm_qoff_logitem_size, .iop_format = (void (*)(xfs_log_item_t *,xfs_log_iovec_t *)) xfs_qm_qoff_logitem_format,
fs/xfs/quota/xfs_qm.h renamed from fs/xfs/quota/xfs_qm.h.old +0 -8
@@ -184,11 +184,9 @@extern void xfs_mount_reset_sbqflags (xfs_mount_t *); -extern int xfs_qm_init_quotainfo (xfs_mount_t *);extern void xfs_qm_destroy_quotainfo (xfs_mount_t *);extern int xfs_qm_mount_quotas (xfs_mount_t *,int );extern void xfs_qm_mount_quotainit (xfs_mount_t *,uint ); -extern int xfs_qm_quotacheck (xfs_mount_t *);extern void xfs_qm_unmount_quotadestroy (xfs_mount_t *);extern int xfs_qm_unmount_quotas (xfs_mount_t *);extern int xfs_qm_write_sb_changes (xfs_mount_t *,__int64_t );
@@ -199,7 +197,6 @@extern int xfs_qm_dqattach (xfs_inode_t *,uint );extern void xfs_qm_dqdetach (xfs_inode_t *);extern int xfs_qm_dqpurge_all (xfs_mount_t *,uint ); -extern void xfs_qm_dqrele_all_inodes (xfs_mount_t *,uint );/* vop stuff */ extern int xfs_qm_vop_dqalloc(xfs_mount_t *, xfs_inode_t *,
@@ -215,14 +212,9 @@ xfs_dquot_t *, xfs_dquot_t *, uint);/* list stuff */ -extern void xfs_qm_freelist_init (xfs_frlist_t *); -extern void xfs_qm_freelist_destroy (xfs_frlist_t *); -extern void xfs_qm_freelist_insert (xfs_frlist_t *,xfs_dquot_t *);extern void xfs_qm_freelist_append (xfs_frlist_t *,xfs_dquot_t *);extern void xfs_qm_freelist_unlink (xfs_dquot_t *);extern int xfs_qm_freelist_lock_nowait (xfs_qm_t *); -extern int xfs_qm_mplist_nowait (xfs_mount_t *); -extern int xfs_qm_dqhashlock_nowait (xfs_dquot_t *);/* system call interface */ extern int xfs_qm_quotactl (bhv_desc_t *,int ,int ,xfs_caddr_t );
fs/xfs/quota/xfs_qm.c renamed from fs/xfs/quota/xfs_qm.c.old +19 -12
@@ -79,9 +79,9 @@mutex_t xfs_Gqm_lock;struct xfs_qm *xfs_Gqm; -kmem_zone_t *qm_dqzone; -kmem_zone_t *qm_dqtrxzone; -kmem_shaker_t xfs_qm_shaker; +kmem_zone_t *qm_dqzone; +kmem_zone_t *qm_dqtrxzone; +STATIC kmem_shaker_t xfs_qm_shaker; STATIC void xfs_qm_list_init(xfs_dqlist_t *, char *, int); STATIC void xfs_qm_list_destroy(xfs_dqlist_t *);
@@ -89,6 +89,13 @@ STATIC int xfs_qm_init_quotainos(xfs_mount_t *); STATIC int xfs_qm_shake(int, unsigned int); +STATIC int xfs_qm_dqhashlock_nowait(xfs_dquot_t *dqp); +STATIC void xfs_qm_freelist_destroy(xfs_frlist_t *ql); +STATIC void xfs_qm_freelist_init(xfs_frlist_t *ql); +STATIC int xfs_qm_init_quotainfo(xfs_mount_t *mp); +STATIC int xfs_qm_mplist_nowait(xfs_mount_t *mp); +STATIC int xfs_qm_quotacheck(xfs_mount_t *mp); +#ifdef DEBUG extern mutex_t qcheck_lock;#endif
@@ -184,7 +191,7 @@/* * Destroy the global quota manager when its reference count goes to zero. */ -void +STATIC voidxfs_qm_destroy (struct xfs_qm *xqm) {
@@ -509,7 +516,7 @@* Flush all dquots of the given file system to disk. The dquots are * _not_ purged from memory here, just their data written to disk. */ -int +STATIC intxfs_qm_dqflush_all (xfs_mount_t *mp,int flags)
@@ -1149,7 +1156,7 @@* This initializes all the quota information that's kept in the * mount structure */ -int +STATIC intxfs_qm_init_quotainfo (xfs_mount_t *mp) {
@@ -1871,7 +1878,7 @@* Walk thru all the filesystem inodes and construct a consistent view * of the disk quota world. If the quotacheck fails, disable quotas. */ -int +STATIC intxfs_qm_quotacheck (xfs_mount_t *mp) {
@@ -2751,7 +2758,7 @@ }/* ------------- list stuff -----------------*/ -void +STATIC voidxfs_qm_freelist_init (xfs_frlist_t *ql) { ql->qh_next = ql->qh_prev = (xfs_dquot_t *) ql;
@@ -2760,7 +2767,7 @@ ql->qh_nelems =0 ; } -void +STATIC voidxfs_qm_freelist_destroy (xfs_frlist_t *ql) {xfs_dquot_t *dqp, *nextdqp;
@@ -2786,7 +2793,7 @@ASSERT (ql->qh_nelems ==0 ); } -void +STATIC voidxfs_qm_freelist_insert (xfs_frlist_t *ql,xfs_dquot_t *dq) { dq->dq_flnext = ql->qh_next;
@@ -2816,7 +2823,7 @@xfs_qm_freelist_insert ((xfs_frlist_t *)ql->qh_prev, dq); } -int +STATIC intxfs_qm_dqhashlock_nowait (xfs_dquot_t *dqp) {
@@ -2836,7 +2843,7 @@return (locked); } -int +STATIC intxfs_qm_mplist_nowait (xfs_mount_t *mp) {
fs/xfs/quota/xfs_qm_bhv.c renamed from fs/xfs/quota/xfs_qm_bhv.c.old +1 -1
@@ -359,7 +359,7 @@ } -struct xfs_qmops xfs_qmcore_xfs = { +STATIC struct xfs_qmops xfs_qmcore_xfs = { .xfs_qminit = xfs_qm_newmount, .xfs_qmdone = xfs_qm_unmount_quotadestroy, .xfs_qmmount = xfs_qm_endmount,
fs/xfs/quota/xfs_qm_syscalls.c renamed from fs/xfs/quota/xfs_qm_syscalls.c.old +2 -1
@@ -91,6 +91,7 @@ STATIC void xfs_qm_export_dquot(xfs_mount_t *, xfs_disk_dquot_t *,fs_disk_quota_t *); +STATIC void xfs_qm_dqrele_all_inodes(struct xfs_mount *mp, uint flags);/* * The main distribution switch of all XFS quotactl system calls.
@@ -1000,7 +1001,7 @@* AFTER this, in the case of quotaoff. This also gets called from * xfs_rootumount. */ -void +STATIC voidxfs_qm_dqrele_all_inodes (struct xfs_mount *mp,uint flags)
fs/xfs/quota/xfs_trans_dquot.c renamed from fs/xfs/quota/xfs_trans_dquot.c.old +2 -2
@@ -187,7 +187,7 @@/* * Wrap around mod_dquot to account for both user and group quotas. */ -void +STATIC void xfs_trans_mod_dquot_byino( xfs_trans_t *tp, xfs_inode_t *ip,
@@ -368,7 +368,7 @@* Unreserve just the reservations done by this transaction. * dquot is still left locked at exit. */ -void +STATIC voidxfs_trans_apply_dquot_deltas (xfs_trans_t *tp) {
fs/xfs/support/debug.h renamed from fs/xfs/support/debug.h.old +3 -1
@@ -49,11 +49,13 @@# define STATIC static#endif +#define DOASS 1 +#ifdef DEBUG # ifdef lint# define ASSERT (EX ) ((void)0)/* avoid "constant in conditional" babble */ # else -# define ASSERT (EX ) ((!doass||(EX))?((void)0):assfail(#EX, __FILE__, __LINE__)) +# define ASSERT (EX ) ((!DOASS||(EX))?((void)0):assfail(#EX, __FILE__, __LINE__))# endif /* lint */ #else # define ASSERT (x) ((void)0)
fs/xfs/support/debug.c renamed from fs/xfs/support/debug.c.old +0 -1
@@ -36,7 +36,6 @@#include <linux/sched.h> #include <linux/kernel.h> -int doass =1 ;static char message[256 ];/* keep it off the stack */ static DEFINE_SPINLOCK (xfs_err_lock);
fs/xfs/support/uuid.h renamed from fs/xfs/support/uuid.h.old +0 -1
@@ -37,7 +37,6 @@ } uuid_t;void uuid_init (void ); -void uuid_create_nil (uuid_t *uuid);int uuid_is_nil (uuid_t *uuid);int uuid_equal (uuid_t *uuid1,uuid_t *uuid2);void uuid_getnodeuniq (uuid_t *uuid,int fsid [2 ]);
fs/xfs/support/uuid.c renamed from fs/xfs/support/uuid.c.old +1 -1
@@ -63,7 +63,7 @@ fsid[1 ] =INT_GET (*(u_int32_t *)(uu ),ARCH_CONVERT ); } -void +static void uuid_create_nil (uuid_t *uuid) {memset (uuid,0 ,sizeof (*uuid));
fs/xfs/xfs_alloc.c renamed from fs/xfs/xfs_alloc.c.old +2 -2
@@ -59,7 +59,7 @@#define XFSA_FIXUP_BNO_OK 1#define XFSA_FIXUP_CNT_OK 2 -int +STATIC int xfs_alloc_search_busy(xfs_trans_t *tp, xfs_agnumber_t agno, xfs_agblock_t bno,
@@ -2562,7 +2562,7 @@/* * returns non-zero if any of (agno,bno):len is in a busy list */ -int +STATIC int xfs_alloc_search_busy(xfs_trans_t *tp, xfs_agnumber_t agno, xfs_agblock_t bno,
fs/xfs/xfs_attr.h renamed from fs/xfs/xfs_attr.h.old +0 -6
@@ -72,14 +72,10 @@#define ATTR_NAMECOUNT 4extern struct attrnames attr_user;extern struct attrnames attr_secure; -extern struct attrnames attr_system;extern struct attrnames attr_trusted;extern struct attrnames *attr_namespaces[ATTR_NAMECOUNT ];#define ATTR_SYSCOUNT 2 -extern struct attrnames posix_acl_access; -extern struct attrnames posix_acl_default; -extern struct attrnames *attr_system_names[ATTR_SYSCOUNT ];extern attrnames_t *attr_lookup_namespace (char *,attrnames_t **,int );extern int attr_generic_list (struct vnode *,void *,size_t ,int ,ssize_t *);
@@ -184,8 +180,6 @@ struct attrlist_cursor_kern *, struct cred *);int xfs_attr_inactive (struct xfs_inode *dp); -int xfs_attr_node_get (struct xfs_da_args *); -int xfs_attr_leaf_get (struct xfs_da_args *);int xfs_attr_shortform_getvalue (struct xfs_da_args *);int xfs_attr_fetch (struct xfs_inode *,char *,int ,char *,int *,int ,struct cred *);
fs/xfs/xfs_attr.c renamed from fs/xfs/xfs_attr.c.old +60 -58
172 lines not on this page · raw message
fs/xfs/xfs_attr_leaf.h renamed from fs/xfs/xfs_attr_leaf.h.old +0 -12
@@ -261,8 +261,6 @@/* * Routines used for growing the Btree. */ -int xfs_attr_leaf_create (struct xfs_da_args *args,xfs_dablk_t which_block, -struct xfs_dabuf **bpp);int xfs_attr_leaf_split (struct xfs_da_state *state,struct xfs_da_state_blk *oldblk,struct xfs_da_state_blk *newblk);
@@ -284,12 +282,6 @@struct xfs_da_state_blk *drop_blk, struct xfs_da_state_blk *save_blk);int xfs_attr_root_inactive (struct xfs_trans **trans,struct xfs_inode *dp); -int xfs_attr_node_inactive (struct xfs_trans **trans,struct xfs_inode *dp, -struct xfs_dabuf *bp,int level); -int xfs_attr_leaf_inactive (struct xfs_trans **trans,struct xfs_inode *dp, -struct xfs_dabuf *bp); -int xfs_attr_leaf_freextent (struct xfs_trans **trans,struct xfs_inode *dp, -xfs_dablk_t blkno,int blkcnt);/* * Utility routines.
@@ -299,10 +291,6 @@ struct xfs_dabuf *leaf2_bp);int xfs_attr_leaf_newentsize (struct xfs_da_args *args,int blocksize,int *local); -int xfs_attr_leaf_entsize (struct xfs_attr_leafblock *leaf,int index); -int xfs_attr_put_listent (struct xfs_attr_list_context *context, -struct attrnames *,char *name,int namelen, -int valuelen);int xfs_attr_rolltrans (struct xfs_trans **transp,struct xfs_inode *dp);#endif /* __XFS_ATTR_LEAF_H__ */
fs/xfs/xfs_attr_leaf.c renamed from fs/xfs/xfs_attr_leaf.c.old +18 -6
@@ -100,6 +100,18 @@ int dst_start, int move_count, xfs_mount_t *mp); +STATIC int xfs_attr_leaf_create(xfs_da_args_t *args, xfs_dablk_t blkno, +xfs_dabuf_t **bpp); +STATIC int xfs_attr_leaf_entsize(xfs_attr_leafblock_t *leaf, int index); +STATIC int xfs_attr_leaf_freextent(xfs_trans_t **trans, xfs_inode_t *dp, +xfs_dablk_t blkno,int blkcnt); +STATIC int xfs_attr_leaf_inactive(xfs_trans_t **trans, xfs_inode_t *dp, +xfs_dabuf_t *bp); +STATIC int xfs_attr_node_inactive(xfs_trans_t **trans, xfs_inode_t *dp, +xfs_dabuf_t *bp,int level); +STATIC int xfs_attr_put_listent(xfs_attr_list_context_t *context, +attrnames_t *namesp,char *name, +int namelen,int valuelen);/*======================================================================== * External routines when dirsize < XFS_LITINO(mp).
@@ -774,7 +786,7 @@* Create the initial contents of a leaf attribute list * or a leaf in a node attribute list. */ -int +STATIC intxfs_attr_leaf_create (xfs_da_args_t *args,xfs_dablk_t blkno,xfs_dabuf_t **bpp) {xfs_attr_leafblock_t *leaf;
@@ -2209,7 +2221,7 @@* Calculate the number of bytes used to store the indicated attribute * (whether local or remote only calculate bytes in this block). */ -int +STATIC intxfs_attr_leaf_entsize (xfs_attr_leafblock_t *leaf,int index) {xfs_attr_leaf_name_local_t *name_loc;
@@ -2380,7 +2392,7 @@* we may be reading them directly out of a user buffer. */ /*ARGSUSED*/ -int +STATIC intxfs_attr_put_listent (xfs_attr_list_context_t *context,attrnames_t *namesp,char *name,int namelen,int valuelen) {
@@ -2740,7 +2752,7 @@* Recurse (gasp!) through the attribute nodes until we find leaves. * We're doing a depth-first traversal in order to invalidate everything. */ -int +STATIC intxfs_attr_node_inactive (xfs_trans_t **trans,xfs_inode_t *dp,xfs_dabuf_t *bp,int level) {
@@ -2849,7 +2861,7 @@* Note that we must release the lock on the buffer so that we are not * caught holding something that the logging code wants to flush to disk. */ -int +STATIC intxfs_attr_leaf_inactive (xfs_trans_t **trans,xfs_inode_t *dp,xfs_dabuf_t *bp) {xfs_attr_leafblock_t *leaf;
@@ -2934,7 +2946,7 @@* Look at all the extents for this logical region, * invalidate any buffers that are incore/in transactions. */ -int +STATIC intxfs_attr_leaf_freextent (xfs_trans_t **trans,xfs_inode_t *dp,xfs_dablk_t blkno,int blkcnt) {
fs/xfs/xfs_bit.c renamed from fs/xfs/xfs_bit.c.old +1 -1
@@ -45,7 +45,7 @@/* * Index of high bit number in byte, -1 for none set, 0..7 otherwise. */ -const char xfs_highbit[256 ] = { +static const char xfs_highbit[256 ] = {-1 ,0 ,1 ,1 ,2 ,2 ,2 ,2 ,/* 00 .. 07 */ 3 ,3 ,3 ,3 ,3 ,3 ,3 ,3 ,/* 08 .. 0f */ 4 ,4 ,4 ,4 ,4 ,4 ,4 ,4 ,/* 10 .. 17 */
fs/xfs/xfs_bmap_btree.h renamed from fs/xfs/xfs_bmap_btree.h.old +0 -23
@@ -580,14 +580,6 @@ xfs_filblks_t, int *); -int -xfs_bmbt_lookup_le ( -struct xfs_btree_cur *, -xfs_fileoff_t , -xfs_fsblock_t , -xfs_filblks_t , -int *); -/* * Give the bmap btree a new root block. Copy the old broot contents * down into a real block and make the broot point to it.
@@ -681,21 +673,6 @@#endif -/* -* Search an extent list for the extent which includes block -* bno. -*/ -xfs_bmbt_rec_t * -xfs_bmap_do_search_extents ( -xfs_bmbt_rec_t *, -xfs_extnum_t , -xfs_extnum_t , -xfs_fileoff_t , -int *, -xfs_extnum_t *, -xfs_bmbt_irec_t *, -xfs_bmbt_irec_t *); -#endif /* __KERNEL__ */ #endif /* __XFS_BMAP_BTREE_H__ */
fs/xfs/xfs_bmap.h renamed from fs/xfs/xfs_bmap.h.old +0 -13
@@ -332,19 +332,6 @@ int iflags); /* interface flags *//* -* Check the last inode extent to determine whether this allocation will result -* in blocks being allocated at the end of the file. When we allocate new data -* blocks at the end of the file which do not start at the previous data block, -* we will try to align the new blocks at stripe unit boundaries. -*/ -int -xfs_bmap_isaeof ( -struct xfs_inode *ip, -xfs_fileoff_t off, -int whichfork, -char *aeof); - -/* * Check if the endoff is outside the last extent. If so the caller will grow * the allocation to a stripe unit boundary */
fs/xfs/xfs_bmap.c renamed from fs/xfs/xfs_bmap.c.old +4 -2
@@ -68,6 +68,8 @@#include "xfs_trans_space.h" #include "xfs_buf_item.h" +STATIC int xfs_bmap_isaeof(xfs_inode_t *ip, xfs_fileoff_t off, +int whichfork,char *aeof);#ifdef DEBUG STATIC void
@@ -3411,7 +3413,7 @@return error; } -xfs_bmbt_rec_t */* pointer to found extent entry */ +STATIC xfs_bmbt_rec_t * /* pointer to found extent entry */ xfs_bmap_do_search_extents( xfs_bmbt_rec_t *base, /* base of extent list */ xfs_extnum_t lastx, /* last extent index used */
@@ -5714,7 +5716,7 @@* blocks at the end of the file which do not start at the previous data block, * we will try to align the new blocks at stripe unit boundaries. */ -int /* error */ +STATIC int /* error */ xfs_bmap_isaeof( xfs_inode_t *ip, /* incore inode pointer */ xfs_fileoff_t off, /* file offset in fsblocks */
fs/xfs/xfs_bmap_btree.c renamed from fs/xfs/xfs_bmap_btree.c.old +2 -0
@@ -2331,6 +2331,7 @@return xfs_bmbt_lookup (cur,XFS_LOOKUP_GE , stat); } +#if 0 int /* error */ xfs_bmbt_lookup_le( xfs_btree_cur_t *cur,
@@ -2344,6 +2345,7 @@ cur->bc_rec.b.br_blockcount = len; return xfs_bmbt_lookup(cur, XFS_LOOKUP_LE, stat); } +#endif /* 0 */ /* * Give the bmap btree a new root block. Copy the old broot contents
fs/xfs/xfs_btree.h renamed from fs/xfs/xfs_btree.h.old +0 -10
@@ -325,16 +325,6 @@ int level); /* level to change *//* -* Retrieve the block pointer from the cursor at the given level. -* This may be a bmap btree root or from a buffer. -*/ -xfs_btree_block_t */* generic btree block pointer */ -xfs_btree_get_block ( -xfs_btree_cur_t *cur,/* btree cursor */ -int level,/* level in btree */ -struct xfs_buf **bpp);/* buffer containing the block */ - -/* * Get a buffer for the block, return it with no data read. * Long-form addressing. */
fs/xfs/xfs_btree.c renamed from fs/xfs/xfs_btree.c.old +4 -1
@@ -77,6 +77,9 @@* Prototypes for internal routines. */ +STATIC xfs_btree_block_t *xfs_btree_get_block(xfs_btree_cur_t *cur, int level, +xfs_buf_t **bpp); +/* * Checking routine: return maxrecs for the block. */
@@ -497,7 +500,7 @@* Retrieve the block pointer from the cursor at the given level. * This may be a bmap btree root or from a buffer. */ -xfs_btree_block_t */* generic btree block pointer */ +STATIC xfs_btree_block_t * /* generic btree block pointer */ xfs_btree_get_block( xfs_btree_cur_t *cur, /* btree cursor */ int level, /* level in btree */
fs/xfs/xfs_buf_item.c renamed from fs/xfs/xfs_buf_item.c.old +12 -12
@@ -172,7 +172,7 @@* * If the XFS_BLI_STALE flag has been set, then log nothing. */ -uint +STATIC uintxfs_buf_item_size (xfs_buf_log_item_t *bip) {
@@ -240,7 +240,7 @@* format structure, and the rest point to contiguous chunks * within the buffer. */ -void +STATIC voidxfs_buf_item_format (xfs_buf_log_item_t *bip,xfs_log_iovec_t *log_vector)
@@ -365,7 +365,7 @@* item in memory so it cannot be written out. Simply call bpin() * on the buffer to do this. */ -void +STATIC voidxfs_buf_item_pin (xfs_buf_log_item_t *bip) {
@@ -391,7 +391,7 @@* If the XFS_BLI_STALE flag is set and we are the last reference, * then free up the buf log item and unlock the buffer. */ -void +STATIC voidxfs_buf_item_unpin (xfs_buf_log_item_t *bip,int stale)
@@ -446,7 +446,7 @@* so we need to free the item's descriptor (that points to the item) * in the transaction. */ -void +STATIC voidxfs_buf_item_unpin_remove (xfs_buf_log_item_t *bip,xfs_trans_t *tp)
@@ -493,7 +493,7 @@* the lock right away, return 0. If we can get the lock, pull the * buffer from the free list, mark it busy, and return 1. */ -uint +STATIC uintxfs_buf_item_trylock (xfs_buf_log_item_t *bip) {
@@ -537,7 +537,7 @@* This is for support of xfs_trans_bhold(). Make sure the * XFS_BLI_HOLD field is cleared if we don't free the item. */ -void +STATIC voidxfs_buf_item_unlock (xfs_buf_log_item_t *bip) {
@@ -635,7 +635,7 @@* by returning the original lsn of that transaction here rather than * the current one. */ -xfs_lsn_t +STATIC xfs_lsn_txfs_buf_item_committed (xfs_buf_log_item_t *bip,xfs_lsn_t lsn)
@@ -654,7 +654,7 @@* and have aborted this transaction, we'll trap this buffer when it tries to * get written out. */ -void +STATIC voidxfs_buf_item_abort (xfs_buf_log_item_t *bip) {
@@ -674,7 +674,7 @@* B_DELWRI set, then get it going out to disk with a call to bawrite(). * If not, then just release the buffer. */ -void +STATIC voidxfs_buf_item_push (xfs_buf_log_item_t *bip) {
@@ -693,7 +693,7 @@ }/* ARGSUSED */ -void +STATIC voidxfs_buf_item_committing (xfs_buf_log_item_t *bip,xfs_lsn_t commit_lsn) { }
@@ -701,7 +701,7 @@/* * This is the ops vector shared by all buf log items. */ -struct xfs_item_ops xfs_buf_item_ops = { +STATIC struct xfs_item_ops xfs_buf_item_ops = { .iop_size = (uint (*)(xfs_log_item_t *))xfs_buf_item_size, .iop_format = (void (*)(xfs_log_item_t *,xfs_log_iovec_t *)) xfs_buf_item_format,
fs/xfs/xfs_da_btree.h renamed from fs/xfs/xfs_da_btree.h.old +0 -3
@@ -296,8 +296,6 @@/* * Utility routines. */ -int xfs_da_blk_unlink (xfs_da_state_t *state,xfs_da_state_blk_t *drop_blk, -xfs_da_state_blk_t *save_blk);int xfs_da_blk_link (xfs_da_state_t *state,xfs_da_state_blk_t *old_blk,xfs_da_state_blk_t *new_blk);
@@ -320,7 +318,6 @@uint xfs_da_log2_roundup (uint i);xfs_da_state_t *xfs_da_state_alloc (void );void xfs_da_state_free (xfs_da_state_t *state); -void xfs_da_state_kill_altpath (xfs_da_state_t *state);void xfs_da_buf_done (xfs_dabuf_t *dabuf); void xfs_da_log_buf(struct xfs_trans *tp, xfs_dabuf_t *dabuf, uint first,
fs/xfs/xfs_da_btree.c renamed from fs/xfs/xfs_da_btree.c.old +6 -2
@@ -114,6 +114,10 @@ STATIC int xfs_da_node_order(xfs_dabuf_t *node1_bp, xfs_dabuf_t *node2_bp); STATIC xfs_dabuf_t *xfs_da_buf_make(int nbuf, xfs_buf_t **bps, inst_t *ra); +STATIC int xfs_da_blk_unlink(xfs_da_state_t *state, +xfs_da_state_blk_t *drop_blk, +xfs_da_state_blk_t *save_blk); +STATIC void xfs_da_state_kill_altpath(xfs_da_state_t *state);/*======================================================================== * Routines used for growing the Btree.
@@ -1424,7 +1428,7 @@/* * Unlink a block from a doubly linked list of blocks. */ -int /* error */ +STATIC int /* error */xfs_da_blk_unlink (xfs_da_state_t *state,xfs_da_state_blk_t *drop_blk,xfs_da_state_blk_t *save_blk) {
@@ -2381,7 +2385,7 @@/* * Kill the altpath contents of a da-state structure. */ -void +STATIC voidxfs_da_state_kill_altpath (xfs_da_state_t *state) {int i;
fs/xfs/xfs_dir2.h renamed from fs/xfs/xfs_dir2.h.old +0 -6
@@ -97,12 +97,6 @@ xfs_dir2_db_t *dbp);extern int -xfs_dir2_isblock (struct xfs_trans *tp,struct xfs_inode *dp,int *vp); - -extern int -xfs_dir2_isleaf (struct xfs_trans *tp,struct xfs_inode *dp,int *vp); - -extern int xfs_dir2_shrink_inode (struct xfs_da_args *args,xfs_dir2_db_t db,struct xfs_dabuf *bp);
fs/xfs/xfs_dir2.c renamed from fs/xfs/xfs_dir2.c.old +5 -2
@@ -101,6 +101,9 @@static int xfs_dir2_put_dirent64_direct (xfs_dir2_put_args_t *pa);static int xfs_dir2_put_dirent64_uio (xfs_dir2_put_args_t *pa); +static int xfs_dir2_isblock (xfs_trans_t *tp,xfs_inode_t *dp,int *vp); +static int xfs_dir2_isleaf (xfs_trans_t *tp,xfs_inode_t *dp,int *vp); +/* * Directory operations vector. */
@@ -666,7 +669,7 @@/* * See if the directory is a single-block form directory. */ -int /* error */ +static int /* error */ xfs_dir2_isblock( xfs_trans_t *tp, /* transaction pointer */ xfs_inode_t *dp, /* incore directory inode */
@@ -689,7 +692,7 @@/* * See if the directory is a single-leaf form directory. */ -int /* error */ +static int /* error */ xfs_dir2_isleaf( xfs_trans_t *tp, /* transaction pointer */ xfs_inode_t *dp, /* incore directory inode */
fs/xfs/xfs_dir2_data.h renamed from fs/xfs/xfs_dir2_data.h.old +0 -8
@@ -185,18 +185,10 @@#endif extern xfs_dir2_data_free_t * -xfs_dir2_data_freefind (xfs_dir2_data_t *d, -xfs_dir2_data_unused_t *dup); - -extern xfs_dir2_data_free_t *xfs_dir2_data_freeinsert (xfs_dir2_data_t *d,xfs_dir2_data_unused_t *dup,int *loghead);extern void -xfs_dir2_data_freeremove (xfs_dir2_data_t *d, -xfs_dir2_data_free_t *dfp,int *loghead); - -extern void xfs_dir2_data_freescan (struct xfs_mount *mp,xfs_dir2_data_t *d,int *loghead,char *aendp);
fs/xfs/xfs_dir2_data.c renamed from fs/xfs/xfs_dir2_data.c.old +5 -2
@@ -61,6 +61,9 @@#include "xfs_dir2_block.h" #include "xfs_error.h" +static xfs_dir2_data_free_t *xfs_dir2_data_freefind (xfs_dir2_data_t *d, +xfs_dir2_data_unused_t *dup); +#ifdef DEBUG /* * Check the consistency of the data block.
@@ -193,7 +196,7 @@* Given a data block and an unused entry from that block, * return the bestfree entry if any that corresponds to it. */ -xfs_dir2_data_free_t * +static xfs_dir2_data_free_t *xfs_dir2_data_freefind (xfs_dir2_data_t *d,/* data block */ xfs_dir2_data_unused_t *dup)/* data unused entry */
@@ -304,7 +307,7 @@/* * Remove a bestfree entry from the table. */ -void +static void xfs_dir2_data_freeremove( xfs_dir2_data_t *d, /* data block pointer */ xfs_dir2_data_free_t *dfp, /* bestfree entry pointer */
fs/xfs/xfs_dir2_leaf.h renamed from fs/xfs/xfs_dir2_leaf.h.old +0 -7
@@ -330,15 +330,8 @@ int first, int last);extern void -xfs_dir2_leaf_log_bests (struct xfs_trans *tp,struct xfs_dabuf *bp, -int first,int last); - -extern void xfs_dir2_leaf_log_header (struct xfs_trans *tp,struct xfs_dabuf *bp); -extern void -xfs_dir2_leaf_log_tail (struct xfs_trans *tp,struct xfs_dabuf *bp); -extern int xfs_dir2_leaf_lookup (struct xfs_da_args *args);
fs/xfs/xfs_dir2_leaf.c renamed from fs/xfs/xfs_dir2_leaf.c.old +5 -2
@@ -77,6 +77,9 @@#endif static int xfs_dir2_leaf_lookup_int (xfs_da_args_t *args,xfs_dabuf_t **lbpp,int *indexp,xfs_dabuf_t **dbpp); +static void xfs_dir2_leaf_log_bests (xfs_trans_t *tp,xfs_dabuf_t *bp, +int first,int last); +static void xfs_dir2_leaf_log_tail (xfs_trans_t *tp,xfs_dabuf_t *bp);/* * Convert a block form directory to a leaf form directory.
@@ -1214,7 +1217,7 @@/* * Log the bests entries indicated from a leaf1 block. */ -void +static void xfs_dir2_leaf_log_bests( xfs_trans_t *tp, /* transaction pointer */ xfs_dabuf_t *bp, /* leaf buffer */
@@ -1278,7 +1281,7 @@/* * Log the tail of the leaf1 block. */ -void +static void xfs_dir2_leaf_log_tail (xfs_trans_t *tp,/* transaction pointer */ xfs_dabuf_t *bp)/* leaf buffer */
fs/xfs/xfs_dir2_node.h renamed from fs/xfs/xfs_dir2_node.h.old +0 -4
@@ -108,10 +108,6 @@* Functions. */ -extern void -xfs_dir2_free_log_bests (struct xfs_trans *tp,struct xfs_dabuf *bp, -int first,int last); -extern int xfs_dir2_leaf_to_node (struct xfs_da_args *args,struct xfs_dabuf *lbp);
fs/xfs/xfs_dir2_node.c renamed from fs/xfs/xfs_dir2_node.c.old +1 -1
@@ -88,7 +88,7 @@/* * Log entries from a freespace block. */ -void +static void xfs_dir2_free_log_bests( xfs_trans_t *tp, /* transaction pointer */ xfs_dabuf_t *bp, /* freespace buffer */
fs/xfs/xfs_dir_leaf.h renamed from fs/xfs/xfs_dir_leaf.h.old +0 -2
@@ -202,8 +202,6 @@/* * Routines used for growing the Btree. */ -int xfs_dir_leaf_create (struct xfs_da_args *args,xfs_dablk_t which_block, -struct xfs_dabuf **bpp);int xfs_dir_leaf_split (struct xfs_da_state *state,struct xfs_da_state_blk *oldblk,struct xfs_da_state_blk *newblk);
fs/xfs/xfs_dir_leaf.c renamed from fs/xfs/xfs_dir_leaf.c.old +3 -1
@@ -100,6 +100,8 @@ int dst_start, int move_count, xfs_mount_t *mp); +STATIC int xfs_dir_leaf_create(xfs_da_args_t *args, xfs_dablk_t blkno, +xfs_dabuf_t **bpp);/*======================================================================== * External routines when dirsize < XFS_IFORK_DSIZE(dp).
@@ -781,7 +783,7 @@* Create the initial contents of a leaf directory * or a leaf in a node directory. */ -int +STATIC intxfs_dir_leaf_create (xfs_da_args_t *args,xfs_dablk_t blkno,xfs_dabuf_t **bpp) {xfs_dir_leafblock_t *leaf;
fs/xfs/xfs_error.h renamed from fs/xfs/xfs_error.h.old +0 -3
@@ -73,9 +73,6 @@int linenum, inst_t *ra); -extern void -xfs_hex_dump (void *p,int length); -#define XFS_ERROR_REPORT (e, lvl, mp) \ xfs_error_report(e, lvl, mp, __FILE__, __LINE__, __return_address)#define XFS_CORRUPTION_ERROR (e, lvl, mp, mem) \
fs/xfs/xfs_error.c renamed from fs/xfs/xfs_error.c.old +1 -1
@@ -280,7 +280,7 @@ } } -void +static void xfs_hex_dump (void *p,int length) {__uint8_t *uip = (__uint8_t *)p;
fs/xfs/xfs_extfree_item.c renamed from fs/xfs/xfs_extfree_item.c.old +2 -2
@@ -288,7 +288,7 @@/* * This is the ops vector shared by all efi log items. */ -struct xfs_item_ops xfs_efi_item_ops = { +STATIC struct xfs_item_ops xfs_efi_item_ops = { .iop_size = (uint (*)(xfs_log_item_t *))xfs_efi_item_size, .iop_format = (void (*)(xfs_log_item_t *,xfs_log_iovec_t *)) xfs_efi_item_format,
@@ -615,7 +615,7 @@/* * This is the ops vector shared by all efd log items. */ -struct xfs_item_ops xfs_efd_item_ops = { +STATIC struct xfs_item_ops xfs_efd_item_ops = { .iop_size = (uint (*)(xfs_log_item_t *))xfs_efd_item_size, .iop_format = (void (*)(xfs_log_item_t *,xfs_log_iovec_t *)) xfs_efd_item_format,
fs/xfs/xfs_fsops.c renamed from fs/xfs/xfs_fsops.c.old +2 -0
@@ -559,6 +559,7 @@return (0 ); } +#if 0 void xfs_fs_log_dummy (xfs_mount_t *mp) {
@@ -584,6 +585,7 @@xfs_iunlock (ip,XFS_ILOCK_EXCL ); } +#endif /* 0 */ int xfs_fs_goingdown(
fs/xfs/xfs_inode.h renamed from fs/xfs/xfs_inode.h.old +0 -4
@@ -466,7 +466,6 @@void xfs_chash_free (struct xfs_mount *);xfs_inode_t *xfs_inode_incore (struct xfs_mount *,xfs_ino_t ,struct xfs_trans *); -void xfs_inode_lock_init (xfs_inode_t *,struct vnode *);int xfs_iget (struct xfs_mount *,struct xfs_trans *,xfs_ino_t ,uint ,uint ,xfs_inode_t **,xfs_daddr_t );void xfs_iput (xfs_inode_t *,uint );
@@ -487,8 +486,6 @@/* * xfs_inode.c prototypes. */ -int xfs_inotobp (struct xfs_mount *,struct xfs_trans *,xfs_ino_t , -xfs_dinode_t **,struct xfs_buf **,int *);int xfs_itobp (struct xfs_mount *,struct xfs_trans *,xfs_inode_t *,xfs_dinode_t **,struct xfs_buf **,xfs_daddr_t );
@@ -515,7 +512,6 @@void xfs_idestroy_fork (xfs_inode_t *,int );void xfs_idestroy (xfs_inode_t *);void xfs_idata_realloc (xfs_inode_t *,int ,int ); -void xfs_iextract (xfs_inode_t *);void xfs_iext_realloc (xfs_inode_t *,int ,int );void xfs_iroot_realloc (xfs_inode_t *,int ,int );void xfs_ipin (xfs_inode_t *);
fs/xfs/xfs_iget.c renamed from fs/xfs/xfs_iget.c.old +5 -2
@@ -57,6 +57,9 @@#include "xfs_utils.h" #include "xfs_bit.h" +static void xfs_iextract (xfs_inode_t *ip); +static void xfs_inode_lock_init (xfs_inode_t *ip,vnode_t *vp); +/* * Initialize the inode hash table for the newly mounted file system. * Choose an initial table size based on user specified value, else
@@ -522,7 +525,7 @@/* * Do the setup for the various locks within the incore inode. */ -void +static void xfs_inode_lock_init (xfs_inode_t *ip,vnode_t *vp)
@@ -668,7 +671,7 @@* all of the lists in which it is located with the exception * of the behavior chain. */ -void +static void xfs_iextract (xfs_inode_t *ip) {
fs/xfs/xfs_inode.c renamed from fs/xfs/xfs_inode.c.old +5 -3
@@ -148,6 +148,7 @@/* * called from bwrite on xfs inode buffers */ +#if 0 void xfs_inobp_bwcheck (xfs_buf_t *bp) {
@@ -189,6 +190,7 @@ return; } +#endif /* 0 */ /* * This routine is called to map an inode number within a file
@@ -203,7 +205,7 @@* Use xfs_imap() to determine the size and location of the * buffer to read from disk. */ -int +static int xfs_inotobp( xfs_mount_t *mp, xfs_trans_t *tp,
@@ -2156,7 +2158,7 @@ (ip->i_update_core == 0)); } -void +static void xfs_ifree_cluster( xfs_inode_t *free_ip, xfs_trans_t *tp,
@@ -2875,7 +2877,7 @@* be subsequently pinned once someone is waiting for it to be * unpinned. */ -void +static void xfs_iunpin_wait (xfs_inode_t *ip) {
fs/xfs/xfs_inode_item.c renamed from fs/xfs/xfs_inode_item.c.old +1 -1
@@ -910,7 +910,7 @@/* * This is the ops vector shared by all buf log items. */ -struct xfs_item_ops xfs_inode_item_ops = { +STATIC struct xfs_item_ops xfs_inode_item_ops = { .iop_size = (uint (*)(xfs_log_item_t *))xfs_inode_item_size, .iop_format = (void (*)(xfs_log_item_t *,xfs_log_iovec_t *)) xfs_inode_item_format,
fs/xfs/xfs_log.c renamed from fs/xfs/xfs_log.c.old +3 -3
@@ -134,7 +134,7 @@#define xlog_verify_tail_lsn (a,b,c)#endif -int xlog_iclogs_empty (xlog_t *log); +static int xlog_iclogs_empty (xlog_t *log);#ifdef DEBUG int xlog_do_error =0 ;
@@ -1857,7 +1857,7 @@* * State Change: DIRTY -> ACTIVE */ -void +static void xlog_state_clean_log (xlog_t *log) {xlog_in_core_t *iclog;
@@ -3542,7 +3542,7 @@return (retval); } -int +static int xlog_iclogs_empty (xlog_t *log) {xlog_in_core_t *iclog;
fs/xfs/xfs_log_priv.h renamed from fs/xfs/xfs_log_priv.h.old +0 -11
@@ -535,20 +535,9 @@/* common routines */ extern xfs_lsn_t xlog_assign_tail_lsn (struct xfs_mount *mp); -extern int xlog_find_head (xlog_t *log,xfs_daddr_t *head_blk); -extern int xlog_find_tail (xlog_t *log, -xfs_daddr_t *head_blk, -xfs_daddr_t *tail_blk, -int readonly);extern int xlog_recover (xlog_t *log,int readonly);extern int xlog_recover_finish (xlog_t *log,int mfsi_flags);extern void xlog_pack_data (xlog_t *log,xlog_in_core_t *iclog,int ); -extern void xlog_recover_process_iunlinks (xlog_t *log); - -extern struct xfs_buf *xlog_get_bp (xlog_t *,int ); -extern void xlog_put_bp (struct xfs_buf *); -extern int xlog_bread (xlog_t *,xfs_daddr_t ,int ,struct xfs_buf *); -extern xfs_caddr_t xlog_align (xlog_t *,xfs_daddr_t ,int ,struct xfs_buf *);/* iclog tracing */ #define XLOG_TRACE_GRAB_FLUSH 1
fs/xfs/xfs_log_recover.c renamed from fs/xfs/xfs_log_recover.c.old +9 -9
@@ -86,7 +86,7 @@ ((bbs + (log)->l_sectbb_mask + 1) & ~(log)->l_sectbb_mask) : (bbs) )#define XLOG_SECTOR_ROUNDDOWN_BLKNO (log, bno) ((bno) & ~(log)->l_sectbb_mask) -xfs_buf_t * +STATIC xfs_buf_t *xlog_get_bp (xlog_t *log,int num_bblks)
@@ -101,7 +101,7 @@return xfs_buf_get_noaddr (BBTOB (num_bblks), log->l_mp->m_logdev_targp); } -void +STATIC voidxlog_put_bp (xfs_buf_t *bp) {
@@ -112,7 +112,7 @@/* * nbblks should be uint, but oh well. Just want to catch that 32-bit length. */ -int +STATIC int xlog_bread( xlog_t *log, xfs_daddr_t blk_no,
@@ -148,7 +148,7 @@* The buffer is kept locked across the write and is returned locked. * This can only be used for synchronous log writes. */ -int +STATIC int xlog_bwrite( xlog_t *log, xfs_daddr_t blk_no,
@@ -179,7 +179,7 @@return error; } -xfs_caddr_t +STATIC xfs_caddr_t xlog_align( xlog_t *log, xfs_daddr_t blk_no,
@@ -310,7 +310,7 @@* Note that the algorithm can not be perfect because the disk will not * necessarily be perfect. */ -int +STATIC int xlog_find_cycle_start( xlog_t *log, xfs_buf_t *bp,
@@ -528,7 +528,7 @@* * Return: zero if normal, non-zero if error. */ -int +STATIC intxlog_find_head (xlog_t *log,xfs_daddr_t *return_head_blk)
@@ -794,7 +794,7 @@* We could speed up search by using current head_blk buffer, but it is not * available. */ -int +STATIC int xlog_find_tail( xlog_t *log, xfs_daddr_t *head_blk,
@@ -3208,7 +3208,7 @@* freeing of the inode and its removal from the list must be * atomic. */ -void +STATIC voidxlog_recover_process_iunlinks (xlog_t *log) {
fs/xfs/xfs_mount.h renamed from fs/xfs/xfs_mount.h.old +0 -3
@@ -543,10 +543,8 @@extern int xfs_mountfs (struct vfs *,xfs_mount_t *mp,int );extern int xfs_unmountfs (xfs_mount_t *,struct cred *); -extern void xfs_unmountfs_wait (xfs_mount_t *);extern void xfs_unmountfs_close (xfs_mount_t *,struct cred *);extern int xfs_unmountfs_writesb (xfs_mount_t *); -extern int xfs_unmount_flush (xfs_mount_t *,int );extern int xfs_mod_incore_sb (xfs_mount_t *,xfs_sb_field_t ,int ,int );extern int xfs_mod_incore_sb_batch (xfs_mount_t *,xfs_mod_sb_t *,uint ,int );
@@ -554,7 +552,6 @@extern int xfs_readsb (xfs_mount_t *mp);extern void xfs_freesb (xfs_mount_t *);extern void xfs_do_force_shutdown (bhv_desc_t *,int ,char *,int ); -extern int xfs_syncsub (xfs_mount_t *,int ,int ,int *);extern xfs_agnumber_t xfs_initialize_perag (xfs_mount_t *,xfs_agnumber_t );extern void xfs_xlatesb (void *,struct xfs_sb *,int ,__int64_t );
fs/xfs/xfs_mount.c renamed from fs/xfs/xfs_mount.c.old +3 -2
@@ -64,6 +64,7 @@ STATIC void xfs_mount_log_sbunit(xfs_mount_t *, __int64_t); STATIC int xfs_uuid_mount(xfs_mount_t *); STATIC void xfs_uuid_unmount(xfs_mount_t *mp); +STATIC void xfs_unmountfs_wait(xfs_mount_t *mp); static struct { short offset;
@@ -546,7 +547,7 @@* fields from the superblock associated with the given * mount structure */ -void +STATIC voidxfs_mount_common (xfs_mount_t *mp,xfs_sb_t *sbp) {int i;
@@ -1137,7 +1138,7 @@xfs_free_buftarg (mp->m_ddev_targp,0 ); } -void +STATIC voidxfs_unmountfs_wait (xfs_mount_t *mp) {if (mp->m_logdev_targp != mp->m_ddev_targp)
fs/xfs/xfs_rename.c renamed from fs/xfs/xfs_rename.c.old +1 -1
@@ -235,7 +235,7 @@ } -int rename_which_error_return =0 ; +static int rename_which_error_return =0 ;/* * xfs_rename
fs/xfs/xfs_trans.h renamed from fs/xfs/xfs_trans.h.old +0 -3
@@ -987,8 +987,6 @@xfs_trans_t *xfs_trans_dup (xfs_trans_t *);int xfs_trans_reserve (xfs_trans_t *,uint ,uint ,uint ,uint ,uint ); -void xfs_trans_callback (xfs_trans_t *, -void (*)(xfs_trans_t *,void *),void *);void xfs_trans_mod_sb (xfs_trans_t *,uint ,long );struct xfs_buf *xfs_trans_get_buf (xfs_trans_t *,struct xfs_buftarg *,xfs_daddr_t ,int ,uint );
@@ -1010,7 +1008,6 @@ xfs_ino_t , uint, uint, struct xfs_inode **);void xfs_trans_ijoin (xfs_trans_t *,struct xfs_inode *,uint );void xfs_trans_ihold (xfs_trans_t *,struct xfs_inode *); -void xfs_trans_ihold_release (xfs_trans_t *,struct xfs_inode *);void xfs_trans_log_buf (xfs_trans_t *,struct xfs_buf *,uint ,uint );void xfs_trans_log_inode (xfs_trans_t *,struct xfs_inode *,uint );struct xfs_efi_log_item *xfs_trans_get_efi (xfs_trans_t *,uint );
fs/xfs/xfs_trans.c renamed from fs/xfs/xfs_trans.c.old +3 -1
@@ -338,6 +338,7 @@* * Only one callback can be associated with any single transaction. */ +#if 0 void xfs_trans_callback( xfs_trans_t *tp,
@@ -348,6 +349,7 @@ tp->t_callback = callback; tp->t_callarg = arg; } +#endif /* 0 */ /*
@@ -551,7 +553,7 @@* * This is done efficiently with a single call to xfs_mod_incore_sb_batch(). */ -void +STATIC voidxfs_trans_unreserve_and_mod_sb (xfs_trans_t *tp) {
fs/xfs/xfs_trans_inode.c renamed from fs/xfs/xfs_trans_inode.c.old +2 -0
@@ -258,6 +258,7 @@* for this transaction. */ /*ARGSUSED*/ +#if 0 void xfs_trans_ihold_release( xfs_trans_t *tp,
@@ -270,6 +271,7 @@ ip->i_itemp->ili_flags &= ~XFS_ILI_HOLD; } +#endif /* 0 */ /*
fs/xfs/xfs_vfsops.c renamed from fs/xfs/xfs_vfsops.c.old +6 -5
@@ -71,7 +71,8 @@#include "xfs_log_priv.h" STATIC int xfs_sync(bhv_desc_t *, int, cred_t *); - +STATIC int xfs_syncsub(xfs_mount_t *mp, int flags, int xflags, int *bypassed); +STATIC int xfs_unmount_flush( xfs_mount_t *mp, int relocation);int xfs_init (void ) {
@@ -681,7 +682,7 @@* inodes, which are needed as a separate set of operations so that * they can be called as part of relocation process. */ -int +STATIC int xfs_unmount_flush( xfs_mount_t *mp, /* Mount structure we are gettingrid of. */
@@ -1444,7 +1445,7 @@* only available by calling this routine. * */ -int +STATIC int xfs_syncsub( xfs_mount_t *mp, int flags,
@@ -1658,7 +1659,7 @@#define MNTOPT_NOIKEEP "noikeep"/* free empty inode clusters */ -int +STATIC int xfs_parseargs( struct bhv_desc *bhv, char *options,
@@ -1844,7 +1845,7 @@return 0 ; } -int +STATIC intxfs_showargs (struct bhv_desc *bhv,struct seq_file *m)
fs/xfs/xfs_vnodeops.c renamed from fs/xfs/xfs_vnodeops.c.old +2 -2
@@ -283,7 +283,7 @@/* * xfs_setattr */ -int +STATIC int xfs_setattr( bhv_desc_t *bdp, vattr_t *vap,
@@ -4025,7 +4025,7 @@* errno on error * */ -int +STATIC int xfs_alloc_file_space( xfs_inode_t *ip, xfs_off_t offset,
fs/xfs/linux-2.6/xfs_linux.h renamed from fs/xfs/linux-2.6/xfs_linux.h.old +0 -1
@@ -64,7 +64,6 @@#include <sema.h> #include <time.h> -#include <support/qsort.h> #include <support/ktrace.h> #include <support/debug.h> #include <support/move.h>
fs/xfs/Makefile renamed from fs/xfs/Makefile.old +0 -1
@@ -143,7 +143,6 @@ xfs-y += $(addprefix support/, \ debug.o \ move.o \ - qsort.o \ uuid.o) xfs-$(CONFIG_XFS_TRACE) += support/ktrace.o
fs/xfs/support/qsort.h deleted +0 -41
41 lines not on this page · raw message
fs/xfs/support/qsort.c deleted +0 -155
155 lines not on this page · raw message