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
| ||
|
Message-ID: <4c8249e3-8429-2d91-0431-6bc3a319fae5@redhat.com> Date: Mon, 17 Sep 2018 10:44:25 -0500 From: Eric Sandeen <esandeen@...hat.com> To: Joshi <joshiiitr@...il.com>, linux-ext4@...r.kernel.org Subject: Re: Repeatable block allocation problem. On 9/17/18 6:22 AM, Joshi wrote: > I've been doing some defrag related tests, and for that I needed to be > able to create file with same set of block numbers (i.e. extents), for > at least two times. Userspace cannot control that. > May I know if there is any randomness in Ext4 allocator, and if there > is any, can I disable it for the purpose of getting repeatable > block-allocation patterns. > > Here are experiment details - > For a 100K file (created using dd if=/dev/zero of=/mnt/f100k bs=4K > count=100, oflag=direct) I got extent info in one run as this - > > File size of /mnt/file400k is 409600 (100 blocks of 4096 bytes) > ext: logical_offset: physical_offset: length: expected: flags: > 0: 0.. 15: 34816.. 34831: 16: > 1: 16.. 99: 33824.. 33907: 84: 34832: last,eof > > while in the the second run I got somewhat different runs - > File size of /mnt/file400k is 409600 (100 blocks of 4096 bytes) > ext: logical_offset: physical_offset: length: expected: flags: > 0: 0.. 0: 34816.. 34816: 1: > 1: 1.. 15: 34320.. 34334: 15: 34817: > 2: 16.. 99: 33824.. 33907: 84: 34335: last,eof > > Each run beings with a mkfs.ext4 with lazy inode/journal > initialization disabled. Userspace doesn't get to pick physical locations for allocations, you cannot write a test which depends on doing so. -Eric
Powered by blists - more mailing lists