Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/ext2fs switch ext2fs_htree_has_idx() over to EXT2F_H...



details:   https://anonhg.NetBSD.org/src/rev/6b5d48b67123
branches:  trunk
changeset: 347105:6b5d48b67123
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Aug 14 11:42:50 2016 +0000

description:
switch ext2fs_htree_has_idx() over to EXT2F_HAS_COMPAT_FEATURE() and remove EXT2F_HAS_COMPAT_FEATURE() - this also fixes it for BE machines, as EXT2F_HAS_COMPAT_FEATURE() did extra byte swap; also 
remove XXX comment about IN_E3INDEX

diffstat:

 sys/ufs/ext2fs/ext2fs.h       |  4 +---
 sys/ufs/ext2fs/ext2fs_htree.c |  7 +++----
 2 files changed, 4 insertions(+), 7 deletions(-)

diffs (46 lines):

diff -r c37852fbbece -r 6b5d48b67123 sys/ufs/ext2fs/ext2fs.h
--- a/sys/ufs/ext2fs/ext2fs.h   Sun Aug 14 11:40:31 2016 +0000
+++ b/sys/ufs/ext2fs/ext2fs.h   Sun Aug 14 11:42:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ext2fs.h,v 1.44 2016/08/14 11:40:31 jdolecek Exp $     */
+/*     $NetBSD: ext2fs.h,v 1.45 2016/08/14 11:42:50 jdolecek Exp $     */
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -365,8 +365,6 @@
 /*
  * Feature set definitions
  */
-#define EXT2_HAS_COMPAT_FEATURE(sb, mask) \
-    ((sb)->e2fs.e2fs_features_compat & htole32(mask))
 #define EXT2F_HAS_COMPAT_FEATURE(fs, feature) \
        ((fs)->e2fs.e2fs_rev >= E2FS_REV1 && \
        ((fs)->e2fs.e2fs_features_compat & (feature)) != 0)
diff -r c37852fbbece -r 6b5d48b67123 sys/ufs/ext2fs/ext2fs_htree.c
--- a/sys/ufs/ext2fs/ext2fs_htree.c     Sun Aug 14 11:40:31 2016 +0000
+++ b/sys/ufs/ext2fs/ext2fs_htree.c     Sun Aug 14 11:42:50 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ext2fs_htree.c,v 1.5 2016/08/13 07:40:10 christos Exp $        */
+/*     $NetBSD: ext2fs_htree.c,v 1.6 2016/08/14 11:42:50 jdolecek Exp $        */
 
 /*-
  * Copyright (c) 2010, 2012 Zheng Liu <lz%freebsd.org@localhost>
@@ -29,7 +29,7 @@
  * $FreeBSD: head/sys/fs/ext2fs/ext2fs_htree.c 294653 2016-01-24 02:41:49Z pfg $
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_htree.c,v 1.5 2016/08/13 07:40:10 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_htree.c,v 1.6 2016/08/14 11:42:50 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -65,8 +65,7 @@
 int
 ext2fs_htree_has_idx(struct inode *ip)
 {
-       /* XXX ip->i_flags should have got checked here for IN_E3INDEX */
-       return EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX)
+       return EXT2F_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX)
            && (ip->i_din.e2fs_din->e2di_flags & EXT2_INDEX);
 }
 



Home | Main Index | Thread Index | Old Index