Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
Revert "eosclient: extend eos metadata with atime/ctime (cs3org#3954)"
Browse files Browse the repository at this point in the history
This reverts commit addb3be.
  • Loading branch information
gmgigi96 committed Aug 17, 2023
1 parent 2cd139f commit fd554a8
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 41 deletions.
6 changes: 0 additions & 6 deletions changelog/unreleased/extend-eos-meta.md

This file was deleted.

30 changes: 0 additions & 30 deletions pkg/eosclient/eosbinary/eosbinary.go
Original file line number Diff line number Diff line change
Expand Up @@ -1187,32 +1187,6 @@ func (c *Client) mapToFileInfo(ctx context.Context, kv, attrs map[string]string,
mtimenanos, _ = strconv.ParseUint(mtimeSplit[1], 10, 32)
}

var ctimesec, ctimenanos uint64
if val, ok := kv["ctime"]; ok && val != "" {
split := strings.Split(val, ".")
ctimesec, err = strconv.ParseUint(split[0], 10, 64)
if err != nil {
return nil, err
}
ctimenanos, _ = strconv.ParseUint(split[1], 10, 32)
if err != nil {
return nil, err
}
}

var atimesec, atimenanos uint64
if val, ok := kv["atime"]; ok && val != "" {
split := strings.Split(val, ".")
atimesec, err = strconv.ParseUint(split[0], 10, 64)
if err != nil {
return nil, err
}
atimenanos, err = strconv.ParseUint(split[1], 10, 32)
if err != nil {
return nil, err
}
}

isDir := false
var xs *eosclient.Checksum
if _, ok := kv["files"]; ok {
Expand Down Expand Up @@ -1262,10 +1236,6 @@ func (c *Client) mapToFileInfo(ctx context.Context, kv, attrs map[string]string,
TreeSize: treeSize,
MTimeSec: mtimesec,
MTimeNanos: uint32(mtimenanos),
CTimeSec: ctimesec,
CTimeNanos: uint32(ctimenanos),
ATimeSec: atimesec,
ATimeNanos: uint32(atimenanos),
IsDir: isDir,
Instance: c.opt.URL,
SysACL: sysACL,
Expand Down
6 changes: 1 addition & 5 deletions pkg/eosclient/eosclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,13 @@ type Attribute struct {
// FileInfo represents the metadata information returned by querying the EOS namespace.
type FileInfo struct {
IsDir bool
MTimeNanos uint32
Inode uint64 `json:"inode"`
FID uint64 `json:"fid"`
UID uint64 `json:"uid"`
GID uint64 `json:"gid"`
TreeSize uint64 `json:"tree_size"`
MTimeSec uint64 `json:"mtime_sec"`
MTimeNanos uint32 `json:"mtime_nanos"`
ATimeSec uint64 `json:"atime_sec"`
ATimeNanos uint32 `json:"atime_nanos"`
CTimeSec uint64 `json:"ctime_sec"`
CTimeNanos uint32 `json:"ctime_nanos"`
Size uint64 `json:"size"`
TreeCount uint64 `json:"tree_count"`
File string `json:"eos_file"`
Expand Down

0 comments on commit fd554a8

Please sign in to comment.