[LTP] [PATCH v2] tst_find_backing_dev: match mount point if major/minor can't be found

Jan Stancek jstancek@redhat.com
Thu May 19 11:56:51 CEST 2022


On Tue, May 17, 2022 at 5:30 PM Cyril Hrubis <chrubis@suse.cz> wrote:
>
> Hi!
> > +             len = count_match_len(path, mnt_point);
> > +             if (len > best_match_len) {
>
> I wonder if we should also check for minimal len to avoid trival prefix
> matches such as "/". Maybe we should set the best_match_len to 1 to
> begin with.

Sure, we can do that. Would you ack this for release as well?
This has been failing for quite a while on fedora (which uses btrfs).

>
> > +                     strcpy(dev, pre);
> > +                     best_match_len = len;
> > +             }
> >       }
> >
> >       SAFE_FCLOSE(NULL, file);
> > --
> > 2.27.0
> >
> >
> > --
> > Mailing list info: https://lists.linux.it/listinfo/ltp
>
> --
> Cyril Hrubis
> chrubis@suse.cz
>



More information about the ltp mailing list