All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 4/7] xfs: uninline xfs_get_extsz_hint
Date: Wed, 18 Nov 2009 22:51:20 -0600	[thread overview]
Message-ID: <4B04CEC8.1040603@sandeen.net> (raw)
In-Reply-To: <20091114161801.818601601@bombadil.infradead.org>

Christoph Hellwig wrote:

> This function is too large to efficiently be inlined.

Just out of curiosity; too how do you define too large?

-Eric

> Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> Index: xfs/fs/xfs/xfs_rw.c
> ===================================================================
> --- xfs.orig/fs/xfs/xfs_rw.c	2009-11-12 17:14:15.278004428 +0100
> +++ xfs/fs/xfs/xfs_rw.c	2009-11-12 17:18:33.311004263 +0100
> @@ -336,3 +336,25 @@ xfs_bwrite(
>  	}
>  	return (error);
>  }
> +
> +/*
> + * helper function to extract extent size hint from inode
> + */
> +xfs_extlen_t
> +xfs_get_extsz_hint(
> +	struct xfs_inode	*ip)
> +{
> +	xfs_extlen_t		extsz;
> +
> +	if (unlikely(XFS_IS_REALTIME_INODE(ip))) {
> +		extsz = (ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE)
> +				? ip->i_d.di_extsize
> +				: ip->i_mount->m_sb.sb_rextsize;
> +		ASSERT(extsz);
> +	} else {
> +		extsz = (ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE)
> +				? ip->i_d.di_extsize : 0;
> +	}
> +
> +	return extsz;
> +}
> Index: xfs/fs/xfs/xfs_rw.h
> ===================================================================
> --- xfs.orig/fs/xfs/xfs_rw.h	2009-11-09 17:06:46.116004228 +0100
> +++ xfs/fs/xfs/xfs_rw.h	2009-11-12 17:18:33.311004263 +0100
> @@ -37,27 +37,6 @@ xfs_fsb_to_db(struct xfs_inode *ip, xfs_
>  }
>  
>  /*
> - * helper function to extract extent size hint from inode
> - */
> -STATIC_INLINE xfs_extlen_t
> -xfs_get_extsz_hint(
> -	xfs_inode_t	*ip)
> -{
> -	xfs_extlen_t	extsz;
> -
> -	if (unlikely(XFS_IS_REALTIME_INODE(ip))) {
> -		extsz = (ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE)
> -				? ip->i_d.di_extsize
> -				: ip->i_mount->m_sb.sb_rextsize;
> -		ASSERT(extsz);
> -	} else {
> -		extsz = (ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE)
> -				? ip->i_d.di_extsize : 0;
> -	}
> -	return extsz;
> -}
> -
> -/*
>   * Prototypes for functions in xfs_rw.c.
>   */
>  extern int xfs_write_clear_setuid(struct xfs_inode *ip);
> @@ -69,5 +48,6 @@ extern int xfs_read_buf(struct xfs_mount
>  			struct xfs_buf **bpp);
>  extern void xfs_ioerror_alert(char *func, struct xfs_mount *mp,
>  				xfs_buf_t *bp, xfs_daddr_t blkno);
> +extern xfs_extlen_t xfs_get_extsz_hint(struct xfs_inode *ip);
>  
>  #endif /* __XFS_RW_H__ */
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
> 

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2009-11-19  4:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-14 16:17 [PATCH 0/7] assorted cleanups Christoph Hellwig
2009-11-14 16:17 ` [PATCH 1/7] xfs: remove IO_ISAIO Christoph Hellwig
2009-11-16  3:05   ` Dave Chinner
2009-11-19  4:36   ` Eric Sandeen
2009-11-14 16:17 ` [PATCH 2/7] xfs: remove xfs_buf_get / xfs_buf_read Christoph Hellwig
2009-11-16  3:15   ` Dave Chinner
2009-11-16 11:03     ` Christoph Hellwig
2009-11-19  4:40   ` Eric Sandeen
2009-11-24 18:02   ` [PATCH v2 2/7] xfs: simplify xfs_buf_get / xfs_buf_read interfaces Christoph Hellwig
2009-11-25  0:16     ` Dave Chinner
2009-11-14 16:17 ` [PATCH 3/7] xfs: rename xfs_attr_fetch to xfs_attr_get_int Christoph Hellwig
2009-11-16  3:17   ` Dave Chinner
2009-11-19  4:42   ` Eric Sandeen
2009-11-14 16:17 ` [PATCH 4/7] xfs: uninline xfs_get_extsz_hint Christoph Hellwig
2009-11-16  3:18   ` Dave Chinner
2009-11-19  4:51   ` Eric Sandeen [this message]
2009-11-14 16:17 ` [PATCH 5/7] xfs: kill the STATIC_INLINE macro Christoph Hellwig
2009-11-16  3:20   ` Dave Chinner
2009-11-14 16:17 ` [PATCH 6/7] xfs: remove incorrect sparse annotation for xfs_iget_cache_miss Christoph Hellwig
2009-11-16  3:22   ` Dave Chinner
2009-11-14 16:17 ` [PATCH 7/7] xfs: cleanup dmapi macros in the umount path Christoph Hellwig
2009-11-16  3:29   ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B04CEC8.1040603@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=hch@infradead.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.