mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-13 19:50:25 +03:00
Add HAVE_SCANSTAMP
This functionality is not supported under Linux, perhaps it will be some day if it's decided it's useful.
This commit is contained in:
parent
872e8d2697
commit
72d5e2da3e
@ -67,7 +67,6 @@ sa_attr_reg_t zfs_attr_table[ZPL_END+1] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef _KERNEL
|
#ifdef _KERNEL
|
||||||
#ifdef HAVE_ZPL
|
|
||||||
int
|
int
|
||||||
zfs_sa_readlink(znode_t *zp, uio_t *uio)
|
zfs_sa_readlink(znode_t *zp, uio_t *uio)
|
||||||
{
|
{
|
||||||
@ -119,6 +118,7 @@ zfs_sa_symlink(znode_t *zp, char *link, int len, dmu_tx_t *tx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_SCANSTAMP
|
||||||
void
|
void
|
||||||
zfs_sa_get_scanstamp(znode_t *zp, xvattr_t *xvap)
|
zfs_sa_get_scanstamp(znode_t *zp, xvattr_t *xvap)
|
||||||
{
|
{
|
||||||
@ -183,6 +183,7 @@ zfs_sa_set_scanstamp(znode_t *zp, xvattr_t *xvap, dmu_tx_t *tx)
|
|||||||
&zp->z_pflags, sizeof (uint64_t), tx));
|
&zp->z_pflags, sizeof (uint64_t), tx));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* HAVE_SCANSTAMP */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* I'm not convinced we should do any of this upgrade.
|
* I'm not convinced we should do any of this upgrade.
|
||||||
@ -205,7 +206,9 @@ zfs_sa_upgrade(sa_handle_t *hdl, dmu_tx_t *tx)
|
|||||||
uint64_t uid, gid, mode, rdev, xattr, parent;
|
uint64_t uid, gid, mode, rdev, xattr, parent;
|
||||||
uint64_t crtime[2], mtime[2], ctime[2];
|
uint64_t crtime[2], mtime[2], ctime[2];
|
||||||
zfs_acl_phys_t znode_acl;
|
zfs_acl_phys_t znode_acl;
|
||||||
|
#ifdef HAVE_SCANSTAMP
|
||||||
char scanstamp[AV_SCANSTAMP_SZ];
|
char scanstamp[AV_SCANSTAMP_SZ];
|
||||||
|
#endif /* HAVE_SCANSTAMP */
|
||||||
boolean_t drop_lock = B_FALSE;
|
boolean_t drop_lock = B_FALSE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -293,6 +296,7 @@ zfs_sa_upgrade(sa_handle_t *hdl, dmu_tx_t *tx)
|
|||||||
SA_ADD_BULK_ATTR(sa_attrs, count, SA_ZPL_XATTR(zfsvfs),
|
SA_ADD_BULK_ATTR(sa_attrs, count, SA_ZPL_XATTR(zfsvfs),
|
||||||
NULL, &xattr, 8);
|
NULL, &xattr, 8);
|
||||||
|
|
||||||
|
#ifdef HAVE_SCANSTAMP
|
||||||
/* if scanstamp then add scanstamp */
|
/* if scanstamp then add scanstamp */
|
||||||
|
|
||||||
if (zp->z_pflags & ZFS_BONUS_SCANSTAMP) {
|
if (zp->z_pflags & ZFS_BONUS_SCANSTAMP) {
|
||||||
@ -302,6 +306,7 @@ zfs_sa_upgrade(sa_handle_t *hdl, dmu_tx_t *tx)
|
|||||||
NULL, scanstamp, AV_SCANSTAMP_SZ);
|
NULL, scanstamp, AV_SCANSTAMP_SZ);
|
||||||
zp->z_pflags &= ~ZFS_BONUS_SCANSTAMP;
|
zp->z_pflags &= ~ZFS_BONUS_SCANSTAMP;
|
||||||
}
|
}
|
||||||
|
#endif /* HAVE_SCANSTAMP */
|
||||||
|
|
||||||
VERIFY(dmu_set_bonustype(db, DMU_OT_SA, tx) == 0);
|
VERIFY(dmu_set_bonustype(db, DMU_OT_SA, tx) == 0);
|
||||||
VERIFY(sa_replace_all_by_template_locked(hdl, sa_attrs,
|
VERIFY(sa_replace_all_by_template_locked(hdl, sa_attrs,
|
||||||
@ -331,5 +336,4 @@ zfs_sa_upgrade_txholds(dmu_tx_t *tx, znode_t *zp)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAVE_ZPL */
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user