Author: pfg
Date: Tue Jun  7 17:08:34 2016
New Revision: 301559
URL: https://svnweb.freebsd.org/changeset/base/301559

Log:
  ext2fs(5): Cosmetic cleanups, mostly to the ext4 code.
  
  Obtained from:        NetBSD

Modified:
  head/sys/fs/ext2fs/ext2_bmap.c
  head/sys/fs/ext2fs/ext2_extents.h
  head/sys/fs/ext2fs/ext2fs.h

Modified: head/sys/fs/ext2fs/ext2_bmap.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_bmap.c      Tue Jun  7 16:57:13 2016        
(r301558)
+++ head/sys/fs/ext2fs/ext2_bmap.c      Tue Jun  7 17:08:34 2016        
(r301559)
@@ -86,8 +86,8 @@ ext2_bmap(struct vop_bmap_args *ap)
 }
 
 /*
- * This function converts the logical block number of a file to
- * its physical block number on the disk within ext4 extents.
+ * Convert the logical block number of a file to its physical block number
+ * on the disk within ext4 extents.
  */
 static int
 ext4_bmapext(struct vnode *vp, int32_t bn, int64_t *bnp, int *runp, int *runb)
@@ -97,7 +97,7 @@ ext4_bmapext(struct vnode *vp, int32_t b
        struct ext4_extent *ep;
        struct ext4_extent_path path = { .ep_bp = NULL };
        daddr_t lbn;
-       int ret = 0;
+       int error = 0;
 
        ip = VTOI(vp);
        fs = ip->i_e2fs;
@@ -120,7 +120,7 @@ ext4_bmapext(struct vnode *vp, int32_t b
        } else {
                ep = path.ep_ext;
                if (ep == NULL)
-                       ret = EIO;
+                       error = EIO;
                else {
                        *bnp = fsbtodb(fs, lbn - ep->e_blk +
                            (ep->e_start_lo | (daddr_t)ep->e_start_hi << 32));
@@ -140,7 +140,7 @@ ext4_bmapext(struct vnode *vp, int32_t b
                path.ep_bp = NULL;
        }
 
-       return (ret);
+       return (error);
 }
 
 /*

Modified: head/sys/fs/ext2fs/ext2_extents.h
==============================================================================
--- head/sys/fs/ext2fs/ext2_extents.h   Tue Jun  7 16:57:13 2016        
(r301558)
+++ head/sys/fs/ext2fs/ext2_extents.h   Tue Jun  7 17:08:34 2016        
(r301559)
@@ -40,8 +40,8 @@
  * Ext4 file system extent on disk.
  */
 struct ext4_extent {
-       uint32_t e_blk; /* first logical block */
-       uint16_t e_len; /* number of blocks */
+       uint32_t e_blk;         /* first logical block */
+       uint16_t e_len;         /* number of blocks */
        uint16_t e_start_hi;    /* high 16 bits of physical block */
        uint32_t e_start_lo;    /* low 32 bits of physical block */
 };

Modified: head/sys/fs/ext2fs/ext2fs.h
==============================================================================
--- head/sys/fs/ext2fs/ext2fs.h Tue Jun  7 16:57:13 2016        (r301558)
+++ head/sys/fs/ext2fs/ext2fs.h Tue Jun  7 17:08:34 2016        (r301559)
@@ -87,7 +87,7 @@ struct ext2fs {
        uint32_t  e3fs_journal_dev;     /* device number of journal file */
        uint32_t  e3fs_last_orphan;     /* start of list of inodes to delete */
        uint32_t  e3fs_hash_seed[4];    /* HTREE hash seed */
-       char      e3fs_def_hash_version; /* Default hash version to use */
+       char      e3fs_def_hash_version;/* Default hash version to use */
        char      e3fs_jnl_backup_type;
        uint16_t  e3fs_desc_size;       /* size of group descriptor */
        uint32_t  e3fs_default_mount_opts;
@@ -97,13 +97,13 @@ struct ext2fs {
        uint32_t  e4fs_bcount_hi;       /* high bits of blocks count */
        uint32_t  e4fs_rbcount_hi;      /* high bits of reserved blocks count */
        uint32_t  e4fs_fbcount_hi;      /* high bits of free blocks count */
-       uint16_t  e4fs_min_extra_isize; /* all inodes have at least some bytes 
*/
-       uint16_t  e4fs_want_extra_isize; /* inodes must reserve some bytes */
+       uint16_t  e4fs_min_extra_isize; /* all inodes have some bytes */
+       uint16_t  e4fs_want_extra_isize;/* inodes must reserve some bytes */
        uint32_t  e4fs_flags;           /* miscellaneous flags */
        uint16_t  e4fs_raid_stride;     /* RAID stride */
-       uint16_t  e4fs_mmpintv;         /* number of seconds to wait in MMP 
checking */
+       uint16_t  e4fs_mmpintv;         /* seconds to wait in MMP checking */
        uint64_t  e4fs_mmpblk;          /* block for multi-mount protection */
-       uint32_t  e4fs_raid_stripe_wid; /* blocks on all data disks (N * 
stride) */
+       uint32_t  e4fs_raid_stripe_wid; /* blocks on data disks (N * stride) */
        uint8_t   e4fs_log_gpf;         /* FLEX_BG group size */
        uint8_t   e4fs_chksum_type;     /* metadata checksum algorithm used */
        uint8_t   e4fs_encrypt;         /* versioning level for encryption */
@@ -117,7 +117,7 @@ struct ext2fs {
        uint32_t  e4fs_first_errtime;   /* first time an error happened */
        uint32_t  e4fs_first_errino;    /* inode involved in first error */
        uint64_t  e4fs_first_errblk;    /* block involved of first error */
-       uint8_t   e4fs_first_errfunc[32]; /* function where error happened */
+       uint8_t   e4fs_first_errfunc[32];/* function where error happened */
        uint32_t  e4fs_first_errline;   /* line number where error happened */
        uint32_t  e4fs_last_errtime;    /* most recent time of an error */
        uint32_t  e4fs_last_errino;     /* inode involved in last error */
@@ -127,10 +127,10 @@ struct ext2fs {
        uint8_t   e4fs_mount_opts[64];
        uint32_t  e4fs_usrquota_inum;   /* inode for tracking user quota */
        uint32_t  e4fs_grpquota_inum;   /* inode for tracking group quota */
-       uint32_t  e4fs_overhead_clusters; /* overhead blocks/clusters */
+       uint32_t  e4fs_overhead_clusters;/* overhead blocks/clusters */
        uint32_t  e4fs_backup_bgs[2];   /* groups with sparse_super2 SBs */
-       uint8_t   e4fs_encrypt_algos[4]; /* encryption algorithms in use */
-       uint8_t   e4fs_encrypt_pw_salt[16]; /* salt used for string2key */
+       uint8_t   e4fs_encrypt_algos[4];/* encryption algorithms in use */
+       uint8_t   e4fs_encrypt_pw_salt[16];/* salt used for string2key */
        uint32_t  e4fs_lpf_ino;         /* location of the lost+found inode */
        uint32_t  e4fs_proj_quota_inum; /* inode for tracking project quota */
        uint32_t  e4fs_chksum_seed;     /* checksum seed */
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to