From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=213.95.11.211 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796116535; b=zBGFMKpbeZ0gM6UYGivTId26i4u+p9KiDs/UFcmmsp7DuM9wkuv7Xha+cT9DU5Zb9u3F Ou6QxYZFOph0nlPzcA4OcFs87r6Zy7iO0IDo92Q+TqQW0CUPc6jQ7UVic2voD0EzN1am5 OZzbLPvQhGBNN0tZsk2mRNSNVqyrUjNLDTKeQWEe8BDklOzksyuOeAff0JeciclYcZtQB zSixQeS5zs8WE4tNzduk7tdZlSOpHDm+KGOJ/X9qQ9Fe9kbA96SJrCigWXgy0nqwcAd47 JSi9Y0+nV2Zqkn24YxcuxPG2kIMcv+6DgYFQsEkBVHHD7EaUqIW3IiIvhTeDW6n173Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796116535; h=DMARC-Filter:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent; bh=nwJrA2Kg6eUd03IqLPl3BGOBtkN/vQYAwVNIT2N0vho=; b=LIs+v8uGu4F3zwIRfWEomNvU1KWXah7/hVwP7wYqSQyM9T1Q3rsSJucjWwVHK9prTNk+ xu/H6yntLxOliXLQhKOc+25TTzXGJqFko8/TTq/fsn2X8k8QYk91Nk9tKTERbJqQZhjc0 vJ341p7mCi4WR1rbSoSh11aJ2a634VJXB63cvFLWBW7kiPpu9AwjBGfKpUoEu3SeKLWSk nY3f7b0BFt/KQBFKXdbLeYHL1iCI51G2YRCRmX3YhM3JFp6kK1nb2vWLwCea+r8wK398K pRg3s+XEG2X8EBU0zaZu4t2ABbZG1Wc+Eg+up/B8UnwPdtFciwcT9bi0T6dhRJH3CNw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.remote-ip=213.95.11.211 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 81F23606A334; Tue, 1 Dec 2026 09:15:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 81F23606A334 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 036D268BFE; Tue, 1 Dec 2026 10:15:28 +0100 (CET) Date: Tue, 1 Dec 2026 10:15:28 +0100 From: Christoph Hellwig To: Alexei Starovoitov Cc: Naohiro Aota , viro@zeniv.linux.org.uk, brauner@kernel.org, cem@kernel.org, hch@lst.de, djwong@kernel.org, dgc@kernel.org, jack@suse.cz, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, dlemoal@kernel.org, Hans Holmberg , Anuj Gupta , Kanchan Joshi Subject: Re: [PATCH 0/6] xfs: BPF data placement policy for zoned file systems Message-ID: <20261201091528.GA27736@lst.de> References: <20261201043452.3866039-1-naohiro.aota@wdc.com> X-Mailing-List: bpf@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) On Tue, Dec 01, 2026 at 04:56:50AM +0000, Alexei Starovoitov wrote: > You waited since ALPSS to send this? > Sorry, but the whole thing is an overkill if 'hint' is the only goal. > Here is a much simpler alternative: I have no idea how you think this helps? > SEC("lsm/file_open") Requiring LSM privileges for hints is not helpful. > > int BPF_PROG(set_hint, struct file *file) > { > struct dentry *dentry = file->f_path.dentry; > struct key key = { > .dev = dentry->d_sb->s_dev, > .dir = dentry->d_parent->d_inode->i_ino, FYI, ->d_parent dereferences aren't stable. > }; > u64 *hint; > > if (!(file->f_mode & FMODE_WRITE)) > return 0; > hint = bpf_map_lookup_elem(&hints, &key); > if (hint) > bpf_file_set_write_hint(file, *hint); This assumes you want to set hints on specific and not relative path, and encodes a really bad and mostly broken ABI in a userspace ABI due to the shared maps. But even with that you can't easily match for cgroup ID and other bits in here. And for anything we'd want to deploy the concept of a shared map with an implicit ABI is just a nightmare.