ffs_rawread.c (200770) | ffs_rawread.c (218195) |
---|---|
1/*- 2 * Copyright (c) 2000-2003 Tor Egge 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2000-2003 Tor Egge 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/ufs/ffs/ffs_rawread.c 200770 2009-12-21 12:29:38Z kib $"); | 28__FBSDID("$FreeBSD: head/sys/ufs/ffs/ffs_rawread.c 218195 2011-02-02 16:35:10Z mdf $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/fcntl.h> 33#include <sys/file.h> 34#include <sys/stat.h> 35#include <sys/proc.h> 36#include <sys/limits.h> --- 201 unchanged lines hidden (view full) --- 238 239 if (bp->b_bcount + blockoff * DEV_BSIZE > bsize) 240 bp->b_bcount = bsize - blockoff * DEV_BSIZE; 241 bp->b_bufsize = bp->b_bcount; 242 243 if (vmapbuf(bp) < 0) 244 return EFAULT; 245 | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/fcntl.h> 33#include <sys/file.h> 34#include <sys/stat.h> 35#include <sys/proc.h> 36#include <sys/limits.h> --- 201 unchanged lines hidden (view full) --- 238 239 if (bp->b_bcount + blockoff * DEV_BSIZE > bsize) 240 bp->b_bcount = bsize - blockoff * DEV_BSIZE; 241 bp->b_bufsize = bp->b_bcount; 242 243 if (vmapbuf(bp) < 0) 244 return EFAULT; 245 |
246 if (ticks - PCPU_GET(switchticks) >= hogticks) 247 uio_yield(); | 246 maybe_yield(); |
248 bzero(bp->b_data, bp->b_bufsize); 249 250 /* Mark operation completed (similar to bufdone()) */ 251 252 bp->b_resid = 0; 253 bp->b_flags |= B_DONE; 254 return 0; 255 } --- 242 unchanged lines hidden --- | 247 bzero(bp->b_data, bp->b_bufsize); 248 249 /* Mark operation completed (similar to bufdone()) */ 250 251 bp->b_resid = 0; 252 bp->b_flags |= B_DONE; 253 return 0; 254 } --- 242 unchanged lines hidden --- |