Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4054079pxb; Mon, 8 Feb 2021 06:56:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJzV9tOhXw3MYYN16MTp8ElPev96hEZjGHnzMGjEISY+MmhmfuWNlMb92s+1GX4NDbu1TB/r X-Received: by 2002:a05:6402:31af:: with SMTP id dj15mr16486181edb.59.1612796166625; Mon, 08 Feb 2021 06:56:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612796166; cv=none; d=google.com; s=arc-20160816; b=nIYd5DD4ppf5/3nx14loA6nlH3nw+9BvwzyPYg6aAH7qxNJNhlLayfirUyihbKBtJ/ oSLx2MdzWerIN/9FrSPovLj/By5dlh9LttfIawbZ0tui7syIOi+OTnxyB0faJqy8ryMC Kn/AoYHHLt5MDErdlUnHBuGs4DVZ1fwSOMWjSEjiFH6wLwDtqvCXbJB7JLz0e+W9Q2zf RCUijyX8GPqWvaxxUU0VUzZlyuuKEVrwFC2FOiEeS809nwnwYTRoJwGpSuFGcX7TV1LH 3NvKW3pFc1OXZgZgqh2AEbhVVni2KRq/Dv0HK4ptdwXS/UxTJZKX1AAaJRdargliwYZG KZdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Y8cQCEgdPFE8xw1N0t+r/wceVgSKQwGQt1gshTBTA/w=; b=rFrZRZG0tr59qpv90QYmORfopY0wnEB2G4lPU8mzLQRuB/LQdXu6mH8NYKDd+OjZ1I WI2jI+ldHX1wToVC6GjYaLLOLEZ4Rko4iZfN1y+eD66Z5c9mG6TuxakYTqDAOK75zJrc /8ldjV15h9gp483rN24j5TNiwJo//9Sc4yrlADjirJa8mXxA7hdSE/fZIpg3k8rGeLts or9l2SG/g1XTRydzpvBDvkgZhkbzgCJqqT4LA4aUMHpxNjIplPy1mvkARnP22v/lHqCS oywp7zJm6cK0tn2lDm1zV7knnihOfGUAbypJ+wYijr3/FuAFHYwZM0lj2lyMyewCUq7f h3uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=alpVJbdM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e18si11131922ejj.130.2021.02.08.06.55.39; Mon, 08 Feb 2021 06:56:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=alpVJbdM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232698AbhBHOyU (ORCPT + 99 others); Mon, 8 Feb 2021 09:54:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233025AbhBHOxi (ORCPT ); Mon, 8 Feb 2021 09:53:38 -0500 Received: from mail-vk1-xa2f.google.com (mail-vk1-xa2f.google.com [IPv6:2607:f8b0:4864:20::a2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E542C061794 for ; Mon, 8 Feb 2021 06:52:39 -0800 (PST) Received: by mail-vk1-xa2f.google.com with SMTP id s124so818650vkb.1 for ; Mon, 08 Feb 2021 06:52:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Y8cQCEgdPFE8xw1N0t+r/wceVgSKQwGQt1gshTBTA/w=; b=alpVJbdMsp+cA4m1fRF7oc91ToOAMiUG3qmsFJvHLTgLEDVe2YKlyNWZjuXEm0+9B5 tI+v40mJamGojR0eSN1f1NT9DRZGVussJ5bnWO5uayHegaNhE4tZyvQWv5WpRvKBeRnm uQQzhETRO/OBzSmXkCgmv1QDy3nprRgWuhNjY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Y8cQCEgdPFE8xw1N0t+r/wceVgSKQwGQt1gshTBTA/w=; b=JZ+cuK55AOVIk2UNyLqZCP6pPY3XSKhZrWI6XrEnpYxx2fy5P71h+N/9Kq8ctPfgjW 5W+gtFDttIkanUghCL0bVJEzf9/5nJxCxD/giXuUOVRQYJicrswokRFkcgJlV23q7tzB UzLIprF1lPEpaA/rAn6pbN/QY2Njijc3TnAhEeHOlfAvVJGjMjOafGisvS90Kgezly/v FPtlav21COoE4OHXXX90DbZhKdxOWl3Wm5bvQa/PdxQi/eSPkTFqCBwxYyq/LNT/ibCg YDZlWyat2H9dUlHZV9iZak6fMBABHPt3zCsY3aY3PjZK7pdcx1Hpymo4bl8SKG4wN1Tx ZXBQ== X-Gm-Message-State: AOAM5323gsBmAENBI9Py6WBFsJvoK9dvlGYVfoUKmtY9EGUscTeLn8wf I4nScktLByo7/2943Qs7NlF+o1RqtreDGdIgqQpUcA== X-Received: by 2002:a1f:1d0e:: with SMTP id d14mr10273523vkd.14.1612795957900; Mon, 08 Feb 2021 06:52:37 -0800 (PST) MIME-Version: 1.0 References: <20210203130501.GY308988@casper.infradead.org> <20210203135827.GZ308988@casper.infradead.org> <20210203142802.GA308988@casper.infradead.org> <20210203145620.GB308988@casper.infradead.org> <20210208020002.GM4626@dread.disaster.area> <20210208140217.GQ308988@casper.infradead.org> In-Reply-To: <20210208140217.GQ308988@casper.infradead.org> From: Miklos Szeredi Date: Mon, 8 Feb 2021 15:52:26 +0100 Message-ID: Subject: Re: [PATCH 00/18] new API for FS_IOC_[GS]ETFLAGS/FS_IOC_FS[GS]ETXATTR To: Matthew Wilcox Cc: Dave Chinner , Miklos Szeredi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Al Viro , Andreas Dilger , Andreas Gruenbacher , Christoph Hellwig , "Darrick J . Wong" , Dave Kleikamp , David Sterba , Jaegeuk Kim , Jan Kara , Joel Becker , Mike Marshall , Richard Weinberger , Ryusuke Konishi , "Theodore Ts'o" , Tyler Hicks Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 8, 2021 at 3:02 PM Matthew Wilcox wrote: > > On Mon, Feb 08, 2021 at 09:25:22AM +0100, Miklos Szeredi wrote: > > On Mon, Feb 8, 2021 at 3:00 AM Dave Chinner wrote: > > > > > > On Wed, Feb 03, 2021 at 04:03:06PM +0100, Miklos Szeredi wrote: > > > > On Wed, Feb 3, 2021 at 3:56 PM Matthew Wilcox wrote: > > > > > > > > > But let's talk specifics. What does CIFS need to contact the server for? > > > > > Could it be cached earlier? > > > > > > > > I don't understand what CIFS is doing, and I don't really care. This > > > > is the sort of operation where adding a couple of network roundtrips > > > > so that the client can obtain the credentials required to perform the > > > > operation doesn't really matter. We won't have thousands of chattr(1) > > > > calls per second. > > > > > > Incorrect. > > > > Okay, I was wrong. > > > > Still, CIFS may very well be able to perform these operations without > > a struct file. But even if it can't, I'd still only add the file > > pointer as an *optional hint* from the VFS, not as the primary object > > as Matthew suggested. > > > > I stand by my choice of /struct dentry/ as the object to pass to these > > operations. > > Why the dentry? This is an inode operation. Why doesn't it take an > inode as its primary object? If we pass struct file to the op, then that limits callers to those that have an open file. E.g. it would be difficult to introduce a path based userspace API for getting/changing these attributes. Passing a dentry instead of an inode has no such problem, since the dentry is always available, whether coming from an open file or a path. Some inode operations do pass a dentry instead of an inode (readlink, getattr, setattr) and some filesystems take advantage of this. Thanks, Miklos