Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1294502

Re: [PATCH] BTT: Change nd_btt_arena_is_valid() to verify UUID

From Vishal Verma <vishal@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] BTT: Change nd_btt_arena_is_valid() to verify UUID
Date 2015-12-18 09:40 +0100
Message-ID <qGYJZ-3eE-19@gated-at.bofh.it> (permalink)
References <qGPQl-61K-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 2015-12-17 at 16:00 -0700, Toshi Kani wrote:
> When user unbinds a BTT disk and binds again with a different
> sector size without wiping out the disk, a BTT disk is created
> with a wrong size.

I think this is an incorrect usage model in the first place. You
shouldn't expect to disable a BTT, change the sector size or uuid
behind it, and expect it to work with the new sector size on re-
enabling.

While this patch makes the BTT see the right size, it is really just an
illusion, because if you try to read the pre-sector-size-change data,
it will be scrambled, and thus practically lost.

Even with this patch, I can skip changing the UUID, just change the
sector size, and re-enable it, and the total available size will appear
to have changed.

For the case of legacy (non-nfit) namespaces, the only way to change a
BTT's properties is to recreate it using 'force_raw'. For non-legacy
namespaces, the recommended way is to recreate the namespace with a new
uuid, and this will cause BTT to react to the parent_uuid change and
not try to bind itself to stale metadata. Both cases will lose any data
on the old BTT.

Ideally, changing BTT properties shouldn't be allowed till the parent
namespaces is recreated, but I'm not sure there is an easy way to
enforce this -- Dan?

Also, I wonder if this problem is solved by using libndctl to manage
BTTs.


Thanks,
	-Vishal


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] BTT: Change nd_btt_arena_is_valid() to verify UUID Toshi Kani <toshi.kani@hpe.com> - 2015-12-18 00:10 +0100
  Re: [PATCH] BTT: Change nd_btt_arena_is_valid() to verify UUID Vishal Verma <vishal@kernel.org> - 2015-12-18 09:40 +0100
    Re: [PATCH] BTT: Change nd_btt_arena_is_valid() to verify UUID Toshi Kani <toshi.kani@hpe.com> - 2015-12-18 16:20 +0100
      Re: [PATCH] BTT: Change nd_btt_arena_is_valid() to verify UUID Dan Williams <dan.j.williams@intel.com> - 2015-12-18 19:00 +0100
        Re: [PATCH] BTT: Change nd_btt_arena_is_valid() to verify UUID Toshi Kani <toshi.kani@hpe.com> - 2015-12-18 20:00 +0100
          Re: [PATCH] BTT: Change nd_btt_arena_is_valid() to verify UUID Dan Williams <dan.j.williams@intel.com> - 2015-12-18 23:30 +0100

csiph-web