Author: fsu
Date: Sun May 13 19:19:10 2018
New Revision: 333584
URL: https://svnweb.freebsd.org/changeset/base/333584

Log:
  Fix EXT2FS_DEBUG definition usage.
  
  Reviewed by:    pfg
  MFC after:      3 months
  
  Differential Revision:    https://reviews.freebsd.org/D15394

Modified:
  head/sys/fs/ext2fs/ext2_alloc.c
  head/sys/fs/ext2fs/ext2_bmap.c
  head/sys/fs/ext2fs/ext2_extents.c
  head/sys/fs/ext2fs/ext2_extents.h
  head/sys/fs/ext2fs/ext2_hash.c
  head/sys/fs/ext2fs/ext2_htree.c
  head/sys/fs/ext2fs/ext2_inode.c
  head/sys/fs/ext2fs/ext2_inode_cnv.c
  head/sys/fs/ext2fs/ext2_lookup.c
  head/sys/fs/ext2fs/ext2_subr.c
  head/sys/fs/ext2fs/ext2_vfsops.c
  head/sys/fs/ext2fs/ext2_vnops.c
  head/sys/fs/ext2fs/fs.h

Modified: head/sys/fs/ext2fs/ext2_alloc.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_alloc.c     Sun May 13 17:44:26 2018        
(r333583)
+++ head/sys/fs/ext2fs/ext2_alloc.c     Sun May 13 19:19:10 2018        
(r333584)
@@ -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");
        }

Modified: head/sys/fs/ext2fs/ext2_bmap.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_bmap.c      Sun May 13 17:44:26 2018        
(r333583)
+++ head/sys/fs/ext2fs/ext2_bmap.c      Sun May 13 19:19:10 2018        
(r333584)
@@ -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>

Modified: head/sys/fs/ext2fs/ext2_extents.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_extents.c   Sun May 13 17:44:26 2018        
(r333583)
+++ head/sys/fs/ext2fs/ext2_extents.c   Sun May 13 19:19:10 2018        
(r333584)
@@ -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_ext
 
        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_exte
 {
        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_exte
 }
 
 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;
 

Modified: head/sys/fs/ext2fs/ext2_extents.h
==============================================================================
--- head/sys/fs/ext2fs/ext2_extents.h   Sun May 13 17:44:26 2018        
(r333583)
+++ head/sys/fs/ext2fs/ext2_extents.h   Sun May 13 19:19:10 2018        
(r333584)
@@ -130,7 +130,7 @@ int ext4_ext_get_blocks(struct inode *ip, int64_t iblo
     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_ */

Modified: head/sys/fs/ext2fs/ext2_hash.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_hash.c      Sun May 13 17:44:26 2018        
(r333583)
+++ head/sys/fs/ext2fs/ext2_hash.c      Sun May 13 19:19:10 2018        
(r333584)
@@ -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>

Modified: head/sys/fs/ext2fs/ext2_htree.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_htree.c     Sun May 13 17:44:26 2018        
(r333583)
+++ head/sys/fs/ext2fs/ext2_htree.c     Sun May 13 19:19:10 2018        
(r333584)
@@ -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>

Modified: head/sys/fs/ext2fs/ext2_inode.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_inode.c     Sun May 13 17:44:26 2018        
(r333583)
+++ head/sys/fs/ext2fs/ext2_inode.c     Sun May 13 19:19:10 2018        
(r333584)
@@ -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>

Modified: head/sys/fs/ext2fs/ext2_inode_cnv.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_inode_cnv.c Sun May 13 17:44:26 2018        
(r333583)
+++ head/sys/fs/ext2fs/ext2_inode_cnv.c Sun May 13 19:19:10 2018        
(r333584)
@@ -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;

Modified: head/sys/fs/ext2fs/ext2_lookup.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_lookup.c    Sun May 13 17:44:26 2018        
(r333583)
+++ head/sys/fs/ext2fs/ext2_lookup.c    Sun May 13 19:19:10 2018        
(r333584)
@@ -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>

Modified: head/sys/fs/ext2fs/ext2_subr.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_subr.c      Sun May 13 17:44:26 2018        
(r333583)
+++ head/sys/fs/ext2fs/ext2_subr.c      Sun May 13 19:19:10 2018        
(r333584)
@@ -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>

Modified: head/sys/fs/ext2fs/ext2_vfsops.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_vfsops.c    Sun May 13 17:44:26 2018        
(r333583)
+++ head/sys/fs/ext2fs/ext2_vfsops.c    Sun May 13 19:19:10 2018        
(r333584)
@@ -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 *);

Modified: head/sys/fs/ext2fs/ext2_vnops.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_vnops.c     Sun May 13 17:44:26 2018        
(r333583)
+++ head/sys/fs/ext2fs/ext2_vnops.c     Sun May 13 19:19:10 2018        
(r333584)
@@ -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 *);

Modified: head/sys/fs/ext2fs/fs.h
==============================================================================
--- head/sys/fs/ext2fs/fs.h     Sun May 13 17:44:26 2018        (r333583)
+++ head/sys/fs/ext2fs/fs.h     Sun May 13 19:19:10 2018        (r333584)
@@ -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_ */
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to