Skip to content

Commit

Permalink
Bump version to v1.0.0.-rc.3
Browse files Browse the repository at this point in the history
  • Loading branch information
kpjensen committed Sep 23, 2021
1 parent bd37300 commit fef7a1d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 20 deletions.
27 changes: 15 additions & 12 deletions dxfuse.go
Original file line number Diff line number Diff line change
Expand Up @@ -1260,15 +1260,14 @@ func (fsys *Filesys) openRegularFile(

if f.dirtyData {
fh := &FileHandle{
accessMode: AM_AO_Remote,
inode: f.Inode,
size: f.Size,
Id: f.Id,
url: nil,
Tgid: tgid,
lastPartId: 0,
nextWriteOffset: 0,
// 16MB slice capacity
accessMode: AM_AO_Remote,
inode: f.Inode,
size: f.Size,
Id: f.Id,
url: nil,
Tgid: tgid,
lastPartId: 0,
nextWriteOffset: 0,
writeBuffer: nil,
writeBufferOffset: 0,
mutex: &sync.Mutex{},
Expand Down Expand Up @@ -1609,8 +1608,10 @@ func (fsys *Filesys) FlushFile(ctx context.Context, op *fuseops.FlushFileOp) err
return nil
}
if fh.accessMode != AM_AO_Remote {
// This isn't a writeable file, there is no dirty data to flush
fsys.log("Ignoring flush of inode %d, file is not writeable", op.Inode)
// This isn't a writeable file
if fsys.ops.options.VerboseLevel > 1 {
fsys.log("Ignoring flush of inode %d, file is not writeable", op.Inode)
}
return nil
}

Expand All @@ -1633,7 +1634,9 @@ func (fsys *Filesys) FlushFile(ctx context.Context, op *fuseops.FlushFileOp) err

// Empty files are handled by ReleaseFileHandle
if len(fh.writeBuffer) == 0 && fh.size == 0 {
fsys.log("Ignoring FlushFile: file is empty")
if fsys.ops.options.VerboseLevel > 1 {
fsys.log("Ignoring FlushFile: file is empty")
}
return nil
}

Expand Down
6 changes: 3 additions & 3 deletions prefetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ func NewPrefetchGlobalState(verboseLevel int, dxEnv dxda.DXEnvironment) *Prefetc
totalMemoryBytes := 2 * maxNumEntriesInTable * prefetchMaxIoSize
totalMemoryBytes += int64(maxNumChunksReadAhead) * prefetchMaxIoSize

log.Printf("maximal memory usage: %dMiB", totalMemoryBytes/MiB)
log.Printf("number of prefetch worker threads: %d", numPrefetchThreads)
log.Printf("maximal number of read-ahead chunks: %d", maxNumChunksReadAhead)
log.Printf("Maximum prefetch memory usage: %dMiB", totalMemoryBytes/MiB)
log.Printf("Number of prefetch worker threads: %d", numPrefetchThreads)
log.Printf("Maximum number of read-ahead chunks: %d", maxNumChunksReadAhead)

pgs := &PrefetchGlobalState{
verbose: verboseLevel >= 1,
Expand Down
7 changes: 3 additions & 4 deletions upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type FileUploader struct {
uploadQueue chan UploadRequest
wg sync.WaitGroup
numUploadRoutines int
// Max write buffers being written to reduce memory consumption
// Max concurrent write buffers to reduce memory consumption
writeBufferChan chan struct{}
// API to dx
ops *DxOps
Expand All @@ -58,9 +58,8 @@ func NewFileUploader(verboseLevel int, options Options, dxEnv dxda.DXEnvironment
concurrentWriteBufferLimit = runtime.NumCPU() * 3
}
uploader := &FileUploader{
verbose: verboseLevel >= 1,
uploadQueue: make(chan UploadRequest),
// Limit of 15 concurrent file handle write buffers
verbose: verboseLevel >= 1,
uploadQueue: make(chan UploadRequest),
writeBufferChan: make(chan struct{}, concurrentWriteBufferLimit),
numUploadRoutines: maxUploadRoutines,
ops: NewDxOps(dxEnv, options),
Expand Down
2 changes: 1 addition & 1 deletion util.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const (
NumRetriesDefault = 10
InitialPartSize = 16 * MiB
MaxPartSize = 700 * MiB
Version = "v1.0.0-rc.2"
Version = "v1.0.0-rc.3"
)
const (
InodeInvalid = 0
Expand Down

0 comments on commit fef7a1d

Please sign in to comment.