From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Jeff Moyer To: Junxiao Bi Cc: ocfs2-devel@oss.oracle.com, linux-aio@kvack.org, mfasheh@suse.com, jlbec@evilplan.org, bcrl@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, joe.jin@oracle.com, dave.kleikamp@oracle.com Subject: Re: [V2 PATCH 1/2] aio: make kiocb->private NUll in init_sync_kiocb() References: <1338881210-14863-1-git-send-email-junxiao.bi@oracle.com> <1338881210-14863-2-git-send-email-junxiao.bi@oracle.com> Date: Thu, 07 Jun 2012 11:09:26 -0400 In-Reply-To: <1338881210-14863-2-git-send-email-junxiao.bi@oracle.com> (Junxiao Bi's message of "Tue, 5 Jun 2012 15:26:49 +0800") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: Junxiao Bi writes: > Ocfs2 uses kiocb.*private as a flag of unsigned long size. In > commit a11f7e6 ocfs2: serialize unaligned aio, the unaligned > io flag is involved in it to serialize the unaligned aio. As > *private is not initialized in init_sync_kiocb() of do_sync_write(), > this unaligned io flag may be unexpectly set in an aligned dio. > And this will cause OCFS2_I(inode)->ip_unaligned_aio decreased > to -1 in ocfs2_dio_end_io(), thus the following unaligned dio > will hang forever at ocfs2_aiodio_wait() in ocfs2_file_aio_write(). > > Signed-off-by: Junxiao Bi Acked-by: Jeff Moyer