Whamcloud - gitweb
LU-6152 osd-zfs: ZFS large block compat 44/13544/3
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 27 Jan 2015 23:20:56 +0000 (15:20 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 9 May 2015 02:48:45 +0000 (02:48 +0000)
commitbc9eae65f0880e5ae781d373f843d2c76f263714
tree573076b866ee29896cf80a2c17a9d1e37c1cfe22
parentddae357087fee63da36483c8432e178c3cacf903
LU-6152 osd-zfs: ZFS large block compat

This patch adds the required compatibility code to leverage the
new ZFS large block feature.  This includes supporting older versions
of ZFS which not contain large block support (ZFS v0.6.3 and earlier).

At the heart of this change is the SPA_MAXBLOCKSIZE macro which has
been increased from 128K to 16M.  This macro has always defined the
maximum possible blocksize support by ZFS.  However, just because
the ZFS code may now support this new large block it doesn't mean
that the feature is enabled on the pool.  Therefore, all consumers
of SPA_MAXBLOCKSIZE have been changed to use spa_maxblocksize() which
consults the pools feature flags to determine the supported maximum.

In addition, the ZFS OSD has been updated to to properly integrate
with a datasets recordsize property.  This allows the maximum block
size of a dataset to be changed with the 'zfs set' command.  This
has no effect on existing objects but new objects will be written
using the larger block size.  For example:

  zfs set recordsize=1M <dataset>

Finally, all references to SPA_MAXBLOCKSIZE and SPA_MAXBLOCKSHIFT
were removed and replaced with portable equivilants.  Going forward
the OSD layer needs to take case to no longer make any assumtions
about the maximum block size.

Test-Parameters: mdtfilesystemtype=zfs ostfilesystemtype=zfs mdsfilesystemtype=zfs
Change-Id: Iae782ff80ff185ca8c0f38e1002ff90e457c3ca1
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/13544
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
config/lustre-build-zfs.m4
lustre/osd-zfs/osd_handler.c
lustre/osd-zfs/osd_internal.h
lustre/osd-zfs/osd_io.c
lustre/osd-zfs/osd_object.c
lustre/osd-zfs/osd_quota.c