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  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]
Date:	Fri, 25 Jul 2014 08:15:09 +0100
From:	Anton Altaparmakov <aia21@....ac.uk>
To:	yuanh <yuanhp_china@...mail.com>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: linux fsync behaviour

Hi,

On 25 Jul 2014, at 02:17, Dave Chinner <david@...morbit.com> wrote:
> On Thu, Jul 24, 2014 at 03:41:31PM -0700, yuanh wrote:
>> Hi all,
>> 
>>   Two file descriptors are pointing the same file. When fsync is called on
>> one fd, the data written by the other fd will also be flushed? We are using
>> linux XFS.
> 
> Yes.

But beware of the common mistake of using fwrite + fsync which does not actually do what you intend at all and you must instead use fwrite + fflush + fsync...  If you are using write(2) then just fsync is obviously fine.

Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
University of Cambridge Information Services, Roger Needham Building
7 JJ Thomson Avenue, Cambridge, CB3 0RB, UK

--
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