grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Toomas Soome <tsoome@me.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH 5/5] zfs extensible_dataset and large_blocks feature support
Date: Sun, 19 Apr 2015 22:40:40 +0300	[thread overview]
Message-ID: <20150419224040.44ec3e70@opensuse.site> (raw)
In-Reply-To: <D4DEDCE6-A44A-4EBE-8ECB-DC5BA807D103@me.com>

В Thu, 16 Apr 2015 08:24:38 +0300
Toomas Soome <tsoome@me.com> пишет:

> 

Could you explain how these changes affect large block read? As far as
I understand, this feature is basically "for free" - changes were
needed to allow large block writes, but on disk format already
supported them so reading should have just worked?

> ---
>  grub-core/fs/zfs/zfs.c |   18 +++++++++++-------
>  1 file changed, 11 insertions(+), 7 deletions(-)
> 
> diff --git a/grub-core/fs/zfs/zfs.c b/grub-core/fs/zfs/zfs.c
> index da44131..4a542e0 100644
> --- a/grub-core/fs/zfs/zfs.c
> +++ b/grub-core/fs/zfs/zfs.c
> @@ -283,6 +283,8 @@ static const char *spa_feature_names[] = {
>    "org.illumos:lz4_compress",
>    "com.delphix:hole_birth",
>    "com.delphix:embedded_data",
> +  "com.delphix:extensible_dataset",
> +  "org.open-zfs:large_blocks",
>    NULL
>  };
>  
> @@ -3080,7 +3082,7 @@ get_filesystem_dnode (dnode_end_t * mosmdn, char *fsname,
>  
>    grub_dprintf ("zfs", "alive\n");
>  
> -  err = dnode_get (mosmdn, objnum, DMU_OT_DSL_DIR, mdn, data);
> +  err = dnode_get (mosmdn, objnum, 0, mdn, data);
>    if (err)
>      return err;
>  
> @@ -3113,7 +3115,7 @@ get_filesystem_dnode (dnode_end_t * mosmdn, char *fsname,
>        if (err)
>  	return err;
>  
> -      err = dnode_get (mosmdn, objnum, DMU_OT_DSL_DIR, mdn, data);
> +      err = dnode_get (mosmdn, objnum, 0, mdn, data);
>        if (err)
>  	return err;
>  
> @@ -3268,8 +3270,7 @@ dnode_get_fullpath (const char *fullpath, struct subvolume *subvol,
>  
>    grub_dprintf ("zfs", "endian = %d\n", subvol->mdn.endian);
>  
> -  err = dnode_get (&(data->mos), headobj, DMU_OT_DSL_DATASET, &subvol->mdn,
> -		   data);
> +  err = dnode_get (&(data->mos), headobj, 0, &subvol->mdn, data);
>    if (err)
>      {
>        grub_free (fsname);
> @@ -3665,8 +3666,11 @@ zfs_mount (grub_device_t dev)
>    if (ub->ub_version >= SPA_VERSION_FEATURES &&
>        check_mos_features(&((objset_phys_t *) osp)->os_meta_dnode,ub_endian,
>  			 data) != 0)
> -    return NULL;
> -	
> +    {
> +      grub_error (GRUB_ERR_BAD_FS, "Unsupported features in pool");
> +      return NULL;
> +    }
> +
>    /* Got the MOS. Save it at the memory addr MOS. */
>    grub_memmove (&(data->mos.dn), &((objset_phys_t *) osp)->os_meta_dnode,
>  		DNODE_SIZE);
> @@ -3963,7 +3967,7 @@ fill_fs_info (struct grub_dirhook_info *info,
>      {
>        headobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) DN_BONUS (&mdn.dn))->dd_head_dataset_obj, mdn.endian);
>  
> -      err = dnode_get (&(data->mos), headobj, DMU_OT_DSL_DATASET, &mdn, data);
> +      err = dnode_get (&(data->mos), headobj, 0, &mdn, data);
>        if (err)
>  	{
>  	  grub_dprintf ("zfs", "failed here\n");



  reply	other threads:[~2015-04-19 19:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-16  5:24 [PATCH 5/5] zfs extensible_dataset and large_blocks feature support Toomas Soome
2015-04-19 19:40 ` Andrei Borzenkov [this message]
2015-04-19 19:53   ` Toomas Soome
2015-04-20  3:40     ` Andrei Borzenkov
2015-04-20  5:41       ` Toomas Soome
2015-05-03 19:23         ` Andrei Borzenkov
2015-05-03 19:47           ` Toomas Soome
2015-05-04  4:32             ` Andrei Borzenkov
2015-05-04  6:49               ` Toomas Soome
2015-05-15  7:50                 ` Toomas Soome
2015-05-30  5:56                   ` Andrei Borzenkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150419224040.44ec3e70@opensuse.site \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=tsoome@me.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).