Skip to content

Commit

Permalink
move remount from fs/btrfs to system/osi rockstor#1320
Browse files Browse the repository at this point in the history
Not directly related to btrfs so moving to more general location.
  • Loading branch information
phillxnet committed Jun 2, 2016
1 parent 55a5eac commit 5b34543
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 0 additions & 6 deletions src/rockstor/fs/btrfs.py
Expand Up @@ -251,12 +251,6 @@ def umount_root(root_pool_mnt):
return


def remount(mnt_pt, mnt_options):
if (is_mounted(mnt_pt)):
run_command([MOUNT, '-o', 'remount,%s' % mnt_options, mnt_pt])
return True


def is_subvol(mnt_pt):
show_cmd = [BTRFS, 'subvolume', 'show', mnt_pt]
o, e, rc = run_command(show_cmd, throw=False)
Expand Down
3 changes: 2 additions & 1 deletion src/rockstor/storageadmin/views/pool.py
Expand Up @@ -29,8 +29,9 @@
from storageadmin.models import (Disk, Pool, Share, PoolBalance)
from storageadmin.views import DiskMixin
from fs.btrfs import (add_pool, pool_usage, resize_pool, umount_root,
btrfs_uuid, mount_root, remount, get_pool_info,
btrfs_uuid, mount_root, get_pool_info,
pool_raid, start_balance)
from system.osi import remount
from storageadmin.util import handle_exception
from django.conf import settings
import rest_framework_custom as rfc
Expand Down
6 changes: 6 additions & 0 deletions src/rockstor/system/osi.py
Expand Up @@ -382,6 +382,12 @@ def is_mounted(mnt_pt):
return False


def remount(mnt_pt, mnt_options):
if (is_mounted(mnt_pt)):
run_command([MOUNT, '-o', 'remount,%s' % mnt_options, mnt_pt])
return True


def get_md_members(device_name, test=None):
"""
Returns the md members from a given device, if the given device is not an
Expand Down

0 comments on commit 5b34543

Please sign in to comment.