Whamcloud - gitweb
LU-8424 osd-zfs: ZFS macro DN_MAX_BONUSLEN is deprecated 78/26078/3
authorNed Bass <bass6@llnl.gov>
Sat, 18 Mar 2017 00:55:46 +0000 (17:55 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 26 Apr 2017 03:40:17 +0000 (03:40 +0000)
commit69940d2b3a445284e7e10ea04e8cb72ee37a8724
tree8ced8bef0e85ee9b13767685353df847b9caf8c2
parent997b8df1b7ead3ec1df4b36fb82f14fe6464185f
LU-8424 osd-zfs: ZFS macro DN_MAX_BONUSLEN is deprecated

The ZFS macro DN_MAX_BONUSLEN was deprecated as of ZFS 0.7.0. Lustre
should instead use the compatibility wrappers such as
osd_dmu_object_alloc() and osd_zap_create_flags(). The reason for the
API change is that ZFS 0.7.0 adds support for variable length dnodes,
so the maximum bonus length should not be treated as a fixed
constant. The maximum bonus length may vary by dnode and by dataset,
and it should be derived accordingly.

This change:

- Adds an additional compatibility function osd_obj_bonuslen(obj) to
  obtain a maximum bonus length given an osd_object.

- Updates code that uses the deprecated macro to instead use
  appropriate compatibility interfaces.

- Removes the definition of DN_MAX_BONUSLEN that was added in commit
  49fc02fb738e9420ab10c5a7d41534c7a55b8ea0 to ensure that future
  builds using the deprecated macro will fail.

- Adds DN_MAX_BONUSLEN and DN_OLD_MAX_BONUSLEN to the list of
  deprecated interfaces in checkpatch.pl.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Change-Id: I1fcc84e55b39ca49a88acb909b5e3294f3b46723
Reviewed-on: https://review.whamcloud.com/26078
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
contrib/scripts/checkpatch.pl
lustre/osd-zfs/osd_internal.h
lustre/osd-zfs/osd_oi.c
lustre/osd-zfs/osd_xattr.c