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

Commit b48d8d64 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Niv Sardi
Browse files

[XFS] kill the XFS_IMAP_BULKSTAT flag



Just pass down the XFS_IGET_* flags all the way down to xfs_imap instead
of translating them mid-way.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDave Chinner <david@fromorbit.com>
Signed-off-by: default avatarNiv Sardi <xaiki@sgi.com>
parent 92bfc6e7
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1228,7 +1228,7 @@ xfs_imap(
	    ino != XFS_AGINO_TO_INO(mp, agno, agino)) {
	    ino != XFS_AGINO_TO_INO(mp, agno, agino)) {
#ifdef DEBUG
#ifdef DEBUG
		/* no diagnostics for bulkstat, ino comes from userspace */
		/* no diagnostics for bulkstat, ino comes from userspace */
		if (flags & XFS_IMAP_BULKSTAT)
		if (flags & XFS_IGET_BULKSTAT)
			return XFS_ERROR(EINVAL);
			return XFS_ERROR(EINVAL);
		if (agno >= mp->m_sb.sb_agcount) {
		if (agno >= mp->m_sb.sb_agcount) {
			xfs_fs_cmn_err(CE_ALERT, mp,
			xfs_fs_cmn_err(CE_ALERT, mp,
+1 −2
Original line number Original line Diff line number Diff line
@@ -159,8 +159,7 @@ xfs_iget_cache_miss(
	 * Read the disk inode attributes into a new inode structure and get
	 * Read the disk inode attributes into a new inode structure and get
	 * a new vnode for it. This should also initialize i_ino and i_mount.
	 * a new vnode for it. This should also initialize i_ino and i_mount.
	 */
	 */
	error = xfs_iread(mp, tp, ino, &ip, bno,
	error = xfs_iread(mp, tp, ino, &ip, bno, flags);
			  (flags & XFS_IGET_BULKSTAT) ? XFS_IMAP_BULKSTAT : 0);
	if (error)
	if (error)
		return error;
		return error;


+2 −2
Original line number Original line Diff line number Diff line
@@ -136,7 +136,7 @@ xfs_imap_to_bp(
	struct xfs_imap	*imap,
	struct xfs_imap	*imap,
	xfs_buf_t	**bpp,
	xfs_buf_t	**bpp,
	uint		buf_flags,
	uint		buf_flags,
	uint		imap_flags)
	uint		iget_flags)
{
{
	int		error;
	int		error;
	int		i;
	int		i;
@@ -178,7 +178,7 @@ xfs_imap_to_bp(
		if (unlikely(XFS_TEST_ERROR(!di_ok, mp,
		if (unlikely(XFS_TEST_ERROR(!di_ok, mp,
						XFS_ERRTAG_ITOBP_INOTOBP,
						XFS_ERRTAG_ITOBP_INOTOBP,
						XFS_RANDOM_ITOBP_INOTOBP))) {
						XFS_RANDOM_ITOBP_INOTOBP))) {
			if (imap_flags & XFS_IMAP_BULKSTAT) {
			if (iget_flags & XFS_IGET_BULKSTAT) {
				xfs_trans_brelse(tp, bp);
				xfs_trans_brelse(tp, bp);
				return XFS_ERROR(EINVAL);
				return XFS_ERROR(EINVAL);
			}
			}
+0 −5
Original line number Original line Diff line number Diff line
@@ -166,11 +166,6 @@ typedef struct xfs_icdinode {
#define	XFS_IFBROOT	0x04	/* i_broot points to the bmap b-tree root */
#define	XFS_IFBROOT	0x04	/* i_broot points to the bmap b-tree root */
#define	XFS_IFEXTIREC	0x08	/* Indirection array of extent blocks */
#define	XFS_IFEXTIREC	0x08	/* Indirection array of extent blocks */


/*
 * Flags for xfs_inotobp and xfs_imap().
 */
#define XFS_IMAP_BULKSTAT	0x1

/*
/*
 * Fork handling.
 * Fork handling.
 */
 */
+1 −1
Original line number Original line Diff line number Diff line
@@ -595,7 +595,7 @@ xfs_bulkstat(


						error = xfs_inotobp(mp, NULL, ino, &dip,
						error = xfs_inotobp(mp, NULL, ino, &dip,
								    &bp, &offset,
								    &bp, &offset,
								    XFS_IMAP_BULKSTAT);
								    XFS_IGET_BULKSTAT);


						if (!error)
						if (!error)
							clustidx = offset / mp->m_sb.sb_inodesize;
							clustidx = offset / mp->m_sb.sb_inodesize;