diff options
| author | chrislu <chris.lu@gmail.com> | 2022-01-21 01:42:20 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-01-21 01:42:20 -0800 |
| commit | 606667f205774943fc64884bc86b2befddfd75c3 (patch) | |
| tree | 375a160403caab7df5f38d5716f3360f265a8233 /weed/filer/entry.go | |
| parent | b1063162b68ff2e84d3038c13c151e479475b6ef (diff) | |
| download | seaweedfs-606667f205774943fc64884bc86b2befddfd75c3.tar.xz seaweedfs-606667f205774943fc64884bc86b2befddfd75c3.zip | |
able to configure the quota for a bucket
Diffstat (limited to 'weed/filer/entry.go')
| -rw-r--r-- | weed/filer/entry.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/filer/entry.go b/weed/filer/entry.go index 8fa75fe6b..9f83da4aa 100644 --- a/weed/filer/entry.go +++ b/weed/filer/entry.go @@ -43,6 +43,7 @@ type Entry struct { HardLinkCounter int32 Content []byte Remote *filer_pb.RemoteEntry + Quota int64 } func (entry *Entry) Size() uint64 { @@ -70,6 +71,7 @@ func (entry *Entry) ShallowClone() *Entry { newEntry.HardLinkCounter = entry.HardLinkCounter newEntry.Content = entry.Content newEntry.Remote = entry.Remote + newEntry.Quota = entry.Quota return newEntry } @@ -96,6 +98,7 @@ func (entry *Entry) ToExistingProtoEntry(message *filer_pb.Entry) { message.HardLinkCounter = entry.HardLinkCounter message.Content = entry.Content message.RemoteEntry = entry.Remote + message.Quota = entry.Quota } func FromPbEntryToExistingEntry(message *filer_pb.Entry, fsEntry *Entry) { @@ -106,6 +109,7 @@ func FromPbEntryToExistingEntry(message *filer_pb.Entry, fsEntry *Entry) { fsEntry.HardLinkCounter = message.HardLinkCounter fsEntry.Content = message.Content fsEntry.Remote = message.RemoteEntry + fsEntry.Quota = message.Quota } func (entry *Entry) ToProtoFullEntry() *filer_pb.FullEntry { |
