public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* 'delete' parameter in xfs_ialloc.h
@ 2014-05-12 15:22 Roger Willcocks
  2014-05-12 15:31 ` Eric Sandeen
  0 siblings, 1 reply; 6+ messages in thread
From: Roger Willcocks @ 2014-05-12 15:22 UTC (permalink / raw)
  To: xfs

Hi folks,

I have to fix this up every time I update xfsprogs -

The 'delete' parameter in xfsprogs/include/xfs_ialloc.c:xfs_difree(...)
causes a compile error if the header's included in C++ code (even with
'extern "C"') -

xfs_ialloc.h:102: error: expected ‘,’ or ‘...’ before ‘delete’

(gcc 4.4.7)

It would be handy if the parameter name could be commented out or
changed in the header.

-- 
Roger Willcocks <roger@filmlight.ltd.uk>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 'delete' parameter in xfs_ialloc.h
  2014-05-12 15:22 'delete' parameter in xfs_ialloc.h Roger Willcocks
@ 2014-05-12 15:31 ` Eric Sandeen
  2014-05-12 17:52   ` Roger Willcocks
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Eric Sandeen @ 2014-05-12 15:31 UTC (permalink / raw)
  To: Roger Willcocks, xfs

On 5/12/14, 10:22 AM, Roger Willcocks wrote:
> Hi folks,
> 
> I have to fix this up every time I update xfsprogs -
> 
> The 'delete' parameter in xfsprogs/include/xfs_ialloc.c:xfs_difree(...)
> causes a compile error if the header's included in C++ code (even with
> 'extern "C"') -
> 
> xfs_ialloc.h:102: error: expected ‘,’ or ‘...’ before ‘delete’
> 
> (gcc 4.4.7)
> 
> It would be handy if the parameter name could be commented out or
> changed in the header.
> 

Send a patch?  Would need to hit kernel code too.

-Eric

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 'delete' parameter in xfs_ialloc.h
  2014-05-12 15:31 ` Eric Sandeen
@ 2014-05-12 17:52   ` Roger Willcocks
  2014-05-12 17:52   ` [PATCH] xfsprogs: fix compile error when libxfs header used in C++ code Roger Willcocks
  2014-05-12 17:52   ` [PATCH] xfs: " Roger Willcocks
  2 siblings, 0 replies; 6+ messages in thread
From: Roger Willcocks @ 2014-05-12 17:52 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Roger Willcocks, xfs


On 12 May 2014, at 16:31, Eric Sandeen <sandeen@sandeen.net> wrote:

> On 5/12/14, 10:22 AM, Roger Willcocks wrote:
>> Hi folks,
>> 
>> I have to fix this up every time I update xfsprogs -
>> 
>> The 'delete' parameter in xfsprogs/include/xfs_ialloc.c:xfs_difree(...)
>> causes a compile error if the header's included in C++ code (even with
>> 'extern "C"') -
>> 
>> xfs_ialloc.h:102: error: expected ‘,’ or ‘...’ before ‘delete’
>> 
>> (gcc 4.4.7)
>> 
>> It would be handy if the parameter name could be commented out or
>> changed in the header.
>> 
> 
> Send a patch?  Would need to hit kernel code too.
> 
> -Eric
> 

Okay, two near-identical patches, one for xfsprogs and one for xfs follow.

--
Roger

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] xfsprogs: fix compile error when libxfs header used in C++ code
  2014-05-12 15:31 ` Eric Sandeen
  2014-05-12 17:52   ` Roger Willcocks
@ 2014-05-12 17:52   ` Roger Willcocks
  2014-05-12 17:52   ` [PATCH] xfs: " Roger Willcocks
  2 siblings, 0 replies; 6+ messages in thread
From: Roger Willcocks @ 2014-05-12 17:52 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Roger Willcocks, xfs

xfs_ialloc.h:102: error: expected ‘,’ or ‘...’ before ‘delete’

Simple parameter rename, no changes to behaviour.

Signed-off-by: Roger Willcocks <roger@filmlight.ltd.uk>
---
 include/xfs_ialloc.h |    2 +-
 libxfs/xfs_ialloc.c  |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/xfs_ialloc.h b/include/xfs_ialloc.h
index a8f76a5..c8ac0a4 100644
--- a/include/xfs_ialloc.h
+++ b/include/xfs_ialloc.h
@@ -89,7 +89,7 @@ xfs_difree(
 	struct xfs_trans *tp,		/* transaction pointer */
 	xfs_ino_t	inode,		/* inode to be freed */
 	struct xfs_bmap_free *flist,	/* extents to free */
-	int		*delete,	/* set if inode cluster was deleted */
+	int		*deleted,	/* set if inode cluster was deleted */
 	xfs_ino_t	*first_ino);	/* first inode in deleted cluster */
 
 /*
diff --git a/libxfs/xfs_ialloc.c b/libxfs/xfs_ialloc.c
index c19d84a..1dabb6c 100644
--- a/libxfs/xfs_ialloc.c
+++ b/libxfs/xfs_ialloc.c
@@ -1080,7 +1080,7 @@ xfs_difree(
 	xfs_trans_t	*tp,		/* transaction pointer */
 	xfs_ino_t	inode,		/* inode to be freed */
 	xfs_bmap_free_t	*flist,		/* extents to free */
-	int		*delete,	/* set if inode cluster was deleted */
+	int		*deleted,	/* set if inode cluster was deleted */
 	xfs_ino_t	*first_ino)	/* first inode in deleted cluster */
 {
 	/* REFERENCED */
@@ -1180,7 +1180,7 @@ xfs_difree(
 	if (!(mp->m_flags & XFS_MOUNT_IKEEP) &&
 	    (rec.ir_freecount == XFS_IALLOC_INODES(mp))) {
 
-		*delete = 1;
+		*deleted = 1;
 		*first_ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino);
 
 		/*
@@ -1208,7 +1208,7 @@ xfs_difree(
 				agno, XFS_INO_TO_AGBNO(mp,rec.ir_startino)),
 				XFS_IALLOC_BLOCKS(mp), flist, mp);
 	} else {
-		*delete = 0;
+		*deleted = 0;
 
 		error = xfs_inobt_update(cur, &rec);
 		if (error) {
-- 
1.7.1


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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] xfs: fix compile error when libxfs header used in C++ code
  2014-05-12 15:31 ` Eric Sandeen
  2014-05-12 17:52   ` Roger Willcocks
  2014-05-12 17:52   ` [PATCH] xfsprogs: fix compile error when libxfs header used in C++ code Roger Willcocks
