Permalink
Browse files

Fix bug with iscsi targets: physical block is 4k, but logical is 512b

(and all sector_read/write count it in logical units)
  • Loading branch information...
1 parent 6453090 commit 68cf6d871c6e68e44675678951e68be043a0871c @amarao committed Apr 14, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 blktop
View
@@ -6,7 +6,7 @@ import copy
def get_sector_size(dev):
try:
- f=file("/sys/block/"+dev+"/queue/physical_block_size", 'r')
+ f=file("/sys/block/"+dev+"/queue/logical_block_size", 'r')
ss=int(f.readline())
except ExceptionObject:
#dirty hack for old kernels (like centos)

0 comments on commit 68cf6d8

Please sign in to comment.