[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YKYYNVD+NsXaOFNe@infradead.org>
Date: Thu, 20 May 2021 09:05:09 +0100
From: Christoph Hellwig <hch@...radead.org>
To: colyli@...e.de
Cc: linux-bcache@...r.kernel.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org,
Diego Ercolani <diego.ercolani@...il.com>,
Jan Szubiak <jan.szubiak@...uxpolska.pl>,
Marco Rebhan <me@...saiko.net>,
Matthias Ferdinand <bcache@...dv.net>,
Thorsten Knabe <linux@...rsten-knabe.de>,
Victor Westerhuis <victor@...terhu.is>,
Vojtech Pavlik <vojtech@...e.cz>, stable@...r.kernel.org,
Takashi Iwai <tiwai@...e.com>,
Kent Overstreet <kent.overstreet@...il.com>
Subject: Re: [PATCH v3] bcache: avoid oversized read request in cache missing
code path
This fix is pretty gross. Adding pages to bios can fail for all kinds
of reasons, so the fix is to use bio_add_page and check its return
value, and if it needs another bio keep looping and chaining more bios.
And maybe capping the readahead to some sane upper bound still makes
sense, but it should never look at BIO_MAX_VECS for that.
Powered by blists - more mailing lists