[patch 3/3] ext2_fileblk_t.patch
This patch converts ext2 file offset to ext2_fileblk_t.
Signed-off-by: Takashi Sato <[email protected]>
---
diff -upNr -X linux-2.6.17/Documentation/dontdiff linux-2.6.17/fs/ext2/ext2.h linux-2.6.17.tmp/fs/ext2/ext2.h
--- linux-2.6.17/fs/ext2/ext2.h 2006-06-29 21:26:30.000000000 +0900
+++ linux-2.6.17.tmp/fs/ext2/ext2.h 2006-06-29 21:27:31.000000000 +0900
@@ -38,7 +38,7 @@ struct ext2_inode_info {
* most-recently-allocated block in this file. Yes, it is misnamed.
* We use this for detecting linearly ascending allocation requests.
*/
- __u32 i_next_alloc_block;
+ ext2_fileblk_t i_next_alloc_block;
/*
* i_next_alloc_goal is the *physical* companion to i_next_alloc_block.
diff -upNr -X linux-2.6.17/Documentation/dontdiff linux-2.6.17/fs/ext2/inode.c linux-2.6.17.tmp/fs/ext2/inode.c
--- linux-2.6.17/fs/ext2/inode.c 2006-06-29 21:27:18.000000000 +0900
+++ linux-2.6.17.tmp/fs/ext2/inode.c 2006-06-29 21:27:31.000000000 +0900
@@ -194,7 +194,7 @@ static inline int verify_chain(Indirect
*/
static int ext2_block_to_path(struct inode *inode,
- long i_block, int offsets[4], int *boundary)
+ ext2_fileblk_t i_block, int offsets[4], int *boundary)
{
int ptrs = EXT2_ADDR_PER_BLOCK(inode->i_sb);
int ptrs_bits = EXT2_ADDR_PER_BLOCK_BITS(inode->i_sb);
@@ -363,7 +363,7 @@ static unsigned long ext2_find_near(stru
*/
static inline int ext2_find_goal(struct inode *inode,
- long block,
+ ext2_fileblk_t block,
Indirect chain[4],
Indirect *partial,
ext2_fsblk_t *goal)
@@ -489,7 +489,7 @@ static int ext2_alloc_branch(struct inod
*/
static inline int ext2_splice_branch(struct inode *inode,
- long block,
+ ext2_fileblk_t block,
Indirect chain[4],
Indirect *where,
int num)
@@ -905,7 +905,7 @@ void ext2_truncate (struct inode * inode
Indirect *partial;
__le32 nr = 0;
int n;
- long iblock;
+ ext2_fileblk_t iblock;
unsigned blocksize;
if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
diff -upNr -X linux-2.6.17/Documentation/dontdiff linux-2.6.17/fs/ext2/super.c linux-2.6.17.tmp/fs/ext2/super.c
--- linux-2.6.17/fs/ext2/super.c 2006-06-29 21:26:30.000000000 +0900
+++ linux-2.6.17.tmp/fs/ext2/super.c 2006-06-29 21:27:31.000000000 +0900
@@ -1104,7 +1104,7 @@ static ssize_t ext2_quota_read(struct su
size_t len, loff_t off)
{
struct inode *inode = sb_dqopt(sb)->files[type];
- sector_t blk = off >> EXT2_BLOCK_SIZE_BITS(sb);
+ ext2_fileblk_t blk = off >> EXT2_BLOCK_SIZE_BITS(sb);
int err = 0;
int offset = off & (sb->s_blocksize - 1);
int tocopy;
@@ -1148,7 +1148,7 @@ static ssize_t ext2_quota_write(struct s
const char *data, size_t len, loff_t off)
{
struct inode *inode = sb_dqopt(sb)->files[type];
- sector_t blk = off >> EXT2_BLOCK_SIZE_BITS(sb);
+ ext2_fileblk_t blk = off >> EXT2_BLOCK_SIZE_BITS(sb);
int err = 0;
int offset = off & (sb->s_blocksize - 1);
int tocopy;
diff -upNr -X linux-2.6.17/Documentation/dontdiff linux-2.6.17/include/linux/ext2_fs_sb.h linux-2.6.17.tmp/include/linux/ext2_fs_sb.h
--- linux-2.6.17/include/linux/ext2_fs_sb.h 2006-06-29 21:27:18.000000000 +0900
+++ linux-2.6.17.tmp/include/linux/ext2_fs_sb.h 2006-06-29 21:27:31.000000000 +0900
@@ -21,6 +21,7 @@
typedef unsigned long ext2_fsblk_t;
typedef long ext2_grpblk_t;
+typedef unsigned long ext2_fileblk_t;
/*
* second extended-fs super-block data in memory
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]