New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mds: improvements for stray reintegration #15548

Merged
merged 7 commits into from Jun 22, 2017

Conversation

Projects
None yet
2 participants
@ukernel
Member

ukernel commented Jun 7, 2017

this helps stray reintegration in workload that first creates new
hardlink, then removes old hardlink

Signed-off-by: "Yan, Zheng" zyan@redhat.com

mds: link inode to newly created remote dentry
this helps stray reintegration in workload that first creates new
hardlink, then removes old hardlink

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>

@ukernel ukernel added the cephfs label Jun 7, 2017

@jcsp

This comment has been minimized.

Contributor

jcsp commented Jun 7, 2017

This probably isn't exercised well by existing tests. The person who reminded me about this issue had the following reproducer script:


#!/bin/bash -e

declare SRC="sources/"
declare DST="hardlinks/"
declare -i MAX=2000 # max files for each directory

[ ${#} -eq 1 ] || { echo "Usage: ${0} <nb_files>"; exit 1; }

mkdir "${SRC}" "${DST}"
declare -i count=1
declare subdir=""
for i in $(seq 1 ${1})
do
    [ ${count} -ge ${MAX} ] && { count=1; subdir+="sub/"; mkdir "${DST}/${subdir}"; }
    echo "" > "${SRC}/${i}"
    ln "${SRC}/${i}" "${DST}/${subdir}/${i}"
    rm "${SRC}/${i}"
    count+=1
done

@ukernel could you add that as a workunit in the fs/basic_workload to exercise this new code path?

ukernel added some commits Jun 8, 2017

mds: cleanup MDCache::eval_remote()
MDCache::eval_remote() tries migrating stray to current mds even
remote dentry's auth mds is not current mds. This doesn't make
sense.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
mds: move MDCache::eval_remote into StrayManager
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>

@ukernel ukernel changed the title from mds: link inode to newly created remote dentry to mds: improvements for stray reintegration Jun 8, 2017

ukernel added some commits Jun 8, 2017

mds: improve StrayManager::eval_remote_stray()
choose auth and pinnable remote dentry when possible. If the chosen
remote dentry is frozen, retry when it gets unfreezed.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
qa/cephfs: update stray reintegration test case
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
@jcsp

jcsp approved these changes Jun 12, 2017

@jcsp

This comment has been minimized.

Contributor

jcsp commented Jun 19, 2017

test_strays.py is currently failing (http://tracker.ceph.com/issues/20335) on master, and also with this PR applied -- need to fix that before merging this.

@ukernel

This comment has been minimized.

Member

ukernel commented Jun 20, 2017

mds shutdown problem should be fixed by #15768

ukernel added some commits Jun 20, 2017

mds: don't export dirfrag to stopping mds
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
qa/cephfs: use ceph.dir.pin to trigger migration
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
@jcsp

jcsp approved these changes Jun 22, 2017

@jcsp jcsp merged commit 38dccd2 into ceph:master Jun 22, 2017

2 of 4 checks passed

arm64 make check arm64 make check failed
Details
make check make check failed
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details

@ukernel ukernel deleted the ukernel:wip-20196 branch Jun 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment