Deleted Added
full compact
ffs_balloc.c (249582) ffs_balloc.c (250576)
1/*-
2 * Copyright (c) 2002 Networks Associates Technology, Inc.
3 * All rights reserved.
4 *
5 * This software was developed for the FreeBSD Project by Marshall
6 * Kirk McKusick and Network Associates Laboratories, the Security
7 * Research Division of Network Associates, Inc. under DARPA/SPAWAR
8 * contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS

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

55 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
56 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
57 * SUCH DAMAGE.
58 *
59 * @(#)ffs_balloc.c 8.8 (Berkeley) 6/16/95
60 */
61
62#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2002 Networks Associates Technology, Inc.
3 * All rights reserved.
4 *
5 * This software was developed for the FreeBSD Project by Marshall
6 * Kirk McKusick and Network Associates Laboratories, the Security
7 * Research Division of Network Associates, Inc. under DARPA/SPAWAR
8 * contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA CHATS

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

55 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
56 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
57 * SUCH DAMAGE.
58 *
59 * @(#)ffs_balloc.c 8.8 (Berkeley) 6/16/95
60 */
61
62#include <sys/cdefs.h>
63__FBSDID("$FreeBSD: head/sys/ufs/ffs/ffs_balloc.c 249582 2013-04-17 11:40:10Z gabor $");
63__FBSDID("$FreeBSD: head/sys/ufs/ffs/ffs_balloc.c 250576 2013-05-12 16:43:26Z eadler $");
64
65#include <sys/param.h>
66#include <sys/systm.h>
67#include <sys/bio.h>
68#include <sys/buf.h>
69#include <sys/lock.h>
70#include <sys/mount.h>
71#include <sys/vnode.h>

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

1006 /*
1007 * If we have failed part way through block allocation, we
1008 * have to deallocate any indirect blocks that we have allocated.
1009 * We have to fsync the file before we start to get rid of all
1010 * of its dependencies so that we do not leave them dangling.
1011 * We have to sync it at the end so that the soft updates code
1012 * does not find any untracked changes. Although this is really
1013 * slow, running out of disk space is not expected to be a common
64
65#include <sys/param.h>
66#include <sys/systm.h>
67#include <sys/bio.h>
68#include <sys/buf.h>
69#include <sys/lock.h>
70#include <sys/mount.h>
71#include <sys/vnode.h>

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

1006 /*
1007 * If we have failed part way through block allocation, we
1008 * have to deallocate any indirect blocks that we have allocated.
1009 * We have to fsync the file before we start to get rid of all
1010 * of its dependencies so that we do not leave them dangling.
1011 * We have to sync it at the end so that the soft updates code
1012 * does not find any untracked changes. Although this is really
1013 * slow, running out of disk space is not expected to be a common
1014 * occurence. The error return from fsync is ignored as we already
1014 * occurrence. The error return from fsync is ignored as we already
1015 * have an error to return to the user.
1016 *
1017 * XXX Still have to journal the free below
1018 */
1019 (void) ffs_syncvnode(vp, MNT_WAIT, 0);
1020 for (deallocated = 0, blkp = allociblk, lbns_remfree = lbns;
1021 blkp < allocblk; blkp++, lbns_remfree++) {
1022 /*

--- 54 unchanged lines hidden ---
1015 * have an error to return to the user.
1016 *
1017 * XXX Still have to journal the free below
1018 */
1019 (void) ffs_syncvnode(vp, MNT_WAIT, 0);
1020 for (deallocated = 0, blkp = allociblk, lbns_remfree = lbns;
1021 blkp < allocblk; blkp++, lbns_remfree++) {
1022 /*

--- 54 unchanged lines hidden ---