[Gluster-users] Small File and "ls" performance ..

Anand Avati avati at gluster.com
Tue Jun 8 04:53:07 UTC 2010


> If write() succeeds, is it not possible for flush() or close() to fail
> later? My understanding is you need to check for errors from both. For
> example, write() might just write to an in-memory buffer, then the disk
> might fill up before the change is flushed out.
>
>
A close() by itself does nothing but freeing up of resources. It does not
guarantee data reaching the disk. You need to use fsync() for that
assurance. By turning flush-behind on, you will only be missing errors which
might occur during free()'ing up of internal structures, which is very
unlikely. You will not miss any I/O error.

Avati


More information about the Gluster-users mailing list