All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Anthony PERARD <anthony.perard@vates.tech>
Cc: paul@xen.org, xen-devel@lists.xenproject.org,
	Owen Smith <owen.smith@cloud.com>,
	Mark Syms <mark.syms@citrix.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Juergen Gross <jgross@suse.com>
Subject: Re: Block protocol incompatibilities with 4K logical sector size disks
Date: Mon, 2 Sep 2024 18:08:08 +0200	[thread overview]
Message-ID: <ZtXi6P0aIchMFXcv@macbook.local> (raw)
In-Reply-To: <ZtXeq8F2BLTk2USB@l14>

On Mon, Sep 02, 2024 at 03:50:05PM +0000, Anthony PERARD wrote:
> On Mon, Sep 02, 2024 at 05:23:37PM +0200, Roger Pau Monné wrote:
> > On Mon, Sep 02, 2024 at 03:19:56PM +0100, Paul Durrant wrote:
> > > On 02/09/2024 09:55, Roger Pau Monné wrote:
> > > [snip]
> > > >
> > > > Thanks for your input.  I would also like to hear from the blktap and
> > > > Windows PV drivers maintainers, as the change that I'm proposing here
> > > > will require changes to their implementations.
> > > >
> > >
> > > So IIUC you are proposing to refuse to connect to a frontend that sets
> > > feature-large-sector-size if sector-size != 512? Is that right?
> >
> > Is is worth retrofitting this into existing backends?  My suggestion
> > would be to make `feature-large-sector-size` not mandatory to expose a
> > sector-size != 512, but I wouldn't go as far as refusing to connect to
> > frontends that expose the feature.  I have no idea which frontends
> > might expose `feature-large-sector-size` but still be compatible with
> > Linux blkback regarding sector-size != 512 (I know the Windows one
> > isn't).
> 
> The frontend exposing "feature-large-sector-size" are not going to work
> with Linux's backend if it set "sector-size" to a value different from
> 512.
> 
> From blkif.h:
>     feature-large-sector-size
>          A value of "1" indicates that the frontend will correctly supply and
>          interpret all sector-based quantities in terms of the "sector-size"
>          value supplied in the backend info, whatever that may be set to.
>          ...

While this is what the protocol specification says, just look how
different implementations have managed to diverge in all kind of
different ways.  I wouldn't discard there's a frontend somewhere that
exposes `feature-large-sector-size` without doing the calculations as
stated in the specification.

> But Linux interprets "sector-based quantities" as 512 bytes. This is
> incompatible with "feature-large-sector-size".
> 
> This is why I proposed to mark "feature-large-sector-size" as broken or
> incompatible with your proposal to use 512B for all sector-based
> quantities.

Yeah, that's the intention, to mark `feature-large-sector-size` as
deprecated in blkif.h and note it shouldn't be exposed by frontends.

I however wasn't planning to change Linux blkback for example to
refuse to attach to frontends that expose `feature-large-sector-size`
when `sector-size` != 512.

Thanks, Roger.


  reply	other threads:[~2024-09-02 16:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-29 10:59 Block protocol incompatibilities with 4K logical sector size disks Roger Pau Monné
2024-08-29 13:15 ` Anthony PERARD
2024-08-29 15:42   ` Roger Pau Monné
2024-08-30 16:09     ` Anthony PERARD
2024-09-02  8:55       ` Roger Pau Monné
2024-09-02 14:19         ` Paul Durrant
2024-09-02 15:23           ` Roger Pau Monné
2024-09-02 15:25             ` Paul Durrant
2024-09-02 15:50             ` Anthony PERARD
2024-09-02 16:08               ` Roger Pau Monné [this message]
2024-09-02 14:50         ` Mark Syms
2024-09-02 15:26           ` Roger Pau Monné

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=ZtXi6P0aIchMFXcv@macbook.local \
    --to=roger.pau@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=jgross@suse.com \
    --cc=mark.syms@citrix.com \
    --cc=owen.smith@cloud.com \
    --cc=paul@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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.