Thanks you help! Jianpeng > -----Original Message----- > From: Zach Brown [mailto:zab@xxxxxxxxx] > Sent: Thursday, August 28, 2014 12:04 AM > To: Ma, Jianpeng > Cc: viro@xxxxxxxxxxxxxxxxxx; Sage Weil; Mark Kirkwood; linux-aio@xxxxxxxxx; > linux-fsdevel@xxxxxxxxxxxxxxx > Subject: Re: [HELP]: about aio+dio > > On Wed, Aug 27, 2014 at 12:34:44AM +0000, Ma, Jianpeng wrote: > > For aio+directio: > > After io_submit, the content in request-queue of block-device. > > In blkdev_fsync(), it will cal blkdev_issue_flush. This operation make all > request to disk. > > > > Or am I missing something? > > You can't rely on implementation details of how far aio operations are > processed before io_submit returns. It'd be entirely valid to implement aio by > only copying the iocb structures from user space and handing them off to kernel > threads before returning from io_submit(). In that case the kernel wouldn't > even know what file descriptors the aios reference when fsync is called. > > So what you describe might be true today (I doubt it, but I'm not going to look), > but an application that relied on those assumptions runs a good chance of > breaking in the future. > > - z -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html