From 41ea0aa9841ce3102d896ab728e16a11f4733011 Mon Sep 17 00:00:00 2001 From: Philip Guyton Date: Sun, 7 May 2017 18:00:54 +0100 Subject: [PATCH] make fstype flag for bcache cdev consistent with role name #550 Minor flag name change - mostly aesthetic - but should help with code readability by being consistent with consequent role and role constants lists. --- src/rockstor/storageadmin/views/disk.py | 4 ++-- src/rockstor/system/osi.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rockstor/storageadmin/views/disk.py b/src/rockstor/storageadmin/views/disk.py index a9f24402b..0d2a924c9 100644 --- a/src/rockstor/storageadmin/views/disk.py +++ b/src/rockstor/storageadmin/views/disk.py @@ -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'] @@ -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 diff --git a/src/rockstor/system/osi.py b/src/rockstor/system/osi.py index 3bd4d9fc6..d0d7461d0 100644 --- a/src/rockstor/system/osi.py +++ b/src/rockstor/system/osi.py @@ -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.