summaryrefslogtreecommitdiffstats
path: root/sys/fs/ext2fs/ext2_subr.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2013-08-13 15:40:43 +0000
committerpfg <pfg@FreeBSD.org>2013-08-13 15:40:43 +0000
commit1d7e5a040e9e45c0417e66c77735c9dd9fad8ee1 (patch)
treeb9f3dee80edb10d7fdf255006fdc5f23c5e588ba /sys/fs/ext2fs/ext2_subr.c
parent33afc0388b6fdde2fe8879b8589ed3dfee555904 (diff)
downloadFreeBSD-src-1d7e5a040e9e45c0417e66c77735c9dd9fad8ee1.zip
FreeBSD-src-1d7e5a040e9e45c0417e66c77735c9dd9fad8ee1.tar.gz
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
Diffstat (limited to 'sys/fs/ext2fs/ext2_subr.c')
-rw-r--r--sys/fs/ext2fs/ext2_subr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/ext2fs/ext2_subr.c b/sys/fs/ext2fs/ext2_subr.c
index cd4a06b..7ff7079 100644
--- a/sys/fs/ext2fs/ext2_subr.c
+++ b/sys/fs/ext2fs/ext2_subr.c
@@ -135,7 +135,7 @@ void
ext2_checkoverlap(struct buf *bp, struct inode *ip)
{
struct buf *ebp, *ep;
- int32_t start, last;
+ e4fs_daddr_t start, last;
struct vnode *vp;
ebp = &buf[nbuf];
OpenPOWER on IntegriCloud