mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-18 10:21:01 +03:00
Fix typos in contrib/
Reviewed-by: Ryan Moeller <ryan@ixsystems.com> Reviewed-by: Richard Laager <rlaager@wiktel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Closes #9235
This commit is contained in:
parent
eaf8e3b779
commit
44ae857ca4
@ -78,7 +78,7 @@ find_rootfs()
|
|||||||
{
|
{
|
||||||
local pool="$1"
|
local pool="$1"
|
||||||
|
|
||||||
# If 'POOL_IMPORTED' isn't set, no pool imported and therefor
|
# If 'POOL_IMPORTED' isn't set, no pool imported and therefore
|
||||||
# we won't be able to find a root fs.
|
# we won't be able to find a root fs.
|
||||||
[ -z "${POOL_IMPORTED}" ] && return 1
|
[ -z "${POOL_IMPORTED}" ] && return 1
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ get_pools()
|
|||||||
# Get the base list of available pools.
|
# Get the base list of available pools.
|
||||||
available_pools=$(find_pools "$ZPOOL" import)
|
available_pools=$(find_pools "$ZPOOL" import)
|
||||||
|
|
||||||
# Just in case - seen it happen (that a pool isn't visable/found
|
# Just in case - seen it happen (that a pool isn't visible/found
|
||||||
# with a simple "zpool import" but only when using the "-d"
|
# with a simple "zpool import" but only when using the "-d"
|
||||||
# option or setting ZPOOL_IMPORT_PATH).
|
# option or setting ZPOOL_IMPORT_PATH).
|
||||||
if [ -d "/dev/disk/by-id" ]
|
if [ -d "/dev/disk/by-id" ]
|
||||||
@ -401,7 +401,7 @@ mount_fs()
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Unlock a ZFS native crypted filesystem.
|
# Unlock a ZFS native encrypted filesystem.
|
||||||
decrypt_fs()
|
decrypt_fs()
|
||||||
{
|
{
|
||||||
local fs="$1"
|
local fs="$1"
|
||||||
@ -606,7 +606,7 @@ setup_snapshot_booting()
|
|||||||
if ! grep -qiE '(^|[^\\](\\\\)* )(rollback)=(on|yes|1)( |$)' /proc/cmdline
|
if ! grep -qiE '(^|[^\\](\\\\)* )(rollback)=(on|yes|1)( |$)' /proc/cmdline
|
||||||
then
|
then
|
||||||
# If the destination dataset for the clone
|
# If the destination dataset for the clone
|
||||||
# already exists, destroy it. Recursivly
|
# already exists, destroy it. Recursively
|
||||||
if [ $(get_fs_value "${rootfs}_${snapname}" type) ]; then
|
if [ $(get_fs_value "${rootfs}_${snapname}" type) ]; then
|
||||||
filesystems=$("${ZFS}" list -oname -tfilesystem -H \
|
filesystems=$("${ZFS}" list -oname -tfilesystem -H \
|
||||||
-r -Sname "${ZFS_BOOTFS}")
|
-r -Sname "${ZFS_BOOTFS}")
|
||||||
@ -616,7 +616,7 @@ setup_snapshot_booting()
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get all snapshots, recursivly (might need to clone /usr, /var etc
|
# Get all snapshots, recursively (might need to clone /usr, /var etc
|
||||||
# as well).
|
# as well).
|
||||||
for s in $("${ZFS}" list -H -oname -tsnapshot -r "${rootfs}" | \
|
for s in $("${ZFS}" list -H -oname -tsnapshot -r "${rootfs}" | \
|
||||||
grep "${snapname}")
|
grep "${snapname}")
|
||||||
@ -843,7 +843,7 @@ mountroot()
|
|||||||
# Strip 'zfs:' and 'ZFS='.
|
# Strip 'zfs:' and 'ZFS='.
|
||||||
ZFS_BOOTFS="${ROOT#*[:=]}"
|
ZFS_BOOTFS="${ROOT#*[:=]}"
|
||||||
|
|
||||||
# Stip everything after the first slash.
|
# Strip everything after the first slash.
|
||||||
ZFS_RPOOL="${ZFS_BOOTFS%%/*}"
|
ZFS_RPOOL="${ZFS_BOOTFS%%/*}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -291,7 +291,7 @@ autodoc_member_order = 'bysource'
|
|||||||
|
|
||||||
#######################
|
#######################
|
||||||
# Neutralize effects of function wrapping on documented signatures.
|
# Neutralize effects of function wrapping on documented signatures.
|
||||||
# The affected signatures could be explcitly placed into the
|
# The affected signatures could be explicitly placed into the
|
||||||
# documentation (either in .rst files or as a first line of a
|
# documentation (either in .rst files or as a first line of a
|
||||||
# docstring).
|
# docstring).
|
||||||
import functools
|
import functools
|
||||||
|
@ -300,7 +300,7 @@ def lzc_destroy_snaps(snaps, defer):
|
|||||||
|
|
||||||
Typical error is :exc:`SnapshotIsCloned` if `defer` is `False`.
|
Typical error is :exc:`SnapshotIsCloned` if `defer` is `False`.
|
||||||
The snapshot names are validated quite loosely and invalid names are
|
The snapshot names are validated quite loosely and invalid names are
|
||||||
typically ignored as nonexisiting snapshots.
|
typically ignored as nonexisting snapshots.
|
||||||
|
|
||||||
A snapshot name referring to a filesystem that doesn't exist is
|
A snapshot name referring to a filesystem that doesn't exist is
|
||||||
ignored.
|
ignored.
|
||||||
@ -470,7 +470,7 @@ def lzc_hold(holds, fd=None):
|
|||||||
Holds for snapshots which don't exist will be skipped and have an entry
|
Holds for snapshots which don't exist will be skipped and have an entry
|
||||||
added to the return value, but will not cause an overall failure.
|
added to the return value, but will not cause an overall failure.
|
||||||
No exceptions is raised if all holds, for snapshots that existed, were
|
No exceptions is raised if all holds, for snapshots that existed, were
|
||||||
succesfully created.
|
successfully created.
|
||||||
Otherwise :exc:`.HoldFailure` exception is raised and no holds will be
|
Otherwise :exc:`.HoldFailure` exception is raised and no holds will be
|
||||||
created.
|
created.
|
||||||
:attr:`.HoldFailure.errors` may contain a single element for an error that
|
:attr:`.HoldFailure.errors` may contain a single element for an error that
|
||||||
@ -654,7 +654,7 @@ def lzc_send_space(snapname, fromsnap=None, flags=None):
|
|||||||
should be done.
|
should be done.
|
||||||
:param fromsnap: the optional starting snapshot name.
|
:param fromsnap: the optional starting snapshot name.
|
||||||
If not `None` then an incremental stream size is estimated, otherwise
|
If not `None` then an incremental stream size is estimated, otherwise
|
||||||
a full stream is esimated.
|
a full stream is estimated.
|
||||||
:type fromsnap: `bytes` or `None`
|
:type fromsnap: `bytes` or `None`
|
||||||
:param flags: the flags that control what enhanced features can be used
|
:param flags: the flags that control what enhanced features can be used
|
||||||
in the stream.
|
in the stream.
|
||||||
@ -1178,11 +1178,11 @@ def receive_header(fd):
|
|||||||
the type of the dataset for which the stream has been created
|
the type of the dataset for which the stream has been created
|
||||||
(volume, filesystem)
|
(volume, filesystem)
|
||||||
'''
|
'''
|
||||||
# read sizeof(dmu_replay_record_t) bytes directly into the memort backing
|
# read sizeof(dmu_replay_record_t) bytes directly into the memory backing
|
||||||
# 'record'
|
# 'record'
|
||||||
record = _ffi.new("dmu_replay_record_t *")
|
record = _ffi.new("dmu_replay_record_t *")
|
||||||
_ffi.buffer(record)[:] = os.read(fd, _ffi.sizeof(record[0]))
|
_ffi.buffer(record)[:] = os.read(fd, _ffi.sizeof(record[0]))
|
||||||
# get drr_begin member and its representation as a Pythn dict
|
# get drr_begin member and its representation as a Python dict
|
||||||
drr_begin = record.drr_u.drr_begin
|
drr_begin = record.drr_u.drr_begin
|
||||||
header = {}
|
header = {}
|
||||||
for field, descr in _ffi.typeof(drr_begin).fields:
|
for field, descr in _ffi.typeof(drr_begin).fields:
|
||||||
@ -1704,7 +1704,7 @@ def lzc_set_props(name, prop, val):
|
|||||||
# As the extended API is not committed yet, the names of the new interfaces
|
# As the extended API is not committed yet, the names of the new interfaces
|
||||||
# are not settled down yet.
|
# are not settled down yet.
|
||||||
# It's not clear if atomically setting multiple properties is an achievable
|
# It's not clear if atomically setting multiple properties is an achievable
|
||||||
# goal and an interface acting on mutiple entities must do so atomically
|
# goal and an interface acting on multiple entities must do so atomically
|
||||||
# by convention.
|
# by convention.
|
||||||
# Being able to set a single property at a time is sufficient for ClusterHQ.
|
# Being able to set a single property at a time is sufficient for ClusterHQ.
|
||||||
lzc_set_prop = lzc_set_props
|
lzc_set_prop = lzc_set_props
|
||||||
@ -1741,7 +1741,7 @@ def lzc_list(name, options):
|
|||||||
Absence of this option implies all types.
|
Absence of this option implies all types.
|
||||||
|
|
||||||
The first of the returned file descriptors can be used to
|
The first of the returned file descriptors can be used to
|
||||||
read the listing in a binary encounded format. The data is
|
read the listing in a binary encoded format. The data is
|
||||||
a series of variable sized records each starting with a fixed
|
a series of variable sized records each starting with a fixed
|
||||||
size header, the header is followed by a serialized ``nvlist``.
|
size header, the header is followed by a serialized ``nvlist``.
|
||||||
Each record describes a single element and contains the element's
|
Each record describes a single element and contains the element's
|
||||||
|
@ -113,7 +113,7 @@ def packed_nvlist_out(packed_nvlist, packed_size):
|
|||||||
|
|
||||||
:param bytes packed_nvlist: packed nvlist_t.
|
:param bytes packed_nvlist: packed nvlist_t.
|
||||||
:param int packed_size: nvlist_t packed size.
|
:param int packed_size: nvlist_t packed size.
|
||||||
:return: an `dict` of values representing the data containted by nvlist_t.
|
:return: an `dict` of values representing the data contained by nvlist_t.
|
||||||
:rtype: dict
|
:rtype: dict
|
||||||
"""
|
"""
|
||||||
props = {}
|
props = {}
|
||||||
|
@ -77,7 +77,7 @@ class MultipleOperationsFailure(ZFSError):
|
|||||||
ZFSError.__str__(self), len(self.errors), self.suppressed_count)
|
ZFSError.__str__(self), len(self.errors), self.suppressed_count)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "%s(%r, %r, errors=%r, supressed=%r)" % (
|
return "%s(%r, %r, errors=%r, suppressed=%r)" % (
|
||||||
self.__class__.__name__, self.errno, self.message, self.errors,
|
self.__class__.__name__, self.errno, self.message, self.errors,
|
||||||
self.suppressed_count)
|
self.suppressed_count)
|
||||||
|
|
||||||
@ -372,7 +372,7 @@ class NoSpace(ZFSError):
|
|||||||
|
|
||||||
class QuotaExceeded(ZFSError):
|
class QuotaExceeded(ZFSError):
|
||||||
errno = errno.EDQUOT
|
errno = errno.EDQUOT
|
||||||
message = "Quouta exceeded"
|
message = "Quota exceeded"
|
||||||
|
|
||||||
def __init__(self, name):
|
def __init__(self, name):
|
||||||
self.name = name
|
self.name = name
|
||||||
|
@ -1913,7 +1913,7 @@ class ZFSTest(unittest.TestCase):
|
|||||||
filecmp.cmp(
|
filecmp.cmp(
|
||||||
os.path.join(mnt1, name), os.path.join(mnt2, name), False))
|
os.path.join(mnt1, name), os.path.join(mnt2, name), False))
|
||||||
|
|
||||||
# This test case fails unless unless a patch from
|
# This test case fails unless a patch from
|
||||||
# https://clusterhq.atlassian.net/browse/ZFS-20
|
# https://clusterhq.atlassian.net/browse/ZFS-20
|
||||||
# is applied to libzfs_core, otherwise it succeeds.
|
# is applied to libzfs_core, otherwise it succeeds.
|
||||||
@unittest.skip("fails with unpatched libzfs_core")
|
@unittest.skip("fails with unpatched libzfs_core")
|
||||||
@ -2160,7 +2160,7 @@ class ZFSTest(unittest.TestCase):
|
|||||||
with streams(srcfs, src1, src2) as (_, (full, incr)):
|
with streams(srcfs, src1, src2) as (_, (full, incr)):
|
||||||
lzc.lzc_receive(dst1, full.fileno())
|
lzc.lzc_receive(dst1, full.fileno())
|
||||||
lzc.lzc_snapshot([dst_snap])
|
lzc.lzc_snapshot([dst_snap])
|
||||||
# becase cannot receive incremental and set origin on a non-clone
|
# because cannot receive incremental and set origin on a non-clone
|
||||||
with self.assertRaises(lzc_exc.BadStream):
|
with self.assertRaises(lzc_exc.BadStream):
|
||||||
lzc.lzc_receive(dst2, incr.fileno(), origin=dst1)
|
lzc.lzc_receive(dst2, incr.fileno(), origin=dst1)
|
||||||
|
|
||||||
@ -2375,7 +2375,7 @@ class ZFSTest(unittest.TestCase):
|
|||||||
for i in range(1024):
|
for i in range(1024):
|
||||||
f.write(b'x' * 1024)
|
f.write(b'x' * 1024)
|
||||||
lzc.lzc_receive(dst, stream.fileno(), force=True)
|
lzc.lzc_receive(dst, stream.fileno(), force=True)
|
||||||
# The temporary file dissappears and any access, even close(),
|
# The temporary file disappears and any access, even close(),
|
||||||
# results in EIO.
|
# results in EIO.
|
||||||
self.assertFalse(os.path.exists(f.name))
|
self.assertFalse(os.path.exists(f.name))
|
||||||
with self.assertRaises(IOError):
|
with self.assertRaises(IOError):
|
||||||
@ -2462,7 +2462,7 @@ class ZFSTest(unittest.TestCase):
|
|||||||
for i in range(1024):
|
for i in range(1024):
|
||||||
f.write(b'x' * 1024)
|
f.write(b'x' * 1024)
|
||||||
lzc.lzc_receive(dst2, incr.fileno(), force=True)
|
lzc.lzc_receive(dst2, incr.fileno(), force=True)
|
||||||
# The temporary file dissappears and any access, even close(),
|
# The temporary file disappears and any access, even close(),
|
||||||
# results in EIO.
|
# results in EIO.
|
||||||
self.assertFalse(os.path.exists(f.name))
|
self.assertFalse(os.path.exists(f.name))
|
||||||
with self.assertRaises(IOError):
|
with self.assertRaises(IOError):
|
||||||
|
Loading…
Reference in New Issue
Block a user