From: Matt Benjamin Date: Wed, 9 Nov 2016 19:24:15 +0000 (-0500) Subject: rgw_file: fix spurious mount entries w/Linux NFS client X-Git-Tag: v11.1.0~361^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F11881%2Fhead;p=ceph.git rgw_file: fix spurious mount entries w/Linux NFS client This change fixes the initialization of root file handles to have their correct fs instance. Previously, the root file handle had fs_inst-1. The apparent change in fsid in a subordinate directory triggers the client's behavior for new filesystem mounts, which we don't want. Fixes: http://tracker.ceph.com/issues/17850 Signed-off-by: Matt Benjamin --- diff --git a/src/rgw/rgw_file.h b/src/rgw/rgw_file.h index 4cec6e7d5e957..db67576514490 100644 --- a/src/rgw/rgw_file.h +++ b/src/rgw/rgw_file.h @@ -781,9 +781,12 @@ namespace rgw { cct->_conf->rgw_nfs_lru_lane_hiwat), uid(_uid), key(_user_id, _key) { + /* fixup fs_inst */ + root_fh.state.dev = ++fs_inst; + /* no bucket may be named rgw_fs_inst-(.*) */ fsid = RGWFileHandle::root_name + "rgw_fs_inst-" + - std::to_string(++(fs_inst)); + std::to_string(fs_inst); root_fh.init_rootfs(fsid /* bucket */, RGWFileHandle::root_name);