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>