Bug 441636 - Build warnings from gfs2tool
Build warnings from gfs2tool
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gfs2-utils (Show other bugs)
9
All Linux
low Severity low
: ---
: ---
Assigned To: Abhijith Das
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-09 04:36 EDT by Steve Whitehouse
Modified: 2008-06-02 07:09 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-06-02 07:09:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Steve Whitehouse 2008-04-09 04:36:25 EDT
Please fix the following build warnings (looks like we've got a header included
twice or something like that):

gcc -Wall -Wformat=2 -O2 -g -I/builddir/build/BUILD/gfs2-0.1.25.2.02.01/config 
-DDEFAULT_CONFIG_DIR=\"/etc/cluster\" -DDEFAULT_CONFIG_FILE=\"cluster.conf\"
-DRELEASE_VERSION=\"DEVEL.1207697850.0\" -D_FILE_OFFSET_BITS=64
-I/lib/modules/2.6.24.4-64.fc8/build//fs/gfs2/
-I/lib/modules/2.6.24.4-64.fc8/build//include/
-I/builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/../include
-I/builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/../libgfs2 -I/usr/include
-c -o counters.o /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/counters.c
gcc -Wall -Wformat=2 -O2 -g -I/builddir/build/BUILD/gfs2-0.1.25.2.02.01/config 
-DDEFAULT_CONFIG_DIR=\"/etc/cluster\" -DDEFAULT_CONFIG_FILE=\"cluster.conf\"
-DRELEASE_VERSION=\"DEVEL.1207697850.0\" -D_FILE_OFFSET_BITS=64
-I/lib/modules/2.6.24.4-64.fc8/build//fs/gfs2/
-I/lib/modules/2.6.24.4-64.fc8/build//include/
-I/builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/../include
-I/builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/../libgfs2 -I/usr/include
-c -o df.o /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/df.c
gcc -Wall -Wformat=2 -O2 -g -I/builddir/build/BUILD/gfs2-0.1.25.2.02.01/config 
-DDEFAULT_CONFIG_DIR=\"/etc/cluster\" -DDEFAULT_CONFIG_FILE=\"cluster.conf\"
-DRELEASE_VERSION=\"DEVEL.1207697850.0\" -D_FILE_OFFSET_BITS=64
-I/lib/modules/2.6.24.4-64.fc8/build//fs/gfs2/
-I/lib/modules/2.6.24.4-64.fc8/build//include/
-I/builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/../include
-I/builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/../libgfs2 -I/usr/include
-c -o layout.o /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/layout.c
gcc -Wall -Wformat=2 -O2 -g -I/builddir/build/BUILD/gfs2-0.1.25.2.02.01/config 
-DDEFAULT_CONFIG_DIR=\"/etc/cluster\" -DDEFAULT_CONFIG_FILE=\"cluster.conf\"
-DRELEASE_VERSION=\"DEVEL.1207697850.0\" -D_FILE_OFFSET_BITS=64
-I/lib/modules/2.6.24.4-64.fc8/build//fs/gfs2/
-I/lib/modules/2.6.24.4-64.fc8/build//include/
-I/builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/../include
-I/builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/../libgfs2 -I/usr/include
-c -o main.o /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/main.c
/builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/main.c: In function
'print_usage':
/builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/main.c:134: warning: format
not a string literal and no format arguments
gcc -Wall -Wformat=2 -O2 -g -I/builddir/build/BUILD/gfs2-0.1.25.2.02.01/config 
-DDEFAULT_CONFIG_DIR=\"/etc/cluster\" -DDEFAULT_CONFIG_FILE=\"cluster.conf\"
-DRELEASE_VERSION=\"DEVEL.1207697850.0\" -D_FILE_OFFSET_BITS=64
-I/lib/modules/2.6.24.4-64.fc8/build//fs/gfs2/
-I/lib/modules/2.6.24.4-64.fc8/build//include/
-I/builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/../include
-I/builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/../libgfs2 -I/usr/include
-c -o misc.o /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:28:1: warning:
"BLOCK_SIZE" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:28:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:104:1: warning:
"MS_RDONLY" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:37:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:105:1: warning:
"MS_NOSUID" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:39:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:106:1: warning:
"MS_NODEV" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:41:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:107:1: warning:
"MS_NOEXEC" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:43:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:108:1: warning:
"MS_SYNCHRONOUS" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:45:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:109:1: warning:
"MS_REMOUNT" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:47:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:110:1: warning:
"MS_MANDLOCK" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:49:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:112:1: warning:
"MS_NOATIME" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:57:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:113:1: warning:
"MS_NODIRATIME" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:59:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:114:1: warning: "MS_BIND"
redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:61:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:133:1: warning:
"MS_RMT_MASK" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:65:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:138:1: warning:
"MS_MGC_VAL" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:71:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:145:1: warning:
"S_APPEND" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:53:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:146:1: warning:
"S_IMMUTABLE" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:55:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:190:1: warning:
"BLKROSET" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:79:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:191:1: warning:
"BLKROGET" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:80:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:192:1: warning:
"BLKRRPART" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:81:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:193:1: warning:
"BLKGETSIZE" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:82:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:194:1: warning:
"BLKFLSBUF" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:83:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:195:1: warning:
"BLKRASET" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:84:1: warning: this is the location of the previous
definition
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:32:
/lib/modules/2.6.24.4-64.fc8/build//include/linux/fs.h:196:1: 
warning: "BLKRAGET" redefined
In file included from /builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:31:
/usr/include/sys/mount.h:85:1: warning: this is the location of the previous
definition
/builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c: In function
'print_lockdump':
/builddir/build/BUILD/gfs2-0.1.25.2.02.01/gfs2/tool/misc.c:155: warning: format
not a string literal and no format arguments
Comment 1 Abhijith Das 2008-04-09 16:13:32 EDT
I just looked at this. misc.c includes both /include/linux/fs.h and
/include/sys/mount.h that both have declarations for these symbols. misc.c seems
to be wanting both these include files.
Comment 2 Robert Peterson 2008-04-09 16:40:52 EDT
IIRC, I needed to include both of these headers because they gave me
different sets of things.  The code would not compile with just one or
the other.
Comment 3 Abhijith Das 2008-04-09 18:28:13 EDT
Bob/Steve,
The following patch to misc.c in fixes the warnings. Should we do this?

