linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mkdir and fsync
@ 2014-09-10 20:55 Samer Al-Kiswany
  2014-09-11  1:29 ` Christoph Hellwig
  2014-09-11 13:29 ` Chris Mason
  0 siblings, 2 replies; 4+ messages in thread
From: Samer Al-Kiswany @ 2014-09-10 20:55 UTC (permalink / raw)
  To: linux-btrfs

Hi,

Thank you for help.

I am seeing a strange behavior when fsync()ing a directory.

Here is what I do

for (i=0; i < 100,000, i++){
	.
      mkdir(p/child_i)
      fsync(p)
}

Btrfs seems to achieve around 100k fsycs/second, which makes me believe it
is not touching the disk during these fsyncs.
After looking at the code, it seems indeed that fsync adds the inode to the
current transaction but does not sync the transaction to disk.

Is this the intended behavior for metadata fsync or is this a bug?
Is this POSIX compliant?

Thank you for your help
-samer



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

end of thread, other threads:[~2014-09-14 21:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-10 20:55 mkdir and fsync Samer Al-Kiswany
2014-09-11  1:29 ` Christoph Hellwig
2014-09-11 13:29 ` Chris Mason
2014-09-14 20:56   ` Samer Al-Kiswany

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).