Whamcloud - gitweb
LU-2190 utils: Map ldd_params to individual props
authorPrakash Surya <surya1@llnl.gov>
Fri, 8 Mar 2013 01:18:08 +0000 (17:18 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 12 Mar 2013 05:02:21 +0000 (01:02 -0400)
commita0fa36164f27f744fccd45ac3f5844c805e0d759
tree96543bb3fa31d57b324e2a6ea7b3fe0d8cc1bffb
parent11b26155714118d38348eadde91ce623ec570ec6
LU-2190 utils: Map ldd_params to individual props

At mkfs/tunefs/mount time the configuration utilities will access
a .ldd_params configuraton string.  This string consists of space
delimited key values pairs which must be saved somewhere.

For ldiskfs it makes sense to store this string on disk as part
of the binary lustre_disk_data structure.  But the logical place
for ZFS is to use the user dataset properties where all the other
lustre_disk_data fields are stored.

This patch updates the ZFS portions of the utilities to take the
.ldd_params string and break it apart in to individual key value
pairs which can be stored as user dataset properties.  This is
done by simply appending 'lustre:' to the provided param key.

The original .ldd_params field can then be reconstructed by
fetching all the dataset properties prefixed by 'lustre:' and
appending them with their keys.

The advantage in this approach is new parameters can be added
without the need to update utilties.

Change-Id: Ida1b0e845b27154b209cc807726ae6ed3d22d189
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Prakash Surya <surya1@llnl.gov>
Reviewed-on: http://review.whamcloud.com/5220
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
lustre/utils/mount_utils_zfs.c