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: <f1033cd2-82da-7ea5-7e12-94a2f3793a2d@oracle.com>
Date:   Thu, 5 Oct 2023 09:22:55 +0100
From:   John Garry <john.g.garry@...cle.com>
To:     Bart Van Assche <bvanassche@....org>,
        "Martin K. Petersen" <martin.petersen@...cle.com>
Cc:     axboe@...nel.dk, kbusch@...nel.org, hch@....de, sagi@...mberg.me,
        jejb@...ux.ibm.com, djwong@...nel.org, viro@...iv.linux.org.uk,
        brauner@...nel.org, chandan.babu@...cle.com, dchinner@...hat.com,
        linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-nvme@...ts.infradead.org, linux-xfs@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, tytso@....edu, jbongio@...gle.com,
        linux-api@...r.kernel.org,
        Himanshu Madhani <himanshu.madhani@...cle.com>
Subject: Re: [PATCH 01/21] block: Add atomic write operations to request_queue
 limits

On 04/10/2023 22:00, Bart Van Assche wrote:
>>
>> We only care about *PF. The *N variants were cut from the same cloth as
>> TRIM and UNMAP.
> 
> Hi Martin,
> 
> Has the following approach been considered? RWF_ATOMIC only guarantees 
> atomicity. Persistence is not guaranteed without fsync() / fdatasync().

This is the approach taken. Please consult the proposed man pages, where 
we say that persistence is not guaranteed without 
O_SYNC/O_DSYNC/fsync()/fdatasync()

The only thing which RWF_ATOMIC guarantees is that the write will not be 
torn.

If you see 2.1.4.2.2 Non-volatile requirements in the NVMe spec, it 
implies that the FUA bit or a flush command is required for persistence.

In 4.29.2 Atomic write operations that do not complete in SBC-4, we are 
told that atomic writes may pend in the device volatile cache and no 
atomic write data will be written if a power failure causes loss of data 
from the write.

> 
> I think this would be more friendly towards battery-powered devices
> (smartphones). On these devices it can be safe to skip fsync() / 
> fdatasync() if the battery level is high enough.

Thanks,
John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