[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH parted] linux: dm_task_run returns 0 on error

From: Jim Meyering
Subject: Re: [PATCH parted] linux: dm_task_run returns 0 on error
Date: Fri, 23 Apr 2010 17:47:17 +0200

Hans de Goede wrote:
> We were checking for a return value of < 0 for dm_task_run errors, but
> dm_task_run returns 0 on error (and 1 on success). Thanks to Joe Jin
> for spotting this, see Red Hat bug 582907.
> * libparted/arch/linux.c(_dm_remove_map_name, _dm_is_part,
> _dm_remove_parts, _dm_add_partition): dm_task_run returns 0 on error.

Thanks, Hans.
Normally I would want a test case, but here the fix seems simple/safe enough,
and the test involved enough to set up that it's not worth the hassle.

FYI, Hans outlined it:

  1) create a dummy devicemapper device for us to use
  2) create pre-existing partitions on it
  3) make one of those partitions busy
  4) make some changes to the table, and watch it fail
  5) check that the failure actually gets reported

I'll push your patch soon.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]