diff options
| author | James Simmons <jsimmons@heisenberg.transvirtual.com> | 2002-07-04 19:50:56 -0700 |
|---|---|---|
| committer | James Simmons <jsimmons@heisenberg.transvirtual.com> | 2002-07-04 19:50:56 -0700 |
| commit | af5c826ce279f0cf9f87ce7543e94b0d3b83a644 (patch) | |
| tree | d02b958b856fed1ba6a5eb7fb111852917fab436 /include/linux | |
| parent | 28a6a4d12b4fbe5eca55079c87f5573ea435b922 (diff) | |
| parent | 75eead62e1de867de280c4edfc24e86cc50577cb (diff) | |
Merge heisenberg.transvirtual.com:/tmp/linus-2.5
into heisenberg.transvirtual.com:/tmp/fbdev-2.5
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bio.h | 2 | ||||
| -rw-r--r-- | include/linux/buffer_head.h | 51 | ||||
| -rw-r--r-- | include/linux/cdrom.h | 10 | ||||
| -rw-r--r-- | include/linux/devpts_fs.h | 49 | ||||
| -rw-r--r-- | include/linux/ext2_fs_sb.h | 14 | ||||
| -rw-r--r-- | include/linux/ext3_fs_sb.h | 14 | ||||
| -rw-r--r-- | include/linux/fs.h | 3 | ||||
| -rw-r--r-- | include/linux/gfp.h | 10 | ||||
| -rw-r--r-- | include/linux/jbd.h | 20 | ||||
| -rw-r--r-- | include/linux/kdev_t.h | 3 | ||||
| -rw-r--r-- | include/linux/list.h | 36 | ||||
| -rw-r--r-- | include/linux/mm.h | 10 | ||||
| -rw-r--r-- | include/linux/nfsd/export.h | 4 | ||||
| -rw-r--r-- | include/linux/nfsd/nfsfh.h | 4 | ||||
| -rw-r--r-- | include/linux/raid/linear.h | 1 | ||||
| -rw-r--r-- | include/linux/raid/md.h | 4 | ||||
| -rw-r--r-- | include/linux/raid/md_k.h | 29 | ||||
| -rw-r--r-- | include/linux/raid/multipath.h | 1 | ||||
| -rw-r--r-- | include/linux/raid/raid1.h | 1 | ||||
| -rw-r--r-- | include/linux/raid/raid5.h | 1 | ||||
| -rw-r--r-- | include/linux/reiserfs_fs.h | 3 | ||||
| -rw-r--r-- | include/linux/reiserfs_fs_sb.h | 2 | ||||
| -rw-r--r-- | include/linux/sched.h | 10 | ||||
| -rw-r--r-- | include/linux/smb.h | 2 | ||||
| -rw-r--r-- | include/linux/sysctl.h | 6 | ||||
| -rw-r--r-- | include/linux/writeback.h | 23 |
26 files changed, 125 insertions, 188 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index ffc38fca9c1e..1b4004652cde 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -203,8 +203,6 @@ extern struct bio *bio_copy(struct bio *, int, int); extern inline void bio_init(struct bio *); -extern int bio_ioctl(kdev_t, unsigned int, unsigned long); - #ifdef CONFIG_HIGHMEM /* * remember to add offset! and never ever reenable interrupts between a diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 4fc6bab55825..f22fdecee5a9 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h @@ -121,7 +121,6 @@ BUFFER_FNS(Boundary, boundary) #define page_has_buffers(page) PagePrivate(page) #define invalidate_buffers(dev) __invalidate_buffers((dev), 0) -#define destroy_buffers(dev) __invalidate_buffers((dev), 1) /* @@ -156,7 +155,6 @@ int sync_blockdev(struct block_device *bdev); void __wait_on_buffer(struct buffer_head *); void sleep_on_buffer(struct buffer_head *bh); void wake_up_buffer(struct buffer_head *bh); -int fsync_dev(kdev_t); int fsync_bdev(struct block_device *); int fsync_super(struct super_block *); int fsync_no_super(struct block_device *); @@ -164,7 +162,7 @@ struct buffer_head *__find_get_block(struct block_device *, sector_t, int); struct buffer_head * __getblk(struct block_device *, sector_t, int); void __brelse(struct buffer_head *); void __bforget(struct buffer_head *); -struct buffer_head * __bread(struct block_device *, int, int); +struct buffer_head *__bread(struct block_device *, sector_t block, int size); void wakeup_bdflush(void); struct buffer_head *alloc_buffer_head(void); void free_buffer_head(struct buffer_head * bh); @@ -201,9 +199,9 @@ int generic_osync_inode(struct inode *, int); * inline definitions */ -static inline void get_bh(struct buffer_head * bh) +static inline void get_bh(struct buffer_head *bh) { - atomic_inc(&(bh)->b_count); + atomic_inc(&bh->b_count); } static inline void put_bh(struct buffer_head *bh) @@ -212,68 +210,49 @@ static inline void put_bh(struct buffer_head *bh) atomic_dec(&bh->b_count); } -/* - * If an error happens during the make_request, this function - * has to be recalled. It marks the buffer as clean and not - * uptodate, and it notifys the upper layer about the end - * of the I/O. - */ -static inline void buffer_IO_error(struct buffer_head * bh) -{ - clear_buffer_dirty(bh); - - /* - * b_end_io has to clear the BH_Uptodate bitflag in the read error - * case, however buffer contents are not necessarily bad if a - * write fails - */ - bh->b_end_io(bh, buffer_uptodate(bh)); -} - - -static inline void brelse(struct buffer_head *buf) +static inline void brelse(struct buffer_head *bh) { - if (buf) - __brelse(buf); + if (bh) + __brelse(bh); } -static inline void bforget(struct buffer_head *buf) +static inline void bforget(struct buffer_head *bh) { - if (buf) - __bforget(buf); + if (bh) + __bforget(bh); } -static inline struct buffer_head * sb_bread(struct super_block *sb, int block) +static inline struct buffer_head *sb_bread(struct super_block *sb, sector_t block) { return __bread(sb->s_bdev, block, sb->s_blocksize); } -static inline struct buffer_head * sb_getblk(struct super_block *sb, int block) +static inline struct buffer_head *sb_getblk(struct super_block *sb, sector_t block) { return __getblk(sb->s_bdev, block, sb->s_blocksize); } static inline struct buffer_head * -sb_find_get_block(struct super_block *sb, int block) +sb_find_get_block(struct super_block *sb, sector_t block) { return __find_get_block(sb->s_bdev, block, sb->s_blocksize); } static inline void -map_bh(struct buffer_head *bh, struct super_block *sb, int block) +map_bh(struct buffer_head *bh, struct super_block *sb, sector_t block) { set_buffer_mapped(bh); bh->b_bdev = sb->s_bdev; bh->b_blocknr = block; } -static inline void wait_on_buffer(struct buffer_head * bh) +static inline void wait_on_buffer(struct buffer_head *bh) { if (buffer_locked(bh)) __wait_on_buffer(bh); } -static inline void lock_buffer(struct buffer_head * bh) +static inline void lock_buffer(struct buffer_head *bh) { while (test_set_buffer_locked(bh)) __wait_on_buffer(bh); diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h index 296ffe2cdfd4..19a318fe8ce6 100644 --- a/include/linux/cdrom.h +++ b/include/linux/cdrom.h @@ -807,11 +807,8 @@ typedef struct { long error; } tracktype; -extern void cdrom_count_tracks(struct cdrom_device_info *cdi,tracktype* tracks); -extern int cdrom_get_next_writable(kdev_t dev, long *next_writable); -extern int cdrom_get_last_written(kdev_t dev, long *last_written); +extern int cdrom_get_last_written(struct cdrom_device_info *cdi, long *last_written); extern int cdrom_number_of_slots(struct cdrom_device_info *cdi); -extern int cdrom_select_disc(struct cdrom_device_info *cdi, int slot); extern int cdrom_mode_select(struct cdrom_device_info *cdi, struct cdrom_generic_command *cgc); extern int cdrom_mode_sense(struct cdrom_device_info *cdi, @@ -819,7 +816,6 @@ extern int cdrom_mode_sense(struct cdrom_device_info *cdi, int page_code, int page_control); extern void init_cdrom_command(struct cdrom_generic_command *cgc, void *buffer, int len, int type); -extern struct cdrom_device_info *cdrom_find_device(kdev_t dev); typedef struct { __u16 disc_information_length; @@ -903,10 +899,6 @@ typedef struct { __u32 last_rec_address; } track_information; -extern int cdrom_get_disc_info(kdev_t dev, disc_information *di); -extern int cdrom_get_track_info(kdev_t dev, __u16 track, __u8 type, - track_information *ti); - /* The SCSI spec says there could be 256 slots. */ #define CDROM_MAX_SLOTS 256 diff --git a/include/linux/devpts_fs.h b/include/linux/devpts_fs.h index 38164e6b2bbf..4def3512b355 100644 --- a/include/linux/devpts_fs.h +++ b/include/linux/devpts_fs.h @@ -10,64 +10,23 @@ * * ------------------------------------------------------------------------- */ -/* - * Prototypes for the pty driver <-> devpts filesystem interface. Most - * of this is really just a hack so we can exclude it or build it as a - * module, and probably should go away eventually. - */ - #ifndef _LINUX_DEVPTS_FS_H #define _LINUX_DEVPTS_FS_H 1 -#include <linux/config.h> -#include <linux/kdev_t.h> -#include <linux/tty.h> - #ifdef CONFIG_DEVPTS_FS -void devpts_pty_new(int, kdev_t); -void devpts_pty_kill(int); -#define unix98_max_ptys NR_PTYS * UNIX98_NR_MAJORS; - -#elif defined(CONFIG_DEVPTS_FS_MODULE) +void devpts_pty_new(int, dev_t); /* mknod in devpts */ +void devpts_pty_kill(int); /* unlink */ -#ifdef BUILDING_PTY_C -void (*devpts_upcall_new)(int,kdev_t) = NULL; -void (*devpts_upcall_kill)(int) = NULL; -unsigned int unix98_max_ptys = NR_PTYS * UNIX98_NR_MAJORS; - -EXPORT_SYMBOL(devpts_upcall_new); -EXPORT_SYMBOL(devpts_upcall_kill); -EXPORT_SYMBOL(unix98_max_ptys); #else -extern void (*devpts_upcall_new)(int,kdev_t); -extern void (*devpts_upcall_kill)(int); -extern unsigned int unix98_max_ptys; -#endif -#ifndef BUILDING_DEVPTS -static inline void -devpts_pty_new(int line, kdev_t device) +static inline void devpts_pty_new(int line, dev_t device) { - if ( devpts_upcall_new ) - return devpts_upcall_new(line,device); } -static inline void -devpts_pty_kill(int line) +static inline void devpts_pty_kill(int line) { - if ( devpts_upcall_kill ) - return devpts_upcall_kill(line); } -#endif - -#else /* No /dev/pts filesystem at all */ - -static inline void -devpts_pty_new(int line, kdev_t device) { } - -static inline void -devpts_pty_kill(int line) { } #endif diff --git a/include/linux/ext2_fs_sb.h b/include/linux/ext2_fs_sb.h index 47f53158e755..070f5b630581 100644 --- a/include/linux/ext2_fs_sb.h +++ b/include/linux/ext2_fs_sb.h @@ -17,14 +17,6 @@ #define _LINUX_EXT2_FS_SB /* - * The following is not needed anymore since the descriptors buffer - * heads are now dynamically allocated - */ -/* #define EXT2_MAX_GROUP_DESC 8 */ - -#define EXT2_MAX_GROUP_LOADED 8 - -/* * second extended-fs super-block data in memory */ struct ext2_sb_info { @@ -41,12 +33,6 @@ struct ext2_sb_info { struct buffer_head * s_sbh; /* Buffer containing the super block */ struct ext2_super_block * s_es; /* Pointer to the super block in the buffer */ struct buffer_head ** s_group_desc; - unsigned short s_loaded_inode_bitmaps; - unsigned short s_loaded_block_bitmaps; - unsigned long s_inode_bitmap_number[EXT2_MAX_GROUP_LOADED]; - struct buffer_head * s_inode_bitmap[EXT2_MAX_GROUP_LOADED]; - unsigned long s_block_bitmap_number[EXT2_MAX_GROUP_LOADED]; - struct buffer_head * s_block_bitmap[EXT2_MAX_GROUP_LOADED]; unsigned long s_mount_opt; uid_t s_resuid; gid_t s_resgid; diff --git a/include/linux/ext3_fs_sb.h b/include/linux/ext3_fs_sb.h index 6bda514a7a54..573aa3588735 100644 --- a/include/linux/ext3_fs_sb.h +++ b/include/linux/ext3_fs_sb.h @@ -22,14 +22,6 @@ #endif /* - * The following is not needed anymore since the descriptors buffer - * heads are now dynamically allocated - */ -/* #define EXT3_MAX_GROUP_DESC 8 */ - -#define EXT3_MAX_GROUP_LOADED 8 - -/* * third extended-fs super-block data in memory */ struct ext3_sb_info { @@ -46,12 +38,6 @@ struct ext3_sb_info { struct buffer_head * s_sbh; /* Buffer containing the super block */ struct ext3_super_block * s_es; /* Pointer to the super block in the buffer */ struct buffer_head ** s_group_desc; - unsigned short s_loaded_inode_bitmaps; - unsigned short s_loaded_block_bitmaps; - unsigned long s_inode_bitmap_number[EXT3_MAX_GROUP_LOADED]; - struct buffer_head * s_inode_bitmap[EXT3_MAX_GROUP_LOADED]; - unsigned long s_block_bitmap_number[EXT3_MAX_GROUP_LOADED]; - struct buffer_head * s_block_bitmap[EXT3_MAX_GROUP_LOADED]; unsigned long s_mount_opt; uid_t s_resuid; gid_t s_resgid; diff --git a/include/linux/fs.h b/include/linux/fs.h index 002e02289155..db86a9686640 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -359,7 +359,7 @@ struct inode { struct list_head i_dentry; unsigned long i_ino; atomic_t i_count; - kdev_t i_dev; + dev_t i_dev; umode_t i_mode; nlink_t i_nlink; uid_t i_uid; @@ -1223,7 +1223,6 @@ extern void ll_rw_block(int, int, struct buffer_head * bh[]); extern int submit_bh(int, struct buffer_head *); struct bio; extern int submit_bio(int, struct bio *); -extern int is_read_only(kdev_t); extern int bdev_read_only(struct block_device *); extern int set_blocksize(struct block_device *, int); extern int sb_set_blocksize(struct super_block *, int); diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 63fac87d50ef..317d45415250 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -18,14 +18,14 @@ #define __GFP_HIGHIO 0x80 /* Can start high mem physical IO? */ #define __GFP_FS 0x100 /* Can call down to low-level FS? */ -#define GFP_NOHIGHIO (__GFP_HIGH | __GFP_WAIT | __GFP_IO) -#define GFP_NOIO (__GFP_HIGH | __GFP_WAIT) -#define GFP_NOFS (__GFP_HIGH | __GFP_WAIT | __GFP_IO | __GFP_HIGHIO) +#define GFP_NOHIGHIO ( __GFP_WAIT | __GFP_IO) +#define GFP_NOIO ( __GFP_WAIT) +#define GFP_NOFS ( __GFP_WAIT | __GFP_IO | __GFP_HIGHIO) #define GFP_ATOMIC (__GFP_HIGH) #define GFP_USER ( __GFP_WAIT | __GFP_IO | __GFP_HIGHIO | __GFP_FS) #define GFP_HIGHUSER ( __GFP_WAIT | __GFP_IO | __GFP_HIGHIO | __GFP_FS | __GFP_HIGHMEM) -#define GFP_KERNEL (__GFP_HIGH | __GFP_WAIT | __GFP_IO | __GFP_HIGHIO | __GFP_FS) -#define GFP_NFS (__GFP_HIGH | __GFP_WAIT | __GFP_IO | __GFP_HIGHIO | __GFP_FS) +#define GFP_KERNEL ( __GFP_WAIT | __GFP_IO | __GFP_HIGHIO | __GFP_FS) +#define GFP_NFS ( __GFP_WAIT | __GFP_IO | __GFP_HIGHIO | __GFP_FS) #define GFP_KSWAPD ( __GFP_WAIT | __GFP_IO | __GFP_HIGHIO | __GFP_FS) /* Flag - indicates that the buffer will be suitable for DMA. Ignored on some diff --git a/include/linux/jbd.h b/include/linux/jbd.h index 683c1247fd70..fafb868eec11 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h @@ -250,6 +250,13 @@ static inline struct journal_head *bh2jh(struct buffer_head *bh) return bh->b_private; } +#define HAVE_JOURNAL_CALLBACK_STATUS +struct journal_callback { + struct list_head jcb_list; + void (*jcb_func)(struct journal_callback *jcb, int error); + /* user data goes here */ +}; + struct jbd_revoke_table_s; /* The handle_t type represents a single atomic update being performed @@ -280,6 +287,12 @@ struct handle_s operations */ int h_err; + /* List of application registered callbacks for this handle. + * The function(s) will be called after the transaction that + * this handle is part of has been committed to disk. + */ + struct list_head h_jcb; + /* Flags */ unsigned int h_sync: 1; /* sync-on-close */ unsigned int h_jdata: 1; /* force data journaling */ @@ -399,6 +412,10 @@ struct transaction_s /* How many handles used this transaction? */ int t_handle_count; + + /* List of registered callback functions for this transaction. + * Called when the transaction is committed. */ + struct list_head t_jcb; }; @@ -647,6 +664,9 @@ extern int journal_invalidatepage(journal_t *, extern int journal_try_to_free_buffers(journal_t *, struct page *, int); extern int journal_stop(handle_t *); extern int journal_flush (journal_t *); +extern void journal_callback_set(handle_t *handle, + void (*fn)(struct journal_callback *,int), + struct journal_callback *jcb); extern void journal_lock_updates (journal_t *); extern void journal_unlock_updates (journal_t *); diff --git a/include/linux/kdev_t.h b/include/linux/kdev_t.h index 2c61fc5161b6..1721915141c7 100644 --- a/include/linux/kdev_t.h +++ b/include/linux/kdev_t.h @@ -36,8 +36,7 @@ typedef struct { unsigned short major, minor; } kdev_t; Admissible operations on an object of type kdev_t: - passing it along - comparing it for equality with another such object -- storing it in inode->i_dev, inode->i_rdev, req->rq_dev, de->dc_dev, -- tty->device +- storing it in inode->i_rdev, req->rq_dev, de->dc_dev, tty->device - using its bit pattern as argument in a hash function - finding its major and minor - complaining about it diff --git a/include/linux/list.h b/include/linux/list.h index ac65cc310ab6..3e70aa03ac11 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -136,6 +136,19 @@ static inline int list_empty(list_t *head) return head->next == head; } +static inline void __list_splice(list_t *list, list_t *head) +{ + list_t *first = list->next; + list_t *last = list->prev; + list_t *at = head->next; + + first->prev = head; + head->next = first; + + last->next = at; + at->prev = last; +} + /** * list_splice - join two lists * @list: the new list to add. @@ -145,15 +158,22 @@ static inline void list_splice(list_t *list, list_t *head) { list_t *first = list->next; - if (first != list) { - list_t *last = list->prev; - list_t *at = head->next; - - first->prev = head; - head->next = first; + if (first != list) + __list_splice(list, head); +} - last->next = at; - at->prev = last; +/** + * list_splice_init - join two lists and reinitialise the emptied list. + * @list: the new list to add. + * @head: the place to add it in the first list. + * + * The list at @list is reinitialised + */ +static inline void list_splice_init(list_t *list, list_t *head) +{ + if (!list_empty(list)) { + __list_splice(list, head); + INIT_LIST_HEAD(list); } } diff --git a/include/linux/mm.h b/include/linux/mm.h index c93dfffc4760..163e19fd7b33 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -305,6 +305,16 @@ static inline void set_page_zone(struct page *page, unsigned long zone_num) #define NOPAGE_SIGBUS (NULL) #define NOPAGE_OOM ((struct page *) (-1)) +/* + * Different kinds of faults, as returned by handle_mm_fault(). + * Used to decide whether a process gets delivered SIGBUS or + * just gets major/minor fault counters bumped up. + */ +#define VM_FAULT_OOM (-1) +#define VM_FAULT_SIGBUS 0 +#define VM_FAULT_MINOR 1 +#define VM_FAULT_MAJOR 2 + /* The array of struct pages */ extern struct page *mem_map; diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index ab7b149a3f84..9de10bf92e32 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h @@ -70,7 +70,7 @@ struct svc_export { int ex_flags; struct vfsmount * ex_mnt; struct dentry * ex_dentry; - kdev_t ex_dev; + dev_t ex_dev; ino_t ex_ino; uid_t ex_anon_uid; gid_t ex_anon_gid; @@ -94,7 +94,7 @@ void exp_readlock(void); void exp_readunlock(void); struct svc_client * exp_getclient(struct sockaddr_in *sin); void exp_putclient(struct svc_client *clp); -struct svc_export * exp_get(struct svc_client *clp, kdev_t dev, ino_t ino); +struct svc_export * exp_get(struct svc_client *clp, dev_t dev, ino_t ino); struct svc_export * exp_get_fsid(struct svc_client *clp, int fsid); struct svc_export * exp_get_by_name(struct svc_client *clp, struct vfsmount *mnt, diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index 84c72958f99b..53f55cc17a50 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h @@ -143,13 +143,13 @@ static inline __u32 kdev_t_to_u32(kdev_t dev) return udev; } -static inline kdev_t u32_to_kdev_t(__u32 udev) +static inline dev_t u32_to_dev_t(__u32 udev) { unsigned int minor, major; minor = (udev & 0xff) | ((udev >> 8) & 0xfff00); major = ((udev >> 8) & 0xff) | ((udev >> 20) & 0xf00); - return mk_kdev(major, minor); + return MKDEV(major, minor); } static inline __u32 ino_t_to_u32(ino_t ino) diff --git a/include/linux/raid/linear.h b/include/linux/raid/linear.h index 56e7c06e1086..dfb588a60ea6 100644 --- a/include/linux/raid/linear.h +++ b/include/linux/raid/linear.h @@ -4,7 +4,6 @@ #include <linux/raid/md.h> struct dev_info { - kdev_t dev; struct block_device *bdev; unsigned long size; unsigned long offset; diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h index 19ebeb0a4988..280092c6e95b 100644 --- a/include/linux/raid/md.h +++ b/include/linux/raid/md.h @@ -66,7 +66,7 @@ extern struct hd_struct md_hd_struct[MAX_MD_DEVS]; extern char * partition_name (kdev_t dev); extern inline char * bdev_partition_name (struct block_device *bdev) { - return partition_name(to_kdev_t(bdev->bd_dev)); + return partition_name(bdev ? to_kdev_t(bdev->bd_dev) : NODEV); } extern int register_md_personality (int p_num, mdk_personality_t *p); extern int unregister_md_personality (int p_num); @@ -77,7 +77,7 @@ extern void md_wakeup_thread(mdk_thread_t *thread); extern void md_interrupt_thread (mdk_thread_t *thread); extern void md_update_sb (mddev_t *mddev); extern void md_done_sync(mddev_t *mddev, int blocks, int ok); -extern void md_sync_acct(kdev_t dev, unsigned long nr_sectors); +extern void md_sync_acct(struct block_device *bdev, unsigned long nr_sectors); extern int md_error (mddev_t *mddev, struct block_device *bdev); extern int md_run_setup(void); diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index e238bd222ea2..7b02c3c82a33 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h @@ -160,16 +160,6 @@ struct mdk_rdev_s int desc_nr; /* descriptor index in the superblock */ }; - -/* - * disk operations in a working array: - */ -#define DISKOP_SPARE_INACTIVE 0 -#define DISKOP_SPARE_WRITE 1 -#define DISKOP_SPARE_ACTIVE 2 -#define DISKOP_HOT_REMOVE_DISK 3 -#define DISKOP_HOT_ADD_DISK 4 - typedef struct mdk_personality_s mdk_personality_t; struct mddev_s @@ -213,19 +203,12 @@ struct mdk_personality_s int (*run)(mddev_t *mddev); int (*stop)(mddev_t *mddev); int (*status)(char *page, mddev_t *mddev); - int (*error_handler)(mddev_t *mddev, kdev_t dev); - -/* - * Some personalities (RAID-1, RAID-5) can have disks hot-added and - * hot-removed. Hot removal is different from failure. (failure marks - * a disk inactive, but the disk is still part of the array) The interface - * to such operations is the 'pers->diskop()' function, can be NULL. - * - * the diskop function can change the pointer pointing to the incoming - * descriptor, but must do so very carefully. (currently only - * SPARE_ACTIVE expects such a change) - */ - int (*diskop) (mddev_t *mddev, mdp_disk_t **descriptor, int state); + int (*error_handler)(mddev_t *mddev, struct block_device *bdev); + int (*hot_add_disk) (mddev_t *mddev, mdp_disk_t *descriptor, mdk_rdev_t *rdev); + int (*hot_remove_disk) (mddev_t *mddev, int number); + int (*spare_write) (mddev_t *mddev, int number); + int (*spare_inactive) (mddev_t *mddev); + int (*spare_active) (mddev_t *mddev, mdp_disk_t **descriptor); int (*sync_request)(mddev_t *mddev, sector_t sector_nr, int go_faster); }; diff --git a/include/linux/raid/multipath.h b/include/linux/raid/multipath.h index 9c9cdc77fa05..e4f3e6189b7b 100644 --- a/include/linux/raid/multipath.h +++ b/include/linux/raid/multipath.h @@ -6,7 +6,6 @@ struct multipath_info { int number; int raid_disk; - kdev_t dev; struct block_device *bdev; /* diff --git a/include/linux/raid/raid1.h b/include/linux/raid/raid1.h index f9f02ab19bd3..f63d68e55c11 100644 --- a/include/linux/raid/raid1.h +++ b/include/linux/raid/raid1.h @@ -8,7 +8,6 @@ typedef struct mirror_info mirror_info_t; struct mirror_info { int number; int raid_disk; - kdev_t dev; struct block_device *bdev; sector_t head_position; atomic_t nr_pending; diff --git a/include/linux/raid/raid5.h b/include/linux/raid/raid5.h index e14864259ffd..7f8beb8acdaa 100644 --- a/include/linux/raid/raid5.h +++ b/include/linux/raid/raid5.h @@ -192,7 +192,6 @@ struct stripe_head { struct disk_info { - kdev_t dev; struct block_device *bdev; int operational; int number; diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 29f6063b3546..d8b3fa0a7ba0 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h @@ -1675,13 +1675,10 @@ int pop_journal_writer(int windex) ; int journal_transaction_should_end(struct reiserfs_transaction_handle *, int) ; int reiserfs_in_journal(struct super_block *p_s_sb, unsigned long bl, int searchall, unsigned long *next) ; int journal_begin(struct reiserfs_transaction_handle *, struct super_block *p_s_sb, unsigned long) ; -struct super_block *reiserfs_get_super(kdev_t dev) ; void flush_async_commits(struct super_block *p_s_sb) ; int buffer_journaled(const struct buffer_head *bh) ; int mark_buffer_journal_new(struct buffer_head *bh) ; -int reiserfs_sync_all_buffers(kdev_t dev, int wait) ; -int reiserfs_sync_buffers(kdev_t dev, int wait) ; int reiserfs_add_page_to_flush_list(struct reiserfs_transaction_handle *, struct inode *, struct buffer_head *) ; int reiserfs_remove_page_from_flush_list(struct reiserfs_transaction_handle *, diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h index 04ec2e907f90..534d8e20bdb7 100644 --- a/include/linux/reiserfs_fs_sb.h +++ b/include/linux/reiserfs_fs_sb.h @@ -160,7 +160,7 @@ struct reiserfs_transaction_handle { int t_blocks_allocated ; /* number of blocks this writer allocated */ unsigned long t_trans_id ; /* sanity check, equals the current trans id */ struct super_block *t_super ; /* super for this FS when journal_begin was - called. saves calls to reiserfs_get_super */ + called. */ } ; /* diff --git a/include/linux/sched.h b/include/linux/sched.h index 6a83711022f8..41382c9f8653 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -385,12 +385,12 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0) #define PF_MEMDIE 0x00001000 /* Killed for out-of-memory */ #define PF_FREE_PAGES 0x00002000 /* per process page freeing */ #define PF_FLUSHER 0x00004000 /* responsible for disk writeback */ -#define PF_RADIX_TREE 0x00008000 /* debug: performing radix tree alloc */ +#define PF_NOWARN 0x00008000 /* debug: don't warn if alloc fails */ #define PF_FREEZE 0x00010000 /* this task should be frozen for suspend */ #define PF_IOTHREAD 0x00020000 /* this thread is needed for doing I/O to swap */ #define PF_FROZEN 0x00040000 /* frozen for system suspend */ - +#define PF_INVALIDATE 0x00080000 /* debug: unmounting an fs. killme. */ /* * Ptrace flags */ @@ -417,8 +417,7 @@ extern int task_prio(task_t *p); extern int task_nice(task_t *p); extern int idle_cpu(int cpu); -asmlinkage long sys_sched_yield(void); -#define yield() sys_sched_yield() +void yield(void); /* * The default (Linux) execution domain. @@ -836,10 +835,11 @@ static inline int need_resched(void) return unlikely(test_thread_flag(TIF_NEED_RESCHED)); } +extern void __cond_resched(void); static inline void cond_resched(void) { if (need_resched()) - schedule(); + __cond_resched(); } /* Reevaluate whether the task has signals pending delivery. diff --git a/include/linux/smb.h b/include/linux/smb.h index a9d88d856df5..5b8dce292377 100644 --- a/include/linux/smb.h +++ b/include/linux/smb.h @@ -10,7 +10,6 @@ #define _LINUX_SMB_H #include <linux/types.h> -#include <linux/kdev_t.h> enum smb_protocol { SMB_PROTOCOL_NONE, @@ -85,7 +84,6 @@ struct smb_fattr { nlink_t f_nlink; uid_t f_uid; gid_t f_gid; - kdev_t f_rdev; loff_t f_size; time_t f_atime; time_t f_mtime; diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 488bc05dbcc1..da8115ec58f6 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -30,7 +30,10 @@ struct file; -#define CTL_MAXNAME 10 +#define CTL_MAXNAME 10 /* how many path components do we allow in a + call to sysctl? In other words, what is + the largest acceptable value for the nlen + member of a struct __sysctl_args to have? */ struct __sysctl_args { int *name; @@ -145,6 +148,7 @@ enum VM_DIRTY_SYNC=13, /* dirty_sync_ratio */ VM_DIRTY_WB_CS=14, /* dirty_writeback_centisecs */ VM_DIRTY_EXPIRE_CS=15, /* dirty_expire_centisecs */ + VM_NR_PDFLUSH_THREADS=16, /* nr_pdflush_threads */ }; diff --git a/include/linux/writeback.h b/include/linux/writeback.h index a06b0f116ebd..af3ec94cb2ad 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -24,18 +24,22 @@ static inline int current_is_pdflush(void) /* * fs/fs-writeback.c */ -#define WB_SYNC_NONE 0 /* Don't wait on anything */ -#define WB_SYNC_LAST 1 /* Wait on the last-written mapping */ -#define WB_SYNC_ALL 2 /* Wait on every mapping */ -#define WB_SYNC_HOLD 3 /* Hold the inode on sb_dirty for sys_sync() */ +enum writeback_sync_modes { + WB_SYNC_NONE = 0, /* Don't wait on anything */ + WB_SYNC_LAST = 1, /* Wait on the last-written mapping */ + WB_SYNC_ALL = 2, /* Wait on every mapping */ + WB_SYNC_HOLD = 3, /* Hold the inode on sb_dirty for sys_sync() */ +}; -void writeback_unlocked_inodes(int *nr_to_write, int sync_mode, - unsigned long *older_than_this); +void writeback_unlocked_inodes(int *nr_to_write, + enum writeback_sync_modes sync_mode, + unsigned long *older_than_this); void wake_up_inode(struct inode *inode); void __wait_on_inode(struct inode * inode); void sync_inodes_sb(struct super_block *, int wait); void sync_inodes(int wait); +/* writeback.h requires fs.h; it, too, is not included from here. */ static inline void wait_on_inode(struct inode *inode) { if (inode->i_state & I_LOCK) @@ -45,15 +49,22 @@ static inline void wait_on_inode(struct inode *inode) /* * mm/page-writeback.c */ +/* These 5 are exported to sysctl. */ extern int dirty_background_ratio; extern int dirty_async_ratio; extern int dirty_sync_ratio; extern int dirty_writeback_centisecs; extern int dirty_expire_centisecs; + void balance_dirty_pages(struct address_space *mapping); void balance_dirty_pages_ratelimited(struct address_space *mapping); int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0); int do_writepages(struct address_space *mapping, int *nr_to_write); +/* pdflush.c */ +extern int nr_pdflush_threads; /* Global so it can be exported to sysctl + read-only. */ + + #endif /* WRITEBACK_H */ |
