<div dir="ltr"><div>Thanks for the review.</div><div><br></div>Martin, can you post a rebased version of this patch ?<div><br></div><div>Thanks,</div><div>Christophe</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 8, 2019 at 4:27 PM Benjamin Marzinski <<a href="mailto:bmarzins@redhat.com">bmarzins@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Jun 28, 2019 at 07:29:41PM +0000, Martin Wilck wrote:<br>
> From: Martin Wilck <<a href="mailto:mwilck@suse.com" target="_blank">mwilck@suse.com</a>><br>
> <br>
> Since 4d57b868, DASD partition tables are only recognized on<br>
> DASD hardware. This turns out to break certain software that works<br>
> e.g. with DASD partition tables on loop devices. The problem that<br>
> 4d57b868 attempted to fix was that "unlabeled disk" format has<br>
> no signature at all and is detected on any volume, including<br>
> empty ones.<br>
> <br>
> With this patch, DASD partition table formats other than "unlabeled<br>
> disk" are detected on non-DASD devices again.<br>
> <br>
> Fixes: 4d57b868 "kpartx: only recognize dasd part table on DASD"<br>
<br>
Reviewed-by: Benjamin Marzinski <<a href="mailto:bmarzins@redhat.com" target="_blank">bmarzins@redhat.com</a>><br>
<br>
> ---<br>
>  kpartx/dasd.c | 7 ++++---<br>
>  1 file changed, 4 insertions(+), 3 deletions(-)<br>
> <br>
> diff --git a/kpartx/dasd.c b/kpartx/dasd.c<br>
> index 61b609a5..3fcef6ad 100644<br>
> --- a/kpartx/dasd.c<br>
> +++ b/kpartx/dasd.c<br>
> @@ -133,9 +133,6 @@ read_dasd_pt(int fd, struct slice all, struct slice *sp, int ns)<br>
>                       /* Couldn't open the device */<br>
>                       return -1;<br>
>               }<br>
> -     } else if ((unsigned int)major(sbuf.st_rdev) != 94) {<br>
> -                     /* Not a DASD */<br>
> -                     return -1;<br>
>       } else {<br>
>               fd_dasd = dup(fd);<br>
>       }<br>
> @@ -277,6 +274,10 @@ read_dasd_pt(int fd, struct slice all, struct slice *sp, int ns)<br>
>                       size = disksize;<br>
>                       if (fmt_size < size)<br>
>                               size = fmt_size;<br>
> +             } else if ((unsigned int)major(sbuf.st_rdev) != 94) {<br>
> +                     /* Not a DASD */<br>
> +                     retval = -1;<br>
> +                     goto out;<br>
>               } else<br>
>                       size = disksize;<br>
>  <br>
> -- <br>
> 2.21.0<br>
> <br>
</blockquote></div>