[Patch] dosmode: Compare block devices to detect reparse points

Noel Power nopower at suse.com
Wed Jan 30 07:53:36 UTC 2019


H James,

On 28/01/2019 23:40, James Ashdown wrote:
> Noel,
>
> I'm attaching a revision of the patch that makes use of your idea to
> re-use the parent directory stat on a FIND operation. Turns out that
> it works beautifully, no additional stat calls needed there.
>
> However, I encountered a snag when I implemented just that. It seems
> that when a Windows 10 File Explorer client opens a
> reparsepoint-marked directory sends a CREATE request targeting that
> directory,
how do you trigger the CREATE request?
> the client overwrites its reparsepoint state for that directory. In
> effect, if you enter a directory and then quickly leave and re-enter
> it, write and copy operations "forget" that there was ever a
> reparsepoint file attribute set.
so you mean if you click into a dir mountpoint and quickly leave (say
clicking the parent) and then click back again ? Then try a copy and it
will revert back to (in my example from earlier in the thread) using the
quota associated with the parent dir share ? Sorry for the maybe obvious
questions, haven't looked at this in a while.
>
>
> To fix that, I mimicked the CREATE flag that Windows File Server
> returns. This is not in the file attributes bit field, but has the
> effect of preserving the set FILE_ATTRIBUTE_REPARSEPOINT returned in
> the FIND response. Detecting the mountpoint here requires an
> additional stat for each CREATE that targets a directory.
Do you have before and after network traces (would help to point out the
relevant packets in each for comparison) At least for me I haven't
looked at this in a while and could do with a big fat finger pointing
things out :-)
>
> Let me know what you think.
Definitely sounds interesting. I'd like to look more at this when I get
a chance. I would encourage you though to bring your findings to the
list. Personally I don't know enough about this stuff (and currently
have forgotten much about what I found out in the past). Jeremy knows
alot about this stuff (well everything really) and is the one to be
convinced.  Also did you find any documentation around the flag you are
setting ? I seem to recall finding precious little about the associated
flags and when/how to use them when I last looked.
>
> James
thanks!
Noel



More information about the samba-technical mailing list