Date: Fri, 17 Jan 2014 10:23:46 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260812 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201401171023.s0HANkNC016913@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Fri Jan 17 10:23:46 2014 New Revision: 260812 URL: http://svnweb.freebsd.org/changeset/base/260812 Log: traverse_visitbp: visit DMU_GROUPUSED_OBJECT before DMU_USERUSED_OBJECT This is done to ensure that visited object IDs are always increasing. Also, pass correct object ID to prefetch_dnode_metadata for os_groupused_dnode. Without this change we would hit an assert if traversal was paused on a GROUPUSED object, which is unlikely but possible. Apparently the same change was independently developed by Deplhix. Reviewed by: Matthew Ahrens <mahrens@delphix.com> MFC after: 10 days Sponsored by: HybridCluster Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Fri Jan 17 10:18:45 2014 (r260811) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Fri Jan 17 10:23:46 2014 (r260812) @@ -351,9 +351,9 @@ traverse_visitbp(traverse_data_t *td, co prefetch_dnode_metadata(td, dnp, zb->zb_objset, DMU_META_DNODE_OBJECT); if (arc_buf_size(buf) >= sizeof (objset_phys_t)) { - prefetch_dnode_metadata(td, &osp->os_userused_dnode, - zb->zb_objset, DMU_USERUSED_OBJECT); prefetch_dnode_metadata(td, &osp->os_groupused_dnode, + zb->zb_objset, DMU_GROUPUSED_OBJECT); + prefetch_dnode_metadata(td, &osp->os_userused_dnode, zb->zb_objset, DMU_USERUSED_OBJECT); } @@ -364,18 +364,18 @@ traverse_visitbp(traverse_data_t *td, co err = 0; } if (err == 0 && arc_buf_size(buf) >= sizeof (objset_phys_t)) { - dnp = &osp->os_userused_dnode; + dnp = &osp->os_groupused_dnode; err = traverse_dnode(td, dnp, zb->zb_objset, - DMU_USERUSED_OBJECT); + DMU_GROUPUSED_OBJECT); } if (err && hard) { lasterr = err; err = 0; } if (err == 0 && arc_buf_size(buf) >= sizeof (objset_phys_t)) { - dnp = &osp->os_groupused_dnode; + dnp = &osp->os_userused_dnode; err = traverse_dnode(td, dnp, zb->zb_objset, - DMU_GROUPUSED_OBJECT); + DMU_USERUSED_OBJECT); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401171023.s0HANkNC016913>