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

Re: [dm-devel] device-mapper ioctl interface version 3

On Wednesday 28 May 2003 14:50, Alasdair G Kergon wrote:
> As soon as it has satisfied all our internal tests, which I genuinely hope
> is only a few days away now...
> We have still been finding some small things to fix/change before release:
> the latest is the addition of the long-awaited command to list the
> names of devices, which we just got working a couple of hours ago.

Cool! I didn't realize you were going to add this command. That should help 
out quite a bit in several error-detection scenarios.

> Current interface definition (which could still need tweaking):
> dm_ioctl)
>   struct dm_name_list {
>           uint64_t dev;
>           uint32_t next;          /* offset to the next record from
>                                      the _start_ of this */
>           char name[0];
>   };
> Data comes in repeating struct dm_name_lists the same way as deps, table
> etc. It returns names not uuids.  [Enhancement is likely to provide the
> choice.]

I guess it would just take one extra flag defintion at the bottom of 
dm-ioctl.h to allow the user to choose between names and uuids.

> If the whole data won't fit, it returns no data & sets DM_BUFFER_FULL_FLAG.
> If there are no mapped devices defined, the first structure's dev is 0.
> The last item has next == 0.
> (The info fields don't get filled.)

Looks good to me. :)  I suppose there's not much point in returning only part 
of the list if the data won't fit in the buffer. Better to just reallocate 
the buffer and retry the command.

Kevin Corry
kevcorry us ibm com

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