From d48d1d811ad512a38a5eaee798b1309321d4a63d Mon Sep 17 00:00:00 2001 From: Nathaniel Clark Date: Tue, 23 Jul 2013 13:38:31 -0400 Subject: [PATCH] LU-3584 osd-zfs: error check dmu_tx_hold_sa Add extra error checking around call to dmu_tx_hold_sa to ensure that it succeeds. Update lbuild target to include necessary zfs fixes (update to version 0.6.2) Test-Parameters: testlist=racer mdsfilesystemtype=zfs mdtfilesystemtype=zfs ostfilesystemtype=zfs Signed-off-by: Nathaniel Clark Change-Id: Id9dd9aed5a50a3b6febdddcbcc0d238229bb031f Reviewed-on: http://review.whamcloud.com/7090 Reviewed-by: Li Wei Tested-by: Hudson Reviewed-by: Mike Pershin Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Alex Zhuravlev --- contrib/lbuild/lbuild | 4 ++-- lustre/osd-zfs/osd_object.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/contrib/lbuild/lbuild b/contrib/lbuild/lbuild index 358f36c..b3186d4 100755 --- a/contrib/lbuild/lbuild +++ b/contrib/lbuild/lbuild @@ -901,8 +901,8 @@ build_spl_zfs() { # The spl/zfs spec files expect RPM_BUILD_ROOT to point to the root of the # destination for the rpms export RPM_BUILD_ROOT=$TOPDIR - SPLZFSVER=${SPLZFSVER:-0.6.1} - SPLZFSTAG=${SPLZFSTAG:-lustre-zfs} + SPLZFSVER=${SPLZFSVER:-0.6.2} + SPLZFSTAG=${SPLZFSTAG:-upstream-master} # The files expect a kver to be set to the kernel version . local kver=$(find_linux_release) diff --git a/lustre/osd-zfs/osd_object.c b/lustre/osd-zfs/osd_object.c index fa6fba9..d640e72 100644 --- a/lustre/osd-zfs/osd_object.c +++ b/lustre/osd-zfs/osd_object.c @@ -874,7 +874,10 @@ static int osd_declare_attr_set(const struct lu_env *env, oh = container_of0(handle, struct osd_thandle, ot_super); LASSERT(obj->oo_sa_hdl != NULL); + LASSERT(oh->ot_tx != NULL); dmu_tx_hold_sa(oh->ot_tx, obj->oo_sa_hdl, 0); + if (oh->ot_tx->tx_err != 0) + RETURN(-oh->ot_tx->tx_err); sa_object_size(obj->oo_sa_hdl, &blksize, &bspace); bspace = toqb(bspace * blksize); -- 1.8.3.1