@@ -452,7 +452,7 @@ func (d *directfsDentry) getCreatedChild(name string, uid, gid int, isDir bool)
452
452
deleteChild := func () {
453
453
// Best effort attempt to remove the newly created child on failure.
454
454
if err := unix .Unlinkat (d .controlFD , name , unlinkFlags ); err != nil {
455
- log .Warningf ("error unlinking newly created child %q after failure: %v" , filepath .Join (genericDebugPathname (& d .dentry ), name ), err )
455
+ log .Warningf ("error unlinking newly created child %q after failure: %v" , filepath .Join (genericDebugPathname (d . fs , & d .dentry ), name ), err )
456
456
}
457
457
}
458
458
@@ -518,7 +518,7 @@ func (d *directfsDentry) bindAt(ctx context.Context, name string, creds *auth.Cr
518
518
hbep := opts .Endpoint .(transport.HostBoundEndpoint )
519
519
if err := hbep .SetBoundSocketFD (ctx , boundSocketFD ); err != nil {
520
520
if err := unix .Unlinkat (d .controlFD , name , 0 ); err != nil {
521
- log .Warningf ("error unlinking newly created socket %q after failure: %v" , filepath .Join (genericDebugPathname (& d .dentry ), name ), err )
521
+ log .Warningf ("error unlinking newly created socket %q after failure: %v" , filepath .Join (genericDebugPathname (d . fs , & d .dentry ), name ), err )
522
522
}
523
523
return nil , err
524
524
}
@@ -593,7 +593,7 @@ func (d *directfsDentry) getDirentsLocked(recordDirent func(name string, key ino
593
593
// TODO(gvisor.dev/issue/6665): Get rid of per-dirent stat.
594
594
stat , err := fsutil .StatAt (d .controlFD , name )
595
595
if err != nil {
596
- log .Warningf ("Getdent64: skipping file %q with failed stat, err: %v" , path .Join (genericDebugPathname (& d .dentry ), name ), err )
596
+ log .Warningf ("Getdent64: skipping file %q with failed stat, err: %v" , path .Join (genericDebugPathname (d . fs , & d .dentry ), name ), err )
597
597
return
598
598
}
599
599
recordDirent (name , inoKeyFromStat (& stat ), ftype )
@@ -650,7 +650,7 @@ func (d *directfsDentry) restoreFile(ctx context.Context, controlFD int, opts *v
650
650
var stat unix.Stat_t
651
651
if err := unix .Fstat (controlFD , & stat ); err != nil {
652
652
_ = unix .Close (controlFD )
653
- return fmt .Errorf ("failed to stat %q: %w" , genericDebugPathname (& d .dentry ), err )
653
+ return fmt .Errorf ("failed to stat %q: %w" , genericDebugPathname (d . fs , & d .dentry ), err )
654
654
}
655
655
656
656
d .controlFD = controlFD
@@ -672,12 +672,12 @@ func (d *directfsDentry) restoreFile(ctx context.Context, controlFD int, opts *v
672
672
if d .isRegularFile () {
673
673
if opts .ValidateFileSizes {
674
674
if d .size .RacyLoad () != uint64 (stat .Size ) {
675
- return vfs.ErrCorruption {fmt .Errorf ("gofer.dentry(%q).restoreFile: file size validation failed: size changed from %d to %d" , genericDebugPathname (& d .dentry ), d .size .Load (), stat .Size )}
675
+ return vfs.ErrCorruption {fmt .Errorf ("gofer.dentry(%q).restoreFile: file size validation failed: size changed from %d to %d" , genericDebugPathname (d . fs , & d .dentry ), d .size .Load (), stat .Size )}
676
676
}
677
677
}
678
678
if opts .ValidateFileModificationTimestamps {
679
679
if want := dentryTimestampFromUnix (stat .Mtim ); d .mtime .RacyLoad () != want {
680
- return vfs.ErrCorruption {fmt .Errorf ("gofer.dentry(%q).restoreFile: mtime validation failed: mtime changed from %+v to %+v" , genericDebugPathname (& d .dentry ), linux .NsecToStatxTimestamp (d .mtime .RacyLoad ()), linux .NsecToStatxTimestamp (want ))}
680
+ return vfs.ErrCorruption {fmt .Errorf ("gofer.dentry(%q).restoreFile: mtime validation failed: mtime changed from %+v to %+v" , genericDebugPathname (d . fs , & d .dentry ), linux .NsecToStatxTimestamp (d .mtime .RacyLoad ()), linux .NsecToStatxTimestamp (want ))}
681
681
}
682
682
}
683
683
}
@@ -687,7 +687,7 @@ func (d *directfsDentry) restoreFile(ctx context.Context, controlFD int, opts *v
687
687
688
688
if rw , ok := d .fs .savedDentryRW [& d .dentry ]; ok {
689
689
if err := d .ensureSharedHandle (ctx , rw .read , rw .write , false /* trunc */ ); err != nil {
690
- return fmt .Errorf ("failed to restore file handles (read=%t, write=%t) for %q: %w" , rw .read , rw .write , genericDebugPathname (& d .dentry ), err )
690
+ return fmt .Errorf ("failed to restore file handles (read=%t, write=%t) for %q: %w" , rw .read , rw .write , genericDebugPathname (d . fs , & d .dentry ), err )
691
691
}
692
692
}
693
693
0 commit comments