Hmm, that doesn't appear to have worked. zdb is still reporting the
ashift of the pool I created with the modified package to be 9.
I could shange the SPA_MINBLOCKSHIFT definition to 12, but I think that
would prevent zfs-fuse from importing an existing ashift=9 pool, would
it not?
Gordan
On 02/20/2014 06:12 PM, Emmanuel Anne wrote:
> if it works it's ok.
> I think the vdev init for ashift is in vdev_file_open line 136 of
> lib/libzpool/vdev_file.c:
> *ashift = SPA_MINBLOCKSHIFT;
> that's probably here that ashift should normally be modified (default
> value here, it shouldn't prevent it from reading other pools with
> different ashift values).
> Not tested of course.
>
>
> 2014-02-20 13:53 GMT+01:00 Gordan Bobic <
gordan...@gmail.com
> <mailto:
gordan...@gmail.com>>:
>
> I _think_ this does that, but please review and treat with caution
> until somebody with more knowledge of ZFS internals says it's OK.
>
> --- src/lib/libzpool/vdev_label.c.orig 2014-02-20
> 12:02:29.306170588 +0000
> +++ src/lib/libzpool/vdev_label.c 2014-02-20 12:02:44.646155572 +0000
> @@ -277,7 +277,7 @@
> VERIFY(nvlist_add_uint64(nv, ZPOOL_CONFIG_METASLAB_SHIFT,
> vd->vdev_ms_shift) == 0);
> VERIFY(nvlist_add_uint64(nv, ZPOOL_CONFIG_ASHIFT,
> - vd->vdev_ashift) == 0);
> + 12) == 0);
> VERIFY(nvlist_add_uint64(nv, ZPOOL_CONFIG_ASIZE,
> vd->vdev_asize) == 0);
> VERIFY(nvlist_add_uint64(nv, ZPOOL_CONFIG_IS_LOG,
>
> According to zdb to pool I created with this patch does show up as
> ashift=12.
>
> Gordan
>
> --
> --
> To post to this group, send email to
zfs-...@googlegroups.com
> <mailto:
zfs-...@googlegroups.com>
> To visit our Web site, click on
http://zfs-fuse.net/
> ---
> You received this message because you are subscribed to the Google
> Groups "zfs-fuse" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to
zfs-fuse+u...@googlegroups.com
> <mailto:
zfs-fuse%2Bunsu...@googlegroups.com>.