Bug 1477192
Summary: | xfs_info suddenly doesn't work with a device path | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Vratislav Podzimek <vpodzime> |
Component: | xfsprogs | Assignee: | Eric Sandeen <esandeen> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 27 | CC: | dustymabe, esandeen, walters |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-05-08 16:00:07 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Vratislav Podzimek
2017-08-01 12:44:29 UTC
Yes, this was largely intentional. The behavior before was a bug: SYNOPSIS ... xfs_info [ -t mtab ] mount-point ^^^^^^^^^^^ There were problems with people pointing at unmounted mount points, and filesystem images, etc, and getting unexpected information. It's documented as to be used on a mount point, but that had not been enforced. To be honest, I was not aware that it had worked on a device node before; that might be something we could revisit, but it's never been a documented feature. If it was working before, it was by accident. How hard would it be to turn the old bug into a new feature? It's not particularly easy to find the device's mount point in places where only the device path is known and information about the particular FS is required. So that's the flip side of it, the command will not work on a block device unless it's mounted, so thinking that it works against block devices may also confuse people... In what situations is it difficult to find a mount point from a device? /proc/mounts contains the mapping, right? Or "mount" output? It may not be too difficult to add block device lookup as a documented, supported feature, but I didn't know that would be such a desired or necessary usecase. Thanks, -Eric (In reply to Eric Sandeen from comment #3) > So that's the flip side of it, the command will not work on a block device > unless it's mounted, so thinking that it works against block devices may > also confuse people... Sure, but that can be quite easily documented. > > In what situations is it difficult to find a mount point from a device? > /proc/mounts contains the mapping, right? Or "mount" output? Yes, but parsing those in a C code line by line is cumbersome, devices can have multiple names/paths etc. I'm not saying it's impossible, but it's complicated enough to be worth having just in one place (xfs_info). > > It may not be too difficult to add block device lookup as a documented, > supported feature, but I didn't know that would be such a desired or > necessary usecase. Well, if some code relied on the old behavior, they would have to adapt now. So it is desired to not remove functionality. But I understand that it wasn't documented and probably not intentionally working either. This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle. Changing version to '27'. FYI - cloud-init uses this functionality so we need to resolve between the cloud-init maintainers and xfs maintainers how this needs to be handled. If not then we'll break every cloud instance we boot with an XFS root filesystem. see https://bugzilla.redhat.com/show_bug.cgi?id=1490505 nb: cloud-init just needs a one-line change to fix this and invoke xfs_growfs properly, I added comments to the bug #1490505 This bug is a great example of where if we actually had the ability to revert, that should have been done first. Fix the consumers, then try again. (In reply to Colin Walters from comment #8) > This bug is a great example of where if we actually had the ability to > revert, that should have been done first. Fix the consumers, then try again. I'm not so sure. This was an undocumented/unsupported interface. The "consumer" in this bug's case was an admin, and we can't really "fix" admins. ;) The consumer in bug #1490505, cloud-init, can be fixed with a trivial 1-line patch. It's not clear to me that reverting the change in xfsprogs has any advantage over simply fixing the consumer properly, does it? (In reply to Eric Sandeen from comment #9) > (In reply to Colin Walters from comment #8) > > This bug is a great example of where if we actually had the ability to > > revert, that should have been done first. Fix the consumers, then try again. > > I'm not so sure. This was an undocumented/unsupported interface. The > "consumer" in this bug's case was an admin, and we can't really "fix" > admins. ;) Which brings us back/again to the discussion about the lack of APIs for file systems. Since CLI is the only option, APIs are actually built on top of it. While recognizing that this was an unexpected and for some undesirable change, it was made intentionally. It won't be changing back at this point, so closing. |