My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 57: Return values of dm ioctl, why ' -1 '
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  checkout...@gmail.com
Closed:  Feb 2009


 
Reported by postri...@gmail.com, Feb 1, 2009
The dm ioctl is returning ' -1 ' even if everything is correct.

is this the defined behaviour.

Will it be changed or the user space code has to take care of this

What other values can it return like 0 ,1

What if a error ocurred there and the OHSM cannot proceed.

Moreover the Size of the mapper table is fixed i suppose

can it impose problems



Feb 1, 2009
Project Member #1 sandeepksinha
Hi Rishi,
Good question actually I will have to take a quick look at ioctl interface of DM.
I think there were some issues of returning -1 even if everything was fine.
Attach the patched dm.c into this issue and assign it to me.
I will take care of it. Will try to see that asap.

Also, can you tell me what macro are we talking about ?
Did you mean device per LVM or something like that? We will have this value as the
value used by DM, even they have a limitation for this.
Owner: sandeepksinha
Feb 1, 2009
#2 postri...@gmail.com

We have fixed that the 
maximum number of devices we support is 10 
maximum number of tiers we support is 10
The SAM table is working on this assumption

The problem can be resolved in the user space itself IF AND ONLY IF the lvm user
wants to use is made using the interface and scripts we are providing

We can check out there itself the number of devices entered and puke error if it does
not suit us.

But

Wat if the user wants to use a LVM which he has created 

He can have N number of device and specifically greater that 10
In that case the size of mapper_table is also fixed and is harcoded as 10

the nr_targets value will be greater than 10 and thus mapper_table will not have
information about any last few devices
???

quite serious i suppose

Solution to it is 
-> make the mapper_table dynamic ( not preffered by me as it may be time consuming)

-> send an error number through the ioctl interface "say 5" which the user space will
identify as "Number of Devices greater than supported" and puke an error and also
make the NUMBER OF DISKS supported as 20 or 25
or any suitable value you feel




Feb 1, 2009
Project Member #3 checkout...@gmail.com
Hi Rishi ,

Well you are right about dm ioctl that it is returning -1. 
I would soon fix the return values for dm-ioctl.

After fixing the return values for dm-ioctl, the problem that you had mention 
that if the count exceeds the maximum defined limit would get solved.


Feb 1, 2009
Project Member #4 sandeepksinha
Assigning it to Vineet,
as he is looking into this issue.
Vineet finish off this asap and close the issue.
Owner: checkout.vineet
Feb 2, 2009
Project Member #5 sandeepksinha
Vineet NO UPDATES      ??????????????????????????????
??????????????????????????????

Feb 2, 2009
#6 postri...@gmail.com
The issue has been fixed 

on error it returns -1

on success it returns 0
Status: Fixed

Powered by Google Project Hosting