[Patch] dosmode: Compare block devices to detect reparse points
jra at samba.org
Mon Dec 3 20:22:57 UTC 2018
On Mon, Dec 03, 2018 at 01:11:38PM -0700, James Ashdown via samba-technical wrote:
> This patch addresses the problem reported in Bug 13122
> <https://bugzilla.samba.org/show_bug.cgi?id=13122>, which describes write
> problems when a file share contains a mountpoint or a wide link that points
> to another volume.
> Currently, the smbd response always returns 'free units' for the volume
> containing the root of the share. If the root volume is full and the write
> destination is on a different volume, the client refuses to write because
> the FsFullSizeInfo states that the disk is full.
> If the root volume has sufficient space and the write destination does not,
> the write will proceed and truncate.
> Flagging each volume crossing (mountpoints and wide links) as reparse points
> enables correct quota reporting for the actual write destination. The flag
> is set by checking whether each directory has a different device ID (using
> smb_filename->st.st_ex_dev) than its parent directory.
This is adding a bunch of expensive syscalls in a hot code
path, so for that reason alone this should be an option,
not the default.
Secondly, what effects does returning (FILE_ATTRIBUTE_REPARSE_POINT|existing_mode)
have on the client ?
Thirdly, isn't this a problem that could be solved by a combination
of (a) Don't do that, and (b) Use MS-DFS redirects ?
I know Samba is convenient for stitching together arbitrary
filesystems into one convenient point for clients to mount,
but this kind of thing seems to me to be something that the
Admin should be thinking about and taking care of in advance.
More information about the samba-technical