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 594063 - the block size specified can't be accepted when more than the min(logical, physical)
Summary: the block size specified can't be accepted when more than the min(logical, ph...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: e2fsprogs
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Eric Sandeen
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-20 13:15 UTC by yanfu,wang
Modified: 2010-05-24 08:54 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-24 08:54:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description yanfu,wang 2010-05-20 13:15:35 UTC
Description of problem:
an explicit block size should be rejected if less than the min(logical, physical). But when the block size specified more than the min(logical, physical), it's still can't be accept. 


Version-Release number of selected component (if applicable):
root@nec-em18 ~]# uname -a
Linux nec-em18.rhts.eng.bos.redhat.com 2.6.32-19.el6.x86_64 #1 SMP Tue Mar 9
17:48:46 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
[root@nec-em18 ~]# rpm -qa|grep e2fsprogs
e2fsprogs-libs-1.41.12-1.el6.x86_64
e2fsprogs-1.41.12-1.el6.x86_64

How reproducible:
always

Steps to Reproduce:
[root@nec-em18 ~]# modprobe scsi_debug dev_size_mb=200 sector_size=2048
physblk_exp=3 lowest_aligned=7

[root@nec-em18 ~]# cat /sys/block/sdb/queue/physical_block_size 
16384
[root@nec-em18 ~]# cat /sys/block/sdb/queue/logical_block_size 
2048

[root@nec-em18 ~]# mkfs.ext4 -b 4096 /dev/sdb
mke2fs 1.41.12 (17-May-2010)
...
mkfs.ext4: Invalid argument while setting blocksize; too small for device

[root@nec-em18 ~]# mkfs.ext4 -b 2048 /dev/sdb
...
mkfs.ext4: Invalid argument while setting blocksize; too small for device




Actual results:


Expected results:


Additional info:

Comment 1 RHEL Program Management 2010-05-20 13:36:51 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 2 Eric Sandeen 2010-05-20 17:01:41 UTC
Ok, this actually was somewhat intentional.

        } else {
                if (blocksize < lsector_size ||                 /* Impossible */
                    (!force && (blocksize < psector_size))) {   /* Suboptimal */
                        com_err(program_name, EINVAL,
                                _("while setting blocksize; too small "
                                  "for device\n"));
                        exit(1);
                } else if (blocksize < psector_size) {
                        fprintf(stderr, _("Warning: specified blocksize %d is "
                                "less than device physical sectorsize %d, "
                                "forced to continue\n"), blocksize,
                                psector_size);
                }

When specifying a block size which is less than the physical block size of the device, performance will likely suffer badly.  Therefore, unless -F is given, we don't continue.

If you think there is a valid reason to allow this and not require the -F force flag, let me know, otherwise I think things are working as designed.

-Eric

Comment 3 yanfu,wang 2010-05-21 05:45:01 UTC
I test it on e2fsprogs-1.41.10-3.el6.x86_64 again using the same steps, it can mkfs successfully by specify the block size without -F given, but I think the current adjust is ok. I'll close the bug if there isn't sth. need to do.


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