On Fri, Jun 23, 2017 at 2:36 PM, Andreas Dilger <adilger@xxxxxxxxx> wrote: > On Jun 23, 2017, at 6:26 AM, Theodore Ts'o <tytso@xxxxxxx> wrote: >> >> The problem is that if we continue, successive reads may all take >> seconds or minutes to fail, thus tieing up the process for a long >> time. > > Sorry, I don't understand where the seconds or minutes of delay come from? > Is that because of long SCSI retries in the block layer, or in the disk > itself, or something caused specifically because of this code? For a networked block device we may be retrying for a while before giving up, although this also applies to the initial failed read. > >> By returning EIO right away, we can "fast fail". > > But it seems like you don't necessarily need to fail at all? Something like the > following would return an error if the entry is not found, but still search the > rest of the leaf blocks (if any) before giving up: > 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. Khazhy
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature