github.com/cockroachdb/pebble@v1.1.5/testdata/mkdir_all_and_sync_parents (about)

     1  mkfs memfs fs=mem1
     2  ----
     3  new memfs
     4  
     5  mkdir-all-and-sync-parents fs=mem1 path=foo/bar/baz/bax
     6  ----
     7  mkdir-all: foo/bar/baz/bax 0755
     8  open-dir: foo/bar/baz
     9  sync: foo/bar/baz
    10  close: foo/bar/baz
    11  open-dir: foo/bar
    12  sync: foo/bar
    13  close: foo/bar
    14  open-dir: foo
    15  sync: foo
    16  close: foo
    17  open-dir: .
    18  sync: .
    19  close: .
    20  open-dir: foo/bar/baz/bax
    21  close: foo/bar/baz/bax
    22  
    23  # Repeating the same command should only sync the parent, and then the new data
    24  # directory itself.
    25  
    26  mkdir-all-and-sync-parents fs=mem1 path=foo/bar/baz/bax
    27  ----
    28  mkdir-all: foo/bar/baz/bax 0755
    29  open-dir: foo/bar/baz
    30  sync: foo/bar/baz
    31  close: foo/bar/baz
    32  open-dir: foo/bar/baz/bax
    33  close: foo/bar/baz/bax
    34  
    35  mkfs fs=default1
    36  ----
    37  new default fs
    38  
    39  mkdir-all-and-sync-parents fs=default1 path=foo/bar/baz/bax
    40  ----
    41  mkdir-all: foo/bar/baz/bax 0755
    42  open-dir: foo/bar/baz
    43  sync: foo/bar/baz
    44  close: foo/bar/baz
    45  open-dir: foo/bar
    46  sync: foo/bar
    47  close: foo/bar
    48  open-dir: foo
    49  sync: foo
    50  close: foo
    51  open-dir: .
    52  sync: .
    53  close: .
    54  open-dir: foo/bar/baz/bax
    55  close: foo/bar/baz/bax
    56  
    57  # Repeating the same command should only sync the parent, and then the new data
    58  # directory itself.
    59  
    60  mkdir-all-and-sync-parents fs=default1 path=foo/bar/baz/bax
    61  ----
    62  mkdir-all: foo/bar/baz/bax 0755
    63  open-dir: foo/bar/baz
    64  sync: foo/bar/baz
    65  close: foo/bar/baz
    66  open-dir: foo/bar/baz/bax
    67  close: foo/bar/baz/bax