Fix EXT2FS_DEBUG definition usage.
Reviewed by: pfg MFC after: 3 months Differential Revision: https://reviews.freebsd.org/D15394
This commit is contained in:
parent
36f8fe9bbb
commit
e06e5241a0
@ -1381,8 +1381,8 @@ ext2_vfree(struct vnode *pvp, ino_t ino, int mode)
|
||||
ibp = (char *)bp->b_data;
|
||||
ino = (ino - 1) % fs->e2fs->e2fs_ipg;
|
||||
if (isclr(ibp, ino)) {
|
||||
printf("ino = %llu, fs = %s\n",
|
||||
(unsigned long long)ino, fs->e2fs_fsmnt);
|
||||
printf("ino = %ju, fs = %s\n",
|
||||
ino, fs->e2fs_fsmnt);
|
||||
if (fs->e2fs_ronly == 0)
|
||||
panic("ext2_vfree: freeing free inode");
|
||||
}
|
||||
|
@ -48,8 +48,8 @@
|
||||
#include <sys/resourcevar.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <fs/ext2fs/inode.h>
|
||||
#include <fs/ext2fs/fs.h>
|
||||
#include <fs/ext2fs/inode.h>
|
||||
#include <fs/ext2fs/ext2fs.h>
|
||||
#include <fs/ext2fs/ext2_dinode.h>
|
||||
#include <fs/ext2fs/ext2_extern.h>
|
||||
|
@ -53,7 +53,7 @@ static void
|
||||
ext4_ext_print_extent(struct ext4_extent *ep)
|
||||
{
|
||||
|
||||
printf(" ext %p => (blk %u len %u start %lu)\n",
|
||||
printf(" ext %p => (blk %u len %u start %ju)\n",
|
||||
ep, ep->e_blk, ep->e_len,
|
||||
(uint64_t)ep->e_start_hi << 32 | ep->e_start_lo);
|
||||
}
|
||||
@ -69,7 +69,7 @@ ext4_ext_print_index(struct inode *ip, struct ext4_extent_index *ex, int do_walk
|
||||
|
||||
fs = ip->i_e2fs;
|
||||
|
||||
printf(" index %p => (blk %u pblk %lu)\n",
|
||||
printf(" index %p => (blk %u pblk %ju)\n",
|
||||
ex, ex->ei_blk, (uint64_t)ex->ei_leaf_hi << 32 | ex->ei_leaf_lo);
|
||||
|
||||
if(!do_walk)
|
||||
@ -110,9 +110,9 @@ ext4_ext_print_path(struct inode *ip, struct ext4_extent_path *path)
|
||||
{
|
||||
int k, l;
|
||||
|
||||
l = path->ep_depth
|
||||
l = path->ep_depth;
|
||||
|
||||
printf("ip=%d, Path:\n", ip->i_number);
|
||||
printf("ip=%ju, Path:\n", ip->i_number);
|
||||
for (k = 0; k <= l; k++, path++) {
|
||||
if (path->ep_index) {
|
||||
ext4_ext_print_index(ip, path->ep_index, 0);
|
||||
@ -123,13 +123,13 @@ ext4_ext_print_path(struct inode *ip, struct ext4_extent_path *path)
|
||||
}
|
||||
|
||||
void
|
||||
ext4_ext_print_extent_tree_status(struct inode * ip)
|
||||
ext4_ext_print_extent_tree_status(struct inode *ip)
|
||||
{
|
||||
struct ext4_extent_header *ehp;
|
||||
|
||||
ehp = (struct ext4_extent_header *)(char *)ip->i_db;
|
||||
|
||||
printf("Extent status:ip=%d\n", ip->i_number);
|
||||
printf("Extent status:ip=%ju\n", ip->i_number);
|
||||
if (!(ip->i_flag & IN_E4EXTENTS))
|
||||
return;
|
||||
|
||||
|
@ -130,7 +130,7 @@ int ext4_ext_get_blocks(struct inode *ip, int64_t iblock,
|
||||
unsigned long max_blocks, struct ucred *cred, struct buf **bpp,
|
||||
int *allocate, daddr_t *);
|
||||
#ifdef EXT2FS_DEBUG
|
||||
void ext4_ext_print_extent_tree_status(struct inode * ip);
|
||||
void ext4_ext_print_extent_tree_status(struct inode *ip);
|
||||
#endif
|
||||
|
||||
#endif /* !_FS_EXT2FS_EXT2_EXTENTS_H_ */
|
||||
|
@ -61,6 +61,7 @@
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <fs/ext2fs/ext2fs.h>
|
||||
#include <fs/ext2fs/fs.h>
|
||||
#include <fs/ext2fs/htree.h>
|
||||
#include <fs/ext2fs/inode.h>
|
||||
#include <fs/ext2fs/ext2_mount.h>
|
||||
|
@ -44,6 +44,7 @@
|
||||
|
||||
#include <ufs/ufs/dir.h>
|
||||
|
||||
#include <fs/ext2fs/fs.h>
|
||||
#include <fs/ext2fs/inode.h>
|
||||
#include <fs/ext2fs/ext2_mount.h>
|
||||
#include <fs/ext2fs/ext2fs.h>
|
||||
|
@ -50,6 +50,7 @@
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_extern.h>
|
||||
|
||||
#include <fs/ext2fs/fs.h>
|
||||
#include <fs/ext2fs/inode.h>
|
||||
#include <fs/ext2fs/ext2_mount.h>
|
||||
#include <fs/ext2fs/ext2fs.h>
|
||||
|
@ -54,17 +54,19 @@ ext2_print_inode(struct inode *in)
|
||||
|
||||
printf("Inode: %5ju", (uintmax_t)in->i_number);
|
||||
printf( /* "Inode: %5d" */
|
||||
" Type: %10s Mode: 0x%o Flags: 0x%x Version: %d acl: 0x%lx\n",
|
||||
" Type: %10s Mode: 0x%o Flags: 0x%x Version: %d acl: 0x%jx\n",
|
||||
"n/a", in->i_mode, in->i_flags, in->i_gen, in->i_facl);
|
||||
printf("User: %5u Group: %5u Size: %ju\n",
|
||||
in->i_uid, in->i_gid, (uintmax_t)in->i_size);
|
||||
printf("Links: %3d Blockcount: %ju\n",
|
||||
in->i_nlink, (uintmax_t)in->i_blocks);
|
||||
printf("ctime: 0x%x", in->i_ctime);
|
||||
printf("atime: 0x%x", in->i_atime);
|
||||
printf("mtime: 0x%x", in->i_mtime);
|
||||
printf("ctime: 0x%x ", in->i_ctime);
|
||||
printf("atime: 0x%x ", in->i_atime);
|
||||
printf("mtime: 0x%x ", in->i_mtime);
|
||||
if (E2DI_HAS_XTIME(in))
|
||||
printf("crtime %#x ", in->i_birthtime);
|
||||
printf("crtime %#x\n", in->i_birthtime);
|
||||
else
|
||||
printf("\n");
|
||||
if (in->i_flag & IN_E4EXTENTS) {
|
||||
printf("Extents:\n");
|
||||
ehp = (struct ext4_extent_header *)in->i_db;
|
||||
|
@ -57,6 +57,7 @@
|
||||
|
||||
#include <ufs/ufs/dir.h>
|
||||
|
||||
#include <fs/ext2fs/fs.h>
|
||||
#include <fs/ext2fs/inode.h>
|
||||
#include <fs/ext2fs/ext2_mount.h>
|
||||
#include <fs/ext2fs/ext2fs.h>
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include <sys/ucred.h>
|
||||
#include <sys/vnode.h>
|
||||
|
||||
#include <fs/ext2fs/fs.h>
|
||||
#include <fs/ext2fs/inode.h>
|
||||
#include <fs/ext2fs/ext2fs.h>
|
||||
#include <fs/ext2fs/ext2_extern.h>
|
||||
|
@ -58,13 +58,15 @@
|
||||
#include <geom/geom.h>
|
||||
#include <geom/geom_vfs.h>
|
||||
|
||||
#include <fs/ext2fs/fs.h>
|
||||
#include <fs/ext2fs/ext2_mount.h>
|
||||
#include <fs/ext2fs/inode.h>
|
||||
|
||||
#include <fs/ext2fs/fs.h>
|
||||
#include <fs/ext2fs/ext2fs.h>
|
||||
#include <fs/ext2fs/ext2_dinode.h>
|
||||
#include <fs/ext2fs/ext2_extern.h>
|
||||
#include <fs/ext2fs/ext2_extents.h>
|
||||
|
||||
|
||||
static int ext2_flushfiles(struct mount *mp, int flags, struct thread *td);
|
||||
static int ext2_mountfs(struct vnode *, struct mount *);
|
||||
|
@ -90,6 +90,7 @@
|
||||
#include <fs/ext2fs/ext2_dir.h>
|
||||
#include <fs/ext2fs/ext2_mount.h>
|
||||
#include <fs/ext2fs/ext2_extattr.h>
|
||||
#include <fs/ext2fs/ext2_extents.h>
|
||||
|
||||
static int ext2_makeinode(int mode, struct vnode *, struct vnode **, struct componentname *);
|
||||
static void ext2_itimes_locked(struct vnode *);
|
||||
|
@ -161,4 +161,9 @@
|
||||
*/
|
||||
#define NINDIR(fs) (EXT2_ADDR_PER_BLOCK(fs))
|
||||
|
||||
/*
|
||||
* Use if additional debug logging is required.
|
||||
*/
|
||||
/* #define EXT2FS_DEBUG */
|
||||
|
||||
#endif /* !_FS_EXT2FS_FS_H_ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user