diff options
author | Josef Bacik <jbacik@fb.com> | 2014-02-14 22:43:48 +0400 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-02-15 01:44:32 +0400 |
commit | 3a0dfa6a12e4bb64a434426ecb17d4842092db5e (patch) | |
tree | d8df8e4befddc291f0c6fdba0c13d1a651d19341 /fs/btrfs/sysfs.c | |
parent | feb5f96589302b39a2b10fc210db7c47a73e4168 (diff) | |
download | linux-3a0dfa6a12e4bb64a434426ecb17d4842092db5e.tar.xz |
Btrfs: unset DCACHE_DISCONNECTED when mounting default subvol
A user was running into errors from an NFS export of a subvolume that had a
default subvol set. When we mount a default subvol we will use d_obtain_alias()
to find an existing dentry for the subvolume in the case that the root subvol
has already been mounted, or a dummy one is allocated in the case that the root
subvol has not already been mounted. This allows us to connect the dentry later
on if we wander into the path. However if we don't ever wander into the path we
will keep DCACHE_DISCONNECTED set for a long time, which angers NFS. It doesn't
appear to cause any problems but it is annoying nonetheless, so simply unset
DCACHE_DISCONNECTED in the get_default_root case and switch btrfs_lookup() to
use d_materialise_unique() instead which will make everything play nicely
together and reconnect stuff if we wander into the defaul subvol path from a
different way. With this patch I'm no longer getting the NFS errors when
exporting a volume that has been mounted with a default subvol set. Thanks,
cc: bfields@fieldses.org
cc: ebiederm@xmission.com
Signed-off-by: Josef Bacik <jbacik@fb.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/sysfs.c')
0 files changed, 0 insertions, 0 deletions