~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to fs/ocfs2/resize.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include <linux/fs.h>
28
28
#include <linux/types.h>
29
29
 
30
 
#define MLOG_MASK_PREFIX ML_DISK_ALLOC
31
30
#include <cluster/masklog.h>
32
31
 
33
32
#include "ocfs2.h"
39
38
#include "super.h"
40
39
#include "sysfile.h"
41
40
#include "uptodate.h"
 
41
#include "ocfs2_trace.h"
42
42
 
43
43
#include "buffer_head_io.h"
44
44
#include "suballoc.h"
82
82
                backups++;
83
83
        }
84
84
 
85
 
        mlog_exit_void();
86
85
        return backups;
87
86
}
88
87
 
103
102
        u16 cl_bpc = le16_to_cpu(cl->cl_bpc);
104
103
        u16 cl_cpg = le16_to_cpu(cl->cl_cpg);
105
104
 
106
 
        mlog_entry("(new_clusters=%d, first_new_cluster = %u)\n",
107
 
                   new_clusters, first_new_cluster);
 
105
        trace_ocfs2_update_last_group_and_inode(new_clusters,
 
106
                                                first_new_cluster);
108
107
 
109
108
        ret = ocfs2_journal_access_gd(handle, INODE_CACHE(bm_inode),
110
109
                                      group_bh, OCFS2_JOURNAL_ACCESS_WRITE);
176
175
                le16_add_cpu(&group->bg_free_bits_count, -1 * num_bits);
177
176
        }
178
177
out:
179
 
        mlog_exit(ret);
 
178
        if (ret)
 
179
                mlog_errno(ret);
180
180
        return ret;
181
181
}
182
182
 
281
281
        u32 first_new_cluster;
282
282
        u64 lgd_blkno;
283
283
 
284
 
        mlog_entry_void();
285
 
 
286
284
        if (ocfs2_is_hard_readonly(osb) || ocfs2_is_soft_readonly(osb))
287
285
                return -EROFS;
288
286
 
342
340
                goto out_unlock;
343
341
        }
344
342
 
345
 
        mlog(0, "extend the last group at %llu, new clusters = %d\n",
 
343
 
 
344
        trace_ocfs2_group_extend(
346
345
             (unsigned long long)le64_to_cpu(group->bg_blkno), new_clusters);
347
346
 
348
347
        handle = ocfs2_start_trans(osb, OCFS2_GROUP_EXTEND_CREDITS);
377
376
        iput(main_bm_inode);
378
377
 
379
378
out:
380
 
        mlog_exit_void();
381
379
        return ret;
382
380
}
383
381
 
472
470
        struct ocfs2_chain_rec *cr;
473
471
        u16 cl_bpc;
474
472
 
475
 
        mlog_entry_void();
476
 
 
477
473
        if (ocfs2_is_hard_readonly(osb) || ocfs2_is_soft_readonly(osb))
478
474
                return -EROFS;
479
475
 
520
516
                goto out_unlock;
521
517
        }
522
518
 
523
 
        mlog(0, "Add a new group  %llu in chain = %u, length = %u\n",
524
 
             (unsigned long long)input->group, input->chain, input->clusters);
 
519
        trace_ocfs2_group_add((unsigned long long)input->group,
 
520
                               input->chain, input->clusters, input->frees);
525
521
 
526
522
        handle = ocfs2_start_trans(osb, OCFS2_GROUP_ADD_CREDITS);
527
523
        if (IS_ERR(handle)) {
589
585
        iput(main_bm_inode);
590
586
 
591
587
out:
592
 
        mlog_exit_void();
593
588
        return ret;
594
589
}