--- misc.c.orig 2008-04-09 17:26:49.000000000 -0500
+++ misc.c      2008-04-09 17:28:36.000000000 -0500
@@ -28,12 +28,23 @@

 #define __user
 #include <linux/gfs2_ondisk.h>
-#include <sys/mount.h>
 #include <linux/fs.h>

 #include "libgfs2.h"
 #include "gfs2_tool.h"

+/* Mount a filesystem.  */
+extern int mount (__const char *__special_file, __const char *__dir,
+                  __const char *__fstype, unsigned long int __rwflag,
+                  __const void *__data) __THROW;
+
+/* Unmount a filesystem.  */
+extern int umount (__const char *__special_file) __THROW;
+
+/* Unmount a filesystem.  Force unmounting if FLAGS is set to MNT_FORCE.  */
+extern int umount2 (__const char *__special_file, int __flags) __THROW;
+
+
 #if GFS2_TOOL_FEATURE_IMPLEMENTED
 /**
  * do_file_flush -
Comment 4 Steve Whitehouse 2008-04-10 03:29:04 EDT
Please don't do that... using the glibc headers is the right thing to do, the
question is what is it that you are using in linux/fs.h that is not available in
any other (glibc) header?
Comment 5 Steve Whitehouse 2008-04-10 04:47:15 EDT
Hmm. Now I suspect that what you are after are the constants for the ioctl. That
is a bit of a problem, but not insoluable. How about using ext3_fs.h rather than
fs.h and using the ext3 definitions of those constants? I think that should
solve the problem in the short term.

Also there are some bugs in that the system attribute is no longer used/needed
really (if something is in the metafs then its a system file, if it isn't, then
its not) and the directio attribute, whilest it probably still works, is
completely pointless, so we could drop that one too. Also you could add the
exhash (index) flag which we can read (but not set directly) on directories. We
could set topdir too, but it seems we don't at the moment so I might fix that up
as its easy to do.
Comment 6 Abhijith Das 2008-04-11 02:02:14 EDT
Steve/Bob,
This patch uses the ext3_fs.h instead of fs.h. I also removed the SYSTEM and
DIRECTIO flags and added the INDEX (exhash) flag. gfs2_tool is only able to
clear or set flag and you mentioned that exhash can't be set directly. So, I
don't know if we should add exhash to gfs2_tool. Also, I've not added the topdir
flag. Let me know if I should add that as well.


--- misc.c.orig 2008-04-09 17:26:49.000000000 -0500
+++ misc.c      2008-04-10 12:18:56.000000000 -0500
@@ -29,7 +29,7 @@
 #define __user
 #include <linux/gfs2_ondisk.h>
 #include <sys/mount.h>
-#include <linux/fs.h>
+#include <linux/ext3_fs.h>

 #include "libgfs2.h"
 #include "gfs2_tool.h"
@@ -198,16 +198,12 @@ print_flags(struct gfs2_dinode *di)
 {
        if (di->di_flags) {
                printf("Flags:\n");
-               if (di->di_flags & GFS2_DIF_SYSTEM)
-                       printf("  system\n");
                if (di->di_flags & GFS2_DIF_JDATA)
                        printf("  jdata\n");
                if (di->di_flags & GFS2_DIF_EXHASH)
                        printf("  exhash\n");
                if (di->di_flags & GFS2_DIF_EA_INDIRECT)
                        printf("  ea_indirect\n");
-               if (di->di_flags & GFS2_DIF_DIRECTIO)
-                       printf("  directio\n");
                if (di->di_flags & GFS2_DIF_IMMUTABLE)
                        printf("  immutable\n");
                if (di->di_flags & GFS2_DIF_APPENDONLY)
@@ -228,20 +224,18 @@ print_flags(struct gfs2_dinode *di)
 static unsigned int
 get_flag_from_name(char *name)
 {
-       if (strncmp(name, "system", 6) == 0)
-               return GFS2_DIF_SYSTEM;
-       else if (strncmp(name, "jdata", 5) == 0)
-               return FS_JOURNAL_DATA_FL;
-       else if (strncmp(name, "directio", 8) == 0)
-               return FS_DIRECTIO_FL;
+       if (strncmp(name, "jdata", 5) == 0)
+               return EXT3_JOURNAL_DATA_FL;
+       else if (strncmp(name, "exhash", 6) == 0)
+                return EXT3_INDEX_FL;
        else if (strncmp(name, "immutable", 9) == 0)
-               return FS_IMMUTABLE_FL;
+               return EXT3_IMMUTABLE_FL;
        else if (strncmp(name, "appendonly", 10) == 0)
-               return FS_APPEND_FL;
+               return EXT3_APPEND_FL;
        else if (strncmp(name, "noatime", 7) == 0)
-               return FS_NOATIME_FL;
+               return EXT3_NOATIME_FL;
        else if (strncmp(name, "sync", 4) == 0)
-               return FS_SYNC_FL;
+               return EXT3_SYNC_FL;
        else
                return 0;
 }
@@ -276,13 +270,13 @@ set_flag(int argc, char **argv)
                if (fd < 0)
                        die("can't open %s: %s\n", argv[optind], strerror(errno));
                /* first get the existing flags on the file */
