From: <cz...@re...> - 2011-03-16 15:45:54
|
From: Caspar Zhang <cz...@re...> When -DNO_XFS disabled in Makefile, the compilation couldn't pass and many errors and warnings outputed. This patch fixes this issue. v2: modify CPPFLAGS to LDLIBS Signed-off-by: Caspar Zhang <cz...@re...> --- testcases/kernel/fs/fsstress/Makefile | 3 +++ testcases/kernel/fs/fsstress/fsstress.c | 16 ++++++++-------- testcases/kernel/fs/fsstress/global.h | 4 ++-- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/testcases/kernel/fs/fsstress/Makefile b/testcases/kernel/fs/fsstress/Makefile index 0a53891..38acce0 100644 --- a/testcases/kernel/fs/fsstress/Makefile +++ b/testcases/kernel/fs/fsstress/Makefile @@ -27,6 +27,9 @@ include $(top_srcdir)/include/mk/env_pre.mk CPPFLAGS += -DNO_XFS -I$(abs_srcdir) \ -D_LARGEFILE64_SOURCE -D_GNU_SOURCE +# if removed -DNO_XFS, you should unmask the following line +#LDLIBS += -lattr + # XXX (garrcoop): not -Wuninitialized clean. CPPFLAGS += -Wno-error diff --git a/testcases/kernel/fs/fsstress/fsstress.c b/testcases/kernel/fs/fsstress/fsstress.c index d6521f4..089edfb 100644 --- a/testcases/kernel/fs/fsstress/fsstress.c +++ b/testcases/kernel/fs/fsstress/fsstress.c @@ -1436,7 +1436,7 @@ allocsp_f(int opno, long r) e = ioctl(fd, XFS_IOC_ALLOCSP64, &fl) < 0 ? errno : 0; if (v) printf("%d/%d: ioctl(XFS_IOC_ALLOCSP64) %s %lld 0 %d\n", - procid, opno, f.path, off, e); + procid, opno, f.path, (long long)off, e); free_pathname(&f); close(fd); } @@ -1571,7 +1571,7 @@ bulkstat_f(int opno, long r) free(t); if (verbose) printf("%d/%d: bulkstat nent %d total %lld\n", - procid, opno, nent, total); + procid, opno, nent, (long long)total); close(fd); } @@ -1704,7 +1704,7 @@ creat_f(int opno, long r) geom.rtextsize * geom.blocksize * extsize; if (ioctl(fd, XFS_IOC_FSSETXATTR, &a) < 0) e1 = errno; - esz = a.fsx_estsize; + esz = a.fsx_extsize; } #endif @@ -2016,7 +2016,7 @@ freesp_f(int opno, long r) e = ioctl(fd, XFS_IOC_FREESP64, &fl) < 0 ? errno : 0; if (v) printf("%d/%d: ioctl(XFS_IOC_FREESP64) %s %lld 0 %d\n", - procid, opno, f.path, off, e); + procid, opno, f.path, (long long)off, e); free_pathname(&f); close(fd); } @@ -2388,8 +2388,8 @@ resvsp_f(int opno, long r) fl.l_len = (off64_t)(random() % (1024 * 1024)); e = ioctl(fd, XFS_IOC_RESVSP64, &fl) < 0 ? errno : 0; if (v) - printf("%d/%d: ioctl(XFS_IOC_RESVSP64) %s %lld %lld %d\n", - procid, opno, f.path, off, fl.l_len, e); + printf("%d/%d: ioctl(XFS_IOC_RESVSP64) %s %lld %ld %d\n", + procid, opno, f.path, (long long)off, fl.l_len, e); free_pathname(&f); close(fd); } @@ -2605,8 +2605,8 @@ unresvsp_f(int opno, long r) fl.l_len = (off64_t)(random() % (1 << 20)); e = ioctl(fd, XFS_IOC_UNRESVSP64, &fl) < 0 ? errno : 0; if (v) - printf("%d/%d: ioctl(XFS_IOC_UNRESVSP64) %s %lld %lld %d\n", - procid, opno, f.path, off, fl.l_len, e); + printf("%d/%d: ioctl(XFS_IOC_UNRESVSP64) %s %lld %ld %d\n", + procid, opno, f.path, (long long)off, fl.l_len, e); free_pathname(&f); close(fd); } diff --git a/testcases/kernel/fs/fsstress/global.h b/testcases/kernel/fs/fsstress/global.h index f788395..9644666 100644 --- a/testcases/kernel/fs/fsstress/global.h +++ b/testcases/kernel/fs/fsstress/global.h @@ -38,8 +38,8 @@ #if defined(NO_XFS) # include "xfscompat.h" #else -# include <libxfs.h> -# include <attributes.h> +# include <xfs/libxfs.h> +# include <attr/attributes.h> #endif /* libc includes */ -- 1.7.4.1 |
From: Garrett C. <yan...@gm...> - 2011-03-16 17:26:32
|
On Wed, Mar 16, 2011 at 8:45 AM, <cz...@re...> wrote: > From: Caspar Zhang <cz...@re...> > > When -DNO_XFS disabled in Makefile, the compilation couldn't pass and > many errors and warnings outputed. This patch fixes this issue. > > v2: modify CPPFLAGS to LDLIBS Once upon a time I assume this worked for someone when compiling on legacy systems. Please add any and all necessary autoconf tests for these headers. Thanks, -Garrett |
From: Cyril H. <ch...@su...> - 2011-03-16 17:34:24
|
Hi! > Once upon a time I assume this worked for someone when compiling > on legacy systems. Please add any and all necessary autoconf tests for > these headers. I've commited the patch as it is a couple of minutes ago as you may say it's improvement to the previous state. However that it doesn't compile here. -- Cyril Hrubis ch...@su... |