zfsonlinux/zfs — pull request #1922 by behlendorf (2013-12-03 22:23:43+00:00)
Title: Workaround for 'zfs diff' shares error

For some reason which is not yet fully explained it's possible for
stat64() to fail with EIO on the .zfs/shares directory. This then
causes the entire 'zfs diff' command to fail even though the shares
directory is not needed.

Until the root cause of the stat64() failure can be determined a
viable work around is to explicitly set the di->shares inode
number. The Linux .zfs directory implementation will always use
the same well known inode numbers for the top level directories.
Obtaining the number through stat64() is cleaner, but in case that
fails it can be safely assigned based on the known constant.

Signed-off-by: Brian Behlendorf
Issue #1426
Issue #481