Print this page
3740 Poor ZFS send / receive performance due to snapshot hold / release processing
Submitted by: Steven Hartland <steven.hartland@multiplay.co.uk>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/zfs/zfs_main.c
          +++ new/usr/src/cmd/zfs/zfs_main.c
↓ open down ↓ 5156 lines elided ↑ open up ↑
5157 5157                  (void) strncpy(parent, path, delim - path);
5158 5158                  parent[delim - path] = '\0';
5159 5159  
5160 5160                  zhp = zfs_open(g_zfs, parent,
5161 5161                      ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME);
5162 5162                  if (zhp == NULL) {
5163 5163                          ++errors;
5164 5164                          continue;
5165 5165                  }
5166 5166                  if (holding) {
5167      -                        if (zfs_hold(zhp, delim+1, tag, recursive,
5168      -                            B_FALSE, -1) != 0)
     5167 +                        if (zfs_hold(zhp, delim+1, tag, recursive, -1) != 0)
5169 5168                                  ++errors;
5170 5169                  } else {
5171 5170                          if (zfs_release(zhp, delim+1, tag, recursive) != 0)
5172 5171                                  ++errors;
5173 5172                  }
5174 5173                  zfs_close(zhp);
5175 5174          }
5176 5175  
5177 5176          return (errors != 0);
5178 5177  }
↓ open down ↓ 1436 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX