From: Nathan Scott Date: Tue, 5 Jul 2005 03:44:14 +0000 (+0000) Subject: Fix fsstress builds when setting the project identifier (fsx interface now). X-Git-Tag: v1.1.0~710 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=781a49c308e89b03d40c79f9b44e13b79d19e250;p=users%2Fhch%2Fxfstests-dev.git Fix fsstress builds when setting the project identifier (fsx interface now). Merge of master-melb:xfs-cmds:23061a by kenmcd. --- diff --git a/ltp/fsstress.c b/ltp/fsstress.c index d21f878cb..d1d10fc53 100644 --- a/ltp/fsstress.c +++ b/ltp/fsstress.c @@ -1628,6 +1628,9 @@ chown_f(int opno, long r) void chproj_f(int opno, long r) { +#if !defined(__sgi__) + struct fsxattr fsx; +#endif int fd; int e; pathname_t f; @@ -1649,7 +1652,10 @@ chproj_f(int opno, long r) #if defined(__sgi__) e = fchproj(fd, p); #else - e = xfsctl(f.path, fd, XFS_IOC_SETPROJID, &p); + if ((e = xfsctl(f.path, fd, XFS_IOC_FSGETXATTR, &fsx)) == 0) { + fsx.fsx_projid = p; + e = xfsctl(f.path, fd, XFS_IOC_FSSETXATTR, &fsx); + } #endif if (v) printf("%d/%d: chproj %s %u %d\n", procid, opno, f.path, p, e);