From: Anthony PERARD <anthony.perard@vates.tech>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: paul@xen.org, Jan Beulich <jbeulich@suse.com>,
Owen Smith <owen.smith@cloud.com>,
Mark Syms <mark.syms@citrix.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Juergen Gross <jgross@suse.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH] blkif: reconcile protocol specification with in-use implementations
Date: Wed, 04 Sep 2024 09:35:40 +0000 [thread overview]
Message-ID: <Ztgp6j571lKZFam5@l14> (raw)
In-Reply-To: <ZtgkVzByhyXjaIqY@macbook.local>
On Wed, Sep 04, 2024 at 11:11:51AM +0200, Roger Pau Monné wrote:
> On Wed, Sep 04, 2024 at 09:39:17AM +0100, Paul Durrant wrote:
> > On 04/09/2024 09:21, Roger Pau Monné wrote:
> > > > In the absence of that I'm afraid it is a little harder to
> > > > judge whether the proposal here is the best we can do at this point.
> > >
> > > While I don't mind looking at what we can do to better handle 4K
> > > sector disks, we need IMO to revert to the specification before
> > > 67e1c050e36b, as that change switched the hardcoded sector based units
> > > from 512 to 'sector-size', thus breaking the existing ABI.
> > >
> >
> > But that's the crux of the problem. What *is* is the ABI? We apparently
> > don't have one that all OS subscribe to.
>
> At least prior to 67e1c050e36b the specification in blkif.h and (what
> I consider) the reference implementation in Linux blk{front,back}
> matched. Previous to 67e1c050e36b blkif.h stated:
>
> /*
> * NB. first_sect and last_sect in blkif_request_segment, as well as
> * sector_number in blkif_request, are always expressed in 512-byte units.
> * However they must be properly aligned to the real sector size of the
> * physical disk, which is reported in the "physical-sector-size" node in
> * the backend xenbus info. Also the xenbus "sectors" node is expressed in
> * 512-byte units.
> */
>
> I think it was quite clear, and does in fact match the implementation
> in Linux.
That's wrong, Linux doesn't match the specification before 67e1c050e36b,
in particular for "sectors":
sectors
Values: <uint64_t>
The size of the backend device, expressed in units of its logical
sector size ("sector-size").
The only implementation that matches this specification is MiniOS (and
OMVF).
Oh, I didn't notice that that random comment you quoted that comes from
the middle of the header have a different definition for "sectors" ...
Well, the specification doesn't match with the specification ... and the
only possible way to implement the specification is to only ever set
"sector-size" to 512...
No wonder that they are so many different interpretation of the
protocol.
Cheers,
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
next prev parent reply other threads:[~2024-09-04 9:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 14:19 [PATCH] blkif: reconcile protocol specification with in-use implementations Roger Pau Monne
2024-09-03 14:36 ` Jan Beulich
2024-09-04 8:21 ` Roger Pau Monné
2024-09-04 8:39 ` Paul Durrant
2024-09-04 9:11 ` Roger Pau Monné
2024-09-04 9:35 ` Anthony PERARD [this message]
2024-09-04 10:31 ` Roger Pau Monné
2024-09-04 9:31 ` Jan Beulich
2024-09-04 10:07 ` Roger Pau Monné
2024-09-04 13:25 ` Anthony PERARD
2024-09-10 9:07 ` 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=Ztgp6j571lKZFam5@l14 \
--to=anthony.perard@vates.tech \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=mark.syms@citrix.com \
--cc=owen.smith@cloud.com \
--cc=paul@xen.org \
--cc=roger.pau@citrix.com \
--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.