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 3/5] zfs com.delphix:hole_birth feature support
Date: Sun, 19 Apr 2015 17:11:02 +0300 [thread overview]
Message-ID: <20150419171102.6433b4b4@opensuse.site> (raw)
In-Reply-To: <35A91AA4-73E2-46D7-8E86-3323C3299DD1@me.com>
В Thu, 16 Apr 2015 08:22:08 +0300
Toomas Soome <tsoome@me.com> пишет:
This really needs better explanation. Otherwise this looks like either
old code was broken to start with and it is a bug fix or new code needs
some conditionals on new feature.
>
> ---
> grub-core/fs/zfs/zfs.c | 6 ++++--
> include/grub/zfs/spa.h | 4 +++-
> 2 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/grub-core/fs/zfs/zfs.c b/grub-core/fs/zfs/zfs.c
> index 2689986..a731c3d 100644
> --- a/grub-core/fs/zfs/zfs.c
> +++ b/grub-core/fs/zfs/zfs.c
> @@ -280,7 +280,9 @@ grub_crypto_cipher_handle_t (*grub_zfs_load_key) (const struct grub_zfs_key *key
> */
> #define MAX_SUPPORTED_FEATURE_STRLEN 50
> static const char *spa_feature_names[] = {
> - "org.illumos:lz4_compress",NULL
> + "org.illumos:lz4_compress",
> + "com.delphix:hole_birth",
> + NULL
> };
>
> static int
> @@ -1751,7 +1753,7 @@ zio_read_gang (blkptr_t * bp, grub_zfs_endian_t endian, dva_t * dva, void *buf,
>
> for (i = 0; i < SPA_GBH_NBLKPTRS; i++)
> {
> - if (zio_gb->zg_blkptr[i].blk_birth == 0)
> + if (BP_IS_HOLE(&zio_gb->zg_blkptr[i]))
> continue;
>
> err = zio_read_data (&zio_gb->zg_blkptr[i], endian, buf, data);
> diff --git a/include/grub/zfs/spa.h b/include/grub/zfs/spa.h
> index 7edb8ab..df43b6b 100644
> --- a/include/grub/zfs/spa.h
> +++ b/include/grub/zfs/spa.h
> @@ -279,7 +279,9 @@ typedef struct blkptr {
>
> #define BP_IDENTITY(bp) (&(bp)->blk_dva[0])
> #define BP_IS_GANG(bp) DVA_GET_GANG(BP_IDENTITY(bp))
> -#define BP_IS_HOLE(bp) ((bp)->blk_birth == 0)
> +#define DVA_IS_EMPTY(dva) ((dva)->dva_word[0] == 0ULL && \
> + (dva)->dva_word[1] == 0ULL)
> +#define BP_IS_HOLE(bp) DVA_IS_EMPTY(BP_IDENTITY(bp))
>
> /* BP_IS_RAIDZ(bp) assumes no block compression */
> #define BP_IS_RAIDZ(bp) (DVA_GET_ASIZE(&(bp)->blk_dva[0]) > \
next prev parent reply other threads:[~2015-04-19 14:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-16 5:22 [PATCH 3/5] zfs com.delphix:hole_birth feature support Toomas Soome
2015-04-19 14:11 ` Andrei Borzenkov [this message]
2015-04-19 14:40 ` Toomas Soome
2015-04-19 14:51 ` Andrei Borzenkov
2015-04-19 14:57 ` Toomas Soome
2015-05-03 15:15 ` Andrei Borzenkov
2015-05-07 9:22 ` Vladimir 'φ-coder/phcoder' Serbinenko
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=20150419171102.6433b4b4@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.