The question is whether it is unreasonable for a fs to accept block map requests which are non-block-sized/aligned? The fiemap interface is the only one which sends such requests to the block map function (via __generic_block_fiemap) so should we fix the problem in __generic_block_fiemap, or in the individual filesystem block map functions? So basically I want to clarify the interface at block map level.
It should never be possible for an invalid request to cause a panic.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
FWIW, I tested ext2/3/4 and xfs and they all are fine with this testcase (xfs doesn't go the generic route anyway, nor does ext4 for extent-based files).
The patch from comment #6 looks good to me.
Posted the above patch to rhkernel-list.
in kernel-2.6.18-192.el5 You can download this test kernel from http://people.redhat.com/jwilson/el5 Please update the appropriate value in the Verified field (cf_verified) to indicate this fix has been successfully verified. Include a comment with verification details.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2010-0178.html