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

« back to all changes in this revision

Viewing changes to fs/ocfs2/slot_map.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/slab.h>
28
28
#include <linux/highmem.h>
29
29
 
30
 
#define MLOG_MASK_PREFIX ML_SUPER
31
30
#include <cluster/masklog.h>
32
31
 
33
32
#include "ocfs2.h"
39
38
#include "slot_map.h"
40
39
#include "super.h"
41
40
#include "sysfile.h"
 
41
#include "ocfs2_trace.h"
42
42
 
43
43
#include "buffer_head_io.h"
44
44
 
142
142
        BUG_ON(si->si_blocks == 0);
143
143
        BUG_ON(si->si_bh == NULL);
144
144
 
145
 
        mlog(0, "Refreshing slot map, reading %u block(s)\n",
146
 
             si->si_blocks);
 
145
        trace_ocfs2_refresh_slot_info(si->si_blocks);
147
146
 
148
147
        /*
149
148
         * We pass -1 as blocknr because we expect all of si->si_bh to
381
380
        /* The size checks above should ensure this */
382
381
        BUG_ON((osb->max_slots / si->si_slots_per_block) > blocks);
383
382
 
384
 
        mlog(0, "Slot map needs %u buffers for %llu bytes\n",
385
 
             si->si_blocks, bytes);
 
383
        trace_ocfs2_map_slot_buffers(bytes, si->si_blocks);
386
384
 
387
385
        si->si_bh = kzalloc(sizeof(struct buffer_head *) * si->si_blocks,
388
386
                            GFP_KERNEL);
400
398
                        goto bail;
401
399
                }
402
400
 
403
 
                mlog(0, "Reading slot map block %u at %llu\n", i,
404
 
                     (unsigned long long)blkno);
 
401
                trace_ocfs2_map_slot_buffers_block((unsigned long long)blkno, i);
405
402
 
406
403
                bh = NULL;  /* Acquire a fresh bh */
407
404
                status = ocfs2_read_blocks(INODE_CACHE(si->si_inode), blkno,
475
472
        int slot;
476
473
        struct ocfs2_slot_info *si;
477
474
 
478
 
        mlog_entry_void();
479
 
 
480
475
        si = osb->slot_info;
481
476
 
482
477
        spin_lock(&osb->osb_lock);
505
500
        osb->slot_num = slot;
506
501
        spin_unlock(&osb->osb_lock);
507
502
 
508
 
        mlog(0, "taking node slot %d\n", osb->slot_num);
 
503
        trace_ocfs2_find_slot(osb->slot_num);
509
504
 
510
505
        status = ocfs2_update_disk_slot(osb, si, osb->slot_num);
511
506
        if (status < 0)
512
507
                mlog_errno(status);
513
508
 
514
509
bail:
515
 
        mlog_exit(status);
516
510
        return status;
517
511
}
518
512