-               error = ioctl(fd, FS_IOC_GETFLAGS, &newflags);
+               error = ioctl(fd, EXT3_IOC_GETFLAGS, &newflags);
                if (error)
                        die("can't get flags on %s: %s\n",
                            argv[optind], strerror(errno));
                newflags = set ? newflags | flag : newflags & ~flag;
                /* new flags */
-               error = ioctl(fd, FS_IOC_SETFLAGS, &newflags);
+               error = ioctl(fd, EXT3_IOC_SETFLAGS, &newflags);
                if (error)
                        die("can't set flags on %s: %s\n",
                            argv[optind], strerror(errno));
Comment 7 Steve Whitehouse 2008-04-11 03:29:12 EDT
That looks like a much better patch. Longer term we need to think about the best
way to get at these flags. Either we need to move them into a file other than
fs.h or we need to get the glibc folks to add them to one of their headers.

I hadn't realised that gfs2_tool couldn't list the flags for an inode. If it can
set and clear them then it really ought to be able to list them as well I think.
Either way the patch looks good and will fix the current problem, so please go
ahead and commit this.

With a bit of luck we are not too far off another release of the gfs2-utils now,
just a few more issues to track down and solve.

Comment 9 Abhijith Das 2008-04-14 15:51:54 EDT
This patch to replace linux/fs.h with linux/ext3_fs.h doesn't work upstream as
ext3_fs.h is quite different from that in rhel5. Another solution is required.
I'm going to try adding a local header file to gfs2_tool that contains all the
definitions required from linux/fs.h.
Comment 10 Abhijith Das 2008-04-15 17:39:47 EDT
This patch reverts back to using the FS_XXX_FL symbols instead of EXT3_XXX_FL
and does away with the inclusion of ext3_fs.h altogether. I've pulled in the
necessary definitions from fs.h into a local header file iflags.h.

