Re: [PATCH] Always report a writeback error once

2018-04-24 Thread Jeff Layton
On Mon, 2018-04-23 at 13:42 -0700, Matthew Wilcox wrote: > The errseq_t infrastructure assumes that errors which occurred before > the file descriptor was opened are of no interest to the application. > This turns out to be a regression for some applications, notably Postgres. > > Before

Re: [PATCH] Always report a writeback error once

2018-04-24 Thread Jeff Layton
On Mon, 2018-04-23 at 13:42 -0700, Matthew Wilcox wrote: > The errseq_t infrastructure assumes that errors which occurred before > the file descriptor was opened are of no interest to the application. > This turns out to be a regression for some applications, notably Postgres. > > Before

Re: [PATCH] Always report a writeback error once

2018-04-23 Thread Andres Freund
On 2018-04-23 14:51:50 -0700, Matthew Wilcox wrote: > How does this look? > > @@ -111,27 +111,22 @@ EXPORT_SYMBOL(errseq_set); > * errseq_sample() - Grab current errseq_t value. > * @eseq: Pointer to errseq_t to be sampled. > * > - * This function allows callers to sample an errseq_t value,

Re: [PATCH] Always report a writeback error once

2018-04-23 Thread Andres Freund
On 2018-04-23 14:51:50 -0700, Matthew Wilcox wrote: > How does this look? > > @@ -111,27 +111,22 @@ EXPORT_SYMBOL(errseq_set); > * errseq_sample() - Grab current errseq_t value. > * @eseq: Pointer to errseq_t to be sampled. > * > - * This function allows callers to sample an errseq_t value,

Re: [PATCH] Always report a writeback error once

2018-04-23 Thread Matthew Wilcox
On Mon, Apr 23, 2018 at 02:43:48PM -0700, Matthew Wilcox wrote: > On Mon, Apr 23, 2018 at 01:57:30PM -0700, Andres Freund wrote: > > On 2018-04-23 13:42:08 -0700, Matthew Wilcox wrote: > > > @@ -119,19 +119,11 @@ EXPORT_SYMBOL(errseq_set); > > > errseq_t errseq_sample(errseq_t *eseq) > > > { > >

Re: [PATCH] Always report a writeback error once

2018-04-23 Thread Matthew Wilcox
On Mon, Apr 23, 2018 at 02:43:48PM -0700, Matthew Wilcox wrote: > On Mon, Apr 23, 2018 at 01:57:30PM -0700, Andres Freund wrote: > > On 2018-04-23 13:42:08 -0700, Matthew Wilcox wrote: > > > @@ -119,19 +119,11 @@ EXPORT_SYMBOL(errseq_set); > > > errseq_t errseq_sample(errseq_t *eseq) > > > { > >

Re: [PATCH] Always report a writeback error once

2018-04-23 Thread Andres Freund
On 2018-04-23 14:43:48 -0700, Matthew Wilcox wrote: > On Mon, Apr 23, 2018 at 01:57:30PM -0700, Andres Freund wrote: > > I've never really looked at this code in any depth before, but won't > > this potentially lead to the same error being reported on multiple FDs? > > Imagine two fds (potentially

Re: [PATCH] Always report a writeback error once

2018-04-23 Thread Andres Freund
On 2018-04-23 14:43:48 -0700, Matthew Wilcox wrote: > On Mon, Apr 23, 2018 at 01:57:30PM -0700, Andres Freund wrote: > > I've never really looked at this code in any depth before, but won't > > this potentially lead to the same error being reported on multiple FDs? > > Imagine two fds (potentially

Re: [PATCH] Always report a writeback error once

2018-04-23 Thread Matthew Wilcox
On Mon, Apr 23, 2018 at 01:57:30PM -0700, Andres Freund wrote: > On 2018-04-23 13:42:08 -0700, Matthew Wilcox wrote: > > @@ -119,19 +119,11 @@ EXPORT_SYMBOL(errseq_set); > > errseq_t errseq_sample(errseq_t *eseq) > > { > > There's a comment above this: > * > * This function allows callers to

Re: [PATCH] Always report a writeback error once

2018-04-23 Thread Matthew Wilcox
On Mon, Apr 23, 2018 at 01:57:30PM -0700, Andres Freund wrote: > On 2018-04-23 13:42:08 -0700, Matthew Wilcox wrote: > > @@ -119,19 +119,11 @@ EXPORT_SYMBOL(errseq_set); > > errseq_t errseq_sample(errseq_t *eseq) > > { > > There's a comment above this: > * > * This function allows callers to

Re: [PATCH] Always report a writeback error once

2018-04-23 Thread Andres Freund
Hi, On 2018-04-23 13:42:08 -0700, Matthew Wilcox wrote: > The errseq_t infrastructure assumes that errors which occurred before > the file descriptor was opened are of no interest to the application. > This turns out to be a regression for some applications, notably Postgres. > > Before

Re: [PATCH] Always report a writeback error once

2018-04-23 Thread Andres Freund
Hi, On 2018-04-23 13:42:08 -0700, Matthew Wilcox wrote: > The errseq_t infrastructure assumes that errors which occurred before > the file descriptor was opened are of no interest to the application. > This turns out to be a regression for some applications, notably Postgres. > > Before

[PATCH] Always report a writeback error once

2018-04-23 Thread Matthew Wilcox
The errseq_t infrastructure assumes that errors which occurred before the file descriptor was opened are of no interest to the application. This turns out to be a regression for some applications, notably Postgres. Before errseq_t, a writeback error would be reported exactly once (as long as the

[PATCH] Always report a writeback error once

2018-04-23 Thread Matthew Wilcox
The errseq_t infrastructure assumes that errors which occurred before the file descriptor was opened are of no interest to the application. This turns out to be a regression for some applications, notably Postgres. Before errseq_t, a writeback error would be reported exactly once (as long as the