Allow multiple values per directory entry
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 27 Jan 2012 21:43:23 +0000 (13:43 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 2 Feb 2012 19:22:08 +0000 (11:22 -0800)
commit0c5dde492ff4fadcc9c43477c81b3d3824ac41db
tree052ee6a0f94ec5083249b81b6a3fd25605e9fe34
parente29be02e46ba2470795c9ab12e6da12d58ff2e5a
Allow multiple values per directory entry

When using zfs to back a Lustre filesystem it's advantageous to
to store a fid with the object id in the directory zap.  The only
technical impediment to doing this is that the zpl code expects
a single value in the zap per directory entry.

This change relaxes that requirement such that multiple entries
are allowed provided the first one is the object id.  The zpl
code will just ignore additional entries.  This allows the ZoL
count to mount datasets which are being used as Lustre server
backends.

Once the upstream feature flags support is merged in this change
should be updated to a read-only feature.  Until this occurs
other zfs implementations will not be able to read the zfs
filesystems created by Lustre.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
module/zfs/zfs_dir.c
module/zfs/zfs_vnops.c