This is an automated email from the git hooks/post-receive script.
andyp pushed a commit to branch main in repository gfs2-utils.
The following commit(s) were added to refs/heads/main by this push: new 980c9191 gfs2_jadd: Clean up definitions from linux/fs.h 980c9191 is described below
commit 980c9191b99fad975350f3557df0cfd5bdd54fb7 Author: Andrew Price anprice@redhat.com AuthorDate: Mon Jan 10 14:50:55 2022 +0000
gfs2_jadd: Clean up definitions from linux/fs.h
gfs2_mkfs.h defines some constants from linux/fs.h to avoid clashes with definitions pulled in my sys/mount.h. When gfs2_jadd started using FS_IOC_FIEMAP, it included linux/fs.h to get it which meant sparse started complaining about redefinitions again. To fix that, add the FS_IOC_FIEMAP definition to gfs2_mkfs.h and remove the linux/fs.h include. Also remove all the unused definitions from gfs2_mkfs.h to keep the workaround minimal.
Signed-off-by: Andrew Price anprice@redhat.com --- gfs2/mkfs/gfs2_mkfs.h | 34 +--------------------------------- gfs2/mkfs/main_jadd.c | 1 - 2 files changed, 1 insertion(+), 34 deletions(-)
diff --git a/gfs2/mkfs/gfs2_mkfs.h b/gfs2/mkfs/gfs2_mkfs.h index d584a9cd..6237cd04 100644 --- a/gfs2/mkfs/gfs2_mkfs.h +++ b/gfs2/mkfs/gfs2_mkfs.h @@ -2,7 +2,6 @@ #define __GFS2_MKFS_DOT_H__
#include <stdarg.h> -#include "osi_list.h" #include "copyright.cf"
/* This function is for libgfs2's sake. */ @@ -25,42 +24,11 @@ void print_it(const char *label, const char *fmt, const char *fmt2, ...)
#define FS_IOC_GETFLAGS _IOR('f', 1, long) #define FS_IOC_SETFLAGS _IOW('f', 2, long) -#define FS_IOC_GETVERSION _IOR('v', 1, long) -#define FS_IOC_SETVERSION _IOW('v', 2, long) -#define FS_IOC32_GETFLAGS _IOR('f', 1, int) -#define FS_IOC32_SETFLAGS _IOW('f', 2, int) -#define FS_IOC32_GETVERSION _IOR('v', 1, int) -#define FS_IOC32_SETVERSION _IOW('v', 2, int) +#define FS_IOC_FIEMAP _IOWR('f', 11, struct fiemap)
/* * 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 /* __GFS2_MKFS_DOT_H__ */ diff --git a/gfs2/mkfs/main_jadd.c b/gfs2/mkfs/main_jadd.c index 8feb201c..2648b980 100644 --- a/gfs2/mkfs/main_jadd.c +++ b/gfs2/mkfs/main_jadd.c @@ -21,7 +21,6 @@ #define _(String) gettext(String)
#include <linux/fiemap.h> -#include <linux/fs.h> #include "libgfs2.h" #include "gfs2_mkfs.h" #include "metafs.h"
cluster-commits@lists.fedorahosted.org