Anonymous <swell.k_at_gmail.com> writes: > Shawn Webb <lattera_at_gmail.com> writes: > >> I'm having trouble building freebsd-current (sources as of 29 Jan 2011) with >> the latest zpool v28 patch. `make buildworld` fails. I'd attach a copy of >> the build log, but it's pretty big. I can put it online on my tech blog if >> needed. Has anyone else had the same problem? The `uname -a` output of the >> box in question: >> >> FreeBSD beastie 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r218075: Sat Jan 29 >> 15:14:44 MST 2011 shawn_at_beastie:/usr/obj/usr/src/sys/GENERIC amd64 > > Try below diff-against-diff. I'm using it for weeks with a few p4 commits. Regen with mm's variant of r218550 for v28. %% --- zfs_20101212.patch pjd's original +++ zfs_20101212.patch sync with r218550 _at__at_ -34850,12 +34851,14 _at__at_ { --- sys/cddl/compat/opensolaris/sys/atomic.h.orig +++ sys/cddl/compat/opensolaris/sys/atomic.h -_at__at_ -39,9 +39,10 _at__at_ - #ifndef __LP64__ +_at__at_ -39,11 +39,10 _at__at_ + #if !defined(__LP64__) && !defined(__mips_n32) extern void atomic_add_64(volatile uint64_t *target, int64_t delta); extern void atomic_dec_64(volatile uint64_t *target); --extern void *atomic_cas_ptr(volatile void *target, void *cmp, void *newval); #endif +-#ifndef __LP64__ +-extern void *atomic_cas_ptr(volatile void *target, void *cmp, void *newval); +-#endif #ifndef __sparc64__ +extern uint32_t atomic_cas_32(volatile uint32_t *target, uint32_t cmp, + uint32_t newval); _at__at_ -38448,9 +38451,9 _at__at_ TUNABLE_QUAD("vfs.zfs.arc_meta_limit", &zfs_arc_meta_limit); -TUNABLE_INT("vfs.zfs.mdcomp_disable", &zfs_mdcomp_disable); SYSCTL_DECL(_vfs_zfs); - SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_max, CTLFLAG_RDTUN, &zfs_arc_max, 0, + SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_max, CTLFLAG_RDTUN, &zfs_arc_max, 0, "Maximum ARC size"); - SYSCTL_QUAD(_vfs_zfs, OID_AUTO, arc_min, CTLFLAG_RDTUN, &zfs_arc_min, 0, + SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_min, CTLFLAG_RDTUN, &zfs_arc_min, 0, "Minimum ARC size"); -SYSCTL_INT(_vfs_zfs, OID_AUTO, mdcomp_disable, CTLFLAG_RDTUN, - &zfs_mdcomp_disable, 0, "Disable metadata compression"); _at__at_ -56065,16 +56068,16 _at__at_ + &zfs_txg_synctime_ms, 0, "Target milliseconds to sync a txg"); + +TUNABLE_QUAD("vfs.zfs.write_limit_min", &zfs_write_limit_min); -+SYSCTL_QUAD(_vfs_zfs, OID_AUTO, write_limit_min, CTLFLAG_RDTUN, ++SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, write_limit_min, CTLFLAG_RDTUN, + &zfs_write_limit_min, 0, "Minimum write limit"); +TUNABLE_QUAD("vfs.zfs.write_limit_max", &zfs_write_limit_max); -+SYSCTL_QUAD(_vfs_zfs, OID_AUTO, write_limit_max, CTLFLAG_RDTUN, ++SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, write_limit_max, CTLFLAG_RDTUN, + &zfs_write_limit_max, 0, "Maximum data payload per txg"); +TUNABLE_QUAD("vfs.zfs.write_limit_inflated", &zfs_write_limit_inflated); -+SYSCTL_QUAD(_vfs_zfs, OID_AUTO, write_limit_inflated, CTLFLAG_RDTUN, ++SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, write_limit_inflated, CTLFLAG_RDTUN, + &zfs_write_limit_inflated, 0, ""); +TUNABLE_QUAD("vfs.zfs.write_limit_override", &zfs_write_limit_override); -+SYSCTL_QUAD(_vfs_zfs, OID_AUTO, write_limit_override, CTLFLAG_RDTUN, ++SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, write_limit_override, CTLFLAG_RDTUN, + &zfs_write_limit_override, 0, ""); + +int _at__at_ -75748,7 +75751,7 _at__at_ uint64_t *io_stall; zio_t *io_gang_leader; zio_gang_node_t *io_gang_tree; -_at__at_ -336,56 +416,64 _at__at_ +_at__at_ -336,57 +416,64 _at__at_ kcondvar_t io_cv; /* FMA state */ _at__at_ -75757,9 +75760,8 _at__at_ #ifdef _KERNEL /* FreeBSD only. */ -- struct ostask io_task; -+ struct ostask io_task_issue; -+ struct ostask io_task_interrupt; + struct ostask io_task_issue; + struct ostask io_task_interrupt; #endif }; _at__at_ -76377,7 +76379,7 _at__at_ -SYSCTL_INT(_vfs_zfs_txg, OID_AUTO, synctime, CTLFLAG_RDTUN, &zfs_txg_synctime, - 0, "Target seconds to sync a txg"); -TUNABLE_QUAD("vfs.zfs.txg.write_limit_override", &zfs_write_limit_override); --SYSCTL_QUAD(_vfs_zfs_txg, OID_AUTO, write_limit_override, CTLFLAG_RW, +-SYSCTL_UQUAD(_vfs_zfs_txg, OID_AUTO, write_limit_override, CTLFLAG_RW, - &zfs_write_limit_override, 0, - "Override maximum size of a txg to this size in bytes, " - "value of 0 means don't override"); _at__at_ -94124,10 +94126,12 _at__at_ /*ARGSUSED*/ static int zfs_mount(vfs_t *vfsp) -_at__at_ -1203,6 +1577,12 _at__at_ +_at__at_ -1203,8 +1577,14 _at__at_ goto out; } + vfsp->vfs_flag |= MNT_NFS4ACLS; + +#ifdef SECLABEL + error = zfs_mount_label_policy(vfsp, osname); + if (error) _at__at_ -94504,6 +94508,16 _at__at_ if (noff >= file_sz) { return (ENXIO); } +_at__at_ -353,6 +355,9 _at__at_ + { + + vm_page_wakeup(pp); ++ vm_page_lock(pp); ++ vm_page_activate(pp); ++ vm_page_unlock(pp); + } + + static caddr_t _at__at_ -370,7 +372,6 _at__at_ sf_buf_free(sf); } _at__at_ -94520,7 +94534,7 _at__at_ static void update_pages(vnode_t *vp, int64_t start, int len, objset_t *os, uint64_t oid, int segflg, dmu_tx_t *tx) -_at__at_ -420,6 +420,64 _at__at_ +_at__at_ -420,6 +420,69 _at__at_ } /* _at__at_ -94569,9 +94583,14 _at__at_ + zfs_unmap_page(sf); + VM_OBJECT_LOCK(obj); + vm_page_io_finish(pp); -+ if (error) -+ break; -+ pp->valid = VM_PAGE_BITS_ALL; ++ vm_page_lock(pp); ++ if (error) { ++ vm_page_free(pp); ++ } else { ++ pp->valid = VM_PAGE_BITS_ALL; ++ vm_page_activate(pp); ++ } ++ vm_page_unlock(pp); + } + uio->uio_resid -= bytes; + uio->uio_offset += bytes; _at__at_ -94600,7 +94619,7 _at__at_ ASSERT(vp->v_mount != NULL); obj = vp->v_object; -_at__at_ -450,92 +505,25 _at__at_ +_at__at_ -450,98 +505,25 _at__at_ start = uio->uio_loffset; off = start & PAGEOFFSET; _at__at_ -94692,9 +94711,15 _at__at_ - } + error = dmu_read_uio(os, zp->z_id, uio, bytes); VM_OBJECT_LOCK(obj); -- if (error == 0) -- m->valid = VM_PAGE_BITS_ALL; - vm_page_io_finish(m); +- vm_page_lock(m); +- if (error == 0) { +- m->valid = VM_PAGE_BITS_ALL; +- vm_page_activate(m); +- } else +- vm_page_free(m); +- vm_page_unlock(m); +- - if (error == 0) { - uio->uio_resid -= bytes; - uio->uio_offset += bytes; _at__at_ -103163,7 +103188,7 _at__at_ } return (ZIO_PIPELINE_CONTINUE); -_at__at_ -943,10 +1063,23 _at__at_ +_at__at_ -943,10 +1063,11 _at__at_ */ static void _at__at_ -103173,36 +103198,22 _at__at_ spa_t *spa = zio->io_spa; zio_type_t t = zio->io_type; + int flags = TQ_SLEEP | (cutinline ? TQ_FRONT : 0); -+#ifdef _KERNEL -+ struct ostask *task; -+#endif -+ -+ ASSERT(q == ZIO_TASKQ_ISSUE || q == ZIO_TASKQ_INTERRUPT); -+ -+#ifdef _KERNEL -+ if (q == ZIO_TASKQ_ISSUE) -+ task = &zio->io_task_issue; -+ else /* if (q == ZIO_TASKQ_INTERRUPT) */ -+ task = &zio->io_task_interrupt; -+#endif - - /* - * If we're a config writer or a probe, the normal issue and -_at__at_ -970,8 +1103,13 _at__at_ - q++; - + #ifdef _KERNEL + struct ostask *task; + #endif +_at__at_ -972,10 +1105,10 _at__at_ ASSERT3U(q, <, ZIO_TASKQ_TYPES); -+#ifdef _KERNEL + #ifdef _KERNEL (void) taskq_dispatch_safe(spa->spa_zio_taskq[t][q], -- (task_func_t *)zio_execute, zio, &zio->io_task); +- (task_func_t *)zio_execute, zio, task); + (task_func_t *)zio_execute, zio, flags, task); -+#else -+ (void) taskq_dispatch(spa->spa_zio_taskq[t][q], + #else + (void) taskq_dispatch(spa->spa_zio_taskq[t][q], +- (task_func_t *)zio_execute, zio, TQ_SLEEP); + (task_func_t *)zio_execute, zio, flags); -+#endif + #endif } - static boolean_t _at__at_ -990,7 +1128,7 _at__at_ static int zio_issue_async(zio_t *zio) _at__at_ -104217,22 +104228,16 _at__at_ zio_gang_tree_free(&zio->io_gang_tree); -_at__at_ -2300,18 +2900,36 _at__at_ - * Reexecution is potentially a huge amount of work. - * Hand it off to the otherwise-unused claim taskq. - */ -+#ifdef _KERNEL +_at__at_ -2303,7 +2903,7 _at__at_ + #ifdef _KERNEL (void) taskq_dispatch_safe( spa->spa_zio_taskq[ZIO_TYPE_CLAIM][ZIO_TASKQ_ISSUE], -- (task_func_t *)zio_reexecute, zio, &zio->io_task); +- (task_func_t *)zio_reexecute, zio, + (task_func_t *)zio_reexecute, zio, TQ_SLEEP, -+ &zio->io_task_issue); -+#else -+ (void) taskq_dispatch( -+ spa->spa_zio_taskq[ZIO_TYPE_CLAIM][ZIO_TASKQ_ISSUE], -+ (task_func_t *)zio_reexecute, zio, TQ_SLEEP); -+#endif - } + &zio->io_task_issue); + #else + (void) taskq_dispatch( +_at__at_ -2314,11 +2914,22 _at__at_ return (ZIO_PIPELINE_STOP); } %%Received on Fri Feb 11 2011 - 18:40:41 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:11 UTC