[dm-devel] [PATCH 12/14] libmultipathpersist: use update_multipath_table/status, in get_mpvec
Martin Wilck
mwilck at suse.com
Mon Sep 7 14:33:15 UTC 2020
On Fri, 2020-09-04 at 19:05 -0500, Benjamin Marzinski wrote:
> On Wed, Sep 02, 2020 at 03:24:33PM +0800, lixiaokeng wrote:
> > The return values of dm_get_map, disassemble_map in get_mpvec
> > were not checked. Use update_multipath_table/status to instead
> > of them.
> >
>
> Looks mostly good. I agree that we should be checking the results of
> getting the raw data before we try to disassemble it. But, there's
> not
> really any point to calling continue as the last operation of a loop.
> Perhaps
>
> if (update_multipath_table(mpp, pathvec, DI_CHECKER) == DMP_OK)
> update_multipath_status(mpp);
>
> makes more sense.
I was thinking about this before, and wondered whether we should call
remove_map() here if we encounter an error. Looking at it again and
comparing with get_dm_mpvec(), I think we should.
Regards
Martin
More information about the dm-devel
mailing list