All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <petr.vorel@gmail.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: dm-devel@redhat.com
Subject: Re: [PATCH 1/1] kpartx: Use __kernel_daddr_t for solaris_x86_slice.s_start
Date: Wed, 2 Oct 2019 08:05:09 +0200	[thread overview]
Message-ID: <20191002060508.GA16684@x230> (raw)
In-Reply-To: <20190709133436.GA2231@infradead.org>

Hi Christoph,

> On Tue, Jul 09, 2019 at 10:02:05AM +0200, Petr Vorel wrote:

> > > What this really should use is fixed size types.
> > If it's not specific to __kernel_daddr_t nor daddr_t ("The type of a disk
> > address") and long is sufficient for all platforms, that's even better.

> > I'd be just for removing typedef int daddr_t comment.

> > BTW gpart also uses struct solaris_x86_slice, with daddr_t [1].
> > I've filed a PR [2], but I guess I'll change it to long.

> solaris_x86_slice is an on-disk format, defined for good old 32-bit
> x86 Solaris.  So the question is not if it is enough, but if it matches
> what Solaris does.  I don't have the Solaris source at the moment,
> but here is what the Linux kernel uses:

> struct solaris_x86_slice {
>         __le16 s_tag;           /* ID tag of partition */
>         __le16 s_flag;          /* permission flags */
>         __le32 s_start;         /* start sector no of partition */
>         __le32 s_size;          /* # of blocks in partition */
> };

I tried to search in [1], with not much success, I don't know the original name
of the struct and struct members are quite similar. Do you have a tip, where it
could be or would you dare to search?

Christophe already merged my patch as
129e6fe6 ("kpartx: Use __kernel_daddr_t for solaris_x86_slice.s_start")

But, according to your comments it looks to me better to use the exact structure
kernel uses. So, if we don't find anything, I'd be for using kernel struct.

Kind regards,
Petr

[1] https://grok.elemental.org/source/

  reply	other threads:[~2019-10-02  6:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08 21:35 [PATCH 1/1] kpartx: Use __kernel_daddr_t for solaris_x86_slice.s_start Petr Vorel
2019-07-09  2:47 ` Christoph Hellwig
2019-07-09  8:02   ` Petr Vorel
2019-07-09 13:34     ` Christoph Hellwig
2019-10-02  6:05       ` Petr Vorel [this message]
2019-10-07 16:57         ` Christoph Hellwig
2019-10-08  8:18           ` Petr Vorel
2019-10-12  9:01             ` Baruch Even
2019-10-12 19:08               ` Petr Vorel

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=20191002060508.GA16684@x230 \
    --to=petr.vorel@gmail.com \
    --cc=dm-devel@redhat.com \
    --cc=hch@infradead.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.