Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp101931rwb; Tue, 25 Jul 2023 12:36:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlHOh3LX4vpuWPHtZeZmT2uiOFyKtambXGPuzgTn/nwyb4kOcFfhqcAuV+zY662TyhHR7iob X-Received: by 2002:a05:6a00:2292:b0:67f:48a2:5d9f with SMTP id f18-20020a056a00229200b0067f48a25d9fmr208028pfe.11.1690313804713; Tue, 25 Jul 2023 12:36:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690313804; cv=none; d=google.com; s=arc-20160816; b=q01NyusfxA/6jopSJ7ErF7ZMJd1sg2kuzAACn5tIsgGZkNrZa/uSMlX6QK/0Ysxd0h bBEihgZrM2s0msiA5qRNOfl9UTQ2h16NSzS2oCjvIeqoByUVgcZ5pyAeDA8vuTPkdGg/ Gcxlrv51ip90bet+jtY3uHrCaBxtMRp5qMhwxskYlD7QccbYJdAmIOpfAKnAxmBgPrHn yYIKTriyRSebou/k6A5RqooveONe9gZHL0PtihRxM/k6CmvTf0oQYzDBhSyrvB8SNMkx kgGDV/D027+JRA3T3qqx0oUY8R3dGHp0299i/HMJHZ8UIEju0hAAc6x5mbSh6zOgR/sn VAbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=7ss2tzNf07FPnrLqdDtf+Er94L4qFrw/j0drlGJAUJI=; fh=ym0Tkv0h5tymLkKnDQSy/Dtx8WpD7sCFtO3dZcByE+Q=; b=ICiaqcYTIr/p+yulEOeqNYRM5ECkrdY6PDWfMLm6mQ0+wSfhaCPthu8pz6xYXESHYG O6s71WPyg1aEzRJwwwZbpS1nC61wWLyq8dJEdMLWgtavO1yR6Gi0WSG0MdW+Vwckv/Av Kres//1ZJTNXTfnM8E6kg5FIglDdDp5TQiUM0soNVgeq9vU9Py3Khsn9IxsL8AuT9PeP 4cgKVtOnNKKsbysVEllEBZKuWQrZShdfkS7Rhy2vY3KlRZVEUU96xOUDuMfTeGxp3I3T S2rqi0KcObJIAbxSj07EnwhK17KopuxCuWuflUzB719efkDQZHdscBGXIVq3yc+Fn481 ZzQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NVswkJDu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o16-20020a637310000000b00563d5bc2942si926118pgc.539.2023.07.25.12.36.32; Tue, 25 Jul 2023 12:36:44 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NVswkJDu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232116AbjGYSlN (ORCPT + 99 others); Tue, 25 Jul 2023 14:41:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231825AbjGYSlF (ORCPT ); Tue, 25 Jul 2023 14:41:05 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBAEC2683 for ; Tue, 25 Jul 2023 11:40:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690310408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7ss2tzNf07FPnrLqdDtf+Er94L4qFrw/j0drlGJAUJI=; b=NVswkJDubFN6sFQtBvjLxl3pJs2FaXqBPjuSfZNv9D51HvLiTJyapg5/y/eLObQceA+2sO MtAmIsP7VVHoEAhyfZunqSJY9tsUWsWydqztaaLJ5x1YFq5EEXgZMCU3u6nc/sRu+zkvEA SRmES+yPihlMnaEaWNrAW74T1JrKWl0= Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-194-8oo2ft68MBSY5EtXE1nj0w-1; Tue, 25 Jul 2023 14:40:05 -0400 X-MC-Unique: 8oo2ft68MBSY5EtXE1nj0w-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 844A21C3408F; Tue, 25 Jul 2023 18:40:00 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.242]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5BBCD4094DC1; Tue, 25 Jul 2023 18:39:52 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <87fs5c3rbl.fsf@oldenburg3.str.redhat.com> References: <87fs5c3rbl.fsf@oldenburg3.str.redhat.com> <104971.1690300714@warthog.procyon.org.uk> To: Florian Weimer Cc: dhowells@redhat.com, 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, dalias@libc.org, 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? MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <107289.1690310391.1@warthog.procyon.org.uk> Date: Tue, 25 Jul 2023 19:39:51 +0100 Message-ID: <107290.1690310391@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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. David