ext2_bmap.c (46635) | ext2_bmap.c (46676) |
---|---|
1/* 2 * Copyright (c) 1989, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)ufs_bmap.c 8.7 (Berkeley) 3/21/95 | 1/* 2 * Copyright (c) 1989, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)ufs_bmap.c 8.7 (Berkeley) 3/21/95 |
39 * $Id: ufs_bmap.c,v 1.26 1999/05/02 23:57:04 alc Exp $ | 39 * $Id: ufs_bmap.c,v 1.27 1999/05/07 10:11:36 phk Exp $ |
40 */ 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/buf.h> 45#include <sys/proc.h> 46#include <sys/vnode.h> 47#include <sys/mount.h> --- 98 unchanged lines hidden (view full) --- 146 * If MAXPHYS is the largest transfer the disks can handle, 147 * we probably want maxrun to be 1 block less so that we 148 * don't create a block larger than the device can handle. 149 */ 150 devvp = ip->i_devvp; 151 152 if (devvp != NULL && devvp->v_tag != VT_MFS && 153 devvp->v_type == VBLK) { | 40 */ 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/buf.h> 45#include <sys/proc.h> 46#include <sys/vnode.h> 47#include <sys/mount.h> --- 98 unchanged lines hidden (view full) --- 146 * If MAXPHYS is the largest transfer the disks can handle, 147 * we probably want maxrun to be 1 block less so that we 148 * don't create a block larger than the device can handle. 149 */ 150 devvp = ip->i_devvp; 151 152 if (devvp != NULL && devvp->v_tag != VT_MFS && 153 devvp->v_type == VBLK) { |
154 if (bdevsw(major(devvp->v_rdev))->d_maxio > MAXPHYS) { | 154 if (bdevsw(devvp->v_rdev)->d_maxio > MAXPHYS) { |
155 maxrun = MAXPHYS; 156 vp->v_maxio = MAXPHYS; 157 } else { | 155 maxrun = MAXPHYS; 156 vp->v_maxio = MAXPHYS; 157 } else { |
158 maxrun = bdevsw(major(devvp->v_rdev))->d_maxio; 159 vp->v_maxio = bdevsw(major(devvp->v_rdev))->d_maxio; | 158 maxrun = bdevsw(devvp->v_rdev)->d_maxio; 159 vp->v_maxio = bdevsw(devvp->v_rdev)->d_maxio; |
160 } 161 maxrun = maxrun / blksize; 162 maxrun -= 1; 163 } 164 165 if (maxrun <= 0) { 166 vp->v_maxio = DFLTPHYS; 167 maxrun = DFLTPHYS / blksize; --- 188 unchanged lines hidden --- | 160 } 161 maxrun = maxrun / blksize; 162 maxrun -= 1; 163 } 164 165 if (maxrun <= 0) { 166 vp->v_maxio = DFLTPHYS; 167 maxrun = DFLTPHYS / blksize; --- 188 unchanged lines hidden --- |