From owner-svn-src-head@freebsd.org Tue Jun 7 17:08:36 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C988B6ED6F; Tue, 7 Jun 2016 17:08:36 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D44C01E40; Tue, 7 Jun 2016 17:08:35 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u57H8ZY6061686; Tue, 7 Jun 2016 17:08:35 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u57H8Yfx061683; Tue, 7 Jun 2016 17:08:34 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201606071708.u57H8Yfx061683@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 7 Jun 2016 17:08:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301559 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jun 2016 17:08:36 -0000 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 */