Deleted Added
full compact
ffs_vfsops.c (189737) ffs_vfsops.c (189878)
1/*-
2 * Copyright (c) 1989, 1991, 1993, 1994
3 * The Regents of the University of California. 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

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

25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95
30 */
31
32#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1989, 1991, 1993, 1994
3 * The Regents of the University of California. 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

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

25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/ufs/ffs/ffs_vfsops.c 189737 2009-03-12 12:43:56Z kib $");
33__FBSDID("$FreeBSD: head/sys/ufs/ffs/ffs_vfsops.c 189878 2009-03-16 15:39:46Z kib $");
34
35#include "opt_mac.h"
36#include "opt_quota.h"
37#include "opt_ufs.h"
38#include "opt_ffs.h"
39#include "opt_ddb.h"
40
41#include <sys/param.h>

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

1840 if (dobkgrdwrite && (bp->b_xflags & BX_BKGRDWRITE) &&
1841 (bp->b_flags & B_ASYNC) &&
1842 !vm_page_count_severe() &&
1843 !buf_dirty_count_severe()) {
1844 KASSERT(bp->b_iodone == NULL,
1845 ("bufwrite: needs chained iodone (%p)", bp->b_iodone));
1846
1847 /* get a new block */
34
35#include "opt_mac.h"
36#include "opt_quota.h"
37#include "opt_ufs.h"
38#include "opt_ffs.h"
39#include "opt_ddb.h"
40
41#include <sys/param.h>

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

1840 if (dobkgrdwrite && (bp->b_xflags & BX_BKGRDWRITE) &&
1841 (bp->b_flags & B_ASYNC) &&
1842 !vm_page_count_severe() &&
1843 !buf_dirty_count_severe()) {
1844 KASSERT(bp->b_iodone == NULL,
1845 ("bufwrite: needs chained iodone (%p)", bp->b_iodone));
1846
1847 /* get a new block */
1848 newbp = geteblk(bp->b_bufsize);
1848 newbp = geteblk(bp->b_bufsize, GB_NOWAIT_BD);
1849 if (newbp == NULL)
1850 goto normal_write;
1849
1850 /*
1851 * set it to be identical to the old block. We have to
1852 * set b_lblkno and BKGRDMARKER before calling bgetvp()
1853 * to avoid confusing the splay tree and gbincore().
1854 */
1855 memcpy(newbp->b_data, bp->b_data, bp->b_bufsize);
1856 newbp->b_lblkno = bp->b_lblkno;

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

1880 * If the reconstituted buffer were written, we could end up
1881 * with two background copies being written at the same time.
1882 */
1883 bqrelse(bp);
1884 bp = newbp;
1885 }
1886
1887 /* Let the normal bufwrite do the rest for us */
1851
1852 /*
1853 * set it to be identical to the old block. We have to
1854 * set b_lblkno and BKGRDMARKER before calling bgetvp()
1855 * to avoid confusing the splay tree and gbincore().
1856 */
1857 memcpy(newbp->b_data, bp->b_data, bp->b_bufsize);
1858 newbp->b_lblkno = bp->b_lblkno;

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

1882 * If the reconstituted buffer were written, we could end up
1883 * with two background copies being written at the same time.
1884 */
1885 bqrelse(bp);
1886 bp = newbp;
1887 }
1888
1889 /* Let the normal bufwrite do the rest for us */
1890normal_write:
1888 return (bufwrite(bp));
1889}
1890
1891
1892static void
1893ffs_geom_strategy(struct bufobj *bo, struct buf *bp)
1894{
1895 struct vnode *vp;

--- 86 unchanged lines hidden ---
1891 return (bufwrite(bp));
1892}
1893
1894
1895static void
1896ffs_geom_strategy(struct bufobj *bo, struct buf *bp)
1897{
1898 struct vnode *vp;

--- 86 unchanged lines hidden ---