From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YozUn-0006ou-Uk for mharc-grub-devel@gnu.org; Sun, 03 May 2015 15:24:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YozUk-0006oD-Rg for grub-devel@gnu.org; Sun, 03 May 2015 15:24:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YozUg-0001vy-BJ for grub-devel@gnu.org; Sun, 03 May 2015 15:24:06 -0400 Received: from mail-lb0-x231.google.com ([2a00:1450:4010:c04::231]:35396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YozUf-0001vp-Vc for grub-devel@gnu.org; Sun, 03 May 2015 15:24:02 -0400 Received: by lbbuc2 with SMTP id uc2so92634085lbb.2 for ; Sun, 03 May 2015 12:24:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=R0neoRoVWUFwoyG19PC+Gg25amzYzkmR6jMcYer8E5I=; b=jqNcmQSxGWs5ULtACum5W1VeZ6lY3gjAaCeIyjCzS9ixQQkEDzYid2m4WCKwxFh5Rm sQleeeVjpbQ/6juU7rkuTvAsGHgAnEu/r7Gmh9dQsR6iQFBLfZwbDEj+0rAiMTON31zV ivitpvOe74X1dapOiU/m5M2rIvTAuiV3iGWytw8fE2v8Yx9ivOw3aaQVsagbhOff3p6+ qv7dqEefXxN2zNp4wgSRR/r+l90RI5MX7QLrpAixGc7hhjTlxW4YnO+qWwOevYF8LxT2 f7NODkUlBgD+BcWwSUpPfFOY/JZauIOdYfSuSRfUIlRpkeNoKv6IF9iGUIsL3GlDAD0G rGXQ== X-Received: by 10.152.5.194 with SMTP id u2mr10163027lau.3.1430681041255; Sun, 03 May 2015 12:24:01 -0700 (PDT) Received: from opensuse.site (ppp91-76-14-38.pppoe.mtu-net.ru. [91.76.14.38]) by mx.google.com with ESMTPSA id li8sm2870815lab.17.2015.05.03.12.23.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 May 2015 12:24:00 -0700 (PDT) Date: Sun, 3 May 2015 22:23:58 +0300 From: Andrei Borzenkov To: Toomas Soome Subject: Re: [PATCH 5/5] zfs extensible_dataset and large_blocks feature support Message-ID: <20150503222358.2431549d@opensuse.site> In-Reply-To: References: <20150419224040.44ec3e70@opensuse.site> <9505B405-2124-4FCC-9527-41C5BE5B045A@me.com> <20150420064023.277228f2@opensuse.site> X-Mailer: Claws Mail 3.11.0 (GTK+ 2.24.27; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::231 Cc: The development of GNU GRUB X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 May 2015 19:24:08 -0000 =D0=92 Mon, 20 Apr 2015 08:41:41 +0300 Toomas Soome =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >=20 > > On 20.04.2015, at 6:40, Andrei Borzenkov wrote: > >=20 > > =D0=92 Sun, 19 Apr 2015 22:53:35 +0300 > > Toomas Soome =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > >=20 > >>=20 > >>> On 19.04.2015, at 22:40, Andrei Borzenkov wrote: > >>>=20 > >>> =D0=92 Thu, 16 Apr 2015 08:24:38 +0300 > >>> Toomas Soome =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > >>>=20 > >>>>=20 > >>>=20 > >>> 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? > >>>=20 > >>=20 > >>=20 > >> yes, large block is basically free, but, there are 2 conditions.=20 > >>=20 > >> 1. large blocks basically use extensible dataset feature, or to be exa= ct, setting recordsize above 128k will trigger large_block feature to be en= abled and storing such blocks is using feature extensible dataset. so the e= xtensible dataset is prerequisite. > >>=20 > >> 2. once large block is enabled, its listed in label as well, and there= fore it should be listed in spa_feature_names, which is list of supported f= eatures. > >>=20 > >> but otherwise, reading large blocks does not require any other changes= (assuming there is enough memory to read those blocks). > >=20 > > Good. So the means that the only change needed was ... > >=20 > >>=20 > >> rgds, > >> toomas > >>=20 > >>=20 > >>=20 > >>>> --- > >>>> grub-core/fs/zfs/zfs.c | 18 +++++++++++------- > >>>> 1 file changed, 11 insertions(+), 7 deletions(-) > >>>>=20 > >>>> 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[] =3D { > >>>> "org.illumos:lz4_compress", > >>>> "com.delphix:hole_birth", > >>>> "com.delphix:embedded_data", > >>>> + "com.delphix:extensible_dataset", > >>>> + "org.open-zfs:large_blocks", > >=20 > > ... this one. What all other changes below do and how they are related > > to these two features? >=20 > they do implement read support extensible dataset=E2=80=A6 instead of fix= ed DMU types they dont specify type, making it possible to use fat zap obje= cts from bonus area.=20 >=20 > reference commit: > https://github.com/illumos/illumos-gate/commit/2acef22db7808606888f8f9271= 5629ff3ba555b9 >=20 OK; just to be sure - there are several remaining uses of DMU_OT_DSL_DATASET and DMU_OT_DSL_DIR; are these intentional? >=20 > >=20 > >>>> NULL > >>>> }; > >>>>=20 > >>>> @@ -3080,7 +3082,7 @@ get_filesystem_dnode (dnode_end_t * mosmdn, ch= ar *fsname, > >>>>=20 > >>>> grub_dprintf ("zfs", "alive\n"); > >>>>=20 > >>>> - err =3D dnode_get (mosmdn, objnum, DMU_OT_DSL_DIR, mdn, data); > >>>> + err =3D dnode_get (mosmdn, objnum, 0, mdn, data); > >>>> if (err) > >>>> return err; > >>>>=20 > >>>> @@ -3113,7 +3115,7 @@ get_filesystem_dnode (dnode_end_t * mosmdn, ch= ar *fsname, > >>>> if (err) > >>>> return err; > >>>>=20 > >>>> - err =3D dnode_get (mosmdn, objnum, DMU_OT_DSL_DIR, mdn, data); > >>>> + err =3D dnode_get (mosmdn, objnum, 0, mdn, data); > >>>> if (err) > >>>> return err; > >>>>=20 > >>>> @@ -3268,8 +3270,7 @@ dnode_get_fullpath (const char *fullpath, stru= ct subvolume *subvol, > >>>>=20 > >>>> grub_dprintf ("zfs", "endian =3D %d\n", subvol->mdn.endian); > >>>>=20 > >>>> - err =3D dnode_get (&(data->mos), headobj, DMU_OT_DSL_DATASET, &su= bvol->mdn, > >>>> - data); > >>>> + err =3D 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 >=3D SPA_VERSION_FEATURES && > >>>> check_mos_features(&((objset_phys_t *) osp)->os_meta_dnode,ub_e= ndian, > >>>> data) !=3D 0) > >>>> - return NULL; > >>>> -=09 > >>>> + { > >>>> + 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_dn= ode, > >>>> DNODE_SIZE); > >>>> @@ -3963,7 +3967,7 @@ fill_fs_info (struct grub_dirhook_info *info, > >>>> { > >>>> headobj =3D grub_zfs_to_cpu64 (((dsl_dir_phys_t *) DN_BONUS (&m= dn.dn))->dd_head_dataset_obj, mdn.endian); > >>>>=20 > >>>> - err =3D dnode_get (&(data->mos), headobj, DMU_OT_DSL_DATASET,= &mdn, data); > >>>> + err =3D dnode_get (&(data->mos), headobj, 0, &mdn, data); > >>>> if (err) > >>>> { > >>>> grub_dprintf ("zfs", "failed here\n"); >=20