aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/ext2fs/ext2_vnops.c
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2013-08-13 15:40:43 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2013-08-13 15:40:43 +0000
commit70097aac13055268eaa414259374016b7cbcfd69 (patch)
treeb9f3dee80edb10d7fdf255006fdc5f23c5e588ba /sys/fs/ext2fs/ext2_vnops.c
parent90c35c1939db21edd0301d25ca81f28d9d9ecd9d (diff)
downloadsrc-70097aac13055268eaa414259374016b7cbcfd69.tar.gz
src-70097aac13055268eaa414259374016b7cbcfd69.zip
Define ext2fs local types and use them.
Add definitions for e2fs_daddr_t, e4fs_daddr_t in addition to the already existing e2fs_lbn_t and adjust them for ext4. Other than making the code more readable these changes should fix problems related to big filesystems. Setting the proper types can be tricky so the process was helped by looking at UFS. In our implementation, logical block numbers can be negative and the code depends on it. In ext2, block numbers are unsigned so it is convenient to keep e2fs_daddr_t unsigned and use the complete 32 bits. In the case of e4fs_daddr_t, while the value should be unsigned, for ext4 we only need to support 48 bits so preserving an extra bit from the sign is not an issue. While here also drop the ext2_setblock() prototype that was never used. Discussed with: mckusick, bde MFC after: 3 weeks
Notes
Notes: svn path=/head/; revision=254283
Diffstat (limited to 'sys/fs/ext2fs/ext2_vnops.c')
-rw-r--r--sys/fs/ext2fs/ext2_vnops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c
index e26a31dbe1f5..c5be7d06f896 100644
--- a/sys/fs/ext2fs/ext2_vnops.c
+++ b/sys/fs/ext2fs/ext2_vnops.c
@@ -1329,7 +1329,7 @@ ext2_strategy(struct vop_strategy_args *ap)
struct vnode *vp = ap->a_vp;
struct inode *ip;
struct bufobj *bo;
- int64_t blkno;
+ daddr_t blkno;
int error;
ip = VTOI(vp);