@@ -88,7 +88,7 @@ main(int argc, char *argv[])
}
if (chknb) { /* Get the original number of inodes (lazy) */
- sync();
+ syncfs(fd[nfiles]);
if (xfsctl(dirname, fd[nfiles], XFS_IOC_FSBULKSTAT, &a) != 0) {
printf("Warning (%s:%d), xfsctl(XFS_IOC_FSBULKSTAT) FAILED.\n", __FILE__, __LINE__);
}
@@ -118,7 +118,7 @@ main(int argc, char *argv[])
*The files are still opened (but unlink()ed) ,
* we should have more inodes than before
*/
- sync();
+ syncfs(fd[nfiles]);
last_inode = 0;
if (xfsctl(dirname, fd[nfiles], XFS_IOC_FSBULKSTAT, &a) != 0) {
printf("Warning (%s:%d), xfsctl(XFS_IOC_FSBULKSTAT) FAILED.\n", __FILE__, __LINE__);
@@ -139,7 +139,7 @@ main(int argc, char *argv[])
* The files are now closed, we should be back to our,
* previous inode count
*/
- sync();
+ syncfs(fd[nfiles]);
last_inode = 0;
if (xfsctl(dirname, fd[nfiles], XFS_IOC_FSBULKSTAT, &a) != 0) {
printf("Warning (%s:%d), xfsctl(XFS_IOC_FSBULKSTAT) FAILED.\n", __FILE__, __LINE__);
@@ -150,7 +150,7 @@ main(int argc, char *argv[])
}
}
- sync();
+ syncfs(fd[nfiles]);
last_inode = 0;
for (;;) {
if ((e = xfsctl(dirname, fd[nfiles], XFS_IOC_FSBULKSTAT, &a)) < 0) {
@@ -173,11 +173,11 @@ main(int argc, char *argv[])
}
}
- close(fd[nfiles]);
sprintf(fname, "rm -rf %s\n", dirname);
system(fname);
- sync();
+ syncfs(fd[nfiles]);
+ close(fd[nfiles]);
sleep(2);
printf("passed\n");
}