summaryrefslogtreecommitdiff
path: root/sys/ufs/ext2fs
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2008-01-05 19:49:27 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2008-01-05 19:49:27 +0000
commit58b52f42cefd1bef54c417665b7c9e14fef23b97 (patch)
tree87c5ac17142beb16081ef9de36bc1822b8216891 /sys/ufs/ext2fs
parent64aee5979f08f78bdbff4796d592b0fa1524876d (diff)
Make the ffs code 64-bit disk block number clean. Based on a diff
from Pedro Martelleto. Two things remain: the on-disk quota structures are still 32-bit and statfs does not do 64-bit numbers yet. ok deraadt@
Diffstat (limited to 'sys/ufs/ext2fs')
-rw-r--r--sys/ufs/ext2fs/ext2fs.h6
-rw-r--r--sys/ufs/ext2fs/ext2fs_alloc.c4
-rw-r--r--sys/ufs/ext2fs/ext2fs_balloc.c4
-rw-r--r--sys/ufs/ext2fs/ext2fs_extern.h6
-rw-r--r--sys/ufs/ext2fs/ext2fs_subr.c4
5 files changed, 12 insertions, 12 deletions
diff --git a/sys/ufs/ext2fs/ext2fs.h b/sys/ufs/ext2fs/ext2fs.h
index caf38041a30..7b007344dcd 100644
--- a/sys/ufs/ext2fs/ext2fs.h
+++ b/sys/ufs/ext2fs/ext2fs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs.h,v 1.12 2007/06/02 00:45:50 pedro Exp $ */
+/* $OpenBSD: ext2fs.h,v 1.13 2008/01/05 19:49:26 otto Exp $ */
/* $NetBSD: ext2fs.h,v 1.10 2000/01/28 16:00:23 bouyer Exp $ */
/*
@@ -55,8 +55,8 @@
#define SBSIZE 1024
#define BBOFF ((off_t)(0))
#define SBOFF ((off_t)(BBOFF + BBSIZE))
-#define BBLOCK ((daddr_t)(0))
-#define SBLOCK ((daddr_t)(BBLOCK + BBSIZE / DEV_BSIZE))
+#define BBLOCK ((daddr64_t)(0))
+#define SBLOCK ((daddr64_t)(BBLOCK + BBSIZE / DEV_BSIZE))
/*
* Addresses stored in inodes are capable of addressing blocks
diff --git a/sys/ufs/ext2fs/ext2fs_alloc.c b/sys/ufs/ext2fs/ext2fs_alloc.c
index 5abad913287..db218f6cfc1 100644
--- a/sys/ufs/ext2fs/ext2fs_alloc.c
+++ b/sys/ufs/ext2fs/ext2fs_alloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_alloc.c,v 1.24 2007/06/22 09:55:17 jasper Exp $ */
+/* $OpenBSD: ext2fs_alloc.c,v 1.25 2008/01/05 19:49:26 otto Exp $ */
/* $NetBSD: ext2fs_alloc.c,v 1.10 2001/07/05 08:38:27 toshii Exp $ */
/*
@@ -218,7 +218,7 @@ ext2fs_dirpref(struct m_ext2fs *fs)
* contigously. The two fields of the ext2 inode extension (see
* ufs/ufs/inode.h) help this.
*/
-int32_t
+daddr64_t
ext2fs_blkpref(struct inode *ip, int32_t lbn, int indx, int32_t *bap)
{
struct m_ext2fs *fs;
diff --git a/sys/ufs/ext2fs/ext2fs_balloc.c b/sys/ufs/ext2fs/ext2fs_balloc.c
index 957b6038777..457404cc21d 100644
--- a/sys/ufs/ext2fs/ext2fs_balloc.c
+++ b/sys/ufs/ext2fs/ext2fs_balloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_balloc.c,v 1.14 2007/06/02 00:45:50 pedro Exp $ */
+/* $OpenBSD: ext2fs_balloc.c,v 1.15 2008/01/05 19:49:26 otto Exp $ */
/* $NetBSD: ext2fs_balloc.c,v 1.10 2001/07/04 21:16:01 chs Exp $ */
/*
@@ -56,7 +56,7 @@
* the inode and the logical block number in a file.
*/
int
-ext2fs_buf_alloc(struct inode *ip, daddr_t bn, int size, struct ucred *cred,
+ext2fs_buf_alloc(struct inode *ip, daddr64_t bn, int size, struct ucred *cred,
struct buf **bpp, int flags)
{
struct m_ext2fs *fs;
diff --git a/sys/ufs/ext2fs/ext2fs_extern.h b/sys/ufs/ext2fs/ext2fs_extern.h
index ec587a9f02f..abbb68ecc47 100644
--- a/sys/ufs/ext2fs/ext2fs_extern.h
+++ b/sys/ufs/ext2fs/ext2fs_extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_extern.h,v 1.25 2007/06/02 00:45:50 pedro Exp $ */
+/* $OpenBSD: ext2fs_extern.h,v 1.26 2008/01/05 19:49:26 otto Exp $ */
/* $NetBSD: ext2fs_extern.h,v 1.1 1997/06/11 09:33:55 bouyer Exp $ */
/*-
@@ -64,12 +64,12 @@ int ext2fs_realloccg(struct inode *, int32_t, int32_t, int, int,
int ext2fs_reallocblks(void *);
int ext2fs_inode_alloc(struct inode *pip, mode_t mode, struct ucred *,
struct vnode **);
-daddr_t ext2fs_blkpref(struct inode *, int32_t, int, int32_t *);
+daddr64_t ext2fs_blkpref(struct inode *, int32_t, int, int32_t *);
void ext2fs_blkfree(struct inode *, int32_t);
int ext2fs_inode_free(struct inode *pip, ino_t ino, mode_t mode);
/* ext2fs_balloc.c */
-int ext2fs_buf_alloc(struct inode *, daddr_t, int, struct ucred *,
+int ext2fs_buf_alloc(struct inode *, daddr64_t, int, struct ucred *,
struct buf **, int);
/* ext2fs_bmap.c */
diff --git a/sys/ufs/ext2fs/ext2fs_subr.c b/sys/ufs/ext2fs/ext2fs_subr.c
index f378edd4574..a8ac75a91ec 100644
--- a/sys/ufs/ext2fs/ext2fs_subr.c
+++ b/sys/ufs/ext2fs/ext2fs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_subr.c,v 1.17 2007/06/17 20:15:25 jasper Exp $ */
+/* $OpenBSD: ext2fs_subr.c,v 1.18 2008/01/05 19:49:26 otto Exp $ */
/* $NetBSD: ext2fs_subr.c,v 1.1 1997/06/11 09:34:03 bouyer Exp $ */
/*
@@ -115,7 +115,7 @@ ext2fs_checkoverlap(struct buf *bp, struct inode *ip)
if (ep == bp || (ep->b_flags & B_INVAL) ||
ep->b_vp == NULLVP)
continue;
- if (VOP_BMAP(ep->b_vp, (daddr_t)0, &vp, (daddr_t)0, NULL))
+ if (VOP_BMAP(ep->b_vp, (daddr64_t)0, &vp, (daddr64_t)0, NULL))
continue;
if (vp != ip->i_devvp)
continue;