Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754688AbdFWX0T (ORCPT ); Fri, 23 Jun 2017 19:26:19 -0400 Received: from imap.thunk.org ([74.207.234.97]:38496 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753849AbdFWX0S (ORCPT ); Fri, 23 Jun 2017 19:26:18 -0400 Date: Fri, 23 Jun 2017 19:26:16 -0400 From: "Theodore Ts'o" To: Khazhismel Kumykov Cc: Andreas Dilger , adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry Message-ID: <20170623232616.r3ffksjntjfbrzgb@thunk.org> Mail-Followup-To: Theodore Ts'o , Khazhismel Kumykov , Andreas Dilger , adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org References: <20170622232307.48392-1-khazhy@google.com> <20170623044314.7f23ighkelnpgnah@thunk.org> <204110E6-EECE-4925-9020-EC6D9633C822@dilger.ca> <20170623122603.jmvyw4oqkojcapv3@thunk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1514 Lines: 30 On Fri, Jun 23, 2017 at 03:33:46PM -0700, Khazhismel Kumykov wrote: > > Giving up early or checking future blocks both work, critical thing > here is not returning NULL after seeing a read error. > Previously to this the behavior was to continue to check future blocks > after a read error, and it seemed OK. Whether or not it is OK probably depends on how big the directory is. If we need to suffer through N long error retries, whether it is caused by long SCSI error retries, or long iSCSI error retries, sooner or later it's going to be problematic if the process which is taking forever to search through the whole directory has a some kind health monitoring service or other watchdog timer. Still, I agree that there will be some cases where instead of "Fast fail", having the file server try as hard as possible fetch the file from the failing disk is worthwhile. I tend to be focused on the cluster file system case where if it's going to several hundred milliseconds to fetch the file, you're better off getting it from the one other replicated copies from another server, or start the reed-solomon reconstruction from. However, if you have an architecture where the only copy of the file is on the particular file server (perhaps because you are depending on RAID instead of n=3 replication or reed-solomon erasure codes), having the file server try as hard as possible to find the file is a good thing. I wonder if the right answer is to have "fastfail" and "nofastfail" mount option. - Ted