Bug 13122 - Share's root volume quota is used in disk free check instead of a sub-mounted volume's quota
Summary: Share's root volume quota is used in disk free check instead of a sub-mounted...
Status: RESOLVED INVALID
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.5.8
Hardware: x64 Linux
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-06 22:03 UTC by Daniel Fussell
Modified: 2020-09-24 01:10 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Fussell 2017-11-06 22:03:02 UTC
The wrong quota is used in the disk free check when:

* the share's root volume has quotas applicable to the user,
* the share contains sub-mounted volume(s) (from separate devices, with or without quota),
* the user is copying/moving data to the sub-mounted volume,
* the total size of the copy/move operation is larger than the user's remaining quota on the share's root volume.

This affects any interface that does a pre-copy/move destination free space check (e.g. Windows Explorer, Mac Finder, possibly others) and the connection is using SMB2+ protocols.  SMB1 connections do not have the problem, nor does any interface that does not do a pre-copy/move destination free space check (e.g. command line utilities like copy, move, xcopy, robocopy, cp, mv, etc).

I appears the disk free check is being done at the root of the share because the client is unaware the destination path crosses a sub-mounted volume.  If the client is sent an IO_REPARSE_TAG_MOUNT_POINT tag when it crosses into the sub-mounted volume, then the client does a free space check properly for the sub-mount's path, and the correct free space information is returned.  

A fix was submitted to samba-technical on September 19, 2017 (see "[PATCH] smbd: Added support for IO_REPARSE_TAG_MOUNT_POINT")
Comment 1 Daniel Fussell 2017-11-07 17:49:30 UTC
Found out yesterday, the fix does not work with Mac Finder.
Comment 2 Björn Jacke 2020-09-22 22:37:29 UTC
sounds good