[LTP] [PATCH 2/2] nfs05: rewrite the test, make use of new library
Cyril Hrubis
chrubis@suse.cz
Thu Jun 23 13:54:39 CEST 2016
Hi!
> >>
> >> - dprt("pid[%d]: init_compile(): status = %d\n",
> >> - gettid(), status);
> >> - dprt("we are here %d\n", __LINE__);
> >> - return status;
> >> + SAFE_WRITE(1, fd, prog_buf, prog_buf_size);
> >> + fsync(fd);
> > Why do we fsync(fd) here? Isn't the whole point of this test to find a
> > race conditions?
>
> And given the fact that we have close(fd) thereafter, should make it
> useless...
fsync() should cause the page caches to be written to the disk, close()
just frees the associated file descriptor and page caches are written on
background.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list