[linux-cifs-client] [PATCH] cifs: guard against hardlinking directories

Steve French smfrench at gmail.com
Wed May 12 07:48:21 MDT 2010


On Wed, May 12, 2010 at 4:19 AM, Suresh Jayaraman <sjayaraman at suse.de> wrote:
> The change looks good. I found the most recent version works fine during
> my testing.
>
>   Reviewed-and-Tested-by: Suresh Jayaraman <sjayaraman at suse.de>
>
> On a side note, thinking about ways to find out whether the share spans
> multiple filesystems - one way is to rely on the fact that "hardlinks
> cannot cross filesystem boundaries". Try and create a hardlink if it
> fails with -EXDEV, then we could be sure that it cross filesystem
> boundaries. But it is ugly and needs cleanup if it succeeds and would
> incur additional SET_PATH_INFO call, not worth the effort..

May be easier (and more intuitive) to ask the server to do a DFS
referral to the subdir (since it really is a different device and this
will make the client treat it as such) if it crosses volume boundaries
and can't guarantee inode numbers.


-- 
Thanks,

Steve


More information about the linux-cifs-client mailing list