Author: jpaetzel
Date: Thu Apr 27 21:11:57 2017
New Revision: 317522
URL: https://svnweb.freebsd.org/changeset/base/317522

Log:
  MFV 316897
  
  7586 remove #ifdef __lint hack from dmu.h
  
  illumos/illumos-gate@4ba5b9616327ef64e8abc737d29b3faabc6ae68c
  
https://github.com/illumos/illumos-gate/commit/4ba5b9616327ef64e8abc737d29b3faabc6ae68c
  
  https://www.illumos.org/issues/7586
    The #ifdef __lint in dmu.h is ugly, and it would be nice not to duplicate 
it if
    we add other inline functions into header files in ZFS, especially since it 
is
    difficult to make any other solution work across all compilation targets. We
    should switch to disabling the lint flags that are failing instead.
  
  Reviewed by: Matthew Ahrens <mahr...@delphix.com>
  Reviewed by: Pavel Zakharov <pavel.zakha...@delphix.com>
  Approved by: Dan McDonald <dan...@omniti.com>
  Author: Dan Kimmel <dan.kim...@delphix.com>

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h       Thu Apr 
27 20:21:29 2017        (r317521)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h       Thu Apr 
27 21:11:57 2017        (r317522)
@@ -567,12 +567,7 @@ typedef struct dmu_buf_user {
  * NOTE: This function should only be called once on a given dmu_buf_user_t.
  *       To allow enforcement of this, dbu must already be zeroed on entry.
  */
-#ifdef __lint
-/* Very ugly, but it beats issuing suppression directives in many Makefiles. */
-extern void
-dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func,
-    dmu_buf_evict_func_t *evict_func_async, dmu_buf_t **clear_on_evict_dbufp);
-#else /* __lint */
+/*ARGSUSED*/
 inline void
 dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func_sync,
     dmu_buf_evict_func_t *evict_func_async, dmu_buf_t **clear_on_evict_dbufp)
@@ -588,7 +583,6 @@ dmu_buf_init_user(dmu_buf_user_t *dbu, d
        dbu->dbu_clear_on_evict_dbufp = clear_on_evict_dbufp;
 #endif
 }
-#endif /* __lint */
 
 /*
  * Attach user data to a dbuf and mark it for normal (when the dbuf's

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h       Thu Apr 
27 20:21:29 2017        (r317521)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h       Thu Apr 
27 21:11:57 2017        (r317522)
@@ -20,7 +20,7 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2016 by Delphix. All rights reserved.
  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
  * Copyright 2013 Saso Kiselkov. All rights reserved.
@@ -36,6 +36,7 @@
 #include <sys/sysmacros.h>
 #include <sys/types.h>
 #include <sys/fs/zfs.h>
+#include <sys/dmu.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -611,8 +612,6 @@ _NOTE(CONSTCOND) } while (0)
        ASSERT(len < size);                                             \
 }
 
-#include <sys/dmu.h>
-
 #define        BP_GET_BUFC_TYPE(bp)                                            
\
        (((BP_GET_LEVEL(bp) > 0) || (DMU_OT_IS_METADATA(BP_GET_TYPE(bp)))) ? \
        ARC_BUFC_METADATA : ARC_BUFC_DATA)
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to