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

« back to all changes in this revision

Viewing changes to fs/ocfs2/quota_local.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:
8
8
#include <linux/quotaops.h>
9
9
#include <linux/module.h>
10
10
 
11
 
#define MLOG_MASK_PREFIX ML_QUOTA
12
11
#include <cluster/masklog.h>
13
12
 
14
13
#include "ocfs2_fs.h"
23
22
#include "quota.h"
24
23
#include "uptodate.h"
25
24
#include "super.h"
 
25
#include "ocfs2_trace.h"
26
26
 
27
27
/* Number of local quota structures per block */
28
28
static inline unsigned int ol_quota_entries_per_block(struct super_block *sb)
475
475
        struct ocfs2_recovery_chunk *rchunk, *next;
476
476
        qsize_t spacechange, inodechange;
477
477
 
478
 
        mlog_entry("ino=%lu type=%u", (unsigned long)lqinode->i_ino, type);
 
478
        trace_ocfs2_recover_local_quota_file((unsigned long)lqinode->i_ino, type);
479
479
 
480
480
        list_for_each_entry_safe(rchunk, next, &(rec->r_list[type]), rc_list) {
481
481
                chunk = rchunk->rc_chunk;
575
575
        }
576
576
        if (status < 0)
577
577
                free_recovery_list(&(rec->r_list[type]));
578
 
        mlog_exit(status);
 
578
        if (status)
 
579
                mlog_errno(status);
579
580
        return status;
580
581
}
581
582
 
600
601
        for (type = 0; type < MAXQUOTAS; type++) {
601
602
                if (list_empty(&(rec->r_list[type])))
602
603
                        continue;
603
 
                mlog(0, "Recovering quota in slot %d\n", slot_num);
 
604
                trace_ocfs2_finish_quota_recovery(slot_num);
604
605
                lqinode = ocfs2_get_system_file_inode(osb, ino[type], slot_num);
605
606
                if (!lqinode) {
606
607
                        status = -ENOENT;
882
883
        dqblk->dqb_inodemod = cpu_to_le64(od->dq_dquot.dq_dqb.dqb_curinodes -
883
884
                                          od->dq_originodes);
884
885
        spin_unlock(&dq_data_lock);
885
 
        mlog(0, "Writing local dquot %u space %lld inodes %lld\n",
886
 
             od->dq_dquot.dq_id, (long long)le64_to_cpu(dqblk->dqb_spacemod),
887
 
             (long long)le64_to_cpu(dqblk->dqb_inodemod));
 
886
        trace_olq_set_dquot(
 
887
                (unsigned long long)le64_to_cpu(dqblk->dqb_spacemod),
 
888
                (unsigned long long)le64_to_cpu(dqblk->dqb_inodemod),
 
889
                od->dq_dquot.dq_id);
888
890
}
889
891
 
890
892
/* Write dquot to local quota file */