daemon/graphdriver: normalize comment formatting
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
6625fa6103
commit
ec4bc83258
7 changed files with 9 additions and 10 deletions
|
@ -134,7 +134,7 @@ func parseOptions(opt []string) (btrfsOptions, bool, error) {
|
|||
|
||||
// Driver contains information about the filesystem mounted.
|
||||
type Driver struct {
|
||||
//root of the file system
|
||||
// root of the file system
|
||||
home string
|
||||
uidMaps []idtools.IDMap
|
||||
gidMaps []idtools.IDMap
|
||||
|
|
|
@ -143,7 +143,7 @@ func DirCopy(srcDir, dstDir string, copyMode Mode, copyXattrs bool) error {
|
|||
|
||||
switch mode := f.Mode(); {
|
||||
case mode.IsRegular():
|
||||
//the type is 32bit on mips
|
||||
// the type is 32bit on mips
|
||||
id := fileID{dev: uint64(stat.Dev), ino: stat.Ino} // nolint: unconvert
|
||||
if copyMode == Hardlink {
|
||||
isHardlink = true
|
||||
|
|
|
@ -67,8 +67,7 @@ func TestCopyDir(t *testing.T) {
|
|||
if srcFileSys.Dev == dstFileSys.Dev {
|
||||
assert.Check(t, srcFileSys.Ino != dstFileSys.Ino)
|
||||
}
|
||||
// Todo: check size, and ctim is not equal
|
||||
/// on filesystems that have granular ctimes
|
||||
// Todo: check size, and ctim is not equal on filesystems that have granular ctimes
|
||||
assert.Check(t, is.DeepEqual(srcFileSys.Mode, dstFileSys.Mode))
|
||||
assert.Check(t, is.DeepEqual(srcFileSys.Uid, dstFileSys.Uid))
|
||||
assert.Check(t, is.DeepEqual(srcFileSys.Gid, dstFileSys.Gid))
|
||||
|
|
|
@ -119,7 +119,7 @@ type DeviceSet struct {
|
|||
deletionWorkerTicker *time.Ticker
|
||||
uidMaps []idtools.IDMap
|
||||
gidMaps []idtools.IDMap
|
||||
minFreeSpacePercent uint32 //min free space percentage in thinpool
|
||||
minFreeSpacePercent uint32 // min free space percentage in thinpool
|
||||
xfsNospaceRetries string // max retries when xfs receives ENOSPC
|
||||
lvmSetupConfig directLVMConfig
|
||||
}
|
||||
|
@ -1692,8 +1692,8 @@ func (devices *DeviceSet) initDevmapper(doInit bool) (retErr error) {
|
|||
}
|
||||
}
|
||||
|
||||
//create the root dir of the devmapper driver ownership to match this
|
||||
//daemon's remapped root uid/gid so containers can start properly
|
||||
// create the root dir of the devmapper driver ownership to match this
|
||||
// daemon's remapped root uid/gid so containers can start properly
|
||||
uid, gid, err := idtools.GetRootUIDGID(devices.uidMaps, devices.gidMaps)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
@ -110,7 +110,7 @@ func testChangeLoopBackSize(t *testing.T, delta, expectDataSize, expectMetaDataS
|
|||
if err := driver.Cleanup(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
//Reload
|
||||
// Reload
|
||||
d, err := Init(driver.home, []string{
|
||||
fmt.Sprintf("dm.loopdatasize=%d", defaultDataLoopbackSize+delta),
|
||||
fmt.Sprintf("dm.loopmetadatasize=%d", defaultMetaDataLoopbackSize+delta),
|
||||
|
|
|
@ -29,7 +29,7 @@ var (
|
|||
drivers map[string]InitFunc
|
||||
)
|
||||
|
||||
//CreateOpts contains optional arguments for Create() and CreateReadWrite()
|
||||
// CreateOpts contains optional arguments for Create() and CreateReadWrite()
|
||||
// methods.
|
||||
type CreateOpts struct {
|
||||
MountLabel string
|
||||
|
|
|
@ -53,7 +53,7 @@ func mountFrom(dir, device, target, mType string, flags uintptr, label string) e
|
|||
w.Close()
|
||||
return fmt.Errorf("mountfrom error on re-exec cmd: %v", err)
|
||||
}
|
||||
//write the options to the pipe for the untar exec to read
|
||||
// write the options to the pipe for the untar exec to read
|
||||
if err := json.NewEncoder(w).Encode(options); err != nil {
|
||||
w.Close()
|
||||
return fmt.Errorf("mountfrom json encode to pipe failed: %v", err)
|
||||
|
|
Loading…
Reference in a new issue