/* Generate a key to describe a superblock key in the main NFS index  */
static uint16_t nfs_super_get_key(const void *cookie_netfs_data, void *buffer, uint16_t bufmax)
/* Generate a key to describe a superblock key in the main NFS index  */
static uint16_t nfs_super_get_key(const void *cookie_netfs_data, void *buffer, uint16_t bufmax)
{
	const struct nfs_fscache_key *key;
	const struct nfs_server *nfss = cookie_netfs_data;
	uint16_t len;
	key = nfss->fscache_key;
	len = sizeof(key->key) + key->key.uniq_len;
	if (len > bufmax) {
		len = 0;
	} else {
		memcpy(buffer, &key->key, sizeof(key->key));
		memcpy(buffer + sizeof(key->key),
		       key->key.uniquifier, key->key.uniq_len);
	}
	return len;
}