Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754594AbdFWG7T (ORCPT ); Fri, 23 Jun 2017 02:59:19 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:34523 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754467AbdFWG7R (ORCPT ); Fri, 23 Jun 2017 02:59:17 -0400 Content-Type: text/plain; charset=us-ascii From: Andreas Dilger Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry Date: Fri, 23 Jun 2017 00:33:02 -0600 Message-Id: <204110E6-EECE-4925-9020-EC6D9633C822@dilger.ca> References: <20170622232307.48392-1-khazhy@google.com> <20170623044314.7f23ighkelnpgnah@thunk.org> Cc: Khazhismel Kumykov , adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20170623044314.7f23ighkelnpgnah@thunk.org> To: "Theodore Ts'o" X-Mailer: iPhone Mail (14F89) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v5N6xRqW005705 Content-Length: 708 Lines: 16 On Jun 22, 2017, at 22:43, Theodore Ts'o wrote: > >> On Thu, Jun 22, 2017 at 04:23:07PM -0700, Khazhismel Kumykov wrote: >> Previously, a read error would be ignored and we would eventually return >> NULL from ext4_find_entry, which signals "no such file or directory". We >> should be returning EIO. >> >> Signed-off-by: Khazhismel Kumykov > > Thanks, applied. I don't necessarily agree that this is an improvement. If the requested entry is not in the bad block, this will return an error even if the file name could be found in another block. It would be better to save the error until the end and only return -EIO if the entry cannot be found. Cheers, Andreas