aops.c (811f933df1e55615fd0bb4818f31e3868a8e6e23) aops.c (e7d4cb6bc19658646357eeff134645cd9bc3479f)
1/* -*- mode: c; c-basic-offset: 8; -*-
2 * vim: noexpandtab sw=8 ts=8 sts=0:
3 *
4 * Copyright (C) 2002, 2004 Oracle. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public
8 * License as published by the Free Software Foundation; either

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

1273 (unsigned long long)OCFS2_I(inode)->ip_blkno);
1274 if (ret < 0) {
1275 mlog_errno(ret);
1276 goto out;
1277 }
1278 } else if (unwritten) {
1279 ret = ocfs2_mark_extent_written(inode, wc->w_di_bh,
1280 wc->w_handle, cpos, 1, phys,
1/* -*- mode: c; c-basic-offset: 8; -*-
2 * vim: noexpandtab sw=8 ts=8 sts=0:
3 *
4 * Copyright (C) 2002, 2004 Oracle. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public
8 * License as published by the Free Software Foundation; either

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

1273 (unsigned long long)OCFS2_I(inode)->ip_blkno);
1274 if (ret < 0) {
1275 mlog_errno(ret);
1276 goto out;
1277 }
1278 } else if (unwritten) {
1279 ret = ocfs2_mark_extent_written(inode, wc->w_di_bh,
1280 wc->w_handle, cpos, 1, phys,
1281 meta_ac, &wc->w_dealloc);
1281 meta_ac, &wc->w_dealloc,
1282 OCFS2_DINODE_EXTENT);
1282 if (ret < 0) {
1283 mlog_errno(ret);
1284 goto out;
1285 }
1286 }
1287
1288 if (should_zero)
1289 v_blkno = ocfs2_clusters_to_blocks(inode->i_sb, cpos);

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

1707 * cluster range.
1708 */
1709 if (clusters_to_alloc || extents_to_split) {
1710 /*
1711 * XXX: We are stretching the limits of
1712 * ocfs2_lock_allocators(). It greatly over-estimates
1713 * the work to be done.
1714 */
1283 if (ret < 0) {
1284 mlog_errno(ret);
1285 goto out;
1286 }
1287 }
1288
1289 if (should_zero)
1290 v_blkno = ocfs2_clusters_to_blocks(inode->i_sb, cpos);

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

1708 * cluster range.
1709 */
1710 if (clusters_to_alloc || extents_to_split) {
1711 /*
1712 * XXX: We are stretching the limits of
1713 * ocfs2_lock_allocators(). It greatly over-estimates
1714 * the work to be done.
1715 */
1715 ret = ocfs2_lock_allocators(inode, wc->w_di_bh,
1716 mlog(0, "extend inode %llu, i_size = %lld, di->i_clusters = %u,"
1717 " clusters_to_add = %u, extents_to_split = %u\n",
1718 (unsigned long long)OCFS2_I(inode)->ip_blkno,
1719 (long long)i_size_read(inode), le32_to_cpu(di->i_clusters),
1720 clusters_to_alloc, extents_to_split);
1721
1722 ret = ocfs2_lock_allocators(inode, wc->w_di_bh, &di->id2.i_list,
1716 clusters_to_alloc, extents_to_split,
1717 &data_ac, &meta_ac);
1718 if (ret) {
1719 mlog_errno(ret);
1720 goto out;
1721 }
1722
1723 credits = ocfs2_calc_extend_credits(inode->i_sb,

--- 245 unchanged lines hidden ---
1723 clusters_to_alloc, extents_to_split,
1724 &data_ac, &meta_ac);
1725 if (ret) {
1726 mlog_errno(ret);
1727 goto out;
1728 }
1729
1730 credits = ocfs2_calc_extend_credits(inode->i_sb,

--- 245 unchanged lines hidden ---