Print this page
ZoL PR 9145

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/zfs_replay.c
          +++ new/usr/src/uts/common/fs/zfs/zfs_replay.c
↓ open down ↓ 327 lines elided ↑ open up ↑
 328  328           * eventually end up in zfs_mknode(), which assigns the object's
 329  329           * creation time, generation number, and dnode size. The generic
 330  330           * zfs_create() has no concept of these attributes, so we smuggle
 331  331           * the values inside the vattr's otherwise unused va_ctime,
 332  332           * va_nblocks, and va_fsid fields.
 333  333           */
 334  334          ZFS_TIME_DECODE(&xva.xva_vattr.va_ctime, lr->lr_crtime);
 335  335          xva.xva_vattr.va_nblocks = lr->lr_gen;
 336  336          xva.xva_vattr.va_fsid = dnodesize;
 337  337  
 338      -        error = dmu_object_info(zfsvfs->z_os, lr->lr_foid, NULL);
 339      -        if (error != ENOENT)
      338 +        error = dnode_try_claim(zfsvfs->z_os, objid, dnodesize >> DNODE_SHIFT);
      339 +        if (error)
 340  340                  goto bail;
 341  341  
 342  342          if (lr->lr_common.lrc_txtype & TX_CI)
 343  343                  vflg |= FIGNORECASE;
 344  344          switch (txtype) {
 345  345          case TX_CREATE_ACL:
 346  346                  aclstart = (caddr_t)(lracl + 1);
 347  347                  fuidstart = (caddr_t)aclstart +
 348  348                      ZIL_ACE_LENGTH(lracl->lr_acl_bytes);
 349  349                  zfsvfs->z_fuid_replay = zfs_replay_fuids(fuidstart,
↓ open down ↓ 112 lines elided ↑ open up ↑
 462  462           * eventually end up in zfs_mknode(), which assigns the object's
 463  463           * creation time, generation number, and dnode slot count. The
 464  464           * generic zfs_create() has no concept of these attributes, so
 465  465           * we smuggle the values inside the vattr's otherwise unused
 466  466           * va_ctime, va_nblocks and va_fsid fields.
 467  467           */
 468  468          ZFS_TIME_DECODE(&xva.xva_vattr.va_ctime, lr->lr_crtime);
 469  469          xva.xva_vattr.va_nblocks = lr->lr_gen;
 470  470          xva.xva_vattr.va_fsid = dnodesize;
 471  471  
 472      -        error = dmu_object_info(zfsvfs->z_os, objid, NULL);
 473      -        if (error != ENOENT)
      472 +        error = dnode_try_claim(zfsvfs->z_os, objid, dnodesize >> DNODE_SHIFT);
      473 +        if (error)
 474  474                  goto out;
 475  475  
 476  476          if (lr->lr_common.lrc_txtype & TX_CI)
 477  477                  vflg |= FIGNORECASE;
 478  478  
 479  479          /*
 480  480           * Symlinks don't have fuid info, and CIFS never creates
 481  481           * symlinks.
 482  482           *
 483  483           * The _ATTR versions will grab the fuid info in their subcases.
↓ open down ↓ 493 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX