lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <5CFF01DA-8C9E-496D-A2F1-D968CFB842EF@mit.edu>
Date:	Mon, 25 Oct 2010 08:54:14 -0400
From:	Theodore Tso <tytso@....EDU>
To:	Filipe David Manana <fdmanana@...che.org>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: question about fsync


On Oct 25, 2010, at 7:49 AM, Filipe David Manana wrote:

> - opens a file (write append mode) and writes data to it
> - opens a 2nd file descriptor for that same file (write append mode as
> well) and does an fsync call on this 2nd file descriptor
> - closes the 2nd file descriptor
> - continues writing to the 1st file descriptor
> - etc
> 
> Is there a risk that some of the data might not get fsynced to disk? I
> mean, is it possible that the 2nd file descriptor doesn't have all the
> same metadata as the first one?

What do you mean by "risk?"  For most Linux file systems, including ext2, ext3, and ext4, all of the data will be sync'ed out to disk.   However, this is not guaranteed by POSIX or the Single Unix Specification.   So in theory, there might exist some POSIX/SUS compliant implementation that would not sync out the data.  I think most Unix or Linux-compatible systems are such that you could count on this, but it's not a portable thing that you can count upon.   I have no idea what the Windows POSIX layer would do in this situation, for example, or the Eunice Emulation layer for VMS.  (Back in the Perl 3 days, Larry Wall's configure script would test for Eunice, and if not found, print the message, "Congratulations.  You're not running Eunice."  :-)

-- Ted

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