From 9b73c8620bdc56985ef3ab7aa1c5aaafee62c50d Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Tue, 20 May 2014 16:07:48 -0700 Subject: [PATCH] LU-5041 osd-zfs: Prefetch dnodes After a successful FID lookup prefetch the referenced dnode. There's every reason to believe the dnode will be immediately useful. This will not result in a spill block also being prefetched for that we need the block pointer from the dnode. However, once large dnodes are supported spill blocks should be rarely needed. Change-Id: I41c0d08249f5d852137a08e2f3b262fb664a15ea Signed-off-by: Brian Behlendorf Reviewed-on: http://review.whamcloud.com/10395 Tested-by: Jenkins Reviewed-by: Andreas Dilger Reviewed-by: Alex Zhuravlev Tested-by: Maloo --- lustre/osd-zfs/osd_oi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lustre/osd-zfs/osd_oi.c b/lustre/osd-zfs/osd_oi.c index 4acbd0d6..99bf185 100644 --- a/lustre/osd-zfs/osd_oi.c +++ b/lustre/osd-zfs/osd_oi.c @@ -487,6 +487,9 @@ int osd_fid_lookup(const struct lu_env *env, struct osd_device *dev, *oid = info->oti_zde.lzd_reg.zde_dnode; } + if (rc == 0) + dmu_prefetch(dev->od_objset.os, *oid, 0, 0); + RETURN(rc); } -- 1.8.3.1