Skip to content

[Stable5] Exclude ext storage from quota - #5934

Merged
PVince81 merged 4 commits into
stable5from
stable5-excludeextstoragefromquota
Nov 22, 2013
Merged

PVince81 merged 4 commits into
stable5from
stable5-excludeextstoragefromquota

Conversation

@PVince81

Copy link
Copy Markdown
Contributor

Raised a backport PR because this needed additional changes to fix the quota calculation which was different in OC 5.

Please review @karlitschek @kabum @icewind1991 @DeepDiver1975

Vincent Petry added 2 commits November 19, 2013 09:47
Added argument to getFileInfo() to disable adding the size of
mountpoints to a directory's size.

Backport of 614e4d4
@karlitschek

Copy link
Copy Markdown
Contributor

Hmm. There is always the option to no backport something if it can break stuff. :-)

@karlitschek

Copy link
Copy Markdown
Contributor

👍

Vincent Petry added 2 commits November 19, 2013 11:05
Previously, the storage statistics were always for the root dir.
This means that the upload button would always show the limit for the
root dir, even when uploading to a shared dir or external storage.

This fix adds a "dir" argument to getstoragestats.php.

Partial backport of 31181e4
@PVince81

Copy link
Copy Markdown
Contributor Author

I've added a fix for the "free space" computation to not include quota when the target dir is not the home storage (ex: ext storage).

Also, I've backported 31181e4 here as well.
Without this, the stable5 fix won't make much sense as the UI would still not allow users to upload more than what's available on the home partition, even when uploading to ext storage...

Please have another look.

@ghost

ghost commented Nov 19, 2013

Copy link
Copy Markdown

@PVince81

Copy link
Copy Markdown
Contributor Author

Note to self: test uploading to shared dirs. I hope my above backport doesn't wake up other hidden bugs.

@PVince81

Copy link
Copy Markdown
Contributor Author

I've verified this: uploading into another user's shared dir still works. I was afraid that maybe it would show s max upload size of 0 bytes after the getstoragestats backport. But it didn't, so all is well 😄

@PVince81

Copy link
Copy Markdown
Contributor Author

@ser72 do you mind testing this as part of your SMB tests ?

Please review @icewind1991 (this is a backport), to confirm that it is ok.

CC @felixboehm

@ser72

ser72 commented Nov 22, 2013

Copy link
Copy Markdown

@PVince81 -- Glad to test -- what are the steps?

@PVince81

Copy link
Copy Markdown
Contributor Author
  1. Mount a SMB storage on the personal page of a user.
  2. Check the "used space" and "total space"
  3. Upload files to the SMB storage
  4. Check the "used space" and "total space" again: they should be the same as step 2. (SMB stuff not counted in quota)
  5. Upload files to the user's home (outside of SMB mount)
  6. Check the used space again, those files must be counted.

Try the same steps by setting a quota to the user.

@ser72

ser72 commented Nov 22, 2013

Copy link
Copy Markdown

👍

@PVince81

Copy link
Copy Markdown
Contributor Author

Thanks. @felixboehm also told me he had a test on his side and it worked correctly.

Merging now.

PVince81 pushed a commit that referenced this pull request Nov 22, 2013
…uota

[Stable5] Exclude ext storage from quota
@PVince81
PVince81 merged commit 8807699 into stable5 Nov 22, 2013
@PVince81
PVince81 deleted the stable5-excludeextstoragefromquota branch November 22, 2013 16:35
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants