From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BB5FDC3ABCB for ; Mon, 16 Sep 2024 18:51:10 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4X6vBh5XNqz2yZN for ; Tue, 17 Sep 2024 04:51:08 +1000 (AEST) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=139.178.84.217 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1726512663; cv=none; b=R9MiJIq6TW2KpxgWFAKKmVC1HWzao532KLBTR9rfz8iLll21oarFTmtRcVQTlfOwH8omm20cdvH3OW8lFDZZDESnjF3Py409vNMMW6ySQm0I2WvPZycaBPF0npeFat16mqcW6qFSjHdGjVY/i80p+2QETTQYxyJrDCH7WMcvlkhpnL8cMwPDD9RPQX/i+O2I2g+Y6MMft2vswBHrbw+m1aYdOp1g6CnAyTHUMQJkdcL5F4d7+g6sXKp+rH47DP1dazuyn8uv4YkGiAkIb9+wQJXMWczu6NAvfIK82E8unHG/S19vbym6yJy813H5gbd3gTepSoLaIjzTINtS0rJhbA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1726512663; c=relaxed/relaxed; bh=adUp/sdNh0NB4Ae6rE8BvvXgKSjUbI0UwzPmTNj4k88=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=G3LlVEx/J3TwNlUO6rHN9kXbp5sDq86F/dD5mbsNYXkYqCO99atybs4B1rgYwcpJ8iOexnz0q/OYsjR+bl07WHtMeNvdsQdjaS76yrnze4m7oGZSFNu934Tk35N+EOu+fqIvsbXdAeClrTT30n9OuB8fr3yePqvmNL5UvUP7w9uRcyIJiICnKMg+YqtMyU27jZLx5Gxp4Yion1uM+VEwEhbcUjoaEWTQdWUmeq7YK+TKy7cPvHGl658jBJIvD+A8cFJdsjMkbTIykr1t5jJSHwfpROggDg8IaRCHMNEtqWv6sZ8zOyJBNKxhpumnYPMzvdra0NpdA2mUhP//hwZ9fg== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; dkim=pass (1024-bit key; unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=S6yD6dTj; dkim-atps=neutral; spf=pass (client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=gregkh@linuxfoundation.org; receiver=lists.ozlabs.org) smtp.mailfrom=linuxfoundation.org Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=S6yD6dTj; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linuxfoundation.org (client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=gregkh@linuxfoundation.org; receiver=lists.ozlabs.org) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4X6vBZ467Pz2xjh for ; Tue, 17 Sep 2024 04:51:01 +1000 (AEST) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 3AB225C5CB2; Mon, 16 Sep 2024 18:50:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DBDDC4CEC4; Mon, 16 Sep 2024 18:50:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1726512658; bh=UIh1dpfLpZcsRwWvhy2J3nv47RD0JA14+2b7Tr05Khw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S6yD6dTjgIAue8lwjRCRxC2lsU1jDpa630eA+sYkenHs5MViz8+wv1R/FgEZkEIn2 ffRp79MrTCImoaNu/rRbRY8G9v8GZ3B+e5jpdN0DsuEJm00Xwcbd/cfpoysa3rlV1E Ke0x6NlsJNOtiShGQ/BdvUd/ZrQgrxefxeiU/f0I= Date: Mon, 16 Sep 2024 19:51:40 +0200 From: Greg KH To: Yiyang Wu Subject: Re: [RFC PATCH 03/24] erofs: add Errno in Rust Message-ID: <2024091602-bannister-giddy-0d6e@gregkh> References: <20240916135634.98554-1-toolmanp@tlmp.cc> <20240916135634.98554-4-toolmanp@tlmp.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240916135634.98554-4-toolmanp@tlmp.cc> X-BeenThere: linux-erofs@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development of Linux EROFS file system List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fsdevel@vger.kernel.org, linux-erofs@lists.ozlabs.org, LKML , rust-for-linux@vger.kernel.org Errors-To: linux-erofs-bounces+linux-erofs=archiver.kernel.org@lists.ozlabs.org Sender: "Linux-erofs" On Mon, Sep 16, 2024 at 09:56:13PM +0800, Yiyang Wu wrote: > Introduce Errno to Rust side code. Note that in current Rust For Linux, > Errnos are implemented as core::ffi::c_uint unit structs. > However, EUCLEAN, a.k.a EFSCORRUPTED is missing from error crate. > > Since the errno_base hasn't changed for over 13 years, > This patch merely serves as a temporary workaround for the missing > errno in the Rust For Linux. Why not just add the missing errno to the core rust code instead? No need to define a whole new one for this. thanks, greg k-h From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DBECF15CD64; Mon, 16 Sep 2024 18:50:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726512659; cv=none; b=tocnDyyFa/WhfAZ7LjElmOxjB0IxTjHaE+JgPsDYHdc4cuyDm5DTNGQOKIt+WkUppRHmrB2qDu91MFxayFXpESL0tFfDpkgb2ZTn/jQGyPfoHB1PK9y5c4BZKag8h/HL7Rqko/oj/CLr2zXwPEhODQE4U2pgqiVieF2vaQH9sa0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726512659; c=relaxed/simple; bh=UIh1dpfLpZcsRwWvhy2J3nv47RD0JA14+2b7Tr05Khw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N93X28ik1Bn4zT8k0coHKNRMTBwxI3oifx0cD/K1jcIMZ4rMG4yQmJQxKprIr4J7jQ3JyilDHm/V0tsE0h3X7uagc6/qDtfpY08QeVZ8g46WxtjRq4oY5ix7/ZGvDXP2dMMfEj113J3NuqXde3XEFtgPrZgTbaCdiKNh3x8bpDI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=S6yD6dTj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="S6yD6dTj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DBDDC4CEC4; Mon, 16 Sep 2024 18:50:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1726512658; bh=UIh1dpfLpZcsRwWvhy2J3nv47RD0JA14+2b7Tr05Khw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S6yD6dTjgIAue8lwjRCRxC2lsU1jDpa630eA+sYkenHs5MViz8+wv1R/FgEZkEIn2 ffRp79MrTCImoaNu/rRbRY8G9v8GZ3B+e5jpdN0DsuEJm00Xwcbd/cfpoysa3rlV1E Ke0x6NlsJNOtiShGQ/BdvUd/ZrQgrxefxeiU/f0I= Date: Mon, 16 Sep 2024 19:51:40 +0200 From: Greg KH To: Yiyang Wu Cc: linux-erofs@lists.ozlabs.org, rust-for-linux@vger.kernel.org, linux-fsdevel@vger.kernel.org, LKML Subject: Re: [RFC PATCH 03/24] erofs: add Errno in Rust Message-ID: <2024091602-bannister-giddy-0d6e@gregkh> References: <20240916135634.98554-1-toolmanp@tlmp.cc> <20240916135634.98554-4-toolmanp@tlmp.cc> Precedence: bulk X-Mailing-List: rust-for-linux@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: <20240916135634.98554-4-toolmanp@tlmp.cc> On Mon, Sep 16, 2024 at 09:56:13PM +0800, Yiyang Wu wrote: > Introduce Errno to Rust side code. Note that in current Rust For Linux, > Errnos are implemented as core::ffi::c_uint unit structs. > However, EUCLEAN, a.k.a EFSCORRUPTED is missing from error crate. > > Since the errno_base hasn't changed for over 13 years, > This patch merely serves as a temporary workaround for the missing > errno in the Rust For Linux. Why not just add the missing errno to the core rust code instead? No need to define a whole new one for this. thanks, greg k-h