iflags.h is pasted below and below that is the patch to make the necessary
changes to misc.c

Let me know if this works so I can check it in.

/******************************************************************************
*******************************************************************************
**
**  Copyright (C) Sistina Software, Inc.  1997-2003  All rights reserved.
**  Copyright (C) 2004-2007 Red Hat, Inc.  All rights reserved.
**
**  This copyrighted material is made available to anyone wishing to use,
**  modify, copy, or redistribute it subject to the terms and conditions
**  of the GNU General Public License v.2.
**
*******************************************************************************
******************************************************************************/

#ifndef __IFLAGS_DOT_H__
#define __IFLAGS_DOT_H__

#define FS_IOC_GETFLAGS                 _IOR('f', 1, long)
#define FS_IOC_SETFLAGS                 _IOW('f', 2, long)
#define FS_IOC32_GETFLAGS               _IOR('f', 1, int)
#define FS_IOC32_SETFLAGS               _IOW('f', 2, int)

/*
 * Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS)
 */
#define FS_SECRM_FL                     0x00000001 /* Secure deletion */
#define FS_UNRM_FL                      0x00000002 /* Undelete */
#define FS_COMPR_FL                     0x00000004 /* Compress file */
#define FS_SYNC_FL                      0x00000008 /* Synchronous updates */
#define FS_IMMUTABLE_FL                 0x00000010 /* Immutable file */
#define FS_APPEND_FL                    0x00000020 /* writes to file may only
append */
#define FS_NODUMP_FL                    0x00000040 /* do not dump file */
#define FS_NOATIME_FL                   0x00000080 /* do not update atime */
/* Reserved for compression usage... */
#define FS_DIRTY_FL                     0x00000100
#define FS_COMPRBLK_FL                  0x00000200 /* One or more compressed
clusters */
#define FS_NOCOMP_FL                    0x00000400 /* Don't compress */
#define FS_ECOMPR_FL                    0x00000800 /* Compression error */
/* End compression flags --- maybe not all used */
#define FS_BTREE_FL                     0x00001000 /* btree format dir */
#define FS_INDEX_FL                     0x00001000 /* hash-indexed directory */
#define FS_IMAGIC_FL                    0x00002000 /* AFS directory */
#define FS_JOURNAL_DATA_FL              0x00004000 /* Reserved for ext3 */
#define FS_NOTAIL_FL                    0x00008000 /* file tail should not be
merged */
#define FS_DIRSYNC_FL                   0x00010000 /* dirsync behaviour
(directories only) */
#define FS_TOPDIR_FL                    0x00020000 /* Top of directory hierarchies*/
#define FS_EXTENT_FL                    0x00080000 /* Extents */
#define FS_DIRECTIO_FL                  0x00100000 /* Use direct i/o */
#define FS_RESERVED_FL                  0x80000000 /* reserved for ext2 lib */

