vdev.c (262093) | vdev.c (265740) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 8 unchanged lines hidden (view full) --- 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22/* 23 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 24 * Copyright 2011 Nexenta Systems, Inc. All rights reserved. | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 8 unchanged lines hidden (view full) --- 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22/* 23 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 24 * Copyright 2011 Nexenta Systems, Inc. All rights reserved. |
25 * Copyright (c) 2013 by Delphix. All rights reserved. | 25 * Copyright (c) 2011, 2014 by Delphix. All rights reserved. |
26 * Copyright 2013 Martin Matuska <mm@FreeBSD.org>. All rights reserved. 27 */ 28 29#include <sys/zfs_context.h> 30#include <sys/fm/fs/zfs.h> 31#include <sys/spa.h> 32#include <sys/spa_impl.h> 33#include <sys/dmu.h> --- 1587 unchanged lines hidden (view full) --- 1621} 1622 1623void 1624vdev_metaslab_set_size(vdev_t *vd) 1625{ 1626 /* 1627 * Aim for roughly 200 metaslabs per vdev. 1628 */ | 26 * Copyright 2013 Martin Matuska <mm@FreeBSD.org>. All rights reserved. 27 */ 28 29#include <sys/zfs_context.h> 30#include <sys/fm/fs/zfs.h> 31#include <sys/spa.h> 32#include <sys/spa_impl.h> 33#include <sys/dmu.h> --- 1587 unchanged lines hidden (view full) --- 1621} 1622 1623void 1624vdev_metaslab_set_size(vdev_t *vd) 1625{ 1626 /* 1627 * Aim for roughly 200 metaslabs per vdev. 1628 */ |
1629 vd->vdev_ms_shift = highbit(vd->vdev_asize / 200); | 1629 vd->vdev_ms_shift = highbit64(vd->vdev_asize / 200); |
1630 vd->vdev_ms_shift = MAX(vd->vdev_ms_shift, SPA_MAXBLOCKSHIFT); 1631} 1632 1633/* 1634 * Maximize performance by inflating the configured ashift for 1635 * top level vdevs to be as close to the physical ashift as 1636 * possible without exceeding the administrator specified 1637 * limit. --- 1780 unchanged lines hidden --- | 1630 vd->vdev_ms_shift = MAX(vd->vdev_ms_shift, SPA_MAXBLOCKSHIFT); 1631} 1632 1633/* 1634 * Maximize performance by inflating the configured ashift for 1635 * top level vdevs to be as close to the physical ashift as 1636 * possible without exceeding the administrator specified 1637 * limit. --- 1780 unchanged lines hidden --- |