On 01/29/2018 01:04 PM, Randy Dunlap wrote: > On 01/29/2018 06:57 AM, Goldwyn Rodrigues wrote: >> From: Goldwyn Rodrigues <rgoldwyn@xxxxxxxx> >> > >> diff --git a/Documentation/sysctl/fs.txt b/Documentation/sysctl/fs.txt >> index 6c00c1e2743f..72e213d62511 100644 >> --- a/Documentation/sysctl/fs.txt >> +++ b/Documentation/sysctl/fs.txt >> @@ -76,6 +77,19 @@ dcache isn't pruned yet. >> >> ============================================================== >> >> +dio_short_writes: >> + >> +In case Direct I/O encounters an transient error, it returns > > a transient > >> +the errorcode, even if it has performed part of the write. > > error code, > >> +This flag, if on (default), will return the number of bytes written >> +so far, as the write(2) symantics are. However, some older applications > > semantics > >> +still consider a direct write as an error if all of the I/O >> +submitted is not complete. ie write(file, count, buf) != count. > > I.e. > >> +This option can be disabled on systems in order to support >> +existing applications which do not expect short writes. Thanks for the comments. I will incorporate the language changes. > > and if my system has a mix of older applications and new ones, > will they all work just fine? > Newer applications should treat the error as nothing is written. But yes, I tried doing it through prctl for an individual processes, but did not find a free bit to stick it in. -- Goldwyn