Hide Forgot
Description of problem: I check the blktrace from the journal commit, and it looks as if the request sent from the jbd2 isn't merged by the block layer although they are sequential write. Seems to be a bug in what jbd2 submit the bios. Version-Release number of selected component (if applicable): 2.6.32-131.4.1 How reproducible: Steps to Reproduce: 1. mkfs.ext4 -b 2048 /dev/sdx 10000000 2. sync 3. mount -t ext4 -o delalloc /dev/sdx /mnt/ext4 4. dd if=/dev/zero of=/mnt/ext4/a bs=1024K count=1 5. blktrace -a issue -a complete /dev/sdx -o -|blkparse -i - Actual results: 8,0 6 18 0.016058423 3342 D W 461101317 + 4 [jbd2/sda11-8] 8,0 6 19 0.016065473 3342 D W 461101321 + 4 [jbd2/sda11-8] 8,0 6 20 0.016070751 3342 D W 461101325 + 4 [jbd2/sda11-8] 8,0 6 21 0.016076180 3342 D W 461101329 + 4 [jbd2/sda11-8] 8,0 6 22 0.016081255 3342 D W 461101333 + 4 [jbd2/sda11-8] 8,0 6 23 0.016085963 3342 D W 461101337 + 4 [jbd2/sda11-8] 8,0 6 24 0.016182048 0 C W 461101317 + 4 [0] 8,0 6 25 0.016190820 0 C W 461101325 + 4 [0] 8,0 6 26 0.016193927 0 C W 461101321 + 4 [0] 8,0 6 27 0.016196532 0 C W 461101333 + 4 [0] 8,0 6 28 0.016199180 0 C W 461101337 + 4 [0] 8,0 6 29 0.016206180 0 C W 461101329 + 4 [0] Expected results: 8,0 4 23 4.320315739 3129 D W 461101317 + 24 [jbd2/sda11-8] 8,0 4 24 4.320364518 0 C W 461101317 + 24 [0] Additional info: In upstream commit 749ef9f8423, we use WRITE_SYNC instead of WRITE in journal_commit_transaction. It causes a much heavy burden for the disk as now the seqenctial write can't be merged(see the blktrace below). Given the description of that commit 749ef9f8423, the reason why we use WRITE_SYNC is that it wants to use REQ_NOIDLE and WRITE_SYNC_PLUG also has that flag, so use WRITE_SYNC_PLUG instead. A corresponding fix has been sent to linux-ext4. http://marc.info/?l=linux-ext4&m=131046746420316&w=2
hi, any update for this? Do you guys think this is a bug or not?
Hi, Tao, I will look into this further for RHEL 6.3. From our discussion upstream, my guess is your patch will go in as is, but I won't know for sure until I've done some more testing. Thanks for reporting the problem and providing a fix!
Hi Jeffrey, Thanks for the update. Please let me know when the patch is OK with your test so that I can track it in our production system.
Hi Jeffrey, I just noticed that the status is changed to POST. So would you mind attaching the patch here? Thanks.
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.
Patch(es) available on kernel-2.6.32-206.el6
Reproduced in 2.6.32-131.4.1.el6.x86_64 and 2.6.32-178.el6.x86_64, unable to reproduce in 2.6.32-205.el6.x86_64 and verified in 2.6.32-206.el6.x86_64.
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/RHSA-2011-1530.html