#define FS_FL_USER_VISIBLE              0x0003DFFF /* User visible flags */
#define FS_FL_USER_MODIFIABLE           0x000380FF /* User modifiable flags */

#endif /* __IFLAGS_DOT_H__ */




--- misc.c.orig 2008-04-11 09:23:37.000000000 -0500
+++ misc.c      2008-04-15 13:58:35.000000000 -0500
@@ -29,10 +29,10 @@
 #define __user
 #include <linux/gfs2_ondisk.h>
 #include <sys/mount.h>
-#include <linux/ext3_fs.h>

 #include "libgfs2.h"
 #include "gfs2_tool.h"
+#include "iflags.h"

 #if GFS2_TOOL_FEATURE_IMPLEMENTED
 /**
@@ -225,17 +225,17 @@ static unsigned int
 get_flag_from_name(char *name)
 {
        if (strncmp(name, "jdata", 5) == 0)
-               return EXT3_JOURNAL_DATA_FL;
+               return FS_JOURNAL_DATA_FL;
        else if (strncmp(name, "exhash", 6) == 0)
-               return EXT3_INDEX_FL;
+               return FS_INDEX_FL;
        else if (strncmp(name, "immutable", 9) == 0)
-               return EXT3_IMMUTABLE_FL;
+               return FS_IMMUTABLE_FL;
        else if (strncmp(name, "appendonly", 10) == 0)
-               return EXT3_APPEND_FL;
+               return FS_APPEND_FL;
        else if (strncmp(name, "noatime", 7) == 0)
-               return EXT3_NOATIME_FL;
+               return FS_NOATIME_FL;
        else if (strncmp(name, "sync", 4) == 0)
-               return EXT3_SYNC_FL;
+               return FS_SYNC_FL;
        else
                return 0;
 }
@@ -270,13 +270,13 @@ set_flag(int argc, char **argv)
                if (fd < 0)
                        die("can't open %s: %s\n", argv[optind], strerror(errno));
                /* first get the existing flags on the file */
-               error = ioctl(fd, EXT3_IOC_GETFLAGS, &newflags);
+               error = ioctl(fd, FS_IOC_GETFLAGS, &newflags);
                if (error)
                        die("can't get flags on %s: %s\n",
                            argv[optind], strerror(errno));
                newflags = set ? newflags | flag : newflags & ~flag;
                /* new flags */
-               error = ioctl(fd, EXT3_IOC_SETFLAGS, &newflags);
+               error = ioctl(fd, FS_IOC_SETFLAGS, &newflags);
                if (error)
                        die("can't set flags on %s: %s\n",
                            argv[optind], strerror(errno));
Comment 11 Bug Zapper 2008-05-14 05:10:33 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 12 Steve Whitehouse 2008-06-02 07:03:42 EDT
Abhi, can we close this one now? I think we've already fixed this...
Comment 13 Fabio Massimo Di Nitto 2008-06-02 07:09:21 EDT
This has been fixed already upstream and in rawhide. Updates for F-9 are pending
and will hit release soon.

Note You need to log in before you can comment on or make changes to this bug.