Date: Wed, 23 Jun 1999 15:51:55 -0400 (EDT) From: Zhihui Zhang <zzhang@cs.binghamton.edu> To: freebsd-hackers@freebsd.org Subject: Difference between msync() and fsync() Message-ID: <Pine.GSO.3.96.990623154411.4433A-100000@sol.cs.binghamton.edu>
next in thread | raw e-mail | index | archive | help
After we mmap a file, we can write back the dirty pages of the file either by calling msync() or fsync(). After reading the source code, it seems to me that they actually does the same thing. msync() will eventually call VOP_FSYNC() as fsync() does. Since msync() has already call the routine vm_object_page_clean() to write back the dirty pages of the file, VOP_FSYNC() really does not have much left to do except update the inode. So is there any real differnce between msync() and fsync() on mmapped files? Or are they simply provided to do the same thing in an alternate way? Thanks for any help. -------------------------------------------------- Zhihui Zhang. Please visit http://www.freebsd.org -------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.3.96.990623154411.4433A-100000>