Deleted Added
full compact
ffs_rawread.c (136943) ffs_rawread.c (136966)
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 136943 2004-10-25 09:14:03Z phk $");
28__FBSDID("$FreeBSD: head/sys/ufs/ffs/ffs_rawread.c 136966 2004-10-26 07:39:12Z phk $");
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>

--- 404 unchanged lines hidden (view full) ---

441 int partialbytes; /* Bytes in last partial block */
442 int skipbytes; /* Bytes not to read in ffs_rawread */
443 struct inode *ip;
444 int error;
445
446
447 /* Only handle sector aligned reads */
448 ip = VTOI(vp);
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>

--- 404 unchanged lines hidden (view full) ---

441 int partialbytes; /* Bytes in last partial block */
442 int skipbytes; /* Bytes not to read in ffs_rawread */
443 struct inode *ip;
444 int error;
445
446
447 /* Only handle sector aligned reads */
448 ip = VTOI(vp);
449 secsize = ip->i_devvp->v_rdev->si_bsize_phys;
449 secsize = ip->i_devvp->v_bufobj.bo_bsize;
450 if ((uio->uio_offset & (secsize - 1)) == 0 &&
451 (uio->uio_resid & (secsize - 1)) == 0) {
452
453 /* Sync dirty pages and buffers if needed */
454 error = ffs_rawread_sync(vp,
455 (uio->uio_td != NULL) ?
456 uio->uio_td : curthread);
457 if (error != 0)

--- 38 unchanged lines hidden ---
450 if ((uio->uio_offset & (secsize - 1)) == 0 &&
451 (uio->uio_resid & (secsize - 1)) == 0) {
452
453 /* Sync dirty pages and buffers if needed */
454 error = ffs_rawread_sync(vp,
455 (uio->uio_td != NULL) ?
456 uio->uio_td : curthread);
457 if (error != 0)

--- 38 unchanged lines hidden ---