@ 2014-05-12 17:52   ` Roger Willcocks
  2014-05-19 22:59     ` Dave Chinner
  2 siblings, 1 reply; 6+ messages in thread
From: Roger Willcocks @ 2014-05-12 17:52 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: Roger Willcocks, xfs

xfs_ialloc.h:102: error: expected ‘,’ or ‘...’ before ‘delete'

Simple parameter rename, no changes to behaviour.

Signed-off-by: Roger Willcocks <roger@filmlight.ltd.uk>
---
 fs/xfs/xfs_ialloc.c |    6 +++---
 fs/xfs/xfs_ialloc.h |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
index 8f711db..b819263 100644
--- a/fs/xfs/xfs_ialloc.c
+++ b/fs/xfs/xfs_ialloc.c
@@ -1109,7 +1109,7 @@ xfs_difree(
 	xfs_trans_t	*tp,		/* transaction pointer */
 	xfs_ino_t	inode,		/* inode to be freed */
 	xfs_bmap_free_t	*flist,		/* extents to free */
-	int		*delete,	/* set if inode cluster was deleted */
+	int		*deleted,	/* set if inode cluster was deleted */
 	xfs_ino_t	*first_ino)	/* first inode in deleted cluster */
 {
 	/* REFERENCED */
@@ -1209,7 +1209,7 @@ xfs_difree(
 	if (!(mp->m_flags & XFS_MOUNT_IKEEP) &&
 	    (rec.ir_freecount == mp->m_ialloc_inos)) {
 
-		*delete = 1;
+		*deleted = 1;
 		*first_ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino);
 
 		/*
@@ -1237,7 +1237,7 @@ xfs_difree(
 				  XFS_AGINO_TO_AGBNO(mp, rec.ir_startino)),
 				  mp->m_ialloc_blks, flist, mp);
 	} else {
-		*delete = 0;
+		*deleted = 0;
 
 		error = xfs_inobt_update(cur, &rec);
 		if (error) {
diff --git a/fs/xfs/xfs_ialloc.h b/fs/xfs/xfs_ialloc.h
index 812365d..95ad1c0 100644
--- a/fs/xfs/xfs_ialloc.h
+++ b/fs/xfs/xfs_ialloc.h
@@ -90,7 +90,7 @@ xfs_difree(
 	struct xfs_trans *tp,		/* transaction pointer */
 	xfs_ino_t	inode,		/* inode to be freed */
 	struct xfs_bmap_free *flist,	/* extents to free */
-	int		*delete,	/* set if inode cluster was deleted */
+	int		*deleted,	/* set if inode cluster was deleted */
 	xfs_ino_t	*first_ino);	/* first inode in deleted cluster */
 
 /*
-- 
1.7.1


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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] xfs: fix compile error when libxfs header used in C++ code
  2014-05-12 17:52   ` [PATCH] xfs: " Roger Willcocks
@ 2014-05-19 22:59     ` Dave Chinner
  0 siblings, 0 replies; 6+ messages in thread
From: Dave Chinner @ 2014-05-19 22:59 UTC (permalink / raw)
  To: Roger Willcocks; +Cc: Eric Sandeen, xfs

On Mon, May 12, 2014 at 06:52:34PM +0100, Roger Willcocks wrote:
> xfs_ialloc.h:102: error: expected ‘,’ or ‘...’ before ‘delete'
> 
> Simple parameter rename, no changes to behaviour.
> 
> Signed-off-by: Roger Willcocks <roger@filmlight.ltd.uk>

Looks good.

Reviewed-by: Dave Chinner <dchinner@redhat.com>

The merge into the for-next branch conflicted with the finobt
changes, but I think I cleaned that up fine.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-05-19 23:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-12 15:22 'delete' parameter in xfs_ialloc.h Roger Willcocks
2014-05-12 15:31 ` Eric Sandeen
2014-05-12 17:52   ` Roger Willcocks
2014-05-12 17:52   ` [PATCH] xfsprogs: fix compile error when libxfs header used in C++ code Roger Willcocks
2014-05-12 17:52   ` [PATCH] xfs: " Roger Willcocks
2014-05-19 22:59     ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox