diff options
Diffstat (limited to 'include/linux/genhd.h')
| -rw-r--r-- | include/linux/genhd.h | 20 | 
1 files changed, 14 insertions, 6 deletions
| diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 06c0fd594097..8b5330dd5ac0 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -150,6 +150,13 @@ enum {  	DISK_EVENT_EJECT_REQUEST		= 1 << 1, /* eject requested */  }; +enum { +	/* Poll even if events_poll_msecs is unset */ +	DISK_EVENT_FLAG_POLL			= 1 << 0, +	/* Forward events to udev */ +	DISK_EVENT_FLAG_UEVENT			= 1 << 1, +}; +  struct disk_part_tbl {  	struct rcu_head rcu_head;  	int len; @@ -184,8 +191,8 @@ struct gendisk {  	char disk_name[DISK_NAME_LEN];	/* name of major driver */  	char *(*devnode)(struct gendisk *gd, umode_t *mode); -	unsigned int events;		/* supported events */ -	unsigned int async_events;	/* async events, subset of all */ +	unsigned short events;		/* supported events */ +	unsigned short event_flags;	/* flags related to event processing */  	/* Array of pointers to partitions indexed by partno.  	 * Protected with matching bdev lock but stat and other @@ -610,6 +617,7 @@ struct unixware_disklabel {  extern int blk_alloc_devt(struct hd_struct *part, dev_t *devt);  extern void blk_free_devt(dev_t devt); +extern void blk_invalidate_devt(dev_t devt);  extern dev_t blk_lookup_devt(const char *name, int partno);  extern char *disk_name (struct gendisk *hd, int partno, char *buf); @@ -714,7 +722,7 @@ static inline void hd_free_part(struct hd_struct *part)   */  static inline sector_t part_nr_sects_read(struct hd_struct *part)  { -#if BITS_PER_LONG==32 && defined(CONFIG_LBDAF) && defined(CONFIG_SMP) +#if BITS_PER_LONG==32 && defined(CONFIG_SMP)  	sector_t nr_sects;  	unsigned seq;  	do { @@ -722,7 +730,7 @@ static inline sector_t part_nr_sects_read(struct hd_struct *part)  		nr_sects = part->nr_sects;  	} while (read_seqcount_retry(&part->nr_sects_seq, seq));  	return nr_sects; -#elif BITS_PER_LONG==32 && defined(CONFIG_LBDAF) && defined(CONFIG_PREEMPT) +#elif BITS_PER_LONG==32 && defined(CONFIG_PREEMPT)  	sector_t nr_sects;  	preempt_disable(); @@ -741,11 +749,11 @@ static inline sector_t part_nr_sects_read(struct hd_struct *part)   */  static inline void part_nr_sects_write(struct hd_struct *part, sector_t size)  { -#if BITS_PER_LONG==32 && defined(CONFIG_LBDAF) && defined(CONFIG_SMP) +#if BITS_PER_LONG==32 && defined(CONFIG_SMP)  	write_seqcount_begin(&part->nr_sects_seq);  	part->nr_sects = size;  	write_seqcount_end(&part->nr_sects_seq); -#elif BITS_PER_LONG==32 && defined(CONFIG_LBDAF) && defined(CONFIG_PREEMPT) +#elif BITS_PER_LONG==32 && defined(CONFIG_PREEMPT)  	preempt_disable();  	part->nr_sects = size;  	preempt_enable(); |