RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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:
Embargoed:


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.