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: <23367b48-83c0-4f7d-b75d-c8980b05f3e8@oracle.com>
Date: Wed, 13 Dec 2023 09:17:53 +0000
From: John Garry <john.g.garry@...cle.com>
To: Ojaswin Mujoo <ojaswin@...ux.ibm.com>
Cc: linux-ext4@...r.kernel.org, Theodore Ts'o <tytso@....edu>,
        Ritesh Harjani <ritesh.list@...il.com>, linux-kernel@...r.kernel.org,
        "Darrick J . Wong" <djwong@...nel.org>, linux-block@...r.kernel.org,
        linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        dchinner@...hat.com
Subject: Re: [RFC 0/7] ext4: Allocator changes for atomic write support with
 DIO

On 13/12/2023 05:59, Ojaswin Mujoo wrote:
>> However - as we have seen with a trial user - it can create a problem if we
>> don't do that and we write 4K and then overwrite with a 16K atomic write to
>> a file, as 2x extents may be allocated for the complete 16K and it cannot be
>> issued as a single BIO.
> So currently, if we don't fallocate beforehand in xfs and the user
> tries to do the 16k overwrite to an offset having a 4k extent, how are
> we handling it?
> 
> Here ext4 will return an error indicating atomic write can't happen at
> this particular offset. The way I see it is if the user passes atomic
> flag to pwritev2 and we are unable to ensure atomicity for any reason we
> return error, which seems like a fair approach for a generic interface.

ok, but this does not seem like a good user experience.

> 
>>> We didn't want to overly restrict the users of atomic writes by
>>> forcing
>>> the extents to be of a certain alignment/size irrespective of the
>>> size
>>> of write. The design in this patchset provides this flexibility at
>>> the
>>> cost of some added precautions that the user should take (eg not
>>> doing
>>> an atomic write on a pre existing unaligned extent etc).
>> Doesn't bigalloc already give you what you require here?
> Yes, but its an mkfs time feature and it also applies to each an every
> file which might not be desirable for all use cases.

Sure, but to get started could you initially support that option (as 
long as it does not conflict with other per-file option)?

Thanks,
John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