Bug 1652818 - Guestfish: set-e2generation failed with "Inappropriate ioctl for device while setting version on /sysroot/testfile" for ext4
Summary: Guestfish: set-e2generation failed with "Inappropriate ioctl for device while...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: libguestfs
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 8.0
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-23 07:20 UTC by Xianghua Chen
Modified: 2018-11-26 08:44 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-26 08:44:33 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description Xianghua Chen 2018-11-23 07:20:14 UTC
Description of problem:
Guestfish: set-e2generation failed with "Inappropriate ioctl for device while setting version on /sysroot/testfile" for ext4

Version-Release number of selected component (if applicable):
libguestfs-1.38.4-5.module+el8+2173+537e5cb5.aarch64

How reproducible:
100%

Steps:
1. # guestfish -N fs:ext4
><fs>  list-filesystems 
/dev/sda1: ext4
><fs> trace 1
><fs> verbose 1

><fs>  mount /dev/sda1 /
libguestfs: trace: mount "/dev/sda1" "/"
libguestfs: trace: vfs_type "/dev/sda1"
libguestfs: trace: vfs_type = "ext4"
[   16.203570] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
libguestfs: trace: mount = 0

><fs>  touch /testfile
libguestfs: trace: touch "/testfile"
libguestfs: trace: touch = 0

><fs> set-e2generation /testfile 1231231
libguestfs: trace: set_e2generation "/testfile" 1231231
[   20.586664] EXT4-fs warning (device sda1): ext4_ioctl:690: Setting inode version is not supported with metadata_csum enabled.
guestfsd: error: chattr: /testfile: chattr: Inappropriate ioctl for device while setting version on /sysroot/testfile
libguestfs: trace: set_e2generation = -1 (error)
libguestfs: error: set_e2generation: chattr: /testfile: chattr: Inappropriate ioctl for device while setting version on /sysroot/testfile


Actual results:
set-e2generation failed.

Expected results:
set-e2generation can be success.

Additional info:
on x86_64 ,there is the same problem.
for ext3, it's ok.

Comment 1 Richard W.M. Jones 2018-11-23 09:08:16 UTC
For reasons I'm not very clear about this commit:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/?id=814525f4df50a196464ce2c7abe91f693203060f

introduced metadata checksums but this is not compatible with
the little-used inode generation feature.

I guess the best thing we can do is to remove this test in RHEL 8.
This feature of ext4 is extremely obscure ...

Comment 2 Xianghua Chen 2018-11-26 01:55:47 UTC
(In reply to Richard W.M. Jones from comment #1)
> For reasons I'm not very clear about this commit:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/
> ?id=814525f4df50a196464ce2c7abe91f693203060f
> 
> introduced metadata checksums but this is not compatible with
> the little-used inode generation feature.
> 
> I guess the best thing we can do is to remove this test in RHEL 8.
> This feature of ext4 is extremely obscure ...

Ok, thank you , I'll disable this test for now.
Please change the status if you decide not to fix it, thanks.

Comment 3 Richard W.M. Jones 2018-11-26 08:44:33 UTC
I'm going to close this, not because it isn't a bug, but because
it's due to a necessary change to the ext4 filesystem which has
rendered the original functionality obsolete.


Note You need to log in before you can comment on or make changes to this bug.