From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09F0D3AC34; Tue, 9 Jan 2024 19:30:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="UTK4nwDx" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=rCctwAWfiDoxb42kUYu+5LER8Jetw3fsb+LRP85kBXg=; b=UTK4nwDxhEyhHOcQoPAnCsJWhk JqQjaMsrQCo4uG24rfCYz+ftz/tfisvmSCR503s18eCCRgwllWJFT/6FQYwm5hpg6baFX64DfsudI pZFamxzsdW0gvORPEijm5oEtEX+IrkcZ/a2MtmUY0YqzxfKtXRRt7R5TeKQKpT2dhsLN4IFsJM1IQ +JXsF87p53raJIHSVkGU8n4gk4Iqddr1X9LUTFSq7pTnvRgSKhEvA4z3/IcChTw6W5py42zYQA/ED 9HVLza7e9+biN2H3G2zUuCFc0X2DrEGeJ49egYdollgSjUmFCvd4Tpw6wqLwDK9EwOkMoE20F6qP0 uS4zHV+g==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1rNHoN-00AEKu-19; Tue, 09 Jan 2024 19:30:55 +0000 Date: Tue, 9 Jan 2024 19:30:54 +0000 From: Matthew Wilcox To: Wedson Almeida Filho Cc: Alexander Viro , Christian Brauner , Kent Overstreet , Greg Kroah-Hartman , linux-fsdevel@vger.kernel.org, rust-for-linux@vger.kernel.org, Wedson Almeida Filho Subject: Re: [RFC PATCH 00/19] Rust abstractions for VFS Message-ID: References: <20231018122518.128049-1-wedsonaf@gmail.com> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Jan 09, 2024 at 03:25:11PM -0300, Wedson Almeida Filho wrote: > On Wed, 3 Jan 2024 at 22:49, Matthew Wilcox wrote: > > > What makes you characterize these filesystems as toys? The fact that > > > they only use the file's inode in iterate_shared? > > > > They're not real filesystems. You can't put, eg, root or your home > > directory on one of these filesystems. > > tarfs is a real file system, we use it to mount read-only container > layers on top of dm-verity for integrity. You're using it in production? Oh dear. > > > I'm trying to understand the argument here. Are saying that Rust > > > cannot have different APIs with the same performance characteristics > > > as C's, unless we also fix the C apis? > > > > > > That isn't even a requirement when introducing new C apis, why would > > > it be a requirement for Rust apis? > > > > I'm saying that we have the current object orientation (eg each inode > > is an object with inode methods) for a reason. Don't change it without > > understanding what that reason is. And moving, eg iterate_shared() from > > file_operations to struct file_system_type (effectively what you've done) > > is something we obviously wouldn't want to do. > > I don't think I'm changing anything. AFAICT, I'm adding a way to write > file systems in Rust. It uses the C API faithfully -- if you find ways > in which it doesn't, I'd be happy to fix them. You are changing the _object model_. The C API has separate objects for inodes, files, filesystems, superblocks, dentries, etc, etc. You've just smashed all of it together into a FileSystem which implements all of the inode, file, address_space, etc, etc ops. And this is the wrong approach.