Skip to content

Commit

Permalink
make fstype flag for bcache cdev consistent with role name rockstor#550
Browse files Browse the repository at this point in the history
Minor flag name change - mostly aesthetic - but should help
with code readability by being consistent with consequent role
and role constants lists.
  • Loading branch information
phillxnet committed May 7, 2017
1 parent 8586980 commit 41ea0aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/rockstor/storageadmin/views/disk.py
Expand Up @@ -46,7 +46,7 @@
# and the post processing present in scan_disks()
# LUKS currently stands for full disk crypto container.
SCAN_DISKS_KNOWN_ROLES = ['mdraid', 'root', 'LUKS', 'openLUKS', 'bcache',
'bcache-cdev', 'partitions']
'bcachecdev', 'partitions']
WHOLE_DISK_FORMAT_ROLES = ['LUKS', 'bcache', 'bcachecdev']


Expand Down Expand Up @@ -251,7 +251,7 @@ def _update_disk_state():
# here we tag our backing device with it's virtual counterparts
# serial number.
disk_roles_identified['bcache'] = 'bcache-%s' % d.uuid
if d.fstype == 'bcache-cdev':
if d.fstype == 'bcachecdev':
# BCACHE: continued; here we use the scan_disks() added info
# of this bcache device being a cache device not a backing
# device, so it will have no virtual block device counterpart
Expand Down
4 changes: 2 additions & 2 deletions src/rockstor/system/osi.py
Expand Up @@ -429,8 +429,8 @@ def scan_disks(min_size):
elif bcache_dev_type == 'cdev':
# We have a bcache caching device, not a backing device.
# Change fstype as an indicator to _update_disk_state()
# role system. N.B. fstype bcache-cdev is fictitious.
dmap['FSTYPE'] = 'bcache-cdev'
# role system. N.B. fstype bcachecdev is fictitious.
dmap['FSTYPE'] = 'bcachecdev'
else:
# we are a non bcache bdev but we might be the virtual device
# if we are listed directly after a bcache bdev.
Expand Down

0 comments on commit 41ea0aa

Please sign in to comment.