diff options
author | pfg <pfg@FreeBSD.org> | 2013-06-23 02:44:42 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2013-06-23 02:44:42 +0000 |
commit | 456a58318f772df57faf95799c77f849e8e59e16 (patch) | |
tree | 8e1f600a10432cd8eb791ceb35beb5ba9a6f7ae4 /sys/fs/ext2fs/ext2_alloc.c | |
parent | e08b36714da1c89099fd71e59285ea45d7700416 (diff) | |
download | FreeBSD-src-456a58318f772df57faf95799c77f849e8e59e16.zip FreeBSD-src-456a58318f772df57faf95799c77f849e8e59e16.tar.gz |
Define and use e2fs_lbn_t in ext2fs.
In line to what is done in UFS, define an internal type
e2fs_lbn_t for the logical block numbers.
This change is basically a no-op as the new type is unchanged
(int32_t) but it may be useful as bumping this may be required
for ext4fs.
Also, as pointed out by Bruce Evans:
-Use daddr_t for daddr in ext2_bmaparray(). This seems to
improve reliability with the reallocblks option.
- Add a cast to the fsbtodb() macro as in UFS.
Reviewed by: bde
MFC after: 3 days
Diffstat (limited to 'sys/fs/ext2fs/ext2_alloc.c')
-rw-r--r-- | sys/fs/ext2fs/ext2_alloc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/fs/ext2fs/ext2_alloc.c b/sys/fs/ext2fs/ext2_alloc.c index 71e3612..9bc4714 100644 --- a/sys/fs/ext2fs/ext2_alloc.c +++ b/sys/fs/ext2fs/ext2_alloc.c @@ -165,7 +165,8 @@ ext2_reallocblks(struct vop_reallocblks_args *ap) struct ext2mount *ump; struct cluster_save *buflist; struct indir start_ap[NIADDR + 1], end_ap[NIADDR + 1], *idp; - int32_t start_lbn, end_lbn, soff, newblk, blkno; + e2fs_lbn_t start_lbn, end_lbn; + int32_t soff, newblk, blkno; int i, len, start_lvl, end_lvl, pref, ssize; if (doreallocblks == 0) @@ -550,7 +551,7 @@ ext2_dirpref(struct inode *pip) * that will hold the pointer */ int32_t -ext2_blkpref(struct inode *ip, int32_t lbn, int indx, int32_t *bap, +ext2_blkpref(struct inode *ip, e2fs_lbn_t lbn, int indx, int32_t *bap, int32_t blocknr) { int tmp; |