summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2002-10-08 18:37:37 -0700
committerPatrick Mochel <mochel@osdl.org>2002-10-08 18:37:37 -0700
commit763fb9a396ec1ad6e5552c53e80494fb09337002 (patch)
treef905260a9bd9cffb974c9e161be6a0993bcec065 /include
parent6179fd182aac68edacdf20dd0c264d64bce8410e (diff)
[PATCH] 64-bit sector_t - filesystems
From Peter Chubb Filesystem migration to possibly 64-bit sector_t: - bmap() now takes and returns a sector_t to allow filesystems (e.g., JFS, XFS) that are 64-bit clean to deal with large files - buffer handling now 64-bit clean Enable 64-bit sector_t on IA32 and PPC. kiobufs takes sector_t array, not array of long. Fix blkmtd.c to deal in such an array. Miscellaneous fixes for 64-bit sector_t. - missed printk formats - ide_floppy_do_request had incorrect signature - in blkmtd.c there was a pointer used to manipulate an array to be used by kiobuf -- it was unsigned long, needed to be sector_t
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/types.h5
-rw-r--r--include/asm-ppc/types.h5
-rw-r--r--include/linux/fs.h6
-rw-r--r--include/linux/iso_fs.h2
-rw-r--r--include/linux/types.h10
5 files changed, 18 insertions, 10 deletions
diff --git a/include/asm-i386/types.h b/include/asm-i386/types.h
index 238635a0a29a..6175dba50238 100644
--- a/include/asm-i386/types.h
+++ b/include/asm-i386/types.h
@@ -52,6 +52,11 @@ typedef u32 dma_addr_t;
#endif
typedef u64 dma64_addr_t;
+#ifdef CONFIG_LBD
+typedef u64 sector_t;
+#define HAVE_SECTOR_T
+#endif
+
#endif /* __KERNEL__ */
#endif
diff --git a/include/asm-ppc/types.h b/include/asm-ppc/types.h
index 2b048ca98e73..26dd36dec197 100644
--- a/include/asm-ppc/types.h
+++ b/include/asm-ppc/types.h
@@ -45,6 +45,11 @@ typedef __vector128 vector128;
typedef u32 dma_addr_t;
typedef u64 dma64_addr_t;
+#ifdef CONFIG_LBD
+typedef u64 sector_t;
+#define HAVE_SECTOR_T
+#endif
+
#endif /* __KERNEL__ */
/*
diff --git a/include/linux/fs.h b/include/linux/fs.h
index fa03013be9d2..56771d8994b6 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -305,7 +305,7 @@ struct address_space_operations {
int (*prepare_write)(struct file *, struct page *, unsigned, unsigned);
int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
/* Unfortunately this kludge is needed for FIBMAP. Don't use it */
- int (*bmap)(struct address_space *, long);
+ sector_t (*bmap)(struct address_space *, sector_t);
int (*invalidatepage) (struct page *, unsigned long);
int (*releasepage) (struct page *, int);
int (*direct_IO)(int, struct file *, const struct iovec *iov,
@@ -356,7 +356,7 @@ struct block_device {
int bd_holders;
struct block_device * bd_contains;
unsigned bd_block_size;
- unsigned long bd_offset;
+ sector_t bd_offset;
unsigned bd_part_count;
int bd_invalidated;
};
@@ -1141,7 +1141,7 @@ extern void write_inode_now(struct inode *, int);
extern int filemap_fdatawrite(struct address_space *);
extern int filemap_fdatawait(struct address_space *);
extern void sync_supers(void);
-extern int bmap(struct inode *, int);
+extern sector_t bmap(struct inode *, sector_t);
extern int notify_change(struct dentry *, struct iattr *);
extern int permission(struct inode *, int);
extern int vfs_permission(struct inode *, int);
diff --git a/include/linux/iso_fs.h b/include/linux/iso_fs.h
index 0ac0aa2334ea..8416bedc5c27 100644
--- a/include/linux/iso_fs.h
+++ b/include/linux/iso_fs.h
@@ -230,7 +230,7 @@ int get_joliet_filename(struct iso_directory_record *, unsigned char *, struct i
int get_acorn_filename(struct iso_directory_record *, char *, struct inode *);
extern struct dentry *isofs_lookup(struct inode *, struct dentry *);
-extern struct buffer_head *isofs_bread(struct inode *, unsigned int);
+extern struct buffer_head *isofs_bread(struct inode *, sector_t);
extern int isofs_get_blocks(struct inode *, sector_t, struct buffer_head **, unsigned long);
extern struct inode_operations isofs_dir_inode_operations;
diff --git a/include/linux/types.h b/include/linux/types.h
index 582d35492314..87985824b16e 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -117,13 +117,11 @@ typedef __s64 int64_t;
#endif
/*
- * transition to 64-bit sector_t, possibly making it an option...
+ * The type used for indexing onto a disc or disc partition.
+ * If required, asm/types.h can override it and define
+ * HAVE_SECTOR_T
*/
-#undef BLK_64BIT_SECTOR
-
-#ifdef BLK_64BIT_SECTOR
-typedef u64 sector_t;
-#else
+#ifndef HAVE_SECTOR_T
typedef unsigned long sector_t;
#endif