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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7919C433FE for ; Wed, 18 May 2022 19:23:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241894AbiERTXb (ORCPT ); Wed, 18 May 2022 15:23:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241917AbiERTX3 (ORCPT ); Wed, 18 May 2022 15:23:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9B3B22DA04 for ; Wed, 18 May 2022 12:23:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2FF8161912 for ; Wed, 18 May 2022 19:23:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C923C34100; Wed, 18 May 2022 19:23:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652901797; bh=4IkUWqt05H3mspNzpAHNA//Q0t9+x8L7venXN8Yy1AQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Q/yMvGVJPqmt1uqdUfqz6l7Row1oRP3Zoc9dBaVlXlzcPlrYGZHdOnFwC/iZXaMF2 Fcf8wiq4jEfK33r178p3QLU06oHNRQhhQC8YpzBw/QR79cI+dAJ6rr07HKSOqN05g+ FM5FSfiQ3D4b7duJOsnjqTqfDPArQ97E1cMYCE07cMBi8Y2h+QD9j+lb/zXF0CCEmf mhNjjnXVlPje6JstXk9G+/RbmdjOhtFdRsdwt9ZF/nGgvFcP9WSfx8ubz6CjpNXR3K xaHPdWWr/gpRlSFB9SA0fZKtW2WGFTt+UcYArDETy1m5ZNAxP3xys1pKQoPloZYpRG 7lrZPE8Cs0aWg== Date: Wed, 18 May 2022 12:23:15 -0700 From: Eric Biggers To: Gabriel Krisman Bertazi Cc: tytso@mit.edu, adilger.kernel@dilger.ca, jaegeuk@kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel@collabora.com Subject: Re: [PATCH v5 6/8] ext4: Log error when lookup of encoded dentry fails Message-ID: References: <20220518172320.333617-1-krisman@collabora.com> <20220518172320.333617-7-krisman@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220518172320.333617-7-krisman@collabora.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, May 18, 2022 at 01:23:18PM -0400, Gabriel Krisman Bertazi wrote: > If the volume is in strict mode, ext4_ci_compare can report a broken > encoding name. This will not trigger on a bad lookup, which is caught > earlier, only if the actual disk name is bad. > > Signed-off-by: Gabriel Krisman Bertazi > > --- > > changes since v4: > - Reword error message (Eric) > > Changes since v1: > - reword error message "file in directory" -> "filename" (Eric) > --- > fs/ext4/namei.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c > index 98295b03a57c..8fbb35187f72 100644 > --- a/fs/ext4/namei.c > +++ b/fs/ext4/namei.c > @@ -1396,6 +1396,9 @@ static bool ext4_match(struct inode *parent, > * only case where it happens is on a disk > * corruption or ENOMEM. > */ > + if (ret == -EINVAL) > + EXT4_ERROR_INODE(parent, > + "Directory contains filename that is invalid UTF-8"); > return false; > } > return ret; Reviewed-by: Eric Biggers - Eric 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.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (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 BA728C433EF for ; Wed, 18 May 2022 19:23:26 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1nrPGY-0001fR-4E; Wed, 18 May 2022 19:23:25 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nrPGX-0001fL-5V for linux-f2fs-devel@lists.sourceforge.net; Wed, 18 May 2022 19:23:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; 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:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ZRrfDFz7KwTZ+d6tNCoIj1rebdSQPVoNWaqTlaP+8cw=; b=Y2mPt7SEK6EQOvRTd1RL/q+Jg2 W2vu7HFGWBEf0NcfCG4ux4uwW19F88CRS+uImU/RrdCKWewfSLIe26fTf6sebRqti+r4n/ZaX/cpw J1sTPjgUii0WjxnCXZ+WjHVgbFT/M1sqfdHPSfHb9gL+PkbCeONMqCvQ50AnlOPGWHfY=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; 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:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=ZRrfDFz7KwTZ+d6tNCoIj1rebdSQPVoNWaqTlaP+8cw=; b=GxtaqyjkYwMyLFnyVWplY/e1Ov j2DKLo1sjxDPeK3rEjTWvdW4FtvRpoQzSXAetFpHeLwGAZIN4a0BGtlMAkO4/lx2cRBXhU5hcHCuf ZuVsq56MLPAta22thsgdBW7qeYgita1xpUe9Btr2slCn54HjAdNWKvWj8eZVm2MbNOmI=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.94.2) id 1nrPGV-007Lm1-IX for linux-f2fs-devel@lists.sourceforge.net; Wed, 18 May 2022 19:23:24 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2BCE061909; Wed, 18 May 2022 19:23:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C923C34100; Wed, 18 May 2022 19:23:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652901797; bh=4IkUWqt05H3mspNzpAHNA//Q0t9+x8L7venXN8Yy1AQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Q/yMvGVJPqmt1uqdUfqz6l7Row1oRP3Zoc9dBaVlXlzcPlrYGZHdOnFwC/iZXaMF2 Fcf8wiq4jEfK33r178p3QLU06oHNRQhhQC8YpzBw/QR79cI+dAJ6rr07HKSOqN05g+ FM5FSfiQ3D4b7duJOsnjqTqfDPArQ97E1cMYCE07cMBi8Y2h+QD9j+lb/zXF0CCEmf mhNjjnXVlPje6JstXk9G+/RbmdjOhtFdRsdwt9ZF/nGgvFcP9WSfx8ubz6CjpNXR3K xaHPdWWr/gpRlSFB9SA0fZKtW2WGFTt+UcYArDETy1m5ZNAxP3xys1pKQoPloZYpRG 7lrZPE8Cs0aWg== Date: Wed, 18 May 2022 12:23:15 -0700 From: Eric Biggers To: Gabriel Krisman Bertazi Message-ID: References: <20220518172320.333617-1-krisman@collabora.com> <20220518172320.333617-7-krisman@collabora.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220518172320.333617-7-krisman@collabora.com> X-Headers-End: 1nrPGV-007Lm1-IX Subject: Re: [f2fs-dev] [PATCH v5 6/8] ext4: Log error when lookup of encoded dentry fails X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-ext4@vger.kernel.org, tytso@mit.edu, linux-f2fs-devel@lists.sourceforge.net, adilger.kernel@dilger.ca, jaegeuk@kernel.org, kernel@collabora.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Wed, May 18, 2022 at 01:23:18PM -0400, Gabriel Krisman Bertazi wrote: > If the volume is in strict mode, ext4_ci_compare can report a broken > encoding name. This will not trigger on a bad lookup, which is caught > earlier, only if the actual disk name is bad. > > Signed-off-by: Gabriel Krisman Bertazi > > --- > > changes since v4: > - Reword error message (Eric) > > Changes since v1: > - reword error message "file in directory" -> "filename" (Eric) > --- > fs/ext4/namei.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c > index 98295b03a57c..8fbb35187f72 100644 > --- a/fs/ext4/namei.c > +++ b/fs/ext4/namei.c > @@ -1396,6 +1396,9 @@ static bool ext4_match(struct inode *parent, > * only case where it happens is on a disk > * corruption or ENOMEM. > */ > + if (ret == -EINVAL) > + EXT4_ERROR_INODE(parent, > + "Directory contains filename that is invalid UTF-8"); > return false; > } > return ret; Reviewed-by: Eric Biggers - Eric _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel