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 1146152 - fallocate fails with keep size mode unsupported when fs doesn't support FALLOC_FL_PUNCH_HOLE
Summary: fallocate fails with keep size mode unsupported when fs doesn't support FALLO...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: util-linux-ng
Version: 6.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Karel Zak
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-24 15:09 UTC by Federico Simoncelli
Modified: 2015-08-25 13:35 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-25 13:35:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Federico Simoncelli 2014-09-24 15:09:50 UTC
Description of problem:
fallocate fails with keep size mode unsupported when fs doesn't support FALLOC_FL_PUNCH_HOLE:

$ truncate -s 1024 test1
$ fallocate -p -o 0 -l 1024 test1
fallocate: keep size mode (-n option) unsupported

The error should be the same as for regular fallocate:

$ fallocate -o 0 -l 1024 test1 
fallocate: test1: fallocate failed: Operation not supported

Version-Release number of selected component (if applicable):
util-linux-ng-2.17.2-12.14.el6_5.x86_64

How reproducible:
100%

Steps to Reproduce:
1. try to run fallocate -p on a fs that doesn't support fallocate (e.g. nfs v3/4)

Actual results:
Fail with a wrong message: "fallocate: keep size mode (-n option) unsupported"

Expected results:
Fail with correct message: "fallocate failed: Operation not supported"

Comment 2 Karel Zak 2015-08-25 13:35:17 UTC
fallocate syscall differentiate between unsupported fallocate (=ENOSYS) and unsupported FALLOC_FL_KEEP_SIZE flag (=EOPNOTSUPP).

I think we want to make a difference between these two errors, but "(-n option)" in the error message is mistake as the KEEP_SIZE flag is generic and used in more situation than only for "-n".

I'm going to fix the error message (remove "-n ..") in the upstream tree. I don't think this is so critical issue that we have to fix it in RHEL update (reopen if do not agree).

Thanks for your report.


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