Bug 1035990 - thin_dump and other persistent-data tools may perform IO to misaligned buffers on devices with block sizes larger than 512 bytes
Summary: thin_dump and other persistent-data tools may perform IO to misaligned buffer...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: device-mapper-persistent-data
Version: 6.5
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: alpha
: 6.6
Assignee: Heinz Mauelshagen
QA Contact: yanfu,wang
URL:
Whiteboard:
Depends On: 960284
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-29 06:40 UTC by yanfu,wang
Modified: 2017-02-07 12:25 UTC (History)
15 users (show)

Fixed In Version: device-mapper-persistent-data-0.3.2-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: thin_dump and other persistent-data tools assume 512 bytes block sizes on devices accessed. Consequence: thin_dump and other persistent-data tools may perform IO to misaligned buffers. Fix: Change code to support 4K block size. Result: Tools work.
Clone Of: 960284
Environment:
Last Closed: 2014-10-14 04:35:54 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1409 0 normal SHIPPED_LIVE device-mapper-persistent-data bug fix and enhancement update 2014-10-14 00:54:53 UTC

Description yanfu,wang 2013-11-29 06:40:08 UTC
+++ This bug was initially created as a clone of Bug #960284 +++

Description of problem:
On devices with logical_block_size=4096 thin_check and thin_dump can perform IO that isn't 4K aligned.

Steps to Reproduce:
# modprobe scsi_debug sector_size=4096 dev_size_mb=128
# thin_dump /dev/sdh
read failed
# strace thin_dump /dev/sdh
...
open("/dev/sdh", O_RDONLY|O_SYNC|O_DIRECT) = 3
brk(0x155f000)                          = 0x155f000
lseek(3, 0, SEEK_SET)                   = 0
read(3, 0x153d600, 4096)                = -1 EINVAL (Invalid argument)
brk(0x155e000)                          = 0x155e000

0x153d600 isn't a 4K aligned address.

(I've also seen thin_check fail IO to when reading from an mmap() buffer that isn't 4K aligned). 
  
Actual results:
Buffers aren't aligned to logical_block_size (e.g. 4K).

Expected results:
Buffers should be aligned to logical_block_size (e.g. 4K).

Comment 8 errata-xmlrpc 2014-10-14 04:35: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-2014-1409.html


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