Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1101236

Summary: mkfs.xfs fails on sparse files
Product: Red Hat Enterprise Linux 7 Reporter: Dan Horák <dan>
Component: xfsprogsAssignee: Eric Sandeen <esandeen>
Status: CLOSED ERRATA QA Contact: Zorro Lang <zlang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: eguan, esandeen, zlang
Target Milestone: rc   
Target Release: ---   
Hardware: s390x   
OS: Unspecified   
Whiteboard:
Fixed In Version: xfsprogs-3.2.1-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1101228 Environment:
Last Closed: 2015-03-05 13:20:21 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:
Bug Depends On: 1101228    
Bug Blocks:    
Attachments:
Description Flags
strace log of the mkfs.xfs run none

Description Dan Horák 2014-05-26 12:39:17 UTC
+++ This bug was initially created as a clone of Bug #1101228 +++

[sharkcz@devel6 tmp]$ dd if=/dev/null of=loop-file bs=512 seek=263168

0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000263063 s, 0.0 kB/s

[sharkcz@devel6 tmp]$ mkfs.xfs -f loop-file

meta-data=loop-file              isize=256    agcount=4, agsize=8224 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0
data     =                       bsize=4096   blocks=32896, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal log           bsize=4096   blocks=853, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
existing superblock read failed: Invalid argument
mkfs.xfs: pwrite64 failed: Invalid argument


Version-Release number of selected component (if applicable):
xfsprogs-3.2.0-1.fc20.s390x

Additional information:
This problem doesn't occur on x86_64 and ppc64.

--- Additional comment from Dan Horák on 2014-05-26 08:28:45 EDT ---

same happens on RHEL-7 with xfsprogs-3.2.0-0.10.alpha2.el7.s390x

Comment 1 Dan Horák 2014-05-26 12:41:06 UTC
Created attachment 899305 [details]
strace log of the mkfs.xfs run

Comment 2 Eric Sandeen 2014-07-01 15:39:14 UTC
Upstream, I sent:

[PATCH 1/2 V2] xfsprogs: try to handle mkfs of a file on 4k sector device
[PATCH 2/2 V3] mkfs.xfs: don't call blkid_get_topology on existing regular files

Not merged yet.

Comment 5 Zorro Lang 2014-10-16 10:31:30 UTC
reproduced on xfsprogs-3.2.0-0.10.alpha2.el7.s390x

+ mkfs -t xfs -f -dname=xfs.img
meta-data=xfs.img                isize=256    agcount=4, agsize=65536 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0
data     =                       bsize=4096   blocks=262144, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal log           bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
existing superblock read failed: Invalid argument
mkfs.xfs: pwrite64 failed: Invalid argument

Test Pass on xfsprogs-3.2.1-3.el7.s390x.

Pass!!

Comment 7 errata-xmlrpc 2015-03-05 13:20:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0537.html