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] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.01.1006081747430.17462@asgard.lang.hm>
Date:	Tue, 8 Jun 2010 17:49:32 -0700 (PDT)
From:	david@...g.hm
To:	Török Edwin <edwintorok@...il.com>
cc:	Theodore Tso <tytso@....EDU>,
	Jeffrey Merkey <jeffmerkey@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: EXT3 File System Corruption 2.6.34

On Tue, 8 Jun 2010, T?r?k Edwin wrote:

> On 06/08/2010 02:14 PM, Theodore Tso wrote:
>>
>> If you pull the plug without fsyncing the file, you will end up with a zero-length file -- or possibly no file at all, even with data=ordered.  If you really want to preserve data after pulling the power cord immediately after a write were the application hasn't done an fsync() or a sync() call, you can mount the file system with the mount option -o sync --- but then the performance will be horrible.
>>
>> It's all a tradeoff of what you think is important....
>>
>
> I think you should either get the old file, or the new file (if you
> don't fsync), and not some random data from another file.

my understanding of the way to get what you want is to

write tempfile
sync
mv temptfile realfile

this also has the advantage that it will work on all filesystems.

David Lang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