Project

General

Profile

Bug #10853

spa_sync, vs_alloc can underflow and checkpoint test fixes

Added by Jerry Jelinek 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
2019-04-25
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

From ZoL
7558997 vs_alloc can underflow in L2ARC vdevs
8dc2197 Simplify spa_sync by breaking it up to smaller functions
db58794 Make zdb results for checkpoint tests consistent

Here are the commit msg summaries from ZoL:

vs_alloc can underflow in L2ARC vdevs
The current L2 ARC device code consistently uses psize to
increment vs_alloc but varies between psize and lsize when
decrementing it. The result of this behavior is that
vs_alloc can be decremented more that it is incremented
and underflow. This patch changes the code so asize is
used anywhere.
In addition, it ensures that vs_alloc gets incremented by
the L2 ARC device code as buffers are written and not at
the end of the l2arc_write_buffers() routine. The latter
(and old) way would temporarily underflow vs_alloc as
buffers that were just written, would be destroyed while
l2arc_write_buffers() was still looping.
Simplify spa_sync by breaking it up to smaller functions
The point of this refactoring is to break the high-level conceptual
steps of spa_sync() to their own helper functions. In general large
functions can enhance readability if structured well, but in this
case the amount of conceptual steps taken could use the help of
helper functions.
Make zdb results for checkpoint tests consistent
This patch exports and re-imports the pool when these tests are
analyzed with zdb to get consistent results.

History

#1

Updated by Electric Monk 4 months ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit 9740f25f0360eb7d9131fa15fabebf958bf19126

commit  9740f25f0360eb7d9131fa15fabebf958bf19126
Author: Serapheim Dimitropoulos <serapheim@delphix.com>
Date:   2019-05-16T12:59:16.000Z

    10853 spa_sync, vs_alloc can underflow and checkpoint test fixes
    Portions contributed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Matt Ahrens <mahrens@delphix.com>
    Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Reviewed by: George Melikov <mail@gmelikov.ru>
    Reviewed by: Kody Kantor <kody.kantor@joyent.com>
    Approved by: Gordon Ross <gwr@nexenta.com>

Also available in: Atom PDF