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

Commit 2a0ec1d9 authored by Dave Chinner's avatar Dave Chinner Committed by Ben Myers
Browse files

xfs: move xfs_get_extsz_hint() and kill xfs_rw.h



The only thing left in xfs_rw.h is a function prototype for an inode
function.  Move that to xfs_inode.h, and kill xfs_rw.h.

Also move the function implementing the prototype from xfs_rw.c to
xfs_inode.c so we only have one function left in xfs_rw.c

Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarMark Tinguely <tinguely@sgi.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarBen Myers <bpm@sgi.com>
parent fd50092c
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -28,7 +28,6 @@
#include "xfs_inode_item.h"
#include "xfs_inode_item.h"
#include "xfs_alloc.h"
#include "xfs_alloc.h"
#include "xfs_error.h"
#include "xfs_error.h"
#include "xfs_rw.h"
#include "xfs_iomap.h"
#include "xfs_iomap.h"
#include "xfs_vnodeops.h"
#include "xfs_vnodeops.h"
#include "xfs_trace.h"
#include "xfs_trace.h"
+0 −1
Original line number Original line Diff line number Diff line
@@ -38,7 +38,6 @@
#include "xfs_error.h"
#include "xfs_error.h"
#include "xfs_quota.h"
#include "xfs_quota.h"
#include "xfs_trans_space.h"
#include "xfs_trans_space.h"
#include "xfs_rw.h"
#include "xfs_vnodeops.h"
#include "xfs_vnodeops.h"
#include "xfs_trace.h"
#include "xfs_trace.h"


+0 −1
Original line number Original line Diff line number Diff line
@@ -41,7 +41,6 @@
#include "xfs_rtalloc.h"
#include "xfs_rtalloc.h"
#include "xfs_error.h"
#include "xfs_error.h"
#include "xfs_attr_leaf.h"
#include "xfs_attr_leaf.h"
#include "xfs_rw.h"
#include "xfs_quota.h"
#include "xfs_quota.h"
#include "xfs_trans_space.h"
#include "xfs_trans_space.h"
#include "xfs_buf_item.h"
#include "xfs_buf_item.h"
+0 −1
Original line number Original line Diff line number Diff line
@@ -38,7 +38,6 @@
#include "xfs_itable.h"
#include "xfs_itable.h"
#include "xfs_trans_space.h"
#include "xfs_trans_space.h"
#include "xfs_rtalloc.h"
#include "xfs_rtalloc.h"
#include "xfs_rw.h"
#include "xfs_filestream.h"
#include "xfs_filestream.h"
#include "xfs_trace.h"
#include "xfs_trace.h"


+14 −0
Original line number Original line Diff line number Diff line
@@ -61,6 +61,20 @@ STATIC int xfs_iformat_local(xfs_inode_t *, xfs_dinode_t *, int, int);
STATIC int xfs_iformat_extents(xfs_inode_t *, xfs_dinode_t *, int);
STATIC int xfs_iformat_extents(xfs_inode_t *, xfs_dinode_t *, int);
STATIC int xfs_iformat_btree(xfs_inode_t *, xfs_dinode_t *, int);
STATIC int xfs_iformat_btree(xfs_inode_t *, xfs_dinode_t *, int);


/*
 * helper function to extract extent size hint from inode
 */
xfs_extlen_t
xfs_get_extsz_hint(
	struct xfs_inode	*ip)
{
	if ((ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE) && ip->i_d.di_extsize)
		return ip->i_d.di_extsize;
	if (XFS_IS_REALTIME_INODE(ip))
		return ip->i_mount->m_sb.sb_rextsize;
	return 0;
}

#ifdef DEBUG
#ifdef DEBUG
/*
/*
 * Make sure that the extents in the given memory buffer
 * Make sure that the extents in the given memory buffer
Loading