Whamcloud - gitweb
LU-13946 build: OpenZFS 2.0 compatibility 22/39822/5
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 3 Sep 2020 16:23:17 +0000 (09:23 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 19 Oct 2020 03:13:28 +0000 (03:13 +0000)
commit6bdda1ac32e4814b2bef065bfc92152265dd5280
tree9732cc8f4eb822724e21e019e1978aee6fd77b6a
parent2bf6442d7d9bd452153e6b1ea08ddaae3dfb3716
LU-13946 build: OpenZFS 2.0 compatibility

* Update zfs_refcount_add() configure check.  OpenZFS 2.0 has renamed
  the sys/refcount.h header to sys/zfs_refcount.h to avoid a conflict
  with this header on FreeBSD.  Since Lustre never directly includes
  this header by name adjust the configure check to indirectly include
  it through sys/dnode.h.  This was we don't need a separate check to
  determine the expected header name.

* Add db->db_dirty_records check.  The db->db_last_dirty field was
  replaced by a proper db->db_dirty_records list_t.  Detect the code
  change and add a osd_db_dirty_txg() helper function which returns
  the largest dirty txg for the dbuf or zero when clean.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Change-Id: Ifc9573ec410f50f46f2c601368639453e78b291d
Reviewed-on: https://review.whamcloud.com/39822
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
config/lustre-build-zfs.m4
lustre/osd-zfs/osd_internal.h
lustre/osd-zfs/osd_io.c
lustre/osd-zfs/osd_object.c