[rhinstaller/blivet/pulls/114 master] Use COW device to get actual size of LVM snapshots
mulkieran
installerbot-noreply at redhat.com
Thu May 14 12:49:27 UTC 2015
> @@ -966,6 +968,20 @@ def dependsOn(self, dep):
> return (self.origin == dep or
> super(LVMSnapShotBase, self).dependsOn(dep))
>
> + def readCurrentSize(self):
> + log_method_call(self, exists=self.exists, path=self.path,
> + sysfsPath=self.sysfsPath)
> + size = Size(0)
> + if self.exists and os.path.exists(self.path) and \
> + os.path.isdir(self.sysfsPath):
> + cowSysfsPath = util.get_cow_sysfs_path(self.path, self.sysfsPath)
> +
> + if os.path.exists(cowSysfsPath) and os.path.isdir(cowSysfsPath):
You should be able to omit ```os.path.exists(cowSysfsPath)``` since ```os.path.isdir(cowSysfsPath)``` will evaluate to False if ```cowSysfsPath``` does not exist.
--
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/114#discussion_r30317657
More information about the anaconda-patches
mailing list