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

« back to all changes in this revision

Viewing changes to drivers/md/dm-log.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:
251
251
 */
252
252
static inline int log_test_bit(uint32_t *bs, unsigned bit)
253
253
{
254
 
        return ext2_test_bit(bit, (unsigned long *) bs) ? 1 : 0;
 
254
        return test_bit_le(bit, (unsigned long *) bs) ? 1 : 0;
255
255
}
256
256
 
257
257
static inline void log_set_bit(struct log_c *l,
258
258
                               uint32_t *bs, unsigned bit)
259
259
{
260
 
        ext2_set_bit(bit, (unsigned long *) bs);
 
260
        __test_and_set_bit_le(bit, (unsigned long *) bs);
261
261
        l->touched_cleaned = 1;
262
262
}
263
263
 
264
264
static inline void log_clear_bit(struct log_c *l,
265
265
                                 uint32_t *bs, unsigned bit)
266
266
{
267
 
        ext2_clear_bit(bit, (unsigned long *) bs);
 
267
        __test_and_clear_bit_le(bit, (unsigned long *) bs);
268
268
        l->touched_dirtied = 1;
269
269
}
270
270
 
449
449
 
450
450
                lc->io_req.mem.type = DM_IO_VMA;
451
451
                lc->io_req.notify.fn = NULL;
452
 
                lc->io_req.client = dm_io_client_create(dm_div_up(buf_size,
453
 
                                                                   PAGE_SIZE));
 
452
                lc->io_req.client = dm_io_client_create();
454
453
                if (IS_ERR(lc->io_req.client)) {
455
454
                        r = PTR_ERR(lc->io_req.client);
456
455
                        DMWARN("couldn't allocate disk io client");
543
542
                return -EINVAL;
544
543
        }
545
544
 
546
 
        r = dm_get_device(ti, argv[0], FMODE_READ | FMODE_WRITE, &dev);
 
545
        r = dm_get_device(ti, argv[0], dm_table_get_mode(ti->table), &dev);
547
546
        if (r)
548
547
                return r;
549
548
 
740
739
                return 0;
741
740
 
742
741
        do {
743
 
                *region = ext2_find_next_zero_bit(
 
742
                *region = find_next_zero_bit_le(
744
743
                                             (unsigned long *) lc->sync_bits,
745
744
                                             lc->region_count,
746
745
                                             lc->sync_search);