From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6CABC33CB2 for ; Fri, 31 Jan 2020 05:30:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 90AF7214D8 for ; Fri, 31 Jan 2020 05:30:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726399AbgAaFaA (ORCPT ); Fri, 31 Jan 2020 00:30:00 -0500 Received: from verein.lst.de ([213.95.11.211]:43019 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726086AbgAaF37 (ORCPT ); Fri, 31 Jan 2020 00:29:59 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id DFEA068B20; Fri, 31 Jan 2020 06:29:56 +0100 (CET) Date: Fri, 31 Jan 2020 06:29:56 +0100 From: "hch@lst.de" To: "Darrick J. Wong" Cc: Dave Chinner , Amir Goldstein , Al Viro , Omar Sandoval , Trond Myklebust , "dhowells@redhat.com" , "lsf-pc@lists.linux-foundation.org" , "hch@lst.de" , "miklos@szeredi.hu" , "linux-fsdevel@vger.kernel.org" Subject: Re: [LSF/MM/BPF TOPIC] Allowing linkat() to replace the destination Message-ID: <20200131052956.GA17457@lst.de> References: <20200118011734.GD295250@vader> <20200118022032.GR8904@ZenIV.linux.org.uk> <20200121230521.GA394361@vader> <20200122221003.GB394361@vader> <20200123034745.GI23230@ZenIV.linux.org.uk> <20200123071639.GA7216@dread.disaster.area> <20200124212546.GC7216@dread.disaster.area> <20200131052454.GA6868@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200131052454.GA6868@magnolia> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, Jan 30, 2020 at 09:24:54PM -0800, Darrick J. Wong wrote: > Or the grumpy maintainer who will have to digest all of this. > > Can we update the documentation to admit that many people will probably > want to use this (and rename) as atomic swap operations? > > "The filesystem will commit the data and metadata of all files and > directories involved in the link operation to stable storage before the > call returns." That sounds horrible, because it is so different from any other metadata operation. Maybe requiring fsync to stabilize metadata ops wasn't the best idea ever, but having some varinats of linkat behave from others is just stupid. We've been beating the fact that you shall fsync into peoples heads for years. No reason to make an exception for an obscure operation now.