@@ -900,7 +900,7 @@ static int __choose_mds(struct ceph_mds_client *mdsc,
900
900
if (req -> r_resend_mds >= 0 &&
901
901
(__have_session (mdsc , req -> r_resend_mds ) ||
902
902
ceph_mdsmap_get_state (mdsc -> mdsmap , req -> r_resend_mds ) > 0 )) {
903
- dout ("choose_mds using resend_mds mds%d\n" ,
903
+ dout ("%s using resend_mds mds%d\n" , __func__ ,
904
904
req -> r_resend_mds );
905
905
return req -> r_resend_mds ;
906
906
}
@@ -918,7 +918,7 @@ static int __choose_mds(struct ceph_mds_client *mdsc,
918
918
rcu_read_lock ();
919
919
inode = get_nonsnap_parent (req -> r_dentry );
920
920
rcu_read_unlock ();
921
- dout ("__choose_mds using snapdir's parent %p\n" , inode );
921
+ dout ("%s using snapdir's parent %p\n" , __func__ , inode );
922
922
}
923
923
} else if (req -> r_dentry ) {
924
924
/* ignore race with rename; old or new d_parent is okay */
@@ -938,7 +938,7 @@ static int __choose_mds(struct ceph_mds_client *mdsc,
938
938
/* direct snapped/virtual snapdir requests
939
939
* based on parent dir inode */
940
940
inode = get_nonsnap_parent (parent );
941
- dout ("__choose_mds using nonsnap parent %p\n" , inode );
941
+ dout ("%s using nonsnap parent %p\n" , __func__ , inode );
942
942
} else {
943
943
/* dentry target */
944
944
inode = d_inode (req -> r_dentry );
@@ -954,8 +954,8 @@ static int __choose_mds(struct ceph_mds_client *mdsc,
954
954
rcu_read_unlock ();
955
955
}
956
956
957
- dout ("__choose_mds %p is_hash=%d (%d ) mode %d\n" , inode , (int )is_hash ,
958
- ( int ) hash , mode );
957
+ dout ("%s %p is_hash=%d (0x%x ) mode %d\n" , __func__ , inode , (int )is_hash ,
958
+ hash , mode );
959
959
if (!inode )
960
960
goto random ;
961
961
ci = ceph_inode (inode );
@@ -973,11 +973,9 @@ static int __choose_mds(struct ceph_mds_client *mdsc,
973
973
get_random_bytes (& r , 1 );
974
974
r %= frag .ndist ;
975
975
mds = frag .dist [r ];
976
- dout ("choose_mds %p %llx.%llx "
977
- "frag %u mds%d (%d/%d)\n" ,
978
- inode , ceph_vinop (inode ),
979
- frag .frag , mds ,
980
- (int )r , frag .ndist );
976
+ dout ("%s %p %llx.%llx frag %u mds%d (%d/%d)\n" ,
977
+ __func__ , inode , ceph_vinop (inode ),
978
+ frag .frag , mds , (int )r , frag .ndist );
981
979
if (ceph_mdsmap_get_state (mdsc -> mdsmap , mds ) >=
982
980
CEPH_MDS_STATE_ACTIVE &&
983
981
!ceph_mdsmap_is_laggy (mdsc -> mdsmap , mds ))
@@ -990,9 +988,9 @@ static int __choose_mds(struct ceph_mds_client *mdsc,
990
988
if (frag .mds >= 0 ) {
991
989
/* choose auth mds */
992
990
mds = frag .mds ;
993
- dout ("choose_mds %p %llx.%llx "
994
- "frag %u mds%d (auth)\n" ,
995
- inode , ceph_vinop ( inode ), frag .frag , mds );
991
+ dout ("%s %p %llx.%llx frag %u mds%d (auth)\n" ,
992
+ __func__ , inode , ceph_vinop ( inode ) ,
993
+ frag .frag , mds );
996
994
if (ceph_mdsmap_get_state (mdsc -> mdsmap , mds ) >=
997
995
CEPH_MDS_STATE_ACTIVE ) {
998
996
if (mode == USE_ANY_MDS &&
@@ -1017,7 +1015,7 @@ static int __choose_mds(struct ceph_mds_client *mdsc,
1017
1015
goto random ;
1018
1016
}
1019
1017
mds = cap -> session -> s_mds ;
1020
- dout ("choose_mds %p %llx.%llx mds%d (%scap %p)\n" ,
1018
+ dout ("%s %p %llx.%llx mds%d (%scap %p)\n" , __func__ ,
1021
1019
inode , ceph_vinop (inode ), mds ,
1022
1020
cap == ci -> i_auth_cap ? "auth " : "" , cap );
1023
1021
spin_unlock (& ci -> i_ceph_lock );
@@ -1032,7 +1030,7 @@ static int __choose_mds(struct ceph_mds_client *mdsc,
1032
1030
* random = true;
1033
1031
1034
1032
mds = ceph_mdsmap_get_random_mds (mdsc -> mdsmap );
1035
- dout ("choose_mds chose random mds%d\n" , mds );
1033
+ dout ("%s chose random mds%d\n" , __func__ , mds );
1036
1034
return mds ;
1037
1035
}
1038
1036
0 commit comments