Bug 836433 - xfstests 279: mkfs.xfs: properly handle physical sector size
Summary: xfstests 279: mkfs.xfs: properly handle physical sector size
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: xfsprogs
Version: 6.4
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Eric Sandeen
QA Contact: Boris Ranto
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-29 05:39 UTC by Eryu Guan
Modified: 2013-02-21 11:00 UTC (History)
3 users (show)

Fixed In Version: xfsprogs-3.1.1-8.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 11:00:54 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0481 0 normal SHIPPED_LIVE xfsprogs bug fix and enhancement update 2013-02-21 12:44:16 UTC

Description Eryu Guan 2012-06-29 05:39:25 UTC
Description of problem:
Use this bug to track the following xfsprogs commit

commit 287d168b550857ce40e04b5f618d7eb91b87022f
Author: Eric Sandeen <sandeen@sandeen.net>
Date:   Thu Mar 1 22:46:35 2012 -0600

    mkfs.xfs: properly handle physical sector size

    This splits the fs_topology structure "sectorsize" into
    logical & physical, and gets both via blkid_get_topology().

    This primarily allows us to default to using the physical
    sectorsize for mkfs's "sector size" value, the fundamental
    size of any IOs the filesystem will perform.

    We reduce mkfs.xfs's "sector size" to logical if
    a block size < physical sector size is specified.
    This is suboptimal, but permissable.

    For block size < sector size, differentiate the error
    message based on whether the sector size was manually
    specified, or deduced.

    Signed-off-by: Eric Sandeen <sandeen@redhat.com>
    Reviewed-by: Dave Chinner <dchinner@redhat.com>

Version-Release number of selected component (if applicable):
xfsprogs-3.1.1-7

How reproducible:
always

Steps to Reproduce:
1. check 279 on xfs
2.
3.
  
Actual results:
--- 279.out     2012-06-26 14:07:06.000000000 +0800
+++ 279.out.bad 2012-06-28 18:36:59.100917091 +0800
@@ -4,7 +4,7 @@
 ===================
 mkfs with opts: DEVICE
 Passed.
-Got sector size: 4096
+Got sector size: 512
 ===================
 mkfs with opts: -b size=2048 -f DEVICE
 Passed.
@@ -13,14 +13,16 @@
 4k physical 512b logical unaligned
 ===================
 mkfs with opts: DEVICE
-Failed.
+Passed.
+Got sector size: 512
 ===================
 mkfs with opts: -f DEVICE
 Passed.
 Got sector size: 512
 ===================
 mkfs with opts: -s size=4096 DEVICE
-Failed.
+Passed.
+Got sector size: 4096
 ===================
 mkfs with opts: -s size=4096 -f DEVICE
 Passed.

Comment 2 Eric Sandeen 2012-07-02 18:55:42 UTC
I'm happy to fix this if/when xfsprogs gets an update.

Comment 3 RHEL Program Management 2012-07-10 08:38:35 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 4 RHEL Program Management 2012-07-11 02:04:49 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 5 Boris Ranto 2012-08-07 08:23:51 UTC
QE has got no problem testing this for rhel-6.4.

Comment 6 Eric Sandeen 2012-09-25 17:37:29 UTC
Going to include another related patch:

commit 66bd6431d0e3b3618c8abacbd6df3fbae74abeec
Author: Carlos Maiolino <cmaiolino@redhat.com>
Date:   Tue Dec 6 14:45:18 2011 -0200

    mkfs: refuse to initialize a misaligned device if not forced using libblkid
    
    This is a new version of a patch to fix the problem about the usage of 4k
    sector devices when the device is not properly aligned. It makes mkfs to
    refuse to initialize a xfs filesystem if the -f option is not passed at the
    command line, and forces a 512b sector size if the user chooses to force
    the device initialization.
    
    Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
    Signed-off-by: Christoph Hellwig <hch@lst.de>


both for simpler porting and because it's solving related problems.

Comment 10 errata-xmlrpc 2013-02-21 11:00:54 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.

http://rhn.redhat.com/errata/RHBA-2013-0481.html


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