Module Name: src Committed By: maya Date: Thu Apr 6 01:54:23 UTC 2017
Modified Files: src/sys/ufs/lfs: lfs_inode.h lfs_segment.c Log Message: Drop single use macro LFS_BCLEAN_LOG with an inlined implementation. LFS_ENTER_LOG currently macro grabs lfs_lock, so I'd like to have just one name for it. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/ufs/lfs/lfs_inode.h cvs rdiff -u -r1.265 -r1.266 src/sys/ufs/lfs/lfs_segment.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/ufs/lfs/lfs_inode.h diff -u src/sys/ufs/lfs/lfs_inode.h:1.16 src/sys/ufs/lfs/lfs_inode.h:1.17 --- src/sys/ufs/lfs/lfs_inode.h:1.16 Mon Jun 20 03:29:52 2016 +++ src/sys/ufs/lfs/lfs_inode.h Thu Apr 6 01:54:23 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_inode.h,v 1.16 2016/06/20 03:29:52 dholland Exp $ */ +/* $NetBSD: lfs_inode.h,v 1.17 2017/04/06 01:54:23 maya Exp $ */ /* from NetBSD: ulfs_inode.h,v 1.5 2013/06/06 00:51:50 dholland Exp */ /* from NetBSD: inode.h,v 1.72 2016/06/03 15:36:03 christos Exp */ @@ -253,12 +253,6 @@ extern struct lfs_log_entry lfs_log[LFS_ mutex_exit(&lfs_lock); \ } while (0) -# define LFS_BCLEAN_LOG(fs, bp) do { \ - if ((bp)->b_vp == (fs)->lfs_ivnode) \ - LFS_ENTER_LOG("clear", __FILE__, __LINE__, \ - bp->b_lblkno, bp->b_flags, curproc->p_pid);\ -} while (0) - /* Must match list in lfs_vfsops.c ! */ # define DLOG_RF 0 /* roll forward */ # define DLOG_ALLOC 1 /* inode alloc */ Index: src/sys/ufs/lfs/lfs_segment.c diff -u src/sys/ufs/lfs/lfs_segment.c:1.265 src/sys/ufs/lfs/lfs_segment.c:1.266 --- src/sys/ufs/lfs/lfs_segment.c:1.265 Sat Apr 1 19:35:56 2017 +++ src/sys/ufs/lfs/lfs_segment.c Thu Apr 6 01:54:23 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_segment.c,v 1.265 2017/04/01 19:35:56 riastradh Exp $ */ +/* $NetBSD: lfs_segment.c,v 1.266 2017/04/06 01:54:23 maya Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc. @@ -60,7 +60,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.265 2017/04/01 19:35:56 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.266 2017/04/06 01:54:23 maya Exp $"); #ifdef DEBUG # define vndebug(vp, str) do { \ @@ -2572,7 +2572,11 @@ lfs_cluster_aiodone(struct buf *bp) tbp->b_flags &= ~B_GATHERED; - LFS_BCLEAN_LOG(fs, tbp); +#ifdef DEBUG + if ((tbp)->b_vp == (fs)->lfs_ivnode) + LFS_ENTER_LOG("clear", __FILE__, __LINE__, + tbp->b_lblkno, tbp->b_flags, curproc->p_pid); +#endif mutex_enter(&bufcache_lock); if (tbp->b_iodone == NULL) {