diff options
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/zfs_sa.c | 13 | ||||
-rw-r--r-- | module/zfs/zpl_xattr.c | 6 |
2 files changed, 17 insertions, 2 deletions
diff --git a/module/zfs/zfs_sa.c b/module/zfs/zfs_sa.c index 08e881cc3..3eff6acc6 100644 --- a/module/zfs/zfs_sa.c +++ b/module/zfs/zfs_sa.c @@ -248,8 +248,17 @@ zfs_sa_set_xattr(znode_t *zp) if (error) { dmu_tx_abort(tx); } else { - VERIFY0(sa_update(zp->z_sa_hdl, SA_ZPL_DXATTR(zfsvfs), - obj, size, tx)); + int count = 0; + sa_bulk_attr_t bulk[2]; + uint64_t ctime[2]; + + zfs_tstamp_update_setup(zp, STATE_CHANGED, NULL, ctime); + SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_DXATTR(zfsvfs), + NULL, obj, size); + SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_CTIME(zfsvfs), + NULL, &ctime, 16); + VERIFY0(sa_bulk_update(zp->z_sa_hdl, bulk, count, tx)); + dmu_tx_commit(tx); } out_free: diff --git a/module/zfs/zpl_xattr.c b/module/zfs/zpl_xattr.c index d3bb4bbf8..0c626b122 100644 --- a/module/zfs/zpl_xattr.c +++ b/module/zfs/zpl_xattr.c @@ -495,6 +495,12 @@ zpl_xattr_set_dir(struct inode *ip, const char *name, const void *value, error = wrote; out: + + if (error == 0) { + ip->i_ctime = current_time(ip); + zfs_mark_inode_dirty(ip); + } + if (vap) kmem_free(vap, sizeof (vattr_t)); |