All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Jingyun He <jingyun.ho@gmail.com>
Cc: dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: unable to run mkfs.btrfs for host managed sata hdd
Date: Fri, 29 Oct 2021 16:21:21 +0200	[thread overview]
Message-ID: <20211029142121.GD20319@twin.jikos.cz> (raw)
In-Reply-To: <CAHQ7scV9i_s3gEXXki_U+RmqWLHu-DMWF_kzXFWKgOtqBQhvhA@mail.gmail.com>

On Fri, Oct 29, 2021 at 09:52:34PM +0800, Jingyun He wrote:
> Hi,
> Thanks for your reply,
> I run these commands under root account.
> 
> After debugging this furthermore,
> 
> The issue looks like LSI 2308 doesn't report it as a host managed device.
> 
> If I connect it to the onboard SATA port, everything is working fine.
> 
> I'm not sure if there is any method to run mkfs.btrfs forcely, as even
> LSI 2308 didn't report it as a host managed device, but it can pass
> most of the libzbc tests.

mkfs relies on the kernel interfaces to access the zone information, ie.
the ioctls to report and reset the zones. AFAIK libzbc works in a
different way and tracks the zone information outside of the device and
can work as an emulation layer.

https://zonedstorage.io/projects/libzbc/
"libzbc command implementation is compliant with the latest published
versions of the ZBC and ZAC standards defined by INCITS technical
committees T10 and T13 (respectively)."

You could connect the two together so there's normal block device that
also works as a native host-managed zoned devices.  For testing I've
been using TCMU runner that utilizes the libzbc library and exports the
block devices backed by file images.

But if the problem is on the lower layer where the LSI controller does
not pass the ZBC ioctls at all I don't see a way how you could use the
combination because simply calling zone reset would not work and that's
quite fundamental limitation.

      reply	other threads:[~2021-10-29 14:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 12:48 unable to run mkfs.btrfs for host managed sata hdd Jingyun He
2021-10-29 13:22 ` David Sterba
2021-10-29 13:52   ` Jingyun He
2021-10-29 14:21     ` David Sterba [this message]

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=20211029142121.GD20319@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=jingyun.ho@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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.