From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761711AbcALBUr (ORCPT ); Mon, 11 Jan 2016 20:20:47 -0500 Received: from mail-ig0-f194.google.com ([209.85.213.194]:34555 "EHLO mail-ig0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759364AbcALBUn (ORCPT ); Mon, 11 Jan 2016 20:20:43 -0500 MIME-Version: 1.0 In-Reply-To: <20160112011128.GC6033@dastard> References: <80934665e0dd2360e2583522c7c7569e5a92be0e.1452549431.git.bcrl@kvack.org> <20160112011128.GC6033@dastard> Date: Mon, 11 Jan 2016 17:20:42 -0800 X-Google-Sender-Auth: 0TEJfQte86cLX5ur6fBLQ5VU3NU Message-ID: Subject: Re: [PATCH 07/13] aio: enabled thread based async fsync From: Linus Torvalds To: Dave Chinner Cc: Benjamin LaHaise , linux-aio@kvack.org, linux-fsdevel , Linux Kernel Mailing List , Linux API , linux-mm , Alexander Viro , Andrew Morton Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 11, 2016 at 5:11 PM, Dave Chinner wrote: > > Insufficient. Needs the range to be passed through and call > vfs_fsync_range(), as I implemented here: And I think that's insufficient *also*. What you actually want is "sync_file_range()", with the full set of arguments. Yes, really. Sometimes you want to start the writeback, sometimes you want to wait for it. Sometimes you want both. For example, if you are doing your own manual write-behind logic, it is not sufficient for "wait for data". What you want is "start IO on new data" followed by "wait for old data to have been written out". I think this only strengthens my "stop with the idiotic special-case-AIO magic already" argument. If we want something more generic than the usual aio, then we should go all in. Not "let's make more limited special cases". Linus From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: <20160112011128.GC6033@dastard> References: <80934665e0dd2360e2583522c7c7569e5a92be0e.1452549431.git.bcrl@kvack.org> <20160112011128.GC6033@dastard> Date: Mon, 11 Jan 2016 17:20:42 -0800 Message-ID: Subject: Re: [PATCH 07/13] aio: enabled thread based async fsync From: Linus Torvalds To: Dave Chinner Cc: Benjamin LaHaise , linux-aio@kvack.org, linux-fsdevel , Linux Kernel Mailing List , Linux API , linux-mm , Alexander Viro , Andrew Morton Content-Type: text/plain; charset=UTF-8 Sender: owner-linux-mm@kvack.org List-ID: On Mon, Jan 11, 2016 at 5:11 PM, Dave Chinner wrote: > > Insufficient. Needs the range to be passed through and call > vfs_fsync_range(), as I implemented here: And I think that's insufficient *also*. What you actually want is "sync_file_range()", with the full set of arguments. Yes, really. Sometimes you want to start the writeback, sometimes you want to wait for it. Sometimes you want both. For example, if you are doing your own manual write-behind logic, it is not sufficient for "wait for data". What you want is "start IO on new data" followed by "wait for old data to have been written out". I think this only strengthens my "stop with the idiotic special-case-AIO magic already" argument. If we want something more generic than the usual aio, then we should go all in. Not "let's make more limited special cases". Linus -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org