* This was once shared with the kernel, but has diverged to the point
* where it's no longer worth the hassle of maintaining common code.
*/
-int
+static int
libxfs_ialloc(
xfs_trans_t *tp,
xfs_inode_t *pip,
case S_IFLNK:
ip->i_d.di_format = XFS_DINODE_FMT_EXTENTS;
ip->i_df.if_flags = XFS_IFEXTENTS;
- ip->i_df.if_bytes = ip->i_df.if_real_bytes = 0;
+ ip->i_df.if_bytes = 0;
ip->i_df.if_u1.if_root = NULL;
break;
default:
return 0;
}
-void
+static void
libxfs_iprint(
xfs_inode_t *ip)
{
struct xfs_icdinode *dip;
xfs_extnum_t i = 0;
- xfs_ifork_t *ifp; /* inode fork pointer */
+ struct xfs_ifork *ifp; /* inode fork pointer */
struct xfs_iext_cursor icur;
xfs_bmbt_irec_t rec;
xfs_filblks_t datablocks;
xfs_filblks_t allocated_fsb;
xfs_filblks_t allocatesize_fsb;
- xfs_fsblock_t firstfsb;
- struct xfs_defer_ops free_list;
xfs_bmbt_irec_t *imapp;
xfs_bmbt_irec_t imaps[1];
int reccount;
}
xfs_trans_ijoin(tp, ip, 0);
- xfs_defer_init(&free_list, &firstfsb);
error = xfs_bmapi_write(tp, ip, startoffset_fsb, allocatesize_fsb,
- xfs_bmapi_flags, &firstfsb, 0, imapp, &reccount);
+ xfs_bmapi_flags, 0, imapp, &reccount);
if (error)
goto error0;
/*
* Complete the transaction
*/
- error = xfs_defer_finish(&tp, &free_list);
- if (error)
- goto error0;
-
error = xfs_trans_commit(tp);
if (error)
break;
return error;
error0: /* Cancel bmap, cancel trans */
- xfs_defer_cancel(&free_list);
xfs_trans_cancel(tp);
return error;
}
* repair can validate it against the state of the log.
*/
xfs_lsn_t libxfs_max_lsn = 0;
-pthread_mutex_t libxfs_max_lsn_lock = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t libxfs_max_lsn_lock = PTHREAD_MUTEX_INITIALIZER;
bool
xfs_log_check_lsn(