mkfs.ext4 -d $directory_with_acls leads to EINVAL
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
e2fsprogs (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Cosmic |
Fix Released
|
Undecided
|
Unassigned | ||
Disco |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Justification]
`mkfs.ext4 -d` can produce broken filesystems when there are acls in the tree used as input.
[Test case]
1. dd if=/dev/zero count=0 bs=1M seek=100 of=./fake.img
2. mkdir -p stuff/journal
3. sudo apt install acl
4. setfacl -m g:adm:rwx stuff/journal
5. mkfs.ext4 -L lala -O -metadata_csum -T default -O uninit_bg fake.img -d ./stuff/
6. sudo mount ./fake.img /mnt
7. Verify that `getfacl /mnt/journal/` returns an error.
8. sudo umount /mnt
9. install libext2fs2 from -proposed.
10. mkfs.ext4 -L lala -O -metadata_csum -T default -O uninit_bg fake.img -d ./stuff/
11. sudo mount ./fake.img /mnt
12. Verify that `getfacl /mnt/journal/` returns acl information, not an error.
13. sudo umount /mnt
[Original description]
This looks an awful lot like bug 1645232 but that is claimed to be fixed:
mwhudson@
mke2fs 1.44.1 (24-Mar-2018)
Using EXT2FS Library version 1.44.1
mwhudson@
0+0 records in
0+0 records out
0 bytes copied, 0.0015871 s, 0.0 kB/s
mwhudson@
mwhudson@
mwhudson@
mke2fs 1.44.1 (24-Mar-2018)
Discarding device blocks: done
Creating filesystem with 25600 4k blocks and 6400 inodes
Allocating group tables: done
Writing inode tables: done
Creating journal (1024 blocks): done
Copying files into the device: done
Writing superblocks and filesystem accounting information: done
mwhudson@
mwhudson@
getfacl: /mnt/journal/: Invalid argument
description: | updated |
tags: | added: id-5c09fa23626104848f94e45e |
Changed in e2fsprogs (Ubuntu Cosmic): | |
status: | New → In Progress |
Also reproducible without the -O options.
Can confirm that this works with e2fslibs from e2fsprogs 1.43.4:
$ dpkg -x ./e2fslibs_ 1.43.4- 2_amd64. deb e2fsprogs PATH=./ e2fsprogs/ lib/x86_ 64-linux- gnu/ e2fsprogs/ sbin/mkfs. ext4 -L lala -T default fake.img -d ./stuff/
$ LD_LIBRARY_
$ sudo mount ./fake.img /mnt
$ getfacl /mnt/journal/
getfacl: Removing leading '/' from absolute path names
# file: mnt/journal/
# owner: vorlon
# group: vorlon
user::rwx
group::r-x
group:adm:rwx
mask::rwx
other::r-x
$ sudo umount /mnt
$