On Mon, Nov 16, 2020 at 04:58:20PM -0800, Boris Burkov wrote: > The current mount detection code in btrfs receive is not quite perfect. > For example, suppose /tmp is mounted as a tmpfs. In that case, > btrfs receive /tmp2 will find /tmp as the longest mount that matches a > prefix of /tmp2 and blow up because it is not a btrfs filesystem, even > if /tmp2 is just a directory in / mounted as btrfs. > > Fix this by replacing the substring check with a dirname recursion to > only check the directories in the path of the dir, rather than every > substring. > > Add a new test for this case. > > Signed-off-by: Boris Burkov <[email protected]>
Added to devel, thanks.
