Print this page
4045 zfs write throttle & i/o scheduler performance work
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>


1011                  * This is the MOS.  If we have upgraded,
1012                  * spa_max_replication() could change, so reset
1013                  * os_copies here.
1014                  */
1015                 os->os_copies = spa_max_replication(os->os_spa);
1016         }
1017 
1018         /*
1019          * Create the root block IO
1020          */
1021         SET_BOOKMARK(&zb, os->os_dsl_dataset ?
1022             os->os_dsl_dataset->ds_object : DMU_META_OBJSET,
1023             ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID);
1024         arc_release(os->os_phys_buf, &os->os_phys_buf);
1025 
1026         dmu_write_policy(os, NULL, 0, 0, &zp);
1027 
1028         zio = arc_write(pio, os->os_spa, tx->tx_txg,
1029             os->os_rootbp, os->os_phys_buf, DMU_OS_IS_L2CACHEABLE(os),
1030             DMU_OS_IS_L2COMPRESSIBLE(os), &zp, dmu_objset_write_ready,
1031             dmu_objset_write_done, os, ZIO_PRIORITY_ASYNC_WRITE,
1032             ZIO_FLAG_MUSTSUCCEED, &zb);
1033 
1034         /*
1035          * Sync special dnodes - the parent IO for the sync is the root block
1036          */
1037         DMU_META_DNODE(os)->dn_zio = zio;
1038         dnode_sync(DMU_META_DNODE(os), tx);
1039 
1040         os->os_phys->os_flags = os->os_flags;
1041 
1042         if (DMU_USERUSED_DNODE(os) &&
1043             DMU_USERUSED_DNODE(os)->dn_type != DMU_OT_NONE) {
1044                 DMU_USERUSED_DNODE(os)->dn_zio = zio;
1045                 dnode_sync(DMU_USERUSED_DNODE(os), tx);
1046                 DMU_GROUPUSED_DNODE(os)->dn_zio = zio;
1047                 dnode_sync(DMU_GROUPUSED_DNODE(os), tx);
1048         }
1049 
1050         txgoff = tx->tx_txg & TXG_MASK;
1051 




1011                  * This is the MOS.  If we have upgraded,
1012                  * spa_max_replication() could change, so reset
1013                  * os_copies here.
1014                  */
1015                 os->os_copies = spa_max_replication(os->os_spa);
1016         }
1017 
1018         /*
1019          * Create the root block IO
1020          */
1021         SET_BOOKMARK(&zb, os->os_dsl_dataset ?
1022             os->os_dsl_dataset->ds_object : DMU_META_OBJSET,
1023             ZB_ROOT_OBJECT, ZB_ROOT_LEVEL, ZB_ROOT_BLKID);
1024         arc_release(os->os_phys_buf, &os->os_phys_buf);
1025 
1026         dmu_write_policy(os, NULL, 0, 0, &zp);
1027 
1028         zio = arc_write(pio, os->os_spa, tx->tx_txg,
1029             os->os_rootbp, os->os_phys_buf, DMU_OS_IS_L2CACHEABLE(os),
1030             DMU_OS_IS_L2COMPRESSIBLE(os), &zp, dmu_objset_write_ready,
1031             NULL, dmu_objset_write_done, os, ZIO_PRIORITY_ASYNC_WRITE,
1032             ZIO_FLAG_MUSTSUCCEED, &zb);
1033 
1034         /*
1035          * Sync special dnodes - the parent IO for the sync is the root block
1036          */
1037         DMU_META_DNODE(os)->dn_zio = zio;
1038         dnode_sync(DMU_META_DNODE(os), tx);
1039 
1040         os->os_phys->os_flags = os->os_flags;
1041 
1042         if (DMU_USERUSED_DNODE(os) &&
1043             DMU_USERUSED_DNODE(os)->dn_type != DMU_OT_NONE) {
1044                 DMU_USERUSED_DNODE(os)->dn_zio = zio;
1045                 dnode_sync(DMU_USERUSED_DNODE(os), tx);
1046                 DMU_GROUPUSED_DNODE(os)->dn_zio = zio;
1047                 dnode_sync(DMU_GROUPUSED_DNODE(os), tx);
1048         }
1049 
1050         txgoff = tx->tx_txg & TXG_MASK;
1051