diff options
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index b4fe68fe3a57..a135256b272c 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -717,10 +717,10 @@ extern void blk_plug_device(struct request_queue *); | |||
717 | extern void blk_plug_device_unlocked(struct request_queue *); | 717 | extern void blk_plug_device_unlocked(struct request_queue *); |
718 | extern int blk_remove_plug(struct request_queue *); | 718 | extern int blk_remove_plug(struct request_queue *); |
719 | extern void blk_recount_segments(struct request_queue *, struct bio *); | 719 | extern void blk_recount_segments(struct request_queue *, struct bio *); |
720 | extern int scsi_cmd_ioctl(struct file *, struct request_queue *, | 720 | extern int scsi_cmd_ioctl(struct request_queue *, struct gendisk *, fmode_t, |
721 | struct gendisk *, unsigned int, void __user *); | 721 | unsigned int, void __user *); |
722 | extern int sg_scsi_ioctl(struct file *, struct request_queue *, | 722 | extern int sg_scsi_ioctl(struct request_queue *, struct gendisk *, fmode_t, |
723 | struct gendisk *, struct scsi_ioctl_command __user *); | 723 | struct scsi_ioctl_command __user *); |
724 | 724 | ||
725 | /* | 725 | /* |
726 | * Temporary export, until SCSI gets fixed up. | 726 | * Temporary export, until SCSI gets fixed up. |
@@ -910,7 +910,8 @@ static inline int sb_issue_discard(struct super_block *sb, | |||
910 | * command filter functions | 910 | * command filter functions |
911 | */ | 911 | */ |
912 | extern int blk_verify_command(struct blk_cmd_filter *filter, | 912 | extern int blk_verify_command(struct blk_cmd_filter *filter, |
913 | unsigned char *cmd, int has_write_perm); | 913 | unsigned char *cmd, fmode_t has_write_perm); |
914 | extern void blk_unregister_filter(struct gendisk *disk); | ||
914 | extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter); | 915 | extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter); |
915 | 916 | ||
916 | #define MAX_PHYS_SEGMENTS 128 | 917 | #define MAX_PHYS_SEGMENTS 128 |
@@ -1056,6 +1057,22 @@ static inline int blk_integrity_rq(struct request *rq) | |||
1056 | 1057 | ||
1057 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ | 1058 | #endif /* CONFIG_BLK_DEV_INTEGRITY */ |
1058 | 1059 | ||
1060 | struct block_device_operations { | ||
1061 | int (*open) (struct block_device *, fmode_t); | ||
1062 | int (*release) (struct gendisk *, fmode_t); | ||
1063 | int (*locked_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long); | ||
1064 | int (*ioctl) (struct block_device *, fmode_t, unsigned, unsigned long); | ||
1065 | int (*compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long); | ||
1066 | int (*direct_access) (struct block_device *, sector_t, | ||
1067 | void **, unsigned long *); | ||
1068 | int (*media_changed) (struct gendisk *); | ||
1069 | int (*revalidate_disk) (struct gendisk *); | ||
1070 | int (*getgeo)(struct block_device *, struct hd_geometry *); | ||
1071 | struct module *owner; | ||
1072 | }; | ||
1073 | |||
1074 | extern int __blkdev_driver_ioctl(struct block_device *, fmode_t, unsigned int, | ||
1075 | unsigned long); | ||
1059 | #else /* CONFIG_BLOCK */ | 1076 | #else /* CONFIG_BLOCK */ |
1060 | /* | 1077 | /* |
1061 | * stubs for when the block layer is configured out | 1078 | * stubs for when the block layer is configured out |