Remove stale code from minio server (#5479)

master
Harshavardhana 7 years ago committed by kannappanr
parent 3b2486ebaf
commit 033cfb5cef
  1. 7
      cmd/format-xl_test.go
  2. 30
      cmd/fs-v1-helpers.go
  3. 7
      cmd/fs-v1-multipart.go
  4. 6
      cmd/fs-v1.go

@ -109,13 +109,6 @@ func genFormatXLInvalidXLVersion() []*formatXLV1 {
return formatConfigs
}
func genFormatFS() *formatXLV1 {
format := &formatXLV1{}
format.Version = formatMetaVersionV1
format.Format = formatBackendFS
return format
}
// generates a invalid format.json version for XL backend.
func genFormatXLInvalidJBODCount() []*formatXLV1 {
jbod := make([]string, 7)

@ -296,36 +296,6 @@ func fsCreateFile(filePath string, reader io.Reader, buf []byte, fallocSize int6
return bytesWritten, nil
}
// Removes uploadID at destination path.
func fsRemoveUploadIDPath(basePath, uploadIDPath string) error {
if basePath == "" || uploadIDPath == "" {
return errors.Trace(errInvalidArgument)
}
if err := checkPathLength(basePath); err != nil {
return errors.Trace(err)
}
if err := checkPathLength(uploadIDPath); err != nil {
return errors.Trace(err)
}
// List all the entries in uploadID.
entries, err := readDir(uploadIDPath)
if err != nil && err != errFileNotFound {
return errors.Trace(err)
}
// Delete all the entries obtained from previous readdir.
for _, entryPath := range entries {
err = fsDeleteFile(basePath, pathJoin(uploadIDPath, entryPath))
if err != nil && err != errFileNotFound {
return errors.Trace(err)
}
}
fsRemoveDir(uploadIDPath)
return nil
}
// fsFAllocate is similar to Fallocate but provides a convenient
// wrapper to handle various operating system specific errors.
func fsFAllocate(fd int, offset int64, len int64) (err error) {

@ -35,13 +35,6 @@ import (
"github.com/minio/minio/pkg/hash"
)
const (
// Expiry duration after which the multipart uploads are deemed stale.
fsMultipartExpiry = time.Hour * 24 * 14 // 2 weeks.
// Cleanup interval when the stale multipart cleanup is initiated.
fsMultipartCleanupInterval = time.Hour * 24 // 24 hrs.
)
// Returns EXPORT/.minio.sys/multipart/SHA256/UPLOADID
func (fs *fsObjects) getUploadIDDir(bucket, object, uploadID string) string {
return pathJoin(fs.fsPath, minioMetaMultipartBucket, getSHA256Hash([]byte(pathJoin(bucket, object))), uploadID)

@ -799,12 +799,6 @@ func (fs *fsObjects) DeleteObject(bucket, object string) error {
return nil
}
// list of all errors that can be ignored in tree walk operation in FS
var fsTreeWalkIgnoredErrs = append(baseIgnoredErrs, []error{
errFileNotFound,
errVolumeNotFound,
}...)
// Returns function "listDir" of the type listDirFunc.
// isLeaf - is used by listDir function to check if an entry
// is a leaf or non-leaf entry.

Loading…
Cancel
Save