Bug 434893
Summary: | resizing leads to missing xattrs | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jeremy Katz <katzj> | ||||
Component: | e2fsprogs | Assignee: | Eric Sandeen <esandeen> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | low | ||||||
Version: | rawhide | CC: | kzak, oliver | ||||
Target Milestone: | --- | Keywords: | Reopened | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | 1.40.7-2 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2008-03-04 03:25:29 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 430962 | ||||||
Attachments: |
|
Description
Jeremy Katz
2008-02-26 02:41:35 UTC
Jeremy, could you create an e2image of the filesystem, before & after the resize? If you bzip2 it it shouldn't be too big... If it's a hassle I can try to reproduce on my own. I can try to get one in a little bit... it might be a tad tricky given the way the images are built. livecd-creator --config=/usr/share/livecd-tools/livecd-fedora-minimal.ks gets you a livecd with the resize done. So, it appears that the end result is actually *missing* selinux xattrs, rather than corrupted, per se. Some files have the proper xattrs on disk; others have none. And per discussion on IRC, I tried creating the filesystem with -I128 and things were fine then. (oops sorry for fat-fingering the summary) :) quick non-livecd-creator test: #!/bin/bash dd if=/dev/zero of=fsfile bs=1M count=100 mkfs.ext3 -I 256 -F fsfile mount -o loop,user_xattr fsfile mnt for I in `seq 1 1000`; do dd if=/dev/zero bs=128k count=1 of=mnt/file$I; setfattr -n user.name -v value$I mnt/file$I 2>/dev/null; done for I in `seq 1 800`; do rm -f mnt/file$I; done getfattr -n user.name mnt/file82? umount mnt e2fsck -f fsfile resize2fs fsfile 6M resize2fs fsfile 5M resize2fs fsfile 4M mount -o loop,user_xattr fsfile mnt getfattr -n user.name mnt/file82? umount mnt it appears that when resize2fs needs to move inodes, it leaves in-inode xattrs behind. Oops. Ok, I see what's up here... will get it patched up shortly. larger inodes with in-inode xattrs will lose and/or corrupt the xattrs whenever the inodes are moved in the process of shrinking. Created attachment 296249 [details]
patch sent upstream
I sent a regression test for this, too...
On its way to rawhide via e2fsprogs-1.40.7-1 Regular files look to be okay with 1.40.7-1, but symlinks still seem to come out with missing xattrs were the link targets long or short... and did they have missing or wrong attributes? Trying to reproduce here... oh and were the attrs on the symlinks or their targets...? Once more, with feeling. e2fsprogs-1.40.7-2 should fix it, building now. I tested livecd creation as far as getting an image, fsck'ing it, and checking that the symlinks all had their attrs... hope it's good this time :) -Eric |