Spellcheck all files

Signed-off-by: InsanePrawn <insane.prawny@gmail.com>
This commit is contained in:
InsanePrawn
2020-02-23 23:24:12 +01:00
committed by Christian Schwarz
parent 94caf8b8db
commit 44bd354eae
60 changed files with 118 additions and 117 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ type DatasetPathsVisitor func(v DatasetPathVisit) (visitChildTree bool)
// Traverse a list of DatasetPaths top down, i.e. given a set of datasets with same
// path prefix, those with shorter prefix are traversed first.
// If there are gaps, i.e. the intermediary component a/b bewtween a and a/b/c,
// If there are gaps, i.e. the intermediary component a/b between a and a/b/c,
// those gaps are still visited but the FilledIn property of the visit is set to true.
func (f *DatasetPathForest) WalkTopDown(visitor DatasetPathsVisitor) {
+4 -4
View File
@@ -56,7 +56,7 @@ func TestDatasetPathForestWalkTopDown(t *testing.T) {
buildForest(paths).WalkTopDown(v)
expectedVisists := []DatasetPathVisit{
expectedVisits := []DatasetPathVisit{
{toDatasetPath("pool1"), false},
{toDatasetPath("pool1/foo"), true},
{toDatasetPath("pool1/foo/bar"), false},
@@ -65,7 +65,7 @@ func TestDatasetPathForestWalkTopDown(t *testing.T) {
{toDatasetPath("pool2/test"), true},
{toDatasetPath("pool2/test/bar"), false},
}
assert.Equal(t, expectedVisists, rec.visits)
assert.Equal(t, expectedVisits, rec.visits)
}
@@ -82,7 +82,7 @@ func TestDatasetPathWalkTopDownWorksUnordered(t *testing.T) {
buildForest(paths).WalkTopDown(v)
expectedVisists := []DatasetPathVisit{
expectedVisits := []DatasetPathVisit{
{toDatasetPath("pool1"), false},
{toDatasetPath("pool1/foo"), true},
{toDatasetPath("pool1/foo/bar"), false},
@@ -91,6 +91,6 @@ func TestDatasetPathWalkTopDownWorksUnordered(t *testing.T) {
{toDatasetPath("pool1/bang/baz"), false},
}
assert.Equal(t, expectedVisists, rec.visits)
assert.Equal(t, expectedVisits, rec.visits)
}
+2 -2
View File
@@ -266,7 +266,7 @@ func doZFSReleaseAllOlderAndIncOrExcludingGUIDFindSnapshots(snapOrBookmarkGuid u
case EntityTypeBookmark:
return 1
default:
panic("unepxected entity type " + t.String())
panic("unexpected entity type " + t.String())
}
}
return iET(lines[i].entityType) < iET(lines[j].entityType)
@@ -290,7 +290,7 @@ func doZFSReleaseAllOlderAndIncOrExcludingGUIDFindSnapshots(snapOrBookmarkGuid u
}
if foundGuid {
// The secondary key in sorting (snap < bookmark) guarantees that we
// A) either found the snapshot with snapOrBoomkarkGuid
// A) either found the snapshot with snapOrBookmarkGuid
// B) or no snapshot with snapGuid exists, but one or more bookmarks of it exists
// In the case of A, we already added the snapshot to releaseSnaps if includeGuid requests it,
// and can ignore possible subsequent bookmarks of the snapshot.
+1 -1
View File
@@ -13,7 +13,7 @@ func TestDoZFSReleaseAllOlderAndIncOrExcludingGUIDFindSnapshots(t *testing.T) {
// what we test here: sort bookmark #3 before @3
// => assert that the function doesn't stop at the first guid match
// (which might be a bookmark, depending on zfs list ordering)
// but instead considers the entire stride of boomarks and snapshots with that guid
// but instead considers the entire stride of bookmarks and snapshots with that guid
//
// also, throw in unordered createtxg for good measure
list, err := doZFSReleaseAllOlderAndIncOrExcludingGUIDParseListOutput(
+2 -1
View File
@@ -15,7 +15,7 @@ import (
"github.com/zrepl/zrepl/util/envconst"
)
// NOTE: Update ZFSSendARgs.Validate when changning fields (potentially SECURITY SENSITIVE)
// NOTE: Update ZFSSendARgs.Validate when changing fields (potentially SECURITY SENSITIVE)
type ResumeToken struct {
HasFromGUID, HasToGUID bool
FromGUID, ToGUID uint64
@@ -25,6 +25,7 @@ type ResumeToken struct {
}
var resumeTokenNVListRE = regexp.MustCompile(`\t(\S+) = (.*)`)
var resumeTokenContentsRE = regexp.MustCompile(`resume token contents:\nnvlist version: 0`)
var resumeTokenIsCorruptRE = regexp.MustCompile(`resume token is corrupt`)
+1 -1
View File
@@ -188,7 +188,7 @@ func doDestroyBatchedRec(ctx context.Context, fsbatch []*DestroySnapOp, d destro
err := tryBatch(ctx, strippedBatch, d)
if err != nil {
// run entire batch sequentially if the stripped one fails
// (it shouldn't because we stripped erronous datasets)
// (it shouldn't because we stripped erroneous datasets)
singleRun = fsbatch // shadow
} else {
setDestroySnapOpErr(strippedBatch, nil) // these ones worked
+8 -8
View File
@@ -127,7 +127,7 @@ func NewDatasetPath(s string) (p *DatasetPath, err error) {
return p, nil // the empty dataset path
}
const FORBIDDEN = "@#|\t<>*"
/* Documenation of allowed characters in zfs names:
/* Documentation of allowed characters in zfs names:
https://docs.oracle.com/cd/E19253-01/819-5461/gbcpt/index.html
Space is missing in the oracle list, but according to
https://github.com/zfsonlinux/zfs/issues/439
@@ -511,7 +511,7 @@ func (s *sendStream) killAndWait(precedingReadErr error) error {
// detect the edge where we're called from s.Read
// after the pipe EOFed and zfs send exited without errors
// this is actullay the "hot" / nice path
// this is actually the "hot" / nice path
if exitErr == nil && precedingReadErr == io.EOF {
return precedingReadErr
}
@@ -618,13 +618,13 @@ func (n *NilBool) String() string {
return fmt.Sprintf("%v", n.B)
}
// When updating this struct, check Validate and ValidateCorrespondsToResumeToken (Potentiall SECURITY SENSITIVE)
// When updating this struct, check Validate and ValidateCorrespondsToResumeToken (POTENTIALLY SECURITY SENSITIVE)
type ZFSSendArgs struct {
FS string
From, To *ZFSSendArgVersion // From may be nil
Encrypted *NilBool
// Prefereed if not empty
// Preferred if not empty
ResumeToken string // if not nil, must match what is specified in From, To (covered by ValidateCorrespondsToResumeToken)
}
@@ -660,7 +660,7 @@ func (e ZFSSendArgsValidationError) Error() string {
}
// - Recursively call Validate on each field.
// - Make sure that if ResumeToken != "", it reflects the same operation as the other paramters would.
// - Make sure that if ResumeToken != "", it reflects the same operation as the other parameters would.
//
// This function is not pure because GUIDs are checked against the local host's datasets.
func (a ZFSSendArgs) Validate(ctx context.Context) error {
@@ -679,7 +679,7 @@ func (a ZFSSendArgs) Validate(ctx context.Context) error {
if err := a.From.ValidateExists(ctx, a.FS); err != nil {
return newGenericValidationError(a, errors.Wrap(err, "`From` invalid"))
}
// falthrough
// fallthrough
}
if err := a.Encrypted.Validate(); err != nil {
@@ -743,7 +743,7 @@ func (a ZFSSendArgs) validateCorrespondsToResumeToken(ctx context.Context, valCt
debug("decoding resume token %q", a.ResumeToken)
t, err := ParseResumeToken(ctx, a.ResumeToken)
debug("decode resumee token result: %#v %T %v", t, err, err)
debug("decode resume token result: %#v %T %v", t, err, err)
if err != nil {
return err
}
@@ -894,7 +894,7 @@ type DrySendInfo struct {
}
var (
// keep same number of capture groups for unmarshalInfoLine homogenity
// keep same number of capture groups for unmarshalInfoLine homogeneity
sendDryRunInfoLineRegexFull = regexp.MustCompile(`^(full)\t()([^\t]+@[^\t]+)\t([0-9]+)$`)
// cannot enforce '[#@]' in incremental source, see test cases
+1 -1
View File
@@ -104,7 +104,7 @@ nvlist version: 0
incremental zroot/test/a@1 zroot/test/a@2 5383936
`
// # incremental send with token + bookmarmk
// # incremental send with token + bookmark
// $ zfs send -nvP -t 1-ef01e717e-e0-789c636064000310a501c49c50360710a715e5e7a69766a63040c1d904b9e342877e062900d9ec48eaf293b252934b181898a0ea30e4d3d28a534b40323e70793624f9a4ca92d46220fdc1ce0fabfe927c882bc46c8a0a9f71ad3baf8124cf0996cf4bcc4d6560a82acacf2fd1079a55a29fe86004710b00d8ae1f93
incSendBookmark := `
resume token contents: