On 10/03/2012 11:17 PM, Sage Weil wrote:
> On Wed, 3 Oct 2012, Yan, Zheng wrote:
>> From: "Yan, Zheng" <[email protected]>
>>
>> Server::handle_client_rename() only skips common ancestor check
>> if source path's base inode is stray directory, but source path's
>> base inode is mdsdir in the stray reintegration case.
>>
>> Signed-off-by: Yan, Zheng <[email protected]>
>
> Hmm, I think this is a problem because path_traverse() does not know how
> to get started with a stray dir it doesn't already have. It might make
> more sense to use the full path here, and make the handle_client_rename()
> check smarter.
>
> I'm testing this:
>
> diff --git a/src/mds/Server.cc b/src/mds/Server.cc
> index b706b5a..0c3ff96 100644
> --- a/src/mds/Server.cc
> +++ b/src/mds/Server.cc
> @@ -5066,7 +5066,8 @@ void Server::handle_client_rename(MDRequest *mdr)
>
> // src+dest traces _must_ share a common ancestor for locking to prevent
> orphans
> if (destpath.get_ino() != srcpath.get_ino() &&
> - !MDS_INO_IS_STRAY(srcpath.get_ino())) { // <-- mds 'rename' out of
> stray dir is ok!
> + !(req->get_source()->is_mds() &&
> + MDS_INO_IS_MDSDIR(srcpath.get_ino()))) { // <-- mds 'rename' out of
> stray dir is ok!
> // do traces share a dentry?
> CDentry *common = 0;
> for (unsigned i=0; i < srctrace.size(); i++) {
>
>
FYI: MDCache::migrate_stray() uses stray directory as base inode, it requires
an update.
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html