Bug 784019 - Missing aio_complete() in finished_one_bio @ /fs/direct-io.c
Summary: Missing aio_complete() in finished_one_bio @ /fs/direct-io.c
Keywords:
Status: CLOSED DUPLICATE of bug 734157
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.7
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Red Hat Kernel Manager
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-23 15:17 UTC by Jan Kratochvíl
Modified: 2013-02-15 13:04 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 745640
Environment:
Last Closed: 2013-02-15 13:04:54 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Jan Kratochvíl 2012-01-23 15:17:05 UTC
+++ This bug was initially created as a clone of Bug #745640 +++

Description of problem:

Missing aio_complete() call in finished_one_bio @ /fs/direct-io.c can cause process hang on IO operation.

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

Affected kernel is >= 5.6. Issue was not reproduced on RHEL 5.5 and lower kernel.

How reproducible:

Need to setup OCFS2 cluster FS and use Oracle's database DataPump to export file to OCFS2 partition(mount point).

Steps to Reproduce:
1.
2.
3.
  
Actual results:
Process hang / spin. Can't be killed - only OS restart.

Expected results:
Successfull information

Additional info:

From 2.6.18-274 RedHat patch :

diff -Naurp linux-2.6.18.4/fs/direct-io.c linux-2.6.18-redhat/fs/direct-io.c
--- linux-2.6.18.4/fs/direct-io.c
+++ linux-2.6.18-redhat/fs/direct-io.c

..
.. wrong :
..

+	if (dio->end_io && dio->result) {
+		if (dio->inode->i_sb->s_type->fs_flags & FS_HAS_IODONE2) {
+			dio_iodone2_t *end_io = (dio_iodone2_t *)dio->end_io;
+
+			end_io(dio->iocb, offset, transferred,
+				    dio->map_bh.b_private, ret, is_async);
+		} else
+			dio->end_io(dio->iocb, offset, transferred,
+				    dio->map_bh.b_private);
+	} else if (is_async) {
+		aio_complete(dio->iocb, ret, 0);
 	}

..
.. correct :
..

+	if (dio->end_io && dio->result) {
+		if (dio->inode->i_sb->s_type->fs_flags & FS_HAS_IODONE2) {
+			dio_iodone2_t *end_io = (dio_iodone2_t *)dio->end_io;
+
+			end_io(dio->iocb, offset, transferred,
+				    dio->map_bh.b_private, ret, is_async);
+		} else {
+			dio->end_io(dio->iocb, offset, transferred,
+				    dio->map_bh.b_private);
+			if (is_async)
+				aio_complete(dio->iocb, ret, 0);
+               }
+	} else if (is_async) {
+		aio_complete(dio->iocb, ret, 0);
 	}

Comment 1 Jes Sorensen 2013-02-15 13:04:54 UTC

*** This bug has been marked as a duplicate of bug 734157 ***


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