x86/xen: resume timer irqs early
[linux/fpc-iii.git] / drivers / block / drbd / drbd_wrappers.h
blob328f18e4b4eedb3cc0faf85fdbca183cae5f52e0
1 #ifndef _DRBD_WRAPPERS_H
2 #define _DRBD_WRAPPERS_H
4 #include <linux/ctype.h>
5 #include <linux/mm.h>
6 #include "drbd_int.h"
8 /* see get_sb_bdev and bd_claim */
9 extern char *drbd_sec_holder;
11 /* sets the number of 512 byte sectors of our virtual device */
12 static inline void drbd_set_my_capacity(struct drbd_conf *mdev,
13 sector_t size)
15 /* set_capacity(mdev->this_bdev->bd_disk, size); */
16 set_capacity(mdev->vdisk, size);
17 mdev->this_bdev->bd_inode->i_size = (loff_t)size << 9;
20 #define drbd_bio_uptodate(bio) bio_flagged(bio, BIO_UPTODATE)
22 /* bi_end_io handlers */
23 extern void drbd_md_io_complete(struct bio *bio, int error);
24 extern void drbd_peer_request_endio(struct bio *bio, int error);
25 extern void drbd_request_endio(struct bio *bio, int error);
28 * used to submit our private bio
30 static inline void drbd_generic_make_request(struct drbd_conf *mdev,
31 int fault_type, struct bio *bio)
33 __release(local);
34 if (!bio->bi_bdev) {
35 printk(KERN_ERR "drbd%d: drbd_generic_make_request: "
36 "bio->bi_bdev == NULL\n",
37 mdev_to_minor(mdev));
38 dump_stack();
39 bio_endio(bio, -ENODEV);
40 return;
43 if (drbd_insert_fault(mdev, fault_type))
44 bio_endio(bio, -EIO);
45 else
46 generic_make_request(bio);
49 #ifndef __CHECKER__
50 # undef __cond_lock
51 # define __cond_lock(x,c) (c)
52 #endif
54 #endif