Whamcloud - gitweb
LU-5242 osd-zfs: umount hang in sanity 133g 30/13630/17
authorIsaac Huang <he.huang@intel.com>
Mon, 20 Apr 2015 17:27:21 +0000 (11:27 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 17 May 2015 22:46:50 +0000 (22:46 +0000)
commit9b704e4088d867851cdb011f0a2560b1e622555c
tree8b15837df475f6882df91d0d32ac47883a2f0c6a
parent1738e70fe6aaf1e07b78a6b89eb11ea115135e69
LU-5242 osd-zfs: umount hang in sanity 133g

It's not optimal to free large/sparse object directly by
dmu_object_free(). The dmu_tx_count_free() may over estimate the
memory overhead and cause the TX to fail in arc_tempreserve_space()
and eventually hang.

The correct way is to truncate the object with dmu_free_long_range()
before freeing it. This patch moves large object to ZPL unlinked set
and then later truncates and frees it, with as many TXs as needed.

Change-Id: I077dbcafff5abaea4a42dc9bc3f9ae980bdcdc54
Signed-off-by: Isaac Huang <he.huang@intel.com>
Test-Parameters: envdefinitions=SLOW=yes mdtfilesystemtype=zfs mdsfilesystemtype=zfs ostfilesystemtype=zfs
Reviewed-on: http://review.whamcloud.com/13630
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/osd-zfs/osd_handler.c
lustre/osd-zfs/osd_index.c
lustre/osd-zfs/osd_internal.h
lustre/osd-zfs/osd_object.c
lustre/osd-zfs/osd_oi.c
lustre/osd-zfs/osd_xattr.c
lustre/tests/sanity.sh