Re: [PATCH] libfs: Fix DIO mode aligment
From: "Theodore Ts'o" <tytso@mit.edu>
Date: 2021-03-01 17:46:46
On Mon, Mar 01, 2021 at 07:14:00PM +0300, Благодаренко Артём wrote:
Here is how I reproduced it originally (without the patch) # truncate -s 512MB /tmp/lustre-ost # losetup -b 4096 /dev/loop0 /tmp/lustre-ost # mkfs.ext4 /dev/loop0
Thanks for pointing out that this can be tested using losetup.
With your patch e2image works fine. [root@CO82 e2fsprogs-kernel]# git rev-parse HEAD 67f2b54667e65cf5a478fcea8b85722be9ee6e8d [root@CO82 e2fsprogs-kernel]# misc/e2image /dev/loop0 /tmp/ost-image e2image 1.46.1 (9-Feb-2021)
So commit 67f2b54667e6 is 1.46.2, so I'm not sure that you recompiled
e2image. More importantly, e2image in upstream doesn't use Direct
I/O. When I tried using debugfs -D, it looks like Direct I/O on an
Advanced Format HDD isn't working correctly:
# debugfs -D /dev/loop0
debugfs 1.46.2 (28-Feb-2021)
debugfs: Bad magic number in super-block while trying to open /dev/loop0
/dev/loop0 contains a ext4 file system
created on Mon Mar 1 12:31:43 2021
This isn't a regression since it was broken in upstream before, but it
would be good to get this fixed before e2fsprogs 1.46.3.
Cheers,
- Ted