Deleted Added
full compact
ffs_balloc.c (248623) ffs_balloc.c (249582)
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 248623 2013-03-22 21:45:28Z mckusick $");
63__FBSDID("$FreeBSD: head/sys/ufs/ffs/ffs_balloc.c 249582 2013-04-17 11:40:10Z gabor $");
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>

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

448 /*
449 * If we have failed part way through block allocation, we
450 * have to deallocate any indirect blocks that we have allocated.
451 * We have to fsync the file before we start to get rid of all
452 * of its dependencies so that we do not leave them dangling.
453 * We have to sync it at the end so that the soft updates code
454 * does not find any untracked changes. Although this is really
455 * 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>

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

448 /*
449 * If we have failed part way through block allocation, we
450 * have to deallocate any indirect blocks that we have allocated.
451 * We have to fsync the file before we start to get rid of all
452 * of its dependencies so that we do not leave them dangling.
453 * We have to sync it at the end so that the soft updates code
454 * does not find any untracked changes. Although this is really
455 * slow, running out of disk space is not expected to be a common
456 * occurence. The error return from fsync is ignored as we already
456 * occurrence. The error return from fsync is ignored as we already
457 * have an error to return to the user.
458 *
459 * XXX Still have to journal the free below
460 */
461 (void) ffs_syncvnode(vp, MNT_WAIT, 0);
462 for (deallocated = 0, blkp = allociblk, lbns_remfree = lbns;
463 blkp < allocblk; blkp++, lbns_remfree++) {
464 /*

--- 612 unchanged lines hidden ---
457 * have an error to return to the user.
458 *
459 * XXX Still have to journal the free below
460 */
461 (void) ffs_syncvnode(vp, MNT_WAIT, 0);
462 for (deallocated = 0, blkp = allociblk, lbns_remfree = lbns;
463 blkp < allocblk; blkp++, lbns_remfree++) {
464 /*

--- 612 unchanged lines hidden ---