From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de ([213.95.11.211]:53658 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966400AbcKAOaL (ORCPT ); Tue, 1 Nov 2016 10:30:11 -0400 Date: Tue, 1 Nov 2016 15:30:08 +0100 From: Christoph Hellwig To: Linus Torvalds Cc: Dave Chinner , Christoph Hellwig , Al Viro , Jan Kara , Dmitry Monakhov , Jeff Moyer , linux-fsdevel , linux-aio@kvack.org, Linux Kernel Mailing List Subject: Re: [PATCH 2/4] fs: remove the never implemented aio_fsync file operation Message-ID: <20161101143008.GD17142@lst.de> References: <1477845724-27586-1-git-send-email-hch@lst.de> <1477845724-27586-3-git-send-email-hch@lst.de> <20161030232331.GJ22126@dastard> <20161031130754.GA9853@lst.de> <20161031202521.GN22126@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Oct 31, 2016 at 06:30:11PM -0700, Linus Torvalds wrote: > I still suspect that if we want to do this, we should strive to expose > all the other syncing flags from sync_file_range() too. sync_file_range is entirely different from fsync - sync_file_range allows you detailed control of data writeback, but it does not allow to commit metadata at all, i.e. it's not a data integrity operation. > Yeah, that's more of a "keep writes streaming" interface than a > fsync() like interface, but I think the two really do fit together. > It's kind of sad how we have this very fragmented interface to > writeback, where some operations take that "data vs metadata", some > operations take a range of bytes, and some operations take that "start > writeback vs wait for it", but nothing does all of the above. They are > really just different faces of the same writeback coin. sync_file_range at the moment actually doesn't involve the fs, which has it's own set of problems. So yes, maybe we need a full blown sync method unifying fsync, sync_file_range and which enables ranged data integrity fsync and asynchronous operations of all this. But to go back to Dave's argument - none of that can archived with that aio_fsync method added more than 10 years ago and never implemented.