Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp97761rwb; Tue, 25 Jul 2023 12:32:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlG9SW2Pe9nHDS6K82WU91U0HzKiRz1W4GvGULTWta7ruQz1tUGfMeb/n4vni9sSCs6YGekI X-Received: by 2002:a17:903:2308:b0:1b8:400a:48f2 with SMTP id d8-20020a170903230800b001b8400a48f2mr144133plh.62.1690313534883; Tue, 25 Jul 2023 12:32:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690313534; cv=none; d=google.com; s=arc-20160816; b=dBdwSgzEur1TdmjIlaaAfQMbr+uVSui7xkT4JiqUJKMRr18+Y8u3NgZ809hKbb8z6m Wug+0Vs2yB5kvjQF3dj5a3FPMHW3RMHP6eQvawfEYIUXe8h5Ry8IIrurNp3X0KwinKwx EZS2ScRplLVFNSQiyV+y713j2nuAwgwcbV2iAfMBP5OgHImKUF5SoU767aVuqgq9uHwa a18ctWddL+0QJmduEK/V36/1F3guyybJTn4bQQfZ1tSffD/z0AjxtjWLa+bfW/w9Lqsy Cob2tHJLYIIi5ILyDKsSP7CpbEaaa9NIoIwrj/Cp8jKiWMicFBUbFa5CtRYcb3UqDtoM UPig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=L0ljwW5VkwE2Eb/wX+LTNER29K5bwNgCbjy2AspGPfc=; fh=GmwKXpW0yeW8S476989odvNCAvtDmkQj/1SNTSYY7X4=; b=GA2qHhf+eBuBs/5xn3CY7KB8lMg19McMTj/G24eqzlFRDJe5I7O68JQ+Lder5oundK +5El0EaE85I+tOlbqD4vJKqjXX3rI3tPCuTPwn10H736edjRdAMfxkaoibAAiai/rf9G csjhDdoeQcHgV4scL35TJHnwIKKHPnVK4F1wTlMdQFxfhGfxjB8xQDiTubMR+P2ky0Dd bwGFhPxZ1fyNOpxMJAJ+oE7dw6o7cshRhVkQe6v8CDideV39z3cXdabV6HCwsdNjHitH m3WfIA1P/LLwyQJHtsu0QsViIvKQ8DmvL+QjwEHTCj0J+DtfpcsdwAviMsTwqubHKEPU 59SA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d4-20020a170902654400b001bbb2675c31si3130935pln.508.2023.07.25.12.32.02; Tue, 25 Jul 2023 12:32:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230480AbjGYSop (ORCPT + 99 others); Tue, 25 Jul 2023 14:44:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229567AbjGYSoo (ORCPT ); Tue, 25 Jul 2023 14:44:44 -0400 Received: from brightrain.aerifal.cx (brightrain.aerifal.cx [216.12.86.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76E0519AD for ; Tue, 25 Jul 2023 11:44:43 -0700 (PDT) Date: Tue, 25 Jul 2023 14:44:43 -0400 From: Rich Felker To: David Howells Cc: Florian Weimer , Alexey Gladkov , James.Bottomley@HansenPartnership.com, acme@kernel.org, alexander.shishkin@linux.intel.com, axboe@kernel.dk, benh@kernel.crashing.org, borntraeger@de.ibm.com, bp@alien8.de, catalin.marinas@arm.com, christian@brauner.io, davem@davemloft.net, deepa.kernel@gmail.com, deller@gmx.de, fenghua.yu@intel.com, geert@linux-m68k.org, glebfm@altlinux.org, gor@linux.ibm.com, hare@suse.com, hpa@zytor.com, ink@jurassic.park.msu.ru, jhogan@kernel.org, kim.phillips@arm.com, ldv@altlinux.org, linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux@armlinux.org.uk, linuxppc-dev@lists.ozlabs.org, luto@kernel.org, mattst88@gmail.com, mingo@redhat.com, monstr@monstr.eu, mpe@ellerman.id.au, namhyung@kernel.org, paulus@samba.org, peterz@infradead.org, ralf@linux-mips.org, sparclinux@vger.kernel.org, stefan@agner.ch, tglx@linutronix.de, tony.luck@intel.com, tycho@tycho.ws, will@kernel.org, x86@kernel.org, ysato@users.sourceforge.jp, LKML , Arnd Bergmann , linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk Subject: Re: Add fchmodat2() - or add a more general syscall? Message-ID: <20230725184443.GA20050@brightrain.aerifal.cx> References: <87fs5c3rbl.fsf@oldenburg3.str.redhat.com> <104971.1690300714@warthog.procyon.org.uk> <107290.1690310391@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <107290.1690310391@warthog.procyon.org.uk> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 25, 2023 at 07:39:51PM +0100, David Howells wrote: > Florian Weimer wrote: > > > > Rather than adding a fchmodat2() syscall, should we add a > > > "set_file_attrs()" syscall that takes a mask and allows you to set a bunch > > > of stuff all in one go? Basically, an interface to notify_change() in the > > > kernel that would allow several stats to be set atomically. This might be > > > of particular interest to network filesystems. > > > > Do you mean atomically as in compare-and-swap (update only if old values > > match), or just a way to update multiple file attributes with a single > > system call? > > I was thinking more in terms of the latter. AFAIK, there aren't any network > filesystems support a CAS interface on file attributes like that. To be able > to do a CAS operation, we'd need to pass in the old values as well as the new. > > Another thing we could look at is doing "create_and_set_attrs()", possibly > allowing it to take a list of xattrs also. Can we please not let " hey let's invent a new interface to do something that will be hard for underlying filesystems to even provide and that nothing needs because there's no standard API to do it" be the enemy of "fixing a known problem implementing an existing standard API that just requires a simple, clearly-scoped syscall to do it"? Rich