Message ID | 1467998504-15744-20-git-send-email-kwolf@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 07/08/2016 11:21 AM, Kevin Wolf wrote: > Commit implemented the 'enospc' policy as 'ignore' if the error was not Was there supposed to be a commit id in this sentence? > ENOSPC. The QAPI documentation promises that it's treated as 'stop'. > Using the common block job error handling function fixes this and also > adds the missing QMP event. > > Signed-off-by: Kevin Wolf <kwolf@redhat.com> > Reviewed-by: Max Reitz <mreitz@redhat.com> > ---
Am 08.07.2016 um 23:36 hat Eric Blake geschrieben: > On 07/08/2016 11:21 AM, Kevin Wolf wrote: > > Commit implemented the 'enospc' policy as 'ignore' if the error was not > > Was there supposed to be a commit id in this sentence? Yes. Or well, I intended to put a commit id there, but it's really since live commit was first merged in 747ff602. Anyway, too late (I pulled Max's tree, so I can't rebase any more), and it's easy enough to figure this out with git blame. Kevin
On 11/07/2016 13:22, Kevin Wolf wrote: >>> > > Commit implemented the 'enospc' policy as 'ignore' if the error was not >> > >> > Was there supposed to be a commit id in this sentence? > Yes. Or well, I intended to put a commit id there, but it's really since > live commit was first merged in 747ff602. Curious, I read it as "[The commit block job] implemented the 'enospc' policy as 'ignore'"! Paolo > Anyway, too late (I pulled Max's tree, so I can't rebase any more), and > it's easy enough to figure this out with git blame.
On 11.07.2016 13:22, Kevin Wolf wrote: > Am 08.07.2016 um 23:36 hat Eric Blake geschrieben: >> On 07/08/2016 11:21 AM, Kevin Wolf wrote: >>> Commit implemented the 'enospc' policy as 'ignore' if the error was not >> >> Was there supposed to be a commit id in this sentence? > > Yes. Or well, I intended to put a commit id there, but it's really since > live commit was first merged in 747ff602. Well, I read it the same as Paolo, so I think it can very well stay as it is. > Anyway, too late (I pulled Max's tree, so I can't rebase any more), Don't say that. :-P Max > and > it's easy enough to figure this out with git blame. > > Kevin >
Am 11.07.2016 um 13:40 hat Paolo Bonzini geschrieben: > > > On 11/07/2016 13:22, Kevin Wolf wrote: > >>> > > Commit implemented the 'enospc' policy as 'ignore' if the error was not > >> > > >> > Was there supposed to be a commit id in this sentence? > > Yes. Or well, I intended to put a commit id there, but it's really since > > live commit was first merged in 747ff602. > > Curious, I read it as "[The commit block job] implemented the 'enospc' > policy as 'ignore'"! Ah, yes, I guess that's what I meant then. Makes a lot more sense than referring to a commit when the bug has always existed. There was a full weekend between writing this and replying to Eric, if that works as an excuse for misunderstanding my own commit message. ;-) Kevin
diff --git a/block/commit.c b/block/commit.c index 8b534d7..5d11eb6 100644 --- a/block/commit.c +++ b/block/commit.c @@ -171,9 +171,9 @@ wait: bytes_written += n * BDRV_SECTOR_SIZE; } if (ret < 0) { - if (s->on_error == BLOCKDEV_ON_ERROR_STOP || - s->on_error == BLOCKDEV_ON_ERROR_REPORT|| - (s->on_error == BLOCKDEV_ON_ERROR_ENOSPC && ret == -ENOSPC)) { + BlockErrorAction action = + block_job_error_action(&s->common, false, s->on_error, -ret); + if (action == BLOCK_ERROR_ACTION_REPORT) { goto out; } else { n = 0;