diff --git a/internal/fs/fs.go b/internal/fs/fs.go index bf8b54ce38..b4ae402d0c 100644 --- a/internal/fs/fs.go +++ b/internal/fs/fs.go @@ -124,9 +124,6 @@ type ServerConfig struct { // File chunk size to read from GCS in one call. Specified in MB. SequentialReadSizeMb int32 - // Allows ignoring interrupts. - IgnoreInterrupts bool - // MountConfig has all the config specified by the user using configFile flag. MountConfig *config.MountConfig } @@ -179,7 +176,6 @@ func NewFileSystem( inodeAttributeCacheTTL: cfg.InodeAttributeCacheTTL, dirTypeCacheTTL: cfg.DirTypeCacheTTL, renameDirLimit: cfg.RenameDirLimit, - ignoreInterrupts: cfg.IgnoreInterrupts, sequentialReadSizeMb: cfg.SequentialReadSizeMb, uid: cfg.Uid, gid: cfg.Gid, @@ -346,7 +342,6 @@ type fileSystem struct { inodeAttributeCacheTTL time.Duration dirTypeCacheTTL time.Duration renameDirLimit int64 - ignoreInterrupts bool sequentialReadSizeMb int32 // The user and group owning everything in the file system. @@ -1315,7 +1310,7 @@ func (fs *fileSystem) StatFS( } func (fs *fileSystem) ignoreInterruptsIfFlagIsSet(ctx context.Context) context.Context { - if fs.ignoreInterrupts { + if fs.mountConfig.FileSystemConfig.IgnoreInterrupts { return context.WithoutCancel(ctx) } return ctx diff --git a/internal/fs/interrupt_test.go b/internal/fs/interrupt_test.go index 35bb23b8b3..58c32dca15 100644 --- a/internal/fs/interrupt_test.go +++ b/internal/fs/interrupt_test.go @@ -22,6 +22,7 @@ import ( "context" "testing" + "github.com/googlecloudplatform/gcsfuse/v2/internal/config" "github.com/jacobsa/ogletest" ) @@ -37,7 +38,7 @@ var ignoreInterruptsTest = []struct { func TestIgnoreInterruptsIfFlagIsSet(t *testing.T) { for _, tt := range ignoreInterruptsTest { t.Run(tt.testName, func(t *testing.T) { - fs := &fileSystem{ignoreInterrupts: tt.ignoreInterrupts} + fs := &fileSystem{mountConfig: &config.MountConfig{FileSystemConfig: config.FileSystemConfig{IgnoreInterrupts: tt.ignoreInterrupts}}} ctx, cancel := context.WithCancel(context.Background()) // Call the method and cancel the context diff --git a/mount.go b/mount.go index da32ea06ea..e769de31e8 100644 --- a/mount.go +++ b/mount.go @@ -120,7 +120,6 @@ be interacting with the file system.`) FilePerms: os.FileMode(flags.FileMode), DirPerms: os.FileMode(flags.DirMode), RenameDirLimit: flags.RenameDirLimit, - IgnoreInterrupts: flags.IgnoreInterrupts, SequentialReadSizeMb: flags.SequentialReadSizeMb, EnableNonexistentTypeCache: flags.EnableNonexistentTypeCache, MountConfig: mountConfig,