Deleted Added
full compact
vfs_aio.c (46571) vfs_aio.c (46580)
1/*
2 * Copyright (c) 1997 John S. Dyson. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. John S. Dyson's name may not be used to endorse or promote products
10 * derived from this software without specific prior written permission.
11 *
12 * DISCLAIMER: This code isn't warranted to do anything useful. Anything
13 * bad that happens because of using this software isn't the responsibility
14 * of the author. This software is distributed AS-IS.
15 *
1/*
2 * Copyright (c) 1997 John S. Dyson. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. John S. Dyson's name may not be used to endorse or promote products
10 * derived from this software without specific prior written permission.
11 *
12 * DISCLAIMER: This code isn't warranted to do anything useful. Anything
13 * bad that happens because of using this software isn't the responsibility
14 * of the author. This software is distributed AS-IS.
15 *
16 * $Id: vfs_aio.c,v 1.46 1999/04/28 01:04:28 luoqi Exp $
16 * $Id: vfs_aio.c,v 1.47 1999/05/06 18:44:42 peter Exp $
17 */
18
19/*
20 * This file contains support for the POSIX 1003.1B AIO/LIO facility.
21 */
22
23#include <sys/param.h>
24#include <sys/systm.h>

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

1000 }
1001
1002 /* create and build a buffer header for a transfer */
1003 bp = (struct buf *)getpbuf(NULL);
1004
1005 /*
1006 * get a copy of the kva from the physical buffer
1007 */
17 */
18
19/*
20 * This file contains support for the POSIX 1003.1B AIO/LIO facility.
21 */
22
23#include <sys/param.h>
24#include <sys/systm.h>

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

1000 }
1001
1002 /* create and build a buffer header for a transfer */
1003 bp = (struct buf *)getpbuf(NULL);
1004
1005 /*
1006 * get a copy of the kva from the physical buffer
1007 */
1008 bp->b_proc = p;
1008 bp->b_caller1 = p;
1009 bp->b_dev = dev;
1010 error = bp->b_error = 0;
1011
1012 if (cb->aio_lio_opcode == LIO_WRITE) {
1013 rw = 0;
1014 bflags = B_WRITE;
1015 } else {
1016 rw = 1;

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

1958 s = splbio();
1959
1960 wakeup((caddr_t) bp);
1961 bp->b_flags &= ~B_CALL;
1962 bp->b_flags |= B_DONE;
1963
1964 aiocbe = (struct aiocblist *)bp->b_spc;
1965 if (aiocbe) {
1009 bp->b_dev = dev;
1010 error = bp->b_error = 0;
1011
1012 if (cb->aio_lio_opcode == LIO_WRITE) {
1013 rw = 0;
1014 bflags = B_WRITE;
1015 } else {
1016 rw = 1;

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

1958 s = splbio();
1959
1960 wakeup((caddr_t) bp);
1961 bp->b_flags &= ~B_CALL;
1962 bp->b_flags |= B_DONE;
1963
1964 aiocbe = (struct aiocblist *)bp->b_spc;
1965 if (aiocbe) {
1966 p = bp->b_proc;
1966 p = bp->b_caller1;
1967
1968 aiocbe->jobstate = JOBST_JOBBFINISHED;
1969 aiocbe->uaiocb._aiocb_private.status -= bp->b_resid;
1970 aiocbe->uaiocb._aiocb_private.error = 0;
1971 aiocbe->jobflags |= AIOCBLIST_DONE;
1972
1973 if (bp->b_flags & B_ERROR) {
1974 aiocbe->uaiocb._aiocb_private.error = bp->b_error;

--- 37 unchanged lines hidden ---
1967
1968 aiocbe->jobstate = JOBST_JOBBFINISHED;
1969 aiocbe->uaiocb._aiocb_private.status -= bp->b_resid;
1970 aiocbe->uaiocb._aiocb_private.error = 0;
1971 aiocbe->jobflags |= AIOCBLIST_DONE;
1972
1973 if (bp->b_flags & B_ERROR) {
1974 aiocbe->uaiocb._aiocb_private.error = bp->b_error;

--- 37 unchanged lines hidden ---