Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/backstores/rd_mcp assumes PAGE_SIZE=4k during creation #13

Open
nablio3000 opened this issue Aug 5, 2015 · 1 comment
Open

/backstores/rd_mcp assumes PAGE_SIZE=4k during creation #13

nablio3000 opened this issue Aug 5, 2015 · 1 comment

Comments

@nablio3000
Copy link
Member

On a ppc64le / RHEL 7.1b host, the size for a targetcli created /backstore/rd_mcp is larger than the user-inputted value.

[root@ibm1 ~]# targetcli
targetcli 3.0.pre4 (rtslib 3.0.pre4)
Copyright (c) 2011-2014 by Datera, Inc.
All rights reserved.

/backstores/rd_mcp> create test size=10G nullio=true
Created rd_mcp ramdisk test with size 10G.
Entering new node /backstores/rd_mcp/test
/backstores/rd_mcp/test> ls    
o- test ...................................................... [160.0G, ramdisk, not in use, nullio]
/backstores/rd_mcp/test> 

Looks like a hardcoded assumption for 4k pages here..

@agrover
Copy link
Contributor

agrover commented Aug 5, 2015

tcm.py

# convert to 4k pages
size = round(float(size)/4096)

can be fixed by replacing the hardcode with getpagesize() from the resource module. BTW the use of floats here made me take note, but it appears to be working correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants