Whamcloud - gitweb
LU-6155 osd-zfs: dbuf_hold_impl() called without the lock 41/13541/16
authorIsaac Huang <he.huang@intel.com>
Tue, 27 Jan 2015 21:03:32 +0000 (14:03 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 16 Oct 2015 12:17:23 +0000 (12:17 +0000)
commit10ebe81e394af356fbae4703ca47586d6b3bc367
treee6e0f1dc265489caf675567c95dd7af89e6b5aea
parentbee9c1897677473f12c0b807edd3e8fec452bc32
LU-6155 osd-zfs: dbuf_hold_impl() called without the lock

The osd-zfs osd_count_not_mapped() calls dbuf_hold_impl() without
the required lock. In addition, dbuf_hold_impl() is an internal
function and has the expensive side effect of reading the block
from disk which would convert a full-block write into a
read-modify-write.

Since space estimation with ZFS is complicated any way, just use
the worst case as a rough estimate where a snapshot holds all current
blocks, i.e. no old space can be freed after the COW.

Skip test sanity-quota/23 on ZFS because overwrites on ZFS are not
guarenteed to be space neutral, and new worst-case assumptions will
always cause this test to fail.

Change-Id: Idf6f2ff80ff185ca8c0f38e1002ff90e457c3ca0
Signed-off-by: Isaac Huang <he.huang@intel.com>
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-on: http://review.whamcloud.com/13541
Tested-by: Jenkins
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
libcfs/include/libcfs/libcfs.h
lustre/osd-zfs/osd_io.c
lustre/tests/sanity-quota.sh