summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blkdev.h5
-rw-r--r--include/linux/cdrom.h10
-rw-r--r--include/linux/compat_ioctl.h1
-rw-r--r--include/linux/compiler.h28
-rw-r--r--include/linux/device-mapper.h23
-rw-r--r--include/linux/dm-ioctl.h19
-rw-r--r--include/linux/fb.h188
-rw-r--r--include/linux/fs.h4
-rw-r--r--include/linux/loop.h1
-rw-r--r--include/linux/mmzone.h8
-rw-r--r--include/linux/page-flags.h40
-rw-r--r--include/linux/security.h13
-rw-r--r--include/linux/topology.h7
-rw-r--r--include/linux/udf_fs.h8
-rw-r--r--include/linux/ufs_fs.h170
-rw-r--r--include/linux/ufs_fs_i.h1
16 files changed, 403 insertions, 123 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 982c2ad23677..1a521e16b398 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -517,6 +517,9 @@ extern void blk_stop_queue(request_queue_t *q);
extern void __blk_stop_queue(request_queue_t *q);
extern void blk_run_queue(request_queue_t *q);
extern void blk_queue_activity_fn(request_queue_t *, activity_fn *, void *);
+extern struct request *blk_rq_map_user(request_queue_t *, int, void __user *, unsigned int);
+extern int blk_rq_unmap_user(struct request *, void __user *, unsigned int);
+extern int blk_execute_rq(request_queue_t *, struct gendisk *, struct request *);
static inline request_queue_t *bdev_get_queue(struct block_device *bdev)
{
@@ -589,7 +592,7 @@ extern int blk_queue_init_tags(request_queue_t *, int, struct blk_queue_tag *);
extern void blk_queue_free_tags(request_queue_t *);
extern int blk_queue_resize_tags(request_queue_t *, int);
extern void blk_queue_invalidate_tags(request_queue_t *);
-extern void blk_congestion_wait(int rw, long timeout);
+extern long blk_congestion_wait(int rw, long timeout);
extern void blk_rq_bio_prep(request_queue_t *, struct request *, struct bio *);
extern void blk_rq_prep_restart(struct request *);
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h
index 513ac8f4e9a2..a4e851d4a335 100644
--- a/include/linux/cdrom.h
+++ b/include/linux/cdrom.h
@@ -877,10 +877,18 @@ struct mode_page_header {
#include <linux/fs.h> /* not really needed, later.. */
#include <linux/device.h>
+/*
+ * _OLD will use PIO transfer on atapi devices, _BPC_* will use DMA
+ */
+#define CDDA_OLD 0 /* old style */
+#define CDDA_BPC_SINGLE 1 /* single frame block pc */
+#define CDDA_BPC_FULL 2 /* multi frame block pc */
+
/* Uniform cdrom data structures for cdrom.c */
struct cdrom_device_info {
struct cdrom_device_ops *ops; /* link to device_ops */
struct cdrom_device_info *next; /* next device_info for this major */
+ struct gendisk *disk; /* matching block layer disk */
void *handle; /* driver-dependent data */
/* specifications */
int mask; /* mask of capability: disables them */
@@ -894,6 +902,8 @@ struct cdrom_device_info {
/* per-device flags */
__u8 sanyo_slot : 2; /* Sanyo 3 CD changer support */
__u8 reserved : 6; /* not used yet */
+ int cdda_method; /* see flags */
+ __u8 last_sense;
int for_data;
int (*exit)(struct cdrom_device_info *);
int mrw_mode_page;
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h
index bfb63a040091..cd4c0c8d7ca5 100644
--- a/include/linux/compat_ioctl.h
+++ b/include/linux/compat_ioctl.h
@@ -134,6 +134,7 @@ COMPATIBLE_IOCTL(DM_TABLE_LOAD)
COMPATIBLE_IOCTL(DM_TABLE_CLEAR)
COMPATIBLE_IOCTL(DM_TABLE_DEPS)
COMPATIBLE_IOCTL(DM_TABLE_STATUS)
+COMPATIBLE_IOCTL(DM_LIST_VERSIONS)
/* Big K */
COMPATIBLE_IOCTL(PIO_FONT)
COMPATIBLE_IOCTL(GIO_FONT)
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index aeee438b861a..1daf6aaaea80 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -39,6 +39,20 @@
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
+/* Optimization barrier */
+#ifndef barrier
+# define barrier() __memory_barrier()
+#endif
+
+#ifndef RELOC_HIDE
+# define RELOC_HIDE(ptr, off) \
+ ({ unsigned long __ptr; \
+ __ptr = (unsigned long) (ptr); \
+ (typeof(ptr)) (__ptr + (off)); })
+#endif
+
+#endif /* __KERNEL__ */
+
/*
* Allow us to mark functions as 'deprecated' and have gcc emit a nice
* warning for each use, in hopes of speeding the functions removal.
@@ -100,18 +114,4 @@
#define noinline
#endif
-/* Optimization barrier */
-#ifndef barrier
-# define barrier() __memory_barrier()
-#endif
-
-#ifndef RELOC_HIDE
-# define RELOC_HIDE(ptr, off) \
- ({ unsigned long __ptr; \
- __ptr = (unsigned long) (ptr); \
- (typeof(ptr)) (__ptr + (off)); })
-#endif
-
-#endif /* __KERNEL__ */
-
#endif /* __LINUX_COMPILER_H */
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 40ea6338e1a1..7abe54e3ee70 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -13,6 +13,11 @@ struct dm_dev;
typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t;
+union map_info {
+ void *ptr;
+ unsigned long long ll;
+};
+
/*
* In the constructor the target parameter will already have the
* table, type, begin and len fields filled in.
@@ -32,7 +37,19 @@ typedef void (*dm_dtr_fn) (struct dm_target *ti);
* = 0: The target will handle the io by resubmitting it later
* > 0: simple remap complete
*/
-typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio);
+typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio,
+ union map_info *map_context);
+
+/*
+ * Returns:
+ * < 0 : error (currently ignored)
+ * 0 : ended successfully
+ * 1 : for some reason the io has still not completed (eg,
+ * multipath target might want to requeue a failed io).
+ */
+typedef int (*dm_endio_fn) (struct dm_target *ti,
+ struct bio *bio, int error,
+ union map_info *map_context);
typedef void (*dm_suspend_fn) (struct dm_target *ti);
typedef void (*dm_resume_fn) (struct dm_target *ti);
@@ -57,9 +74,11 @@ void dm_put_device(struct dm_target *ti, struct dm_dev *d);
struct target_type {
const char *name;
struct module *module;
+ unsigned version[3];
dm_ctr_fn ctr;
dm_dtr_fn dtr;
dm_map_fn map;
+ dm_endio_fn end_io;
dm_suspend_fn suspend;
dm_resume_fn resume;
dm_status_fn status;
@@ -86,7 +105,7 @@ struct dm_target {
sector_t split_io;
/*
- * These are automaticall filled in by
+ * These are automatically filled in by
* dm_table_get_device.
*/
struct io_restrictions limits;
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h
index 74a8d14b885d..cd781d795f8d 100644
--- a/include/linux/dm-ioctl.h
+++ b/include/linux/dm-ioctl.h
@@ -163,6 +163,16 @@ struct dm_name_list {
};
/*
+ * Used to retrieve the target versions
+ */
+struct dm_target_versions {
+ uint32_t next;
+ uint32_t version[3];
+
+ char name[0];
+};
+
+/*
* If you change this make sure you make the corresponding change
* to dm-ioctl.c:lookup_ioctl()
*/
@@ -185,6 +195,9 @@ enum {
DM_TABLE_CLEAR_CMD,
DM_TABLE_DEPS_CMD,
DM_TABLE_STATUS_CMD,
+
+ /* Added later */
+ DM_LIST_VERSIONS_CMD,
};
#define DM_IOCTL 0xfd
@@ -205,10 +218,12 @@ enum {
#define DM_TABLE_DEPS _IOWR(DM_IOCTL, DM_TABLE_DEPS_CMD, struct dm_ioctl)
#define DM_TABLE_STATUS _IOWR(DM_IOCTL, DM_TABLE_STATUS_CMD, struct dm_ioctl)
+#define DM_LIST_VERSIONS _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, struct dm_ioctl)
+
#define DM_VERSION_MAJOR 4
-#define DM_VERSION_MINOR 0
+#define DM_VERSION_MINOR 1
#define DM_VERSION_PATCHLEVEL 0
-#define DM_VERSION_EXTRA "-ioctl (2003-06-04)"
+#define DM_VERSION_EXTRA "-ioctl (2003-12-10)"
/* Status bits */
#define DM_READONLY_FLAG (1 << 0) /* In/Out */
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 85176893dbf4..99d3db0779c1 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -236,15 +236,71 @@ struct fb_con2fbmap {
#define VESA_HSYNC_SUSPEND 2
#define VESA_POWERDOWN 3
+/* Definitions below are used in the parsed monitor specs */
+#define FB_DPMS_ACTIVE_OFF 1
+#define FB_DPMS_SUSPEND 2
+#define FB_DPMS_STANDBY 4
+
+#define FB_DISP_DDI 1
+#define FB_DISP_ANA_700_300 2
+#define FB_DISP_ANA_714_286 4
+#define FB_DISP_ANA_1000_400 8
+#define FB_DISP_ANA_700_000 16
+
+#define FB_DISP_MONO 32
+#define FB_DISP_RGB 64
+#define FB_DISP_MULTI 128
+#define FB_DISP_UNKNOWN 256
+
+#define FB_SIGNAL_NONE 0
+#define FB_SIGNAL_BLANK_BLANK 1
+#define FB_SIGNAL_SEPARATE 2
+#define FB_SIGNAL_COMPOSITE 4
+#define FB_SIGNAL_SYNC_ON_GREEN 8
+#define FB_SIGNAL_SERRATION_ON 16
+
+#define FB_MISC_PRIM_COLOR 1
+#define FB_MISC_1ST_DETAIL 2 /* First Detailed Timing is preferred */
+
+struct fb_chroma {
+ __u32 redx; /* in fraction of 1024 */
+ __u32 greenx;
+ __u32 bluex;
+ __u32 whitex;
+ __u32 redy;
+ __u32 greeny;
+ __u32 bluey;
+ __u32 whitey;
+};
+
struct fb_monspecs {
+ struct fb_chroma chroma;
+ struct fb_videomode *modedb; /* mode database */
+ __u8 manufacturer[4]; /* Manufacturer */
+ __u8 monitor[14]; /* Monitor String */
+ __u8 serial_no[14]; /* Serial Number */
+ __u8 ascii[14]; /* ? */
+ __u32 modedb_len; /* mode database length */
+ __u32 model; /* Monitor Model */
+ __u32 serial; /* Serial Number - Integer */
+ __u32 year; /* Year manufactured */
+ __u32 week; /* Week Manufactured */
__u32 hfmin; /* hfreq lower limit (Hz) */
- __u32 hfmax; /* hfreq upper limit (Hz) */
+ __u32 hfmax; /* hfreq upper limit (Hz) */
+ __u32 dclkmin; /* pixelclock lower limit (Hz) */
+ __u32 dclkmax; /* pixelclock upper limit (Hz) */
+ __u16 input; /* display type - see FB_DISP_* */
+ __u16 dpms; /* DPMS support - see FB_DPMS_ */
+ __u16 signal; /* Signal Type - see FB_SIGNAL_* */
__u16 vfmin; /* vfreq lower limit (Hz) */
__u16 vfmax; /* vfreq upper limit (Hz) */
- __u32 dclkmin; /* pixelclock lower limit (Hz) */
- __u32 dclkmax; /* pixelclock upper limit (Hz) */
- unsigned gtf : 1; /* supports GTF */
- unsigned dpms : 1; /* supports DPMS */
+ __u16 gamma; /* Gamma - in fractions of 100 */
+ __u16 gtf : 1; /* supports GTF */
+ __u16 misc; /* Misc flags - see FB_MISC_* */
+ __u8 version; /* EDID version... */
+ __u8 revision; /* ...and revision */
+ __u8 max_x; /* Maximum horizontal size (cm) */
+ __u8 max_y; /* Maximum vertical size (cm) */
};
#define FB_VBLANK_VBLANKING 0x001 /* currently in a vertical blank */
@@ -379,14 +435,19 @@ struct fb_pixmap {
u32 scan_align; /* alignment per scanline */
u32 access_align; /* alignment per read/write */
u32 flags; /* see FB_PIXMAP_* */
- /* access methods */
+ /* access methods */
void (*outbuf)(struct fb_info *info, u8 *addr, u8 *src, unsigned int size);
u8 (*inbuf) (struct fb_info *info, u8 *addr);
};
- /*
- * Frame buffer operations
- */
+
+/*
+ * Frame buffer operations
+ *
+ * LOCKING NOTE: those functions must _ALL_ be called with the console
+ * semaphore held, this is the only suitable locking mecanism we have
+ * in 2.6. Some may be called at interrupt time at this point though.
+ */
struct fb_ops {
/* open/release and usage marking */
@@ -394,13 +455,16 @@ struct fb_ops {
int (*fb_open)(struct fb_info *info, int user);
int (*fb_release)(struct fb_info *info, int user);
- /* For framebuffers with strange non linear layouts */
+ /* For framebuffers with strange non linear layouts or that do not
+ * work with normal memory mapped access
+ */
ssize_t (*fb_read)(struct file *file, char *buf, size_t count, loff_t *ppos);
ssize_t (*fb_write)(struct file *file, const char *buf, size_t count, loff_t *ppos);
/* checks var and eventually tweaks it to something supported,
* DO NOT MODIFY PAR */
int (*fb_check_var)(struct fb_var_screeninfo *var, struct fb_info *info);
+
/* set the video mode according to info->var */
int (*fb_set_par)(struct fb_info *info);
@@ -441,15 +505,14 @@ struct fb_ops {
struct fb_info {
int node;
int flags;
- int open; /* Has this been open already ? */
#define FBINFO_FLAG_MODULE 1 /* Low-level driver is a module */
struct fb_var_screeninfo var; /* Current var */
struct fb_fix_screeninfo fix; /* Current fix */
struct fb_monspecs monspecs; /* Current Monitor specs */
struct fb_cursor cursor; /* Current cursor */
struct work_struct queue; /* Framebuffer event queue */
- struct fb_pixmap pixmap; /* Image Hardware Mapper */
- struct fb_pixmap sprite; /* Cursor hardware Mapper */
+ struct fb_pixmap pixmap; /* Image hardware mapper */
+ struct fb_pixmap sprite; /* Cursor hardware mapper */
struct fb_cmap cmap; /* Current cmap */
struct fb_ops *fbops;
char *screen_base; /* Virtual address */
@@ -459,6 +522,7 @@ struct fb_info {
#define FBINFO_STATE_RUNNING 0
#define FBINFO_STATE_SUSPENDED 1
u32 state; /* Hardware state i.e suspend */
+
/* From here on everything is device dependent */
void *par;
};
@@ -469,12 +533,14 @@ struct fb_info {
#define FBINFO_FLAG_DEFAULT 0
#endif
+// This will go away
#if defined(__sparc__)
/* We map all of our framebuffers such that big-endian accesses
* are what we want, so the following is sufficient.
*/
+// This will go away
#define fb_readb sbus_readb
#define fb_readw sbus_readw
#define fb_readl sbus_readl
@@ -485,7 +551,7 @@ struct fb_info {
#define fb_writeq sbus_writeq
#define fb_memset sbus_memset_io
-#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__)
+#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__) || defined(__powerpc__)
#define fb_readb __raw_readb
#define fb_readw __raw_readw
@@ -546,24 +612,32 @@ extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev);
extern void framebuffer_release(struct fb_info *info);
/* drivers/video/fbmon.c */
-#define FB_MAXTIMINGS 0
-#define FB_VSYNCTIMINGS 1
-#define FB_HSYNCTIMINGS 2
-#define FB_DCLKTIMINGS 3
-#define FB_IGNOREMON 0x100
+#define FB_MAXTIMINGS 0
+#define FB_VSYNCTIMINGS 1
+#define FB_HSYNCTIMINGS 2
+#define FB_DCLKTIMINGS 3
+#define FB_IGNOREMON 0x100
+
+#define FB_MODE_IS_UNKNOWN 0
+#define FB_MODE_IS_DETAILED 1
+#define FB_MODE_IS_STANDARD 2
+#define FB_MODE_IS_VESA 4
+#define FB_MODE_IS_CALCULATED 8
+#define FB_MODE_IS_FIRST 16
extern int fbmon_valid_timings(u_int pixclock, u_int htotal, u_int vtotal,
const struct fb_info *fb_info);
extern int fbmon_dpms(const struct fb_info *fb_info);
extern int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var,
struct fb_info *info);
-extern int fb_validate_mode(struct fb_var_screeninfo *var,
+extern int fb_validate_mode(const struct fb_var_screeninfo *var,
struct fb_info *info);
-extern int parse_edid(unsigned char *edid, struct fb_var_screeninfo *var);
+extern int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var);
+extern int fb_get_monitor_limits(unsigned char *edid, struct fb_monspecs *specs);
+extern void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs);
extern int fb_get_monitor_limits(unsigned char *edid, struct fb_monspecs *specs);
extern struct fb_videomode *fb_create_modedb(unsigned char *edid, int *dbsize);
extern void fb_destroy_modedb(struct fb_videomode *modedb);
-extern void show_edid(unsigned char *edid);
/* drivers/video/modedb.c */
#define VESA_MODEDB_SIZE 34
@@ -578,58 +652,28 @@ extern struct fb_cmap *fb_default_cmap(int len);
extern void fb_invert_cmaps(void);
struct fb_videomode {
- const char *name; /* optional */
- u32 refresh; /* optional */
- u32 xres;
- u32 yres;
- u32 pixclock;
- u32 left_margin;
- u32 right_margin;
- u32 upper_margin;
- u32 lower_margin;
- u32 hsync_len;
- u32 vsync_len;
- u32 sync;
- u32 vmode;
+ const char *name; /* optional */
+ u32 refresh; /* optional */
+ u32 xres;
+ u32 yres;
+ u32 pixclock;
+ u32 left_margin;
+ u32 right_margin;
+ u32 upper_margin;
+ u32 lower_margin;
+ u32 hsync_len;
+ u32 vsync_len;
+ u32 sync;
+ u32 vmode;
+ u32 flag;
};
-#ifdef MODULE
-static inline int fb_find_mode(struct fb_var_screeninfo *var,
- struct fb_info *info,
- const char *mode_option,
- const struct fb_videomode *db,
- unsigned int dbsize,
- const struct fb_videomode *default_mode,
- unsigned int default_bpp)
-{
- extern int __fb_try_mode(struct fb_var_screeninfo *var,
- struct fb_info *info,
- const struct fb_videomode *mode,
- unsigned int bpp);
- /*
- * FIXME: How to make the compiler optimize vga640x400 away if
- * default_mode is non-NULL?
- */
- static const struct fb_videomode vga640x400 = {
- /* 640x400 @ 70 Hz, 31.5 kHz hsync */
- NULL, 70, 640, 400, 39721, 40, 24, 39, 9, 96, 2,
- 0, FB_VMODE_NONINTERLACED
- };
- if (!default_mode)
- default_mode = &vga640x400;
- if (!default_bpp)
- default_bpp = 8;
- return __fb_try_mode(var, info, default_mode, default_bpp);
-}
-#else
-extern int __init fb_find_mode(struct fb_var_screeninfo *var,
- struct fb_info *info,
- const char *mode_option,
- const struct fb_videomode *db,
- unsigned int dbsize,
- const struct fb_videomode *default_mode,
- unsigned int default_bpp);
-#endif
+extern int fb_find_mode(struct fb_var_screeninfo *var,
+ struct fb_info *info, const char *mode_option,
+ const struct fb_videomode *db,
+ unsigned int dbsize,
+ const struct fb_videomode *default_mode,
+ unsigned int default_bpp);
#endif /* __KERNEL__ */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 025fdc3b379b..661e12c67875 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -89,6 +89,7 @@ extern int leases_enable, dir_notify_enable, lease_break_time;
/* public flags for file_system_type */
#define FS_REQUIRES_DEV 1
+#define FS_BINARY_MOUNTDATA 2
#define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */
#define FS_ODD_RENAME 32768 /* Temporary stuff; will go away as soon
* as nfs_rename() will be cleaned up
@@ -507,6 +508,8 @@ struct file_ra_state {
unsigned long prev_page; /* Cache last read() position */
unsigned long ahead_start; /* Ahead window */
unsigned long ahead_size;
+ unsigned long serial_cnt; /* measure of sequentiality */
+ unsigned long average; /* another measure of sequentiality */
unsigned long ra_pages; /* Maximum readahead window */
unsigned long mmap_hit; /* Cache hit stat for mmap accesses */
unsigned long mmap_miss; /* Cache miss stat for mmap accesses */
@@ -1133,6 +1136,7 @@ extern void vfs_caches_init(unsigned long);
extern int register_blkdev(unsigned int, const char *);
extern int unregister_blkdev(unsigned int, const char *);
extern struct block_device *bdget(dev_t);
+extern void bd_set_size(struct block_device *, loff_t size);
extern void bd_forget(struct inode *inode);
extern void bdput(struct block_device *);
extern int blkdev_open(struct inode *, struct file *);
diff --git a/include/linux/loop.h b/include/linux/loop.h
index 31754df95143..652124463a24 100644
--- a/include/linux/loop.h
+++ b/include/linux/loop.h
@@ -153,5 +153,6 @@ int loop_unregister_transfer(int number);
#define LOOP_GET_STATUS 0x4C03
#define LOOP_SET_STATUS64 0x4C04
#define LOOP_GET_STATUS64 0x4C05
+#define LOOP_CHANGE_FD 0x4C06
#endif
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 1cbccb4d226f..091159691236 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -76,7 +76,8 @@ struct zone {
spinlock_t lru_lock;
struct list_head active_list;
struct list_head inactive_list;
- atomic_t refill_counter;
+ atomic_t nr_scan_active;
+ atomic_t nr_scan_inactive;
unsigned long nr_active;
unsigned long nr_inactive;
int all_unreclaimable; /* All pages pinned */
@@ -288,6 +289,11 @@ static inline int is_highmem(struct zone *zone)
return (zone - zone->zone_pgdat->node_zones == ZONE_HIGHMEM);
}
+static inline int is_normal(struct zone *zone)
+{
+ return (zone - zone->zone_pgdat->node_zones == ZONE_NORMAL);
+}
+
/* These two functions are used to setup the per zone pages min values */
struct ctl_table;
struct file;
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 0b35e7111465..f58c9e68d3d8 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -98,23 +98,38 @@ struct page_state {
unsigned long pgpgout; /* Disk writes */
unsigned long pswpin; /* swap reads */
unsigned long pswpout; /* swap writes */
- unsigned long pgalloc; /* page allocations */
+ unsigned long pgalloc_high; /* page allocations */
+ unsigned long pgalloc_normal;
+ unsigned long pgalloc_dma;
unsigned long pgfree; /* page freeings */
unsigned long pgactivate; /* pages moved inactive->active */
unsigned long pgdeactivate; /* pages moved active->inactive */
+
unsigned long pgfault; /* faults (major+minor) */
unsigned long pgmajfault; /* faults (major only) */
-
- unsigned long pgscan; /* pages scanned by page reclaim */
- unsigned long pgrefill; /* inspected in refill_inactive_zone */
- unsigned long pgsteal; /* total pages reclaimed */
+ unsigned long pgrefill_high; /* inspected in refill_inactive_zone */
+ unsigned long pgrefill_normal;
+ unsigned long pgrefill_dma;
+
+ unsigned long pgsteal_high; /* total highmem pages reclaimed */
+ unsigned long pgsteal_normal;
+ unsigned long pgsteal_dma;
+ unsigned long pgscan_kswapd_high;/* total highmem pages scanned */
+ unsigned long pgscan_kswapd_normal;
+
+ unsigned long pgscan_kswapd_dma;
+ unsigned long pgscan_direct_high;/* total highmem pages scanned */
+ unsigned long pgscan_direct_normal;
+ unsigned long pgscan_direct_dma;
unsigned long pginodesteal; /* pages reclaimed via inode freeing */
- unsigned long kswapd_steal; /* pages reclaimed by kswapd */
+ unsigned long slabs_scanned; /* slab objects scanned */
+ unsigned long kswapd_steal; /* pages reclaimed by kswapd */
unsigned long kswapd_inodesteal;/* reclaimed via kswapd inode freeing */
unsigned long pageoutrun; /* kswapd's calls to page reclaim */
unsigned long allocstall; /* direct reclaim calls */
+
unsigned long pgrotated; /* pages rotated to tail of the LRU */
} ____cacheline_aligned;
@@ -131,11 +146,24 @@ extern void get_full_page_state(struct page_state *ret);
local_irq_restore(flags); \
} while (0)
+
#define inc_page_state(member) mod_page_state(member, 1UL)
#define dec_page_state(member) mod_page_state(member, 0UL - 1)
#define add_page_state(member,delta) mod_page_state(member, (delta))
#define sub_page_state(member,delta) mod_page_state(member, 0UL - (delta))
+#define mod_page_state_zone(zone, member, delta) \
+ do { \
+ unsigned long flags; \
+ local_irq_save(flags); \
+ if (is_highmem(zone)) \
+ __get_cpu_var(page_states).member##_high += (delta);\
+ else if (is_normal(zone)) \
+ __get_cpu_var(page_states).member##_normal += (delta);\
+ else \
+ __get_cpu_var(page_states).member##_dma += (delta);\
+ local_irq_restore(flags); \
+ } while (0)
/*
* Manipulation of page state flags
diff --git a/include/linux/security.h b/include/linux/security.h
index 05d468421611..9baa2ed4ac96 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -177,7 +177,7 @@ struct swap_info_struct;
* options cleanly (a filesystem may modify the data e.g. with strsep()).
* This also allows the original mount data to be stripped of security-
* specific options to avoid having to make filesystems aware of them.
- * @fstype the type of filesystem being mounted.
+ * @type the type of filesystem being mounted.
* @orig the original mount data copied from userspace.
* @copy copied data which will be passed to the security module.
* Returns 0 if the copy was successful.
@@ -1033,7 +1033,8 @@ struct security_operations {
int (*sb_alloc_security) (struct super_block * sb);
void (*sb_free_security) (struct super_block * sb);
- int (*sb_copy_data)(const char *fstype, void *orig, void *copy);
+ int (*sb_copy_data)(struct file_system_type *type,
+ void *orig, void *copy);
int (*sb_kern_mount) (struct super_block *sb, void *data);
int (*sb_statfs) (struct super_block * sb);
int (*sb_mount) (char *dev_name, struct nameidata * nd,
@@ -1318,9 +1319,10 @@ static inline void security_sb_free (struct super_block *sb)
security_ops->sb_free_security (sb);
}
-static inline int security_sb_copy_data (const char *fstype, void *orig, void *copy)
+static inline int security_sb_copy_data (struct file_system_type *type,
+ void *orig, void *copy)
{
- return security_ops->sb_copy_data (fstype, orig, copy);
+ return security_ops->sb_copy_data (type, orig, copy);
}
static inline int security_sb_kern_mount (struct super_block *sb, void *data)
@@ -1988,7 +1990,8 @@ static inline int security_sb_alloc (struct super_block *sb)
static inline void security_sb_free (struct super_block *sb)
{ }
-static inline int security_sb_copy_data (const char *fstype, void *orig, void *copy)
+static inline int security_sb_copy_data (struct file_system_type *type,
+ void *orig, void *copy)
{
return 0;
}
diff --git a/include/linux/topology.h b/include/linux/topology.h
index 5f7543009717..a78a177137d5 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -54,4 +54,11 @@ static inline int __next_node_with_cpus(int node)
#define for_each_node_with_cpus(node) \
for (node = 0; node < numnodes; node = __next_node_with_cpus(node))
+#ifndef node_distance
+#define node_distance(from,to) (from != to)
+#endif
+#ifndef PENALTY_FOR_NODE_WITH_CPUS
+#define PENALTY_FOR_NODE_WITH_CPUS (1)
+#endif
+
#endif /* _LINUX_TOPOLOGY_H */
diff --git a/include/linux/udf_fs.h b/include/linux/udf_fs.h
index 45c1a58688ab..4f19d23eb941 100644
--- a/include/linux/udf_fs.h
+++ b/include/linux/udf_fs.h
@@ -8,7 +8,7 @@
* OSTA-UDF(tm) = Optical Storage Technology Association
* Universal Disk Format.
*
- * This code is based on version 2.00 of the UDF specification,
+ * This code is based on version 2.50 of the UDF specification,
* and revision 3 of the ECMA 167 standard [equivalent to ISO 13346].
* http://www.osta.org/ * http://www.ecma.ch/
* http://www.iso.org/
@@ -24,7 +24,7 @@
* ftp://prep.ai.mit.edu/pub/gnu/GPL
* Each contributing author retains all rights to their own work.
*
- * (C) 1999-2000 Ben Fennema
+ * (C) 1999-2004 Ben Fennema
* (C) 1999-2000 Stelias Computing Inc
*
* HISTORY
@@ -37,8 +37,8 @@
#define UDF_PREALLOCATE
#define UDF_DEFAULT_PREALLOC_BLOCKS 8
-#define UDFFS_DATE "2002/11/15"
-#define UDFFS_VERSION "0.9.7"
+#define UDFFS_DATE "2004/29/09"
+#define UDFFS_VERSION "0.9.8.1"
#define UDFFS_DEBUG
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h
index cc3ddd5f680f..507187f51c58 100644
--- a/include/linux/ufs_fs.h
+++ b/include/linux/ufs_fs.h
@@ -22,6 +22,9 @@
* HP/UX hfs filesystem support added by
* Martin K. Petersen <mkp@mkp.net>, August 1999
*
+ * UFS2 (of FreeBSD 5.x) support added by
+ * Niraj Kumar <niraj17@iitbombay.org> , Jan 2004
+ *
*/
#ifndef __LINUX_UFS_FS_H
@@ -43,8 +46,50 @@
#define UFS_SECTOR_SIZE 512
#define UFS_SECTOR_BITS 9
-#define UFS_MAGIC 0x00011954
-#define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */
+#define UFS_MAGIC 0x00011954
+#define UFS2_MAGIC 0x19540119
+#define UFS_CIGAM 0x54190100 /* byteswapped MAGIC */
+
+/* Copied from FreeBSD */
+/*
+ * Each disk drive contains some number of filesystems.
+ * A filesystem consists of a number of cylinder groups.
+ * Each cylinder group has inodes and data.
+ *
+ * A filesystem is described by its super-block, which in turn
+ * describes the cylinder groups. The super-block is critical
+ * data and is replicated in each cylinder group to protect against
+ * catastrophic loss. This is done at `newfs' time and the critical
+ * super-block data does not change, so the copies need not be
+ * referenced further unless disaster strikes.
+ *
+ * For filesystem fs, the offsets of the various blocks of interest
+ * are given in the super block as:
+ * [fs->fs_sblkno] Super-block
+ * [fs->fs_cblkno] Cylinder group block
+ * [fs->fs_iblkno] Inode blocks
+ * [fs->fs_dblkno] Data blocks
+ * The beginning of cylinder group cg in fs, is given by
+ * the ``cgbase(fs, cg)'' macro.
+ *
+ * Depending on the architecture and the media, the superblock may
+ * reside in any one of four places. For tiny media where every block
+ * counts, it is placed at the very front of the partition. Historically,
+ * UFS1 placed it 8K from the front to leave room for the disk label and
+ * a small bootstrap. For UFS2 it got moved to 64K from the front to leave
+ * room for the disk label and a bigger bootstrap, and for really piggy
+ * systems we check at 256K from the front if the first three fail. In
+ * all cases the size of the superblock will be SBLOCKSIZE. All values are
+ * given in byte-offset form, so they do not imply a sector size. The
+ * SBLOCKSEARCH specifies the order in which the locations should be searched.
+ */
+#define SBLOCK_FLOPPY 0
+#define SBLOCK_UFS1 8192
+#define SBLOCK_UFS2 65536
+#define SBLOCK_PIGGY 262144
+#define SBLOCKSIZE 8192
+#define SBLOCKSEARCH \
+ { SBLOCK_UFS2, SBLOCK_UFS1, SBLOCK_FLOPPY, SBLOCK_PIGGY, -1 }
/* HP specific MAGIC values */
@@ -120,6 +165,11 @@
#define UFS_CG_OLD 0x00000000
#define UFS_CG_44BSD 0x00002000
#define UFS_CG_SUN 0x00001000
+/* filesystem type encoding */
+#define UFS_TYPE_MASK 0x00010000 /* mask for the following */
+#define UFS_TYPE_UFS1 0x00000000
+#define UFS_TYPE_UFS2 0x00010000
+
/* fs_inodefmt options */
#define UFS_42INODEFMT -1
@@ -132,7 +182,7 @@
#define UFS_MOUNT_ONERROR_UMOUNT 0x00000004
#define UFS_MOUNT_ONERROR_REPAIR 0x00000008
-#define UFS_MOUNT_UFSTYPE 0x00000FF0
+#define UFS_MOUNT_UFSTYPE 0x0000FFF0
#define UFS_MOUNT_UFSTYPE_OLD 0x00000010
#define UFS_MOUNT_UFSTYPE_44BSD 0x00000020
#define UFS_MOUNT_UFSTYPE_SUN 0x00000040
@@ -141,6 +191,7 @@
#define UFS_MOUNT_UFSTYPE_OPENSTEP 0x00000200
#define UFS_MOUNT_UFSTYPE_SUNx86 0x00000400
#define UFS_MOUNT_UFSTYPE_HP 0x00000800
+#define UFS_MOUNT_UFSTYPE_UFS2 0x00001000
#define ufs_clear_opt(o,opt) o &= ~UFS_MOUNT_##opt
#define ufs_set_opt(o,opt) o |= UFS_MOUNT_##opt
@@ -173,7 +224,8 @@
* They calc file system addresses of cylinder group data structures.
*/
#define ufs_cgbase(c) (uspi->s_fpg * (c))
-#define ufs_cgstart(c) (ufs_cgbase(c) + uspi->s_cgoffset * ((c) & ~uspi->s_cgmask))
+#define ufs_cgstart(c) ((uspi)->fs_magic == UFS2_MAGIC ? ufs_cgbase(c) : \
+ (ufs_cgbase(c) + uspi->s_cgoffset * ((c) & ~uspi->s_cgmask)))
#define ufs_cgsblock(c) (ufs_cgstart(c) + uspi->s_sblkno) /* super blk */
#define ufs_cgcmin(c) (ufs_cgstart(c) + uspi->s_cblkno) /* cg block */
#define ufs_cgimin(c) (ufs_cgstart(c) + uspi->s_iblkno) /* inode blk */
@@ -227,8 +279,14 @@
#define UFS_MAXNAMLEN 255
#define UFS_MAXMNTLEN 512
+#define UFS2_MAXMNTLEN 468
+#define UFS2_MAXVOLLEN 32
/* #define UFS_MAXCSBUFS 31 */
#define UFS_LINK_MAX 32000
+/*
+#define UFS2_NOCSPTRS ((128 / sizeof(void *)) - 4)
+*/
+#define UFS2_NOCSPTRS 28
/*
* UFS_DIR_PAD defines the directory entries boundaries
@@ -262,6 +320,14 @@ struct ufs_csum {
__u32 cs_nifree; /* number of free inodes */
__u32 cs_nffree; /* number of free frags */
};
+struct ufs2_csum_total {
+ __u64 cs_ndir; /* number of directories */
+ __u64 cs_nbfree; /* number of free blocks */
+ __u64 cs_nifree; /* number of free inodes */
+ __u64 cs_nffree; /* number of free frags */
+ __u64 cs_numclusters; /* number of free clusters */
+ __u64 cs_spare[3]; /* future expansion */
+};
/*
* This is the actual superblock, as it is laid out on the disk.
@@ -333,7 +399,7 @@ struct ufs_super_block {
__u32 fs_ncyl; /* cylinders in file system */
/* these fields can be computed from the others */
__u32 fs_cpg; /* cylinders per group */
- __u32 fs_ipg; /* inodes per group */
+ __u32 fs_ipg; /* inodes per cylinder group */
__u32 fs_fpg; /* blocks per group * fs_frag */
/* this data must be re-computed after crashes */
struct ufs_csum fs_cstotal; /* cylinder summary information */
@@ -342,13 +408,39 @@ struct ufs_super_block {
__s8 fs_clean; /* file system is clean flag */
__s8 fs_ronly; /* mounted read-only flag */
__s8 fs_flags; /* currently unused flag */
- __s8 fs_fsmnt[UFS_MAXMNTLEN]; /* name mounted on */
-/* these fields retain the current block allocation info */
- __u32 fs_cgrotor; /* last cg searched */
- __u32 fs_csp[UFS_MAXCSBUFS]; /* list of fs_cs info buffers */
- __u32 fs_maxcluster;
- __u32 fs_cpc; /* cyl per cycle in postbl */
- __u16 fs_opostbl[16][8]; /* old rotation block list head */
+ union {
+ struct {
+ __s8 fs_fsmnt[UFS_MAXMNTLEN];/* name mounted on */
+ __u32 fs_cgrotor; /* last cg searched */
+ __u32 fs_csp[UFS_MAXCSBUFS];/*list of fs_cs info buffers */
+ __u32 fs_maxcluster;
+ __u32 fs_cpc; /* cyl per cycle in postbl */
+ __u16 fs_opostbl[16][8]; /* old rotation block list head */
+ } fs_u1;
+ struct {
+ __s8 fs_fsmnt[UFS2_MAXMNTLEN]; /* name mounted on */
+ __u8 fs_volname[UFS2_MAXVOLLEN]; /* volume name */
+ __u64 fs_swuid; /* system-wide uid */
+ __s32 fs_pad; /* due to alignment of fs_swuid */
+ __u32 fs_cgrotor; /* last cg searched */
+ __u32 fs_ocsp[UFS2_NOCSPTRS]; /*list of fs_cs info buffers */
+ __u32 fs_contigdirs;/*# of contiguously allocated dirs */
+ __u32 fs_csp; /* cg summary info buffer for fs_cs */
+ __u32 fs_maxcluster;
+ __u32 fs_active;/* used by snapshots to track fs */
+ __s32 fs_old_cpc; /* cyl per cycle in postbl */
+ __s32 fs_maxbsize;/*maximum blocking factor permitted */
+ __s64 fs_sparecon64[17];/*old rotation block list head */
+ __s64 fs_sblockloc; /* byte offset of standard superblock */
+ struct ufs2_csum_total fs_cstotal;/*cylinder summary information*/
+ struct ufs_timeval fs_time; /* last time written */
+ __s64 fs_size; /* number of blocks in fs */
+ __s64 fs_dsize; /* number of data blocks in fs */
+ __u64 fs_csaddr; /* blk addr of cyl grp summary area */
+ __s64 fs_pendingblocks;/* blocks in process of being freed */
+ __s32 fs_pendinginodes;/*inodes in process of being freed */
+ } fs_u2;
+ } fs_u11;
union {
struct {
__s32 fs_sparecon[53];/* reserved for future constants */
@@ -441,6 +533,16 @@ struct ufs_cylinder_group {
__u32 cg_nclusterblks; /* number of clusters this cg */
__u32 cg_sparecon[13]; /* reserved for future use */
} cg_44;
+ struct {
+ __u32 cg_clustersumoff;/* (u_int32) counts of avail clusters */
+ __u32 cg_clusteroff; /* (u_int8) free cluster map */
+ __u32 cg_nclusterblks;/* number of clusters this cg */
+ __u32 cg_niblk; /* number of inode blocks this cg */
+ __u32 cg_initediblk; /* last initialized inode */
+ __u32 cg_sparecon32[3];/* reserved for future use */
+ __u64 cg_time; /* time last written */
+ __u64 cg_sparecon[3]; /* reserved for future use */
+ } cg_u2;
__u32 cg_sparecon[16]; /* reserved for future use */
} cg_u;
__u8 cg_space[1]; /* space for cylinder group maps */
@@ -497,6 +599,39 @@ struct ufs_inode {
} ui_u3;
};
+#define UFS_NXADDR 2 /* External addresses in inode. */
+struct ufs2_inode {
+ __u16 ui_mode; /* 0: IFMT, permissions; see below. */
+ __s16 ui_nlink; /* 2: File link count. */
+ __u32 ui_uid; /* 4: File owner. */
+ __u32 ui_gid; /* 8: File group. */
+ __u32 ui_blksize; /* 12: Inode blocksize. */
+ __u64 ui_size; /* 16: File byte count. */
+ __u64 ui_blocks; /* 24: Bytes actually held. */
+ struct ufs_timeval ui_atime; /* 32: Last access time. */
+ struct ufs_timeval ui_mtime; /* 40: Last modified time. */
+ struct ufs_timeval ui_ctime; /* 48: Last inode change time. */
+ struct ufs_timeval ui_birthtime; /* 56: Inode creation time. */
+ __s32 ui_mtimensec; /* 64: Last modified time. */
+ __s32 ui_atimensec; /* 68: Last access time. */
+ __s32 ui_ctimensec; /* 72: Last inode change time. */
+ __s32 ui_birthnsec; /* 76: Inode creation time. */
+ __s32 ui_gen; /* 80: Generation number. */
+ __u32 ui_kernflags; /* 84: Kernel flags. */
+ __u32 ui_flags; /* 88: Status flags (chflags). */
+ __s32 ui_extsize; /* 92: External attributes block. */
+ __s64 ui_extb[UFS_NXADDR];/* 96: External attributes block. */
+ union {
+ struct {
+ __s64 ui_db[UFS_NDADDR]; /* 112: Direct disk blocks. */
+ __s64 ui_ib[UFS_NINDIR];/* 208: Indirect disk blocks.*/
+ } ui_addr;
+ __u8 ui_symlink[2*4*(UFS_NDADDR+UFS_NINDIR)];/* 0x28 fast symlink */
+ } ui_u2;
+ __s64 ui_spare[3]; /* 232: Reserved; currently unused */
+};
+
+
/* FreeBSD has these in sys/stat.h */
/* ui_flags that can be set by a file owner */
#define UFS_UF_SETTABLE 0x0000ffff
@@ -517,8 +652,8 @@ struct ufs_inode {
* than the size of fragment.
*/
struct ufs_buffer_head {
- unsigned fragment; /* first fragment */
- unsigned count; /* number of fragments */
+ __u64 fragment; /* first fragment */
+ __u64 count; /* number of fragments */
struct buffer_head * bh[UFS_MAXFRAG]; /* buffers */
};
@@ -551,6 +686,8 @@ struct ufs_sb_private_info {
__u32 s_cgmask; /* used to calc mod fs_ntrak */
__u32 s_size; /* number of blocks (fragments) in fs */
__u32 s_dsize; /* number of data blocks in fs */
+ __u64 s_u2_size; /* ufs2: number of blocks (fragments) in fs */
+ __u64 s_u2_dsize; /*ufs2: number of data blocks in fs */
__u32 s_ncg; /* number of cylinder groups */
__u32 s_bsize; /* size of basic blocks */
__u32 s_fsize; /* size of fragments */
@@ -577,7 +714,7 @@ struct ufs_sb_private_info {
__u32 s_ntrak; /* tracks per cylinder */
__u32 s_nsect; /* sectors per track */
__u32 s_spc; /* sectors per cylinder */
- __u32 s_ipg; /* inodes per group */
+ __u32 s_ipg; /* inodes per cylinder group */
__u32 s_fpg; /* fragments per group */
__u32 s_cpc; /* cyl per cycle in postbl */
__s32 s_contigsumsize;/* size of cluster summary array, 44bsd */
@@ -605,6 +742,7 @@ struct ufs_sb_private_info {
__u32 s_bpfmask; /* bits per fragment mask */
__u32 s_maxsymlinklen;/* upper limit on fast symlinks' size */
+ __s32 fs_magic; /* filesystem magic */
};
/*
@@ -758,7 +896,7 @@ extern void ufs_free_inode (struct inode *inode);
extern struct inode * ufs_new_inode (struct inode *, int);
/* inode.c */
-extern int ufs_frag_map (struct inode *, int);
+extern u64 ufs_frag_map (struct inode *, int);
extern void ufs_read_inode (struct inode *);
extern void ufs_put_inode (struct inode *);
extern void ufs_write_inode (struct inode *, int);
diff --git a/include/linux/ufs_fs_i.h b/include/linux/ufs_fs_i.h
index 1b7586441822..c4ef0dfa9f46 100644
--- a/include/linux/ufs_fs_i.h
+++ b/include/linux/ufs_fs_i.h
@@ -17,6 +17,7 @@ struct ufs_inode_info {
union {
__u32 i_data[15];
__u8 i_symlink[4*15];
+ __u64 u2_i_data[15];
} i_u1;
__u32 i_flags;
__u32 i_gen;