Re: [PATCH v2 02/11] reftable: handle interrupted reads
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Dec 11, 2023, 09:08 UTC
- Message-ID
- <ZXbRir8Nnc3mMIoF@tanuki>
- In-Reply-To
- <ZXOK2o0jTgLmxPWZ@nand.local>
On Fri, Dec 08, 2023 at 04:30:02PM -0500, Taylor Blau wrote:
Show 6 quoted lines
> On Fri, Dec 08, 2023 at 03:53:02PM +0100, Patrick Steinhardt wrote: > > There are calls to pread(3P) and read(3P) where we don't properly handle > > interrupts. Convert them to use `pread_in_full()` and `read_in_full()`, > > Just checking... do you mean "interrupt" in the kernel sense? Or are you > referring to the possibility of short reads/writes (in later patches)?
Both. The callsites I'm converting are explicitly checking that they get the exact number of requested bytes. That means that we'll have to loop both around EINTR/EAGAIN, but also around short reads.
Patrick