public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* Directory fsync
@ 2011-09-23 15:12 Zhu Han
  2011-09-23 16:33 ` Christoph Hellwig
  0 siblings, 1 reply; 7+ messages in thread
From: Zhu Han @ 2011-09-23 15:12 UTC (permalink / raw)
  To: xfs


[-- Attachment #1.1: Type: text/plain, Size: 573 bytes --]

I note below words in the manual of fsync:
       Calling  fsync()  does  not  necessarily  ensure  that  the entry in
the directory containing the file has also reached disk.  For that an
explicit fsync() on a file
       descriptor for the directory is also needed.

I am wondering is directory sync is essential after below steps if I want to
assure the file can be retrieved after system crash?

1) create file A
2) write file A
3) fsync(file A)

--------------------------------> fsync(parent directory) [Is it essential
to make the inode linked to parent directory?]

[-- Attachment #1.2: Type: text/html, Size: 623 bytes --]

[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-10-01 23:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-23 15:12 Directory fsync Zhu Han
2011-09-23 16:33 ` Christoph Hellwig
2011-09-23 23:09   ` Michael Monnerie
2011-09-24  1:20     ` Zhu Han
2011-10-01 23:20       ` Peter Grandi
2011-09-26  0:28     ` Dave Chinner
2011-09-26  0:51       ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox