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]
Date:   Sat, 6 Aug 2022 08:51:52 -0600
From:   Jens Axboe <axboe@...nel.dk>
To:     Zhang Boyang <zhangboyang.id@...il.com>,
        Christoph Hellwig <hch@....de>, linux-block@...r.kernel.org
Cc:     Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
        Jan Kara <jack@...e.cz>, Ming Lei <ming.lei@...hat.com>,
        "Darrick J . Wong" <djwong@...nel.org>,
        Chaitanya Kulkarni <kch@...dia.com>,
        Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND 1/1] loop: introduce LO_FLAGS_NODEALLOC

On 8/6/22 5:49 AM, Zhang Boyang wrote:
> Previously, for file-backed loop devices, REQ_OP_DISCARD and
> REQ_OP_WRITE_ZEROES (without REQ_NOUNMAP) are implemented using
> fallocate(FALLOC_FL_PUNCH_HOLE), which will cause the underlying file to
> be sparse and disk space freed. The users have no choice to prevent this
> this from happening.
> 
> This patch introduces LO_FLAGS_NODEALLOC. With this flag set,
> REQ_OP_DISCARD and REQ_OP_WRITE_ZEROES are forced to use
> fallocate(FALLOC_FL_ZERO_RANGE). The disk space of underlying file is
> kept allocated. This is useful if users, for example, want to use a
> preallocated file as the backing file.

Just in terms of readability, I would prefer if NO_DEALLOC is used
consistently rather than NODEALLOC. The latter reads more like
node-alloc to me.

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