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/inode.h | |
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/inode.h')
-rw-r--r-- | sys/fs/ext2fs/inode.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/fs/ext2fs/inode.h b/sys/fs/ext2fs/inode.h index 82525e9..d939987 100644 --- a/sys/fs/ext2fs/inode.h +++ b/sys/fs/ext2fs/inode.h @@ -50,6 +50,11 @@ #define NIADDR 3 /* Indirect addresses in inode. */ /* + * The size of physical and logical block numbers and time fields in UFS. + */ +typedef int32_t e2fs_lbn_t; + +/* * The inode is used to describe each active (or recently active) file in the * EXT2FS filesystem. It is composed of two types of information. The first * part is the information that is needed only while the file is active (such @@ -148,7 +153,7 @@ struct inode { * ext2_getlbns and used by truncate and bmap code. */ struct indir { - int32_t in_lbn; /* Logical block number. */ + e2fs_lbn_t in_lbn; /* Logical block number. */ int in_off; /* Offset in buffer. */ }; |